This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

switch constant issue


steve writes:
 > Hey guys,
 > 
 > When is this not a const when using the -fno-assume-compiled?
 > Class Connection
 > {
 > 	static final int C_CLOSE_ACK=1;
 > }
 > 
 > /home/steve/NetFuel/src/AgentRE/src/kernel/com/netfuel/messaging/Session.java:178: 
 > error: Constant expression required.
 >                     case Connection.C_CLOSE_ACK:
 > 
 > gcc -v
 > Reading specs from /opt/gcc-3.4/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs
 > Configured with: ../configure --prefix /opt/gcc-3.4
 > Thread model: posix
 > gcc version 3.3.1 20030602 (prerelease)
 > 
 > If this is a bug I will submit it.

Looks like a bug to me.  I guess no-assume-compiled is deferring the
resolution of this constant to runtime, and this conflicts with the
compiler's requirement that case labels be constant.  I'm not sure
about the best way to resolve this.  Please submit the bug.

Andrew.


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