This is the mail archive of the 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: [C++ PATCH] Fix 21280

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

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