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

[lex.icon]p4 Note condition for ill-formedness off-by 1 bit/u-suffix #6333

Closed
JohelEGP opened this issue Jun 21, 2023 · 2 comments
Closed

[lex.icon]p4 Note condition for ill-formedness off-by 1 bit/u-suffix #6333

JohelEGP opened this issue Jun 21, 2023 · 2 comments

Comments

@JohelEGP
Copy link
Contributor

0b58fbd adds

[ Note: An integer-literal with a z or Z suffix is ill-formed if it cannot be represented by std::size_t. -- end note ]

But according to Table 8,
that's only true for suffix uz (or equivalent),
or if the integer-literal cannot be represented by the signed integer type corresponding to std::size_t.

@jensmaurer
Copy link
Member

The note is correct as written. If an integer-literal cannot be represented by std::size_t, that implies that it cannot be represented by the signed type corresponding to std::size_t, either.

Note that integer-literals are always non-negative.

@JohelEGP
Copy link
Contributor Author

I've been enlightened. Thank you.

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

2 participants