This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/7139: Shifting 1 through a 64bit int fails at 32bit line


The following reply was made to PR c/7139; it has been noted by GNATS.

From: Mark Mitchell <mark@codesourcery.com>
To: Simon Shapiro <shimon@nomis-storage.com>,
   "mmitchel@gcc.gnu.org" <mmitchel@gcc.gnu.org>,
   "gcc-bugs@gcc.gnu.org" <gcc-bugs@gcc.gnu.org>,
   "gcc-prs@gcc.gnu.org" <gcc-prs@gcc.gnu.org>,
   "nobody@gcc.gnu.org" <nobody@gcc.gnu.org>,
   "shimon@simon-shapiro.com" <shimon@simon-shapiro.com>,
   "gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: c/7139: Shifting 1 through a 64bit int fails at 32bit line
Date: Thu, 27 Jun 2002 15:46:41 -0700

 --On Thursday, June 27, 2002 06:26:25 PM +0100 Simon Shapiro 
 <shimon@nomis-storage.com> wrote:
 
 > Thax for looking into this problem.
 >
 > However, I would like to suggest that you may have dismissed the
 > problem a bit too quickly.
 
 No, I understood it.
 
 You need to take a look at the C standard.
 
 If ints have 32 bits, (1 << 32) has undefined behavior.
 
 -- 
 Mark Mitchell                mark@codesourcery.com
 CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]