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]

Re: __cplusplus revisited


On Tue, 13 Feb 2001, you wrote:
> stephen.webb@cybersafe.com wrote:-
> 
> > I have several flavours of Solaris.  Could someone give me links to
> > the problem and I'll see what I can do?
> 
> OK, great.  Apply the patch below and bootstrap C and C++.  The
> problems are that defining __cplusplus to 199711L reveals different
> aspects of the Solaris headers owing to conditional compilation, and
> some conflicts occur.  I'm not sure if they occur during compiling
> libstdc++, or after installation when compiling normal user code.

I have a patch that lets gcc bootstrap after applying the __cplusplus==199711L patch, at least on Solaris 6 and 8.

There isn't a lot that compiles, however, because a few test programs (like "hello world") reveal yet more conflicts
between the Solaris 8 ISO headers and the libstdc++ headers.

While trying to track down the conflicts, I noticed some of the libstdc++ headers do not declare the right names
according to the Standard.  For example, <cstring> (via std_cstring.h) declares
	void* std::memchr(const void*, int, size_t)
which it shouldn't, but not
	const void* std::memchr(const void*, int, size_t)
and
	void* std::memchr(void*, int, size_t)
which the copy of the standard I have says it should, and the Solaris ISO headers do.

Here's my question (and I'm willing to wager I already know the answer).  Should I be changing the libstdc++ headers
so they declare the right functions, or are they left the way they are for a Very Good Reason?

Here's another question.  Should I submit my patch that at least lets the Solaris 8 compiler bootstrap with
__cplusplus==199711L now or should I wait until I have a (big and still growing) patch that lets it compile C++
programs as well?


Stephen M. Webb


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