News for hackers. Stuff that matters.
Re:Notes on Programming in C (1989) by stormbrew on Sunday May 11, 2014 @07:16AM (#7728399)
It's pretty unlikely that list.h would have a trivial include guard, so I don't see how the above optimization would break it. An include guard in list.h would prevent you from using it properly with or without the optimization.
Re:Notes on Programming in C (1989) by pjmlp on Sunday May 11, 2014 @11:02AM (#7728834)
Not when you #undef it. That was just a possible example.
Re:Notes on Programming in C (1989) by dllthomas on Sunday May 11, 2014 @12:04PM (#7728988)
If list.h has no include guard, it gets included with or without this optimization. If it has an include guard and you #undef it, then it gets included again with or without this optimization. If you it has an include guard and you do not #undef it, it does not get included again, with or without this optimization.

In no case does this optimization change the code emitted.