Bug 15713 - compile interpret.cc with -fno-strict-aliasing
Summary: compile interpret.cc with -fno-strict-aliasing
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-28 19:03 UTC by Tom Tromey
Modified: 2004-07-13 01:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-05-28 19:10:22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2004-05-28 19:03:15 UTC
we should either fix interpret.cc or compile it with
-fno-strict-aliasing.  Andrew points out that 
it has code like this in it:

  jbyte value = (*(jint*)&rvalue) & 0xff;
Comment 1 Andrew Pinski 2004-05-28 19:10:21 UTC
Confirmed, it would look nicer if you used a union also as then you can refer to the types by nice 
variable names like double_value and such like that.

This is in _Jv_InterpMethod::run.
Comment 2 GCC Commits 2004-07-13 01:04:50 UTC
Subject: Bug 15713

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bryce@gcc.gnu.org	2004-07-13 01:04:48

Modified files:
	libjava        : ChangeLog interpret.cc 
	libjava/include: jvm.h 
	libjava/gcj    : field.h 

Log message:
	2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
	
	PR libgcj/15713
	* include/jvm.h (_Jv_value): New union type.
	* gcj/field.h (_Jv_Field): Add new _addr union field variants
	* interperet.cc (run): Use _Jv_value union type and *_addr _Jv_Field
	union members.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.2924&r2=1.2925
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/interpret.cc.diff?cvsroot=gcc&r1=1.42&r2=1.43
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/jvm.h.diff?cvsroot=gcc&r1=1.65&r2=1.66
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/gcj/field.h.diff?cvsroot=gcc&r1=1.9&r2=1.10

Comment 3 Andrew Pinski 2004-07-13 01:29:56 UTC
Fixed.