[Top][All Lists]

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

Re: Clang compile error

From: Akim Demaille
Subject: Re: Clang compile error
Date: Sat, 17 Nov 2018 16:15:50 +0100

Hi Laurence,

> Le 17 nov. 2018 à 02:30, Lawrence Murray <address@hidden> a écrit :
> Just wanted to report a minor issue that I encountered yesterday after 
> upgrading to Bison 3.2.1 and Xcode 10.1 on macOS, for which the corresponding 
> compiler is "Apple LLVM version 10.0.0 (clang-1000.11.45.5)".
> I get the following error when compiling C++ code generated from bison:
> parser.cpp:1395:8: error: an attribute list cannot appear here
> static _Noreturn void
>       ^~~~~~~~~
> parser.cpp:231:21: note: expanded from macro '_Noreturn'
> #  define _Noreturn [[noreturn]]
>                    ^~~~~~~~~~~~
> I believe the standard syntax is that the attribute should appear before the 
> "static" keyword, so "_Noreturn static void" instead of "static _Noreturn 
> void", although other compilers are more forgiving.
> A quick fix in the meantime is to add « -D_Noreturn=" to the C++ compiler 
> flags, as the attribute is not essential.

Sorry, I discovered this recently too, see 
https://lists.gnu.org/archive/html/bison-patches/2018-11/msg00042.html.  I 
don’t know whether that means I should release a 3.2.2.  WDYT?

Does that mean that you are a user of glr.cc?  I don’t much feedback about it, 
unfortunately.  Also, I’m looking for the opinion about a proposal for GLR 
parsers: see

https://lists.gnu.org/archive/html/bison-patches/2013-02/msg00105.html and
https://lists.gnu.org/archive/html/bison-patches/2018-11/msg00008.html and 


reply via email to

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