This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] Fix bootstrap issues with C++


On Tue, 1 Jun 2010, Michael Matz wrote:

> Hi,
> 
> On Tue, 1 Jun 2010, Richard Guenther wrote:
> 
> > Bootstrapped on x86_64-unknown-linux-gnu with C++ and C, applied
> > as obvious.
> 
> Uhm, and we have decided already to clutter our sources with 
> ugly workarounds like this ...
> 
> > + #if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
> >     static bool reinit;
> > + #endif

Well - it's pre-existing, this just completes it to avoid
unused or set-but-not-used warnings.

> ... or this ...
> 
> > Index: opts.c
> > ===================================================================
> >   
> >       case OPT_pedantic_errors:
> > !       global_dc->pedantic_errors = flag_pedantic_errors = pedantic = 1;
> > --- 2182,2189 ----
> > !       flag_pedantic_errors = pedantic = 1;
> > !       global_dc->pedantic_errors = 1;
> 
> ?  Somehow I must have missed this decision.

The above is the bool vs. int issue.  flag_pedantic_errors = pedantic = 1
is treated as truth-value and thus we emit a warnign that suggests
parantheses.

I don't see these as "ugly workarounds" at all.

Richard.


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