emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preview: portable dumper


From: Charles A. Roelli
Subject: Re: Preview: portable dumper
Date: Sat, 17 Feb 2018 15:12:23 +0100

> From: Alan Third <address@hidden>
> 
> On Sat, Feb 17, 2018 at 12:53:48PM +0100, Charles A. Roelli wrote:
> > On Apple's version of FSF GCC, I saw these kinds of errors:
> > 
> >   CC       pdumper.o
> > pdumper.c:63: warning: unknown option after ‘#pragma GCC diagnostic’ kind
> > pdumper.c: In function ‘dump_reloc_set_offset’:
> > pdumper.c:289: error: #pragma GCC diagnostic not allowed inside functions
> > pdumper.c:289: error: #pragma GCC diagnostic not allowed inside functions
> > pdumper.c:291: error: #pragma GCC diagnostic not allowed inside functions
> > 
> > They're fixed locally with this patch:
> > 
> > diff --git a/src/pdumper.c b/src/pdumper.c
> > index a05b2c4..844ec25 100644
> > --- a/src/pdumper.c
> > +++ b/src/pdumper.c
> > @@ -54,7 +54,10 @@
> >  
> >  #ifdef HAVE_PDUMPER
> >  
> > -#ifdef __GNUC__
> > +#if defined(__GNUC__) && !defined(__APPLE__) /* Apple's old GCC (based
> > +                                                on FSF's GCC) does not
> > +                                                support pragmas in
> > +                                                functions.  */
> >  # pragma GCC diagnostic error "-Wconversion"
> >  # pragma GCC diagnostic error "-Wshadow"
> >  # define ALLOW_IMPLICIT_CONVERSION                       \
> 
> I’m pretty sure this will disable these pragmas for more recent clang
> versions on macOS, and probably any newer version of GCC people have
> compiled themselves..
> -- 
> Alan Third

Whoops, my bad.  If there's a feature test for pragmas, that would of
course be better.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]