On Sat, Jan 30, 2016 at 06:57:48AM +0100, David Malcolm wrote:
> On Fri, 2016-01-29 at 20:50 +0100, Jakub Jelinek wrote:
> > Hi!
> > 
> > This patch reverts one tiny change from r228049 changes (which hasn't
> > been
> > mentioned in the ChangeLog or patch description).  We definitely need
> > to
> > revisit this for GCC 7, but stage4 is probably not the right time for
> > that,
> > and the patch fixes e.g. tons of warnings (or with -Werror errors on
> > including pretty much all glib2 headers).
> > 
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> > 
> > 2016-01-29  Jakub Jelinek  <ja...@redhat.com>
> > 
> >     PR preprocessor/69543
> >     PR c/69558
> >     * c-pragma.c (handle_pragma_diagnostic): Pass input_location
> >     instead of loc to control_warning_option.
> > 
> >     * gcc.dg/pr69543.c: New test.
> >     * gcc.dg/pr69558.c: New test.
> 
> This touches c-family; shouldn't the new tests be in c-c++-common,
> rather than gcc.dg? (presumably we need to ensure that the glib2
> headers are sane from C++ also)

Ideally yes.  But they don't really work.
pr69558.c in C++ (i.e. glib2) doesn't look to be a regression, at least
those pragmas are supported in 4.6+ (and used in glib2 only for 4.6+) and
4.6 (don't have 4.7 around), 4.8, 4.9 and 5.3 all print two! warnings
about deprecated foo, and so does trunk g++, unpatched and patched.
So we actually have two bugs there, one is that we emit two warnings
instead of one (one is from mark_used called from somewhere, another
build_over_call), and another that we don't suppress the warning in C++,
but neither of them is a regression.
pr69543.c also fails in C++, and that is a regression.

> I've been attempting to fix these by fixing linemap_compare_locations,
> but I don't have that approach working, so fwiw I don't object to this
> patch.

        Jakub

Reply via email to