This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Tentative patch to catch a[n]=b[n++]...


>> > 	I have written a patch for gcc-2.8.1 / egcs-1.0.2 that flags
>> > 	warnings on the more simple cases of modifying a variable between 
>> >     sequence points.

>> Interesting, but probably not useful. Only boneheaded programmers write the
>> simple cases; and the not-so-simple cases are difficult to detect.
>> I would find it a waste of compile time for my own code, and annoying
>> if it warns on correct code.

> It doesn't have to be on by default.  And I would find it useful.

If the warning does not produce false positives (or only does in rare
cases), it may still be an advantage because it will decrease the number
of bug reports received.  So you might want to turn it on by default, as
it would be likely to save Cygnus money, as your support customers will
fix their own boneheaded problems!




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]