
GCC hacks in the Linux kernel - soundsop
http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/index.html
======
davidw
This is the sort of thing I'd love to see more of, rather than yet another
article on the car companies.

~~~
kiter007
Submit good links. Vote judiciously. Don't pollute threads by whining.

~~~
jrockway
For someone that has only had an account for an hour (!), you sure have a lot
of thoughts on how the site works.

Consider this -- voting makes the articles about car companies have 84 upvotes
instead of 85. Making a comment (or "whining", as you call it) can influence
others to not vote-up the articles about car companies, and it can encourage
others to submit better articles. So there is good reason to "whine" instead
of silently not clicking the upvote button.

~~~
GHFigs
Please do not attempt to justify obnoxious and off-topic comments. The
hypothetical positive effect of influencing other submitters who may or may
not even be reading the story you post them to does not outweigh the very real
negative effect of degrading discussion.

Might I suggest as an alternative that if you wish to whine/encourage others
to submit better articles, you can simply "Leave url blank to submit a
question for discussion." In that way, you can _create_ a more suitable venue
for airing your grievances, rather than shitting up every other thread with
either complaints about the that article or in this case, complaints about a
whole class of other articles.

That the highest-voted comment on this article is completely off-topic isn't
and indicator of efficacy at encouraging better submissions as much as it is
an indicator that the quality of the discussion is dreadful. And that,
frankly, is a more dire concern for the vitality of a site than whether any
given reader (even one with vague claims to seniority) has to ignore a few
submissions that others have chosen not to ignore.

------
cabalamat
Can someone explain this code please:

    
    
      #define min(x, y) ({				\
      	typeof(x) _min1 = (x);			\
      	typeof(y) _min2 = (y);			\
      	(void) (&_min1 == &_min2);		\
      	_min1 < _min2 ? _min1 : _min2; })
    

What does the 4th line do?

~~~
blasdel
The real oddity of this macro is the parentheses around the block, which cause
it to behave much like an inline function (but without having to wrestle the
type system).

~~~
yan
It's also cleaner than the do { ... } while(0) business, imho.

~~~
tspiteri
do { ... } while(0) is Ansi C and has type void.

({ ... }) is a GCC extension and its value is the value of the last expression
inside the block.

So they have different uses.

------
streblo
I don't understand how half of this stuff works, but it's always awesome to
see the guts of a complex system. The first time I looked at linux source code
was comparable to the first time I looked under the hood of a car - I had only
the slightest idea as to what might have been going on, but my curiosity was
peaked and it made me want to learn more.

