This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should we fix warnings from GCC 2.xx?


Eli Zaretskii <eliz@is.elta.co.il> writes:

|> On Wed, 11 Sep 2002, Joel Brobecker wrote:
|> 
|> > > tracepoint.c: In function `trace_find_tracepoint_command':
|> > > tracepoint.c:2077: warning: suggest explicit braces to avoid ambiguous `else'
|> > 
|> > This warning appears with a GCC 2.8.1-based compiler, but does not
|> > with GCC 3.0.4. Hence my question, do we want to fix these warnings
|> > anyway?

GCC 2.8 warns in one case where GCC 2.95+ does not:

    if (foo)
      if (bar)
        ;
      else
        ;
    else
      ;

|> FWIW, I'm still using GCC 2.7.2.1 on one of my machines.

GCC 2.7 does not have this warning in the first place.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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