Message ID | 20101109052530.4n6wwwhu4o40wkw8-nzlynne@webmail.spamcop.net |
---|---|
State | New |
Headers | show |
PDP11 part is ok. Thanks! paul On Nov 9, 2010, at 5:25 AM, Joern Rennecke wrote: > Quoting Andrew Haley <aph@redhat.com>: > >> I am always opposed to obfuscating code in order to suppress bogus warnings. >> >> Can I suggest >> >> temp <<= (POINTER_SIZE > 32) ? POINTER_SIZE - 32 : 0; > > Yes, that also works fine for the pdp11 build. > > Currently bootstrapping on i686-pc-linux-gnu. > 2010-11-09 Joern Rennecke <amylaar@spamcop.net> > Andrew Haley <aph@redhat.com> > > PR java/46386 > gcc/java: > * constants.c (build_constants_constructor): Avoid negative shift. > gcc: > * config/pdp11/t-pdp11 (java/constants.o-warn): Remove. > > Index: java/constants.c > =================================================================== > --- java/constants.c (revision 166429) > +++ java/constants.c (working copy) > @@ -540,8 +540,8 @@ build_constants_constructor (void) > FIXME: This is a kludge. The field we're initializing is > not a scalar but a union, and that's how we should > represent it in the compiler. We should fix this. */ > - if (BYTES_BIG_ENDIAN && POINTER_SIZE > 32) > - temp <<= POINTER_SIZE - 32; > + if (BYTES_BIG_ENDIAN) > + temp <<= ((POINTER_SIZE > 32) ? POINTER_SIZE - 32 : 0); > > CONSTRUCTOR_PREPEND_VALUE (t, get_tag_node (outgoing_cpool->tags[i])); > CONSTRUCTOR_PREPEND_VALUE (d, > Index: config/pdp11/t-pdp11 > =================================================================== > --- config/pdp11/t-pdp11 (revision 166429) > +++ config/pdp11/t-pdp11 (working copy) > @@ -42,7 +42,3 @@ MULTILIB_OPTIONS = msoft-float > # We could say "-Werror -Wno-error=type-limits", alas, not all supported > # gcc bootstrap compilers support the latter option. > dwarf2out.o-warn = -Wno-error > - > -# Likewise, java/constants.c:build_constants_constructor has a negative shift > -# count (in never-executed code) due to the small POINTER_SIZE. > -java/constants.o-warn = -Wno-error
Regarding:
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00872.html
Quoting Paul Koning <paul_koning@dell.com>:
> PDP11 part is ok. Thanks!
I still need approval of the java part.
FWIW that also affects avr.
>>>>> "Joern" == Joern Rennecke <amylaar@spamcop.net> writes: Joern> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00872.html Joern> Quoting Paul Koning <paul_koning@dell.com>: >> PDP11 part is ok. Thanks! Joern> I still need approval of the java part. Joern> FWIW that also affects avr. It is ok. Thanks. Tom
Index: java/constants.c =================================================================== --- java/constants.c (revision 166429) +++ java/constants.c (working copy) @@ -540,8 +540,8 @@ build_constants_constructor (void) FIXME: This is a kludge. The field we're initializing is not a scalar but a union, and that's how we should represent it in the compiler. We should fix this. */ - if (BYTES_BIG_ENDIAN && POINTER_SIZE > 32) - temp <<= POINTER_SIZE - 32; + if (BYTES_BIG_ENDIAN) + temp <<= ((POINTER_SIZE > 32) ? POINTER_SIZE - 32 : 0); CONSTRUCTOR_PREPEND_VALUE (t, get_tag_node (outgoing_cpool->tags[i])); CONSTRUCTOR_PREPEND_VALUE (d, Index: config/pdp11/t-pdp11 =================================================================== --- config/pdp11/t-pdp11 (revision 166429) +++ config/pdp11/t-pdp11 (working copy) @@ -42,7 +42,3 @@ MULTILIB_OPTIONS = msoft-float # We could say "-Werror -Wno-error=type-limits", alas, not all supported # gcc bootstrap compilers support the latter option. dwarf2out.o-warn = -Wno-error - -# Likewise, java/constants.c:build_constants_constructor has a negative shift -# count (in never-executed code) due to the small POINTER_SIZE. -java/constants.o-warn = -Wno-error