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++]...


  In message <01BD58BB.84FD66D0.kaz@cafe.net>you write:
  > On Wednesday, March 25, 1998 1:04 PM, Jim Wilson [SMTP:wilson@cygnus.com] 
  > wrote:
  > > 	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 seque
  > nce
  > > 	points.
  > >
  > > It would be interesting to have such a warning option in gcc.
  > 
  > 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.

It's not uncommon for me to take suspicious bug reports and run
them through a "warn about everything" compile to see if any source
issues need to be looked at *before* spending the time analyzing
the generated code to look for a potential bug.

It's worth noting that several warning options will give false
positive warnings.  The question at had is how often do we get
false positives :-)

jeff


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