Re: glr2.cc compile errors under Windows

Akim Demaille <[email protected]> Sat, 20 Nov 2021 09:08:34 +0100
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hi Jot,

> Le 15 nov. 2021 à 06:13, Jot Dot <[email protected]> a écrit :
> 
> I installed the 64 bit version of cygwin and installed flex/bison thru their
> setup interface. The flex/bison versions are:
> 
> flex 2.6.4
> bison (GNU Bison) 3.8.2

Great!

> I then compile the generated code but I get multiple errors compiling both files.
> 
> 1>parser.cpp
> 1>D:\data\c\gen\runtime\parser.h(480,1): error C2535: 'gen::Parser::basic_symbol<Base> &gen::Parser::basic_symbol<Base>::operator =(const gen::Parser::basic_symbol<Base> &)': member function already defined or declared
> 1>D:\data\c\gen\runtime\parser.h(435): message : see declaration of 'gen::Parser::basic_symbol<Base>::operator ='
> 1>D:\data\c\gen\runtime\parser.h(482): message : see reference to class template instantiation 'gen::Parser::basic_symbol<Base>' being compiled

Could you please attach that parser.h file?  Or a link to it?  Or at least the relevant excerpts, so that we can have a look at what confuses it.

Did you make sure it compiled in C++11?  Actually I would even make sure to be in C++14 mode.

Cheers!