------- Comment #2 from rguenth at gcc dot gnu dot org  2010-04-15 09:27 -------
Shifting by an amount bigger than the width of the type invokes undefined
behavior (that is, target specific behavior in this case).  We usually
try to simulate target behavior here but the i?86 architecture is inconsistent
in itself:

/* Define if shifts truncate the shift count
   which implies one can omit a sign-extension or zero-extension
   of a shift count.  */
/* On i386, shifts do truncate the count.  But bit opcodes don't.  */

/* #define SHIFT_COUNT_TRUNCATED */


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|Bit shifitng by a constant  |Bit shifitng by a constant
                   |32 isn't the same as        |32 isn't the same as
                   |bitshifting by a variable   |bitshifting by a variable
                   |32.                         |32.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43756

Reply via email to