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.

Cheers,

Lawrence



Reply via email to