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: Creation of precompiled headers fails for gcc-3.4.0 on i386-pc-solaris2.8


On Mon, Apr 26, 2004 at 03:17:53PM -0300, Brad Spencer wrote:
> On Mon, Apr 26, 2004 at 03:06:09PM -0300, Brad Spencer wrote:
> > While building a cross compiler for i386-pc-solaris2.8 (on
> > i686-pc-linux-gnu) with gcc-3.4.0, I came across the following errors
> > when it came time to build precompiled headers.  It looks like
> > <stdio.h> and <cstdio> have somehow selected different types for
> > va_list. 
> 
> Sorry, I meant <cstdarg> and <cstdio> have selected different types
> for va_list.  In fact, if I comment out the inclusion of cstdarg in
> stdc++.h, there are no errors.

[My original posting was on libstdc++, but this looks like a gcc
issue.  See <http://gcc.gnu.org/ml/libstdc++/2004-04/msg00138.html>.]

I looked into this some more after some prompting by Eric Botcazou,
and discovered that gcc-3.4.0 and Solaris 2.8 x86 don't agree on the type
of va_list in general, it seems.  From what I can tell from looking at
the headers, Solaris 2.8 expects "void *" for va_list (in the typical
case), and with a test program and gdb, I confirmed that gcc choses
that for sparc-sun-solaris2.8.  However, under i386-pc-solaris2.8, the
system headers are the same (i.e. "void *"), but gcc choses "char *",
seemingly in config/i386/i386.c.  I confirmed this with the same
test program and gdb ("ptype x" where x is of type va_list).

static tree
ix86_build_builtin_va_list (void)
{
  tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl;

  /* For i386 we use plain pointer to argument area.  */
  if (!TARGET_64BIT)
    return build_pointer_type (char_type_node);

  // ...
}

So for i386-pc-solaris2.8, who's right? :)

-- 
------------------------------------------------------------------
Brad Spencer - spencer@infointeractive.com - "It's quite nice..."
Systems Architect | InfoInterActive Corp. | A Canadian AOL Company


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