Re: Bison 3.6 requires runtime type information?

Adrian <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <CAL_yH3jcoA6htW0J7NnJ2eLnCQYsALcNqA_9A1Rf2qNY37ThUw@mail.gmail.com>
Hi,

Thanks for the quick reply.
My apologies for the lack of info in my original email;
I assumed it was intended behaviour.
The exact error message I'm getting is:

In constructor 'Parser::semantic_type::semantic_type(T&&)’:
error: cannot use typeid with -fno-rtti

When I open the generated parser.hpp file,
it clearly contains a typeid call in what seems to be bison code.

I'm not sure what skeleton I'm using (I actually want to ask about that too);
I'm just specifying %language "c++".
What's the difference between using that declaration and using the
skeleton declaration?
Should I be doing both (but everything seemed to work fine with C++
and bison 3.4.2 without the skeleton declaration)?

I'm not sure exactly what command I'm running as I'm using the cmake module.
But I would guess the only flags it passes are for setting the output files.

When I grep the bison 3.6.4 source for "typeid", I find references
inside data/skeletons/variant.hh.
Indeed, I am using variants along with api.token.constructor.
However, strangely when I grep the 3.4.2 source, I also find
references to typeid (in that same file),
so I'm not sure why I'm only getting a compilation error now.

Hopefully this provides more useful information.
Please let me know if I can provide anything else.

Kind regards,
Adrian


On Sat, Jun 27, 2020 at 1:43 AM Akim Demaille <[email protected]> wrote:
>
> Hi Adrian,
>
> > Le 27 juin 2020 à 01:05, Adrian <[email protected]> a écrit :
> >
> > I upgraded from bison 3.4 to 3.6 and am now getting the following error:
> >
> > error: cannot use typeid with -fno-rtti
> >
> > Is there a way to disable the requirement on runtime type information?
>
> Well, that's a rather short bug report.
>
> Where did you get this message from?  What command were you running?
> What skeleton are you using?
>
> Anyway, it's unlikely related to Bison.
>
> $ grep rtti -r bison-3.6.4
> bison-3.6.4/build-aux/texinfo.tex:\parseargdef\shorttitlepage{%
> bison-3.6.4/ChangeLog-2012:     * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
> bison-3.6.4/po/fi.po:"      --report-file=TIEDOSTO kirjoita raportti TIEDOSTOon\n"
> bison-3.6.4/po/fi.po:"  -x, --xml[=TIEDOSTO]       tulosta myös automaatin XML-raportti\n"
> bison-3.6.4/doc/bison.texi:@c LocalWords: ifinfo smallbook shorttitlepage titlepage GPL FIXME iftex FSF's
> bison-3.6.4/gnulib-po/fi.po:#~ msgstr "portti"
>
>
> Cheers!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.