public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Where does the C standard describe overflow of signed integers?
@ 2005-07-11 14:58 Nicholas Nethercote
  2005-07-11 15:07 ` Dave Korn
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nicholas Nethercote @ 2005-07-11 14:58 UTC (permalink / raw)
  To: gcc

Hi,

There was recently a very long thread about the overflow behaviour of 
signed integers in C.  Apparently this is undefined according to the C 
standard.  I searched the standard on this matter, and while I did find 
some paragraphs that described how unsigned integers must wrap around upon 
overflow, I couldn't find anything explicit about signed integers.  Can 
someone point me to the relevant part(s) of the standard?

Also, does anyone know what the required behaviour for Fortran integers is 
on overflow?

(I realise this isn't exactly on-topic for this list, but I thought it 
reasonable to ask since this topic was discussed so enthusiastically 
recently :)

Thanks very much.

Nick

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

end of thread, other threads:[~2005-07-12 23:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-11 14:58 Where does the C standard describe overflow of signed integers? Nicholas Nethercote
2005-07-11 15:07 ` Dave Korn
2005-07-11 16:07   ` Nicholas Nethercote
2005-07-11 17:04     ` Dave Korn
2005-07-11 15:15 ` Nathan Sidwell
2005-07-11 15:23   ` Dave Korn
2005-07-11 15:18 ` Overflow in Fortran (was: Where does the C standard describe overflow of signed integers?) Paul Brook
2005-07-12 23:13 ` Where does the C standard describe overflow of signed integers? Michael Meissner

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).