On Mon, Sep 24, 2012 at 11:49 AM, Dmitri Gribenko <[email protected]>wrote:

> On Mon, Sep 24, 2012 at 9:08 PM, Richard Smith <[email protected]>
> wrote:
> > On Mon, Sep 24, 2012 at 10:03 AM, Dmitri Gribenko <[email protected]>
> > wrote:
> >>
> >> On Mon, Sep 24, 2012 at 7:59 PM, Ronan Keryell <
> [email protected]>
> >> wrote:
> >> >>>>>> On Mon, 24 Sep 2012 18:53:07 +0300, Dmitri Gribenko
> >> >>>>>> <[email protected]> said:
> >> >
> >> >     Dmitri> The rationale for my change is that if one has some C++
> code
> >> >     Dmitri> that is being compiled in C++98 mode, offering C99 isn't
> of
> >> >     Dmitri> much help, since most C++ features are not C99-compatible.
> >> >
> >> > Yes, I understand.
> >> >
> >> > I was just thinking also to the poor lost guys that use the C++
> compiler
> >> > to compile their C code... :-)
> >> >
> >> > That sounds crazy but this happens.
> >>
> >> This is an interesting viewpoint, but it should be applied
> >> consistently to all our diagnostics.  I don't think that we aim to
> >> educate the programmer with diagnostics.
> >>
> >> Although we have to admit that there are programmers who learn
> >> language features by playing with their implementation in a particular
> >> compiler.
> >
> >
> > This patch matches our current approach for features which are
> extensions in
> > both C99 and C++11, and I don't see a compelling reason to change that
> > approach. LGTM, though it saddens me that we have so many different
> places
> > issuing the same trio of diagnostics.
>
> I'm terribly sorry for breakage, but this makes us warn on long long
> while self-hosting because we pass -pedantic -Wno-long-long, but
> "'long long' is a C++11 extension" is in CXX11 group, not in LongLong
> group.
>
> How to handle this?  Should I back out?


The best way to fix this is to add this warning to both the LongLong group
and the CXX11 group:

def CXX11LongLong : DiagGroup<"c++11-long-long">;
def LongLong : DiagGroup<"long-long", [CXX11LongLong]>;
def CXX11 : DiagGroup<"c++11-extensions", [CXX11ExtraSemi, CXX11LongLong]>;

Please back out the other patch if you can't get this fix in reasonably
soon.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to