Message-ID: <3F246120.63C3753C@worldnet.att.net> From: Paul Cousoulis X-Mailer: Mozilla 4.78 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: integer overflow Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 9 Date: Sun, 27 Jul 2003 23:33:21 GMT NNTP-Posting-Host: 12.81.74.220 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1059348801 12.81.74.220 (Sun, 27 Jul 2003 23:33:21 GMT) NNTP-Posting-Date: Sun, 27 Jul 2003 23:33:21 GMT Organization: AT&T Worldnet To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Why does this code result in an integer overflow? unsigned long res; res = (1<<31)-1; Thanks Paul