public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Erik <sigra@home.se>
To: gcc-help@gcc.gnu.org
Subject: Re: unsigned
Date: Mon, 04 Dec 2006 22:04:00 -0000	[thread overview]
Message-ID: <45749B8F.9030904@home.se> (raw)
In-Reply-To: <4b7c18640612041348q3eab823dr7e50ad300640818@mail.gmail.com>

Trevis Rothwell skrev:
> Given the following program:
>
>  int main()
>  {
>    unsigned int squiggy = 2147483648;
>  }
>
> Compliing on GCC 3.2.3, I get the following warning:
>
>  $ gcc foo.c
>  foo.c: In function `main':
>  foo.c:3: warning: decimal constant is so large that it is unsigned
>
> To the best of my knowledge, 2147483648 should fit with ample room to
> spare in an unsigned (4-byte) integer.
>
> What's going on?
With gcc 4.1.1, I get this:

$ gcc foo.c
foo.c: In function 'main':
foo.c:3: warning: this decimal constant is unsigned only in ISO C90

  reply	other threads:[~2006-12-04 22:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-04 21:48 unsigned Trevis Rothwell
2006-12-04 22:04 ` Erik [this message]
2006-12-04 22:17 ` unsigned Luke Powell
2006-12-04 22:41   ` unsigned Young, Michael
2006-12-05 13:08 ` unsigned John Love-Jensen
2006-12-05 19:25 unsigned Kaz Kylheku

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45749B8F.9030904@home.se \
    --to=sigra@home.se \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).