[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison 3.1 api.value.type {semantic_type} error in gcc8
From: |
Hans Åberg |
Subject: |
Re: Bison 3.1 api.value.type {semantic_type} error in gcc8 |
Date: |
Tue, 16 Oct 2018 12:38:11 +0200 |
> On 16 Oct 2018, at 12:10, Akim Demaille <address@hidden> wrote:
>
> Hi Hans,
Hello,
>> Le 16 oct. 2018 à 11:20, Hans Åberg <address@hidden> 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.