What every C Programmer should know about undefined behavior #2/3
What every C Programmer should know about undefined behavior #2/3
Posted May 16, 2011 21:35 UTC (Mon) by cmccabe (guest, #60281)In reply to: What every C Programmer should know about undefined behavior #2/3 by gowen
Parent article: What every C Programmer should know about undefined behavior #2/3
Ok, I know I'm replying to a blatant troll, but let me just point out that:
1. Initializing something before checking if it's NULL has nothing to do with whether you decide to put declarations at the start.
2. C99 doesn't have a "declarations go at the start of the block rule."
That being said, a lot of people consider it good style in C to put the declarations at the start of the block in C, because it encourages you to keep functions short and sweet.
