Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: [bisected] 3c8ba0d61d04ced9f8d9ff93977995a9e4e96e91 oopses on s390

$
0
0
Linus Torvalds writes: (Summary) Having to pass it off to a second macro to use as a variable name makes it cumbersome to use for most normal macro cases.
normal macro cases.
It would be nice to have the equivalent of __COUNTER__ that just expanded not to a continually increasing number, but expanded to a number that expands for each macro expansion.
number that expands for each macro expansion.
Then you could do things like
Then you could do things like
int UNIQUE(a) = (a);
int UNIQUE(a) = (a);
to generate a variable name that was unique within a particular macro expansion, and then actually _use_ UNIQUE(a) in the same macro expansion to refer to it without having to pass it off as a name to another macro that does the declaration and use.
another macro that does the declaration and use.
You can't use __UNIQUE_ID() for that, because every new __UNIQUE_ID(a) will give _another_ unique ID.
will give _another_ unique ID.
(And you *could* use the __LINE__ based one for that, b

Viewing all articles
Browse latest Browse all 1267

Trending Articles