[wplug] Linux vs OS X version of GCC

wplug at perigee.shadysidesupercomputingcenter.com wplug at perigee.shadysidesupercomputingcenter.com
Thu Apr 20 10:21:25 EDT 2006


O'Connor, Michael P wrote:
> Here is something that should help.  Never rely on order of operations 
> I would write that line as 

They're called side effects, avoid them at all costs

http://www.google.com/search?hl=en&lr=&q=c+sequence+points&btnG=Search

And there is no way you should even attempt to write that code, the
logic behind it is so incredibly broken it's not funny.
Seriously did anyone even read it?

> int stringLgn = strlen(args[arg_count]);

_requires_ that args[arg_count] be null terminated.

> args[arg_count][strinLgn] = 0;

for the previous statement to work (strlen()), this must already hold
true.. 

The code was 100% redundant and all it did was introduce bugs.




More information about the wplug mailing list