This is the mail archive of the gcc-bugs@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: cross compiler bug ? (ia64,asm)


On Jul  3, 2003, Wallace Wadge <wwadge@hobsoft.com.mt> wrote:

> In my .S file, I have the following:
> movl r25=(1 << 64) - 1

1 << 64 invokes undefined behavior, since you're shifting by more than
the width of the integer type in bits.  From then on, all bets are
off.  The compiler might have legitimately translated the shift into a
call to abort().

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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