emacs-devel
[Top][All Lists]
Advanced

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

Re: Preview: portable dumper


From: Alan Third
Subject: Re: Preview: portable dumper
Date: Sat, 17 Feb 2018 12:09:10 +0000
User-agent: Mutt/1.9.3 (2018-01-21)

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



reply via email to

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