rentzsch.com: Tales from the Red ShedTechnical Journal of Jonathan 'Wolf' RentzschAwesome GCC Literal Suffix Bug- September 11, 2007 The setup:$ cat bug.cinclude <stdio.h>static float f(float x) printf("f() calledn"); return x + 1;int main (int argc, const char argv) if TYPO float y = f(42f);else float y = f(42.f);endif printf("y: %fn", y); return 0;Let&8217;s build+run it normally:$ gcc -o bug bug.c && .bugf() calledy: 43.000000OK, let&8217;s insert the typo:$ gcc -DTYPO=1 -o bug bug.c && .bugbug.c:10:14: error: invalid suffix "f" on integer constantOK, still in the land of the sane. Now let&8217;s add a couple.http://rentzsch.com/bugs/awesomeGccLiteralSuffixBug PSIG 107: Thurs, September 6th, 2007- September 4, 2007 When: Thursday, September 6th, 2007 7pm Where: Inverness Room (downstairs rear) of the Holiday Inn Rolling Meadows Schedule: Show & Tell We'll start out the meeting by going around the table and talking about what we're currently working on or learning about. Handouts are welcome, or bring along your PowerBook and we'll hook it up to the projector. Book Reports Bring along the book you're currently reading, or one of your old favorites. Hopefully the book would have some relevance to...http://rentzsch.com/psig/107 |