[Top][All Lists]

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

Re: syntax_error constructor is declared inline

From: Hans Åberg
Subject: Re: syntax_error constructor is declared inline
Date: Tue, 13 Mar 2018 21:31:06 +0100

> On 12 Mar 2018, at 20:08, Vishal V <address@hidden> wrote:
> Bison 3.0.4 marks the constructor for the syntax_error class as 'inline'
> when generating a C++ scanner, which results in undefined references when
> the exception is thrown from a separate scanner file. Since this is the
> stated purpose of the syntax_error class (see
> http://lists.gnu.org/archive/html/help-bison/2013-07/msg00010.html), this
> appears to be a bug.

As a workaround, you might try removing the inline specifier by adding to the 
.yy grammar file:
%code {
  #define inline

> This was mentioned in another unrelated bug report as well:
> http://lists.gnu.org/archive/html/bug-bison/2016-03/msg00002.html

It worked in GCC7.

reply via email to

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