This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Tentative patch to catch a[n]=b[n++]...
- To: law at cygnus dot com
- Subject: Re: Tentative patch to catch a[n]=b[n++]...
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Tue, 31 Mar 98 9:41:16 PST
- Cc: kaz at cafe dot net, wilson at cygnus dot com, michael at imaginator dot com, egcs at cygnus dot com
>> > 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!