This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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 many Solaris 10 g++ testsuite failures


Richard Henderson writes:

> On Fri, Apr 30, 2004 at 09:31:26PM +0200, Rainer Orth wrote:
> > +	   In Solaris 10, int64_t from <sys/int_types.h>\
> > +	   is only visible with g++ -ansi for ISO C99	\
> > +	   compilations.  Those only work together with	\
> > +	   XPG6.  */					\
> >  	if (c_dialect_cxx ())				\
> >  	  {						\
> > -	    builtin_define ("_XOPEN_SOURCE=500");	\
> > +	    builtin_define ("__STDC_VERSION__=199901L");\
> > +	    builtin_define ("_XOPEN_SOURCE=600");	\
> 
> Does this get us into any other trouble assuming C99 features in C++98?

libstdc++-v3 does already try to use C99 features if available.  A similar
change was applied to the IRIX 6 port some time ago when SGI's system
headers became C99-aware.

> Would we be better off not using int64_t from system headers, but instead
> via __attribute__((mode("DI"))) or somesuch?

That's for the libstdc++-v3 guys to comment.  Currently, I find both
constructs: include/bits/postypes.h uses int64_t if available,
libmath/mathconf.h defines U_int64_t with __attribute ((mode (DI))).  I
understand that there's some desire to have libstdc++-v3 buildable with
other compilers, so the use of __attribute__ seems not too desirable.

> > +  /* Solaris 2/x86, like SPARC, uses the default.  */
> > +  if (TARGET_SOLARIS2)
> > +    return std_build_builtin_va_list ();
> > +
> >    /* For i386 we use plain pointer to argument area.  */
> >    if (!TARGET_64BIT)
> 
> Nest this inside TARGET_64BIT, lest you break Solaris/amd64
> (reportedly under construction).

Will do.  In fact I hope to get a copy of the 64-bit Solaris 10/amd64 port
asap.

	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]