public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compiler warning about literal
@ 2014-11-17 16:22 Luchezar Belev
  2014-11-17 16:45 ` Luchezar Belev
  2014-11-17 16:46 ` Jonathan Wakely
  0 siblings, 2 replies; 6+ messages in thread
From: Luchezar Belev @ 2014-11-17 16:22 UTC (permalink / raw)
  To: gcc-help

hi,

when i try to compile this c code:
long long t = 2684354560;
gcc (version 4.8.2) says: " ...warning: this decimal constant is
unsigned only in ISO C90 [enabled by default]"

i added the option -std=C90 but i still get the same warning.
Is there a way one can get rid of this warning (other than adding the
"u" suffix to the literal, which i can't do for complicated reasons
that are beyond this question)

I wonder why does gcc give such warning at all given that in either
standard the literal decimal number  "2684354560" is valid:
 a) in ISO C90 it will be interpreted as unsigned long and
 b) in ISO C99 it will be interpreted as signed long long

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-17 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 16:22 compiler warning about literal Luchezar Belev
2014-11-17 16:45 ` Luchezar Belev
2014-11-17 16:50   ` Nicholas Mc Guire
     [not found]     ` <CAJtzQrzHnh_=_UZ=-y=HZEBVQYgWFzGVzvUTLG6U_HVtxObfhQ@mail.gmail.com>
     [not found]       ` <20141117170828.GA27808@opentech.at>
     [not found]         ` <20141117171418.GA30462@opentech.at>
2014-11-17 17:28           ` Luchezar Belev
2014-11-17 17:34             ` Luchezar Belev
2014-11-17 16:46 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).