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]

Re: 3.4/3.5 PATCH: Fix Solaris 10 libjava bootstrap failure


Rainer Orth writes:

> Andrew Haley writes:
> 
> > Perhaps, although not using capitalized names is just a matter of
> > convention.  The system is treading on the user's name space!
> 
> True enough.  I'll check in more detail what's going on here.  There may be
> another problem: between the last two builds, Solaris 10 changed from the
> older __STDC__ - 0 == 0 or similar constructs to a new macro _STRICT_STDC.
> The problem may be due to that change.

Here's what I've found: the problem happens in this trivial program, too:

#include <signal.h>

int PC;

$ gcc -c PC.cc
PC.cc:3: error: expected unqualified-id before numeric constant
PC.cc:3: error: expected `,' or `;' before numeric constant
$ gcc -E PC.cc |tail -1
int 14;

<sys/signal.h> includes <sys/ucontext.h> iff _XPG4_2.  This is defined by
<sys/feature_tests.h> for _XOPEN_SOURCE=500, which g++ predefines.  The
rest of the include chain is
<sys/regset.h> -> <sys/reg.h> -> <ia32/sys/reg.h>.

Defining PC there is controlled by __EXTENSIONS__, which g++ predefines as
well.  So it seems we are out of luck: we get the namespace pollution we
asked for ;-(

	Rainer

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



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