This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/13788] Zero propogate right shift in static final int initializer causes error
- From: "andrew dot gray at anu dot edu dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2004 06:17:49 -0000
- Subject: [Bug java/13788] Zero propogate right shift in static final int initializer causes error
- References: <20040121055330.13788.andrew.gray@anu.edu.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From andrew dot gray at anu dot edu dot au 2004-01-21 06:17 -------
I have a feeling that the "weirdness" could be explained by the
"! flag_emit_class_files" in the following lines:
/* The >>> operator is a >> operating on unsigned quantities */
if (code == URSHIFT_EXPR && ! flag_emit_class_files)
from java/parse.y (lines 13428 & 13429 in the 2004-01-14 snapshot I have)
in the patch_binop function under the URSHIFT_EXPR case.
As far as I can tell the code in the body of this if statement converts
the zero propogate right shift to a right shift on an unsigned int and a
cast back to int, which then causes the error I am seeing. However, I have
virtually zero experience with this code, so I didn't get any further than
this guess.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13788