> On 16 Oct 2018, at 12:10, Akim Demaille <a...@lrde.epita.fr> wrote:
> 
> Hi Hans,

Hello,

>> Le 16 oct. 2018 à 11:20, Hans Åberg <haber...@telia.com> a écrit :
>> 
>> In Bison 3.1,
>> %define api.value.type {semantic_type}
>> produces an error in gcc8, though accepted in clang6, by the parser header 
>> typedef
>> #ifndef YYSTYPE
>>   /// Symbol semantic values.
>>   typedef semantic_type semantic_type;
>> #else
>>   typedef YYSTYPE semantic_type;
>> #endif
> 
> Please, be more specific.  Provide an input file, and the complete error from 
> the compiler.

I just happened to discover it, so I do not know much about it yet. It may have 
to do with -std=c++17 on g++ 8.2.0, and I have a class semantic_type.

A workaround is to make the typedef'ed name qualified:
  typedef <namespace>::semantic_type semantic_type;

So if I change to
  %define api.value.type {<namespace>::semantic_type}
then it passes.



Reply via email to