[C++ PATCH] Fix 21280

DJ Delorie dj@redhat.com
Mon Jun 6 18:55:00 GMT 2005


> DJ Delorie wrote:
> >>!     warning (0, "%Hsynthesized method %qD first required here ",
> >>  	     &input_location, fndecl);
> > 
> > 
> > Could you put something other than 0 there?  I'm working on converting
> > all those zeros to OPT_* constants...
> 
> Um, what do you suggest?

Whichever OPT_* controls whether this warning is emitted or not.  If
this warning is unconditional, then consider adding a new -W to
control it.

> We're issuing this warning because we've just emitted an error or
> warning that occurred during synthesizing something.  For the error
> case, I think we should unconditionally provide this additional
> location information.  For the warning case (which I'm not sure can
> actually occur), the user obviously requested the initial warning,
> why should we not provide additional location information?

That's not what that parameter is for.  That parameter tells the
diagnostic machinery which command line option triggers and/or
controls that warning, so that (1) the user can disable it (either via
the command line or later via pragmas), and (2) the user can be told
which command line option enables that warning.



More information about the Gcc-patches mailing list