https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #11 from Andreas Schwab ---
2147483648 does not fit in 32 bits.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #10 from s.baur...@tu-berlin.de ---
(In reply to Jonathan Wakely from comment #9)
> (In reply to s.bauroth from comment #7)
> > > The type of an integer constant is the first of the corresponding list
> > > in which its value can be re
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #9 from Jonathan Wakely ---
(In reply to s.bauroth from comment #7)
> > The type of an integer constant is the first of the corresponding list
> > in which its value can be represented.
> These kind of sentences make me think gcc's be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #8 from Jakub Jelinek ---
If you design your own programming language, you can define it whatever way you
want, but for C and C++ it is well defined how the compiler must behave in
these cases, that -2147483648 are two separate tokens
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #7 from s.baur...@tu-berlin.de ---
I do understand that +2147483648 is not an int. I am aware of how the 2s
complement works. It seems to me the reason for INT_MIN being '(-2147483647 -
1)' instead of the mathematically equivalent '-21
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #6 from Jonathan Wakely ---
The C standard says "The type of an integer constant is the first of the
corresponding list in which its value can be represented." The corresponding
list for decimal constants with no suffix is int, long i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #4 from s.baur...@tu-berlin.de ---
I am aware of the warning, I disagree with it's content. INT_MIN is an int, not
a long long int. I understand why it is processed as a long long int
internally, but that should not be visible from the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
Martin Sebor changed:
What|Removed |Added
CC||msebor at gcc dot gnu.org
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97884
--- Comment #1 from s.baur...@tu-berlin.de ---
Created attachment 49584
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49584&action=edit
preprocessed source
11 matches
Mail list logo