Subject: gcc 3 <-> 2.95, STL & NetBSD
To: None <netbsd-help@netbsd.org>
From: =?ISO-8859-1?Q?Thorbj=F6rn_Jemander?= <thorman@jemander.net>
List: netbsd-help
Date: 07/07/2003 22:11:44
Hi,

I have some C++ code I'd like to run under
NetBSD. I've 1.6.1 and gcc 2.95.3.

When using that gcc, I cannot compile
the following row:

    friend ProcessId (::createProcess(ProcessType processType, U16 
schedulerId,
                                      const char* name,
                                      void (*entryPoint)(void),
                                      unsigned int stacksize,
                                      Priority priority));

 From what I can understand 2.95.3 have a
problem with the interpretation of the association
of the scope resolution operator when the left
operand in a non-aggregate structure (as in this case.
where ProcessId is a typedef:ed unsigned short).

gcc 3.2 copes with this, but it seems to be
non-trivial [for me] to upgrade to 3.2 under NetBSD,
so I have two questions:

1. Something in the back of my head tells me
that something changed (the ABI?) between
the 3-series and the 2-series of gcc. Will executables
compiled with gcc 3 run under a system compiled
with gcc 2.95.3?

2. If I try to compile with gcc 3.2.1 (built from pkgsrc),
STL gives me an headache. Previously the STL
headers resided in /usr/pkg/include/stlport,
but with the same makefiles, headers and
switches, gcc-3.2.1 won't find some STL headers.
Can anyone give me a hint on what's going on here?

I'd be most grateful for some directions or
ponters. Thanks in advance,

/Thorbjörn Jemander

(BTW, please CC this address)