Vishal V 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.
Note, I didn't write the code. But I'm currently writing a C++17
skeleton, and if there's a bug, I could fix it in that version.
BTW, the link doesn't explicitly mention separate files, it could
refer to sub-functions in the same file.
Anyway, do you use the "--defines" option or "%defines" setting to
generate a header that you include in your other source files? If
so, AFAICS, the inline constructor is generated in the same header,
so it should be available in your other source file, too.
If you don't generate a header, you don't even get the declaration
of syntax_error (or the parser class).
Am I missing something?