Linked by Amjith Ramanujam on Fri 21st Nov 2008 03:38 UTC
General Development The Linux kernel uses several special capabilities of the GNU Compiler Collection (GCC) suite. These capabilities range from giving you shortcuts and simplifications to providing the compiler with hints for optimization. Discover some of these special GCC features and learn how to use them in the Linux kernel.
Thread beginning with comment 337982
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Comment by Yamin
by drahca on Fri 21st Nov 2008 13:34 UTC in reply to "RE: Comment by Yamin"
drahca
Member since:
2006-02-23

Could you please explain further. For me the line (void) (&_min1 == &_min2); is still somewhat inexplicable, since it does not seem to do anything other than compare the two pointers of the temporary variables (which are always distinct) and cast the result to void. So it seems to me as an addendum to the macro (they must have first written it without this line) to keep GCC from generating warnings. Why GCC refrains from the warning after this line is not completely clear to me.

Reply Parent Bookmark Score: 1

RE[3]: Comment by Yamin
by theosib on Fri 21st Nov 2008 13:45 in reply to "RE[2]: Comment by Yamin"
theosib Member since:
2006-03-02

Maybe it's in there in order to generate a warning.

Reply Parent Bookmark Score: 2

RE[4]: Comment by Yamin
by drahca on Fri 21st Nov 2008 13:54 in reply to "RE[3]: Comment by Yamin"
drahca Member since:
2006-02-23

Ah. That would make more sense. ;) Thank you.

Reply Parent Bookmark Score: 1