chiark / gitweb /
shared: drop UNIQUE()
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 22 Aug 2014 12:38:28 +0000 (14:38 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 27 Aug 2014 16:42:28 +0000 (18:42 +0200)
commit418bcb0ce3b704ea26ee1b4a68706abca536f65a
tree00154171b6360d608b024f1f393c5bd66b3d9c72
parent285e8c126b1607188249c42e74c172cb69cc99a6
shared: drop UNIQUE()

The UNIQUE() macro works fine if used in un-stacked macros. However, once
you stack them like:
        MAX(MIN(a, b),
            CLAMP(MAX(c, d), e, f))
you will get warnings due to shadowing other variables. gcc uses the last
line of a macro expansion as value for __LINE__, therefore, we cannot even
avoid this by splitting the expressions across lines.

Remove the only user of UNIQUE() so we introduce a new helper in
follow-ups.
src/shared/macro.h