Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YYPTRDIFF_T not 64bit compatible? #95

Open
danielmarschall opened this issue Jun 2, 2024 · 0 comments
Open

YYPTRDIFF_T not 64bit compatible? #95

danielmarschall opened this issue Jun 2, 2024 · 0 comments

Comments

@danielmarschall
Copy link

danielmarschall commented Jun 2, 2024

When I compile my app with Win64, I receive the following compiler warning

1>/y.tab.c(1366,41): warning C4244: "Initialisierung": Converting from "__int64" to "long", possible data loss

The line:

      /* Get the current used size of the three stacks, in elements.  */
      YYPTRDIFF_T yysize = yyssp - yyss + 1;

The definition:

#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX

I wonder, shouldn't the definition be changed to this?

#ifdef _WIN64
#  define YYPTRDIFF_T long long
#  define YYPTRDIFF_MAXIMUM LLONG_MAX
#else
#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX
#endif
danielmarschall added a commit to danielmarschall/winflexbison that referenced this issue Aug 13, 2024
danielmarschall added a commit to danielmarschall/winflexbison that referenced this issue Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant