MSVC generates errors with rules embedding 64-bit integer attribute

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MSVC generates errors with rules embedding 64-bit integer attribute

gillesb68
This post was updated on .
The following source code encloses a trio of lexer, parser and generator: lex_qi_karma.cpp.

This source code compiles gracefully from Visual Studio 2015. However, reversing the comments of lines #27 and #28 produces the following build errors: build_errors.txt.

I don’t understand what I am doing wrong with 64-bit signed integers that works with 32-bit ones. Do someone would like to enlighten me?
Gilles
Reply | Threaded
Open this post in threaded view
|

Re: MSVC generates errors with rules embedding 64-bit integer attribute

gillesb68
Please, take the new source code version from the following link: lex_qi_karma.cpp.

I changed three things:

First, I added some lines on top of the “main” function, to proof that MSVC differentiates “long” and “long long” types.

Second, I attempted the same tests with type definitions from “cstdint”. Identical results with “std::int64_t” and “long long”.

Lastly, I modified the three components to process integers before reals, so that the generator avoids converting “var2 = 455” to “var2 = 455.0”.
Gilles