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

3.4/3.5 PATCH: Fix Solaris 10 libjava bootstrap failure


With the installation of Solaris 10 Beta 1 (aka s10_b52), libjava suddenly
started to fail bootstrapping: verify.cc doesn't compile any longer since
<sys/reg.h> or <ia32/sys/reg.h> is suddenly included which defines

#define PC      (1)

or

#define EIP             14
#define PC      EIP

Of course, this breaks verify.cc:

  // The current PC.
  int PC;

To fix this, one can either change the member name to something less likely
to clash with macros (like curr_PC), but this could cause the need for
additional reformatting to avoid exceeding the 80-character line limit.  So
I've chosen the easy way out and just undefined the macro.  This allowed
verify.cc to compile again.

Ok for mainline and 3.4 branch if a full bootstrap succeeds?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Thu Mar 18 14:48:55 2004  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* verify.cc (class _Jv_BytecodeVerifier): #undef PC.

Index: libjava/verify.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/verify.cc,v
retrieving revision 1.61
diff -u -p -r1.61 verify.cc
--- libjava/verify.cc	1 Feb 2004 20:05:02 -0000	1.61
+++ libjava/verify.cc	18 Mar 2004 14:10:29 -0000
@@ -142,6 +142,7 @@ private:
   };
 
   // The current PC.
+#undef PC
   int PC;
   // The PC corresponding to the start of the current instruction.
   int start_PC;


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