Re: syntax_error constructor is declared inline

2018-03-14 Thread Hans Åberg
> On 14 Mar 2018, at 23:04, Frank Heckenbach wrote: > >> It could be deliberate to avoid them being exported. But C++ now >> has namespaces, which cann be used to avoid name conflicts. > > It's all in a namespace anyway (yy by default) and we're only > talking about a

Re: syntax_error constructor is declared inline

2018-03-14 Thread Frank Heckenbach
Hans Åberg wrote: > It could be deliberate to avoid them being exported. But C++ now > has namespaces, which cann be used to avoid name conflicts. It's all in a namespace anyway (yy by default) and we're only talking about a constructor, so no name conflicts. I think it was a simple mistake.

Re: syntax_error constructor is declared inline

2018-03-14 Thread Hans Åberg
> On 14 Mar 2018, at 19:22, Kaz Kylheku wrote: > > Here is a rule from a production Makefile to remove // comments in Lex code > that prevent it from being C90 Flex is a separate project: https://github.com/westes/flex

Re: syntax_error constructor is declared inline

2018-03-14 Thread Vishal V
Thank you for the workaround suggestions. I ended up using a sed rule to specifically remove the offending keyword: sed -i '/inline/{ N; s/inline\s*\n\s*parser::syntax_error::syntax_error/parser::syntax_error::syntax_error/ }' parser.cpp By keeping it specific, I hope the rule will simply have

Re: syntax_error constructor is declared inline

2018-03-14 Thread Kaz Kylheku
On 2018-03-13 13:31, Hans Åberg wrote: On 12 Mar 2018, at 20:08, 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

Re: syntax_error constructor is declared inline

2018-03-14 Thread Hans Åberg
> On 14 Mar 2018, at 15:46, Frank Heckenbach wrote: > > Hans Åberg wrote: > >> It is sort of strange in C++ to not have a header, and having >> inlines not in those. > > Sure, I think it was just a mistake. Bison puts inlines for some > classes it uses internally

Re: syntax_error constructor is declared inline

2018-03-14 Thread Frank Heckenbach
Hans Åberg wrote: > It is sort of strange in C++ to not have a header, and having > inlines not in those. Sure, I think it was just a mistake. Bison puts inlines for some classes it uses internally (by_state, stack_symbol_type) in the C++ file, that's OK (though they don't really need the

Re: syntax_error constructor is declared inline

2018-03-14 Thread Hans Åberg
> On 14 Mar 2018, at 04:03, Frank Heckenbach wrote: > > Hans Åberg wrote: > >>> On 13 Mar 2018, at 23:23, Frank Heckenbach wrote: >>> Bison 3.0.4 marks the constructor for the syntax_error class as 'inline' when generating a C++