Skip to content

YYPTRDIFF_T not 64bit compatible? #95

Description

@danielmarschall

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions