Skip to content

[Bug] Java.flex example file can't handle most negative int litera [sf#95] #97

Description

@lsf37

Reported by mcspanky on 2008-07-04 03:26 UTC
The examples/java/java.flex scanner can't handle the integer literal -2147483648, because it treats this as two tokens (a unary minus followed by a positive integer literal), and the second token is not a valid integer literal, it's too big to fit into an int.

This is the same representation problem that causes Math.abs(int) to return negative values when called with Integer.MIN_VALUE.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions