Skip to content

YYPTRDIFF_T not 64bit compatible? #95

@danielmarschall

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions