This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: __cplusplus revisited
- To: stephen dot webb at cybersafe dot com
- Subject: Re: __cplusplus revisited
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Tue, 20 Feb 2001 14:16:38 -0800 (PST)
- cc: libstdc++ at gcc dot gnu dot org, neil at daikokuya dot demon dot co dot uk
> I have a patch that lets gcc bootstrap after applying the __cplusplus==199711L patch, at least on Solaris 6 and 8.
cool. post it.
> 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.
You need to use the include/c headers, not include/c_std. Did you do that
part? (Note this can be switched with a config option, see the web config
page)
since the solaris headers are so-called "std-namespace-ready" we don't
need to fool around with them, and can just pass through directly to them.
> 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.
looks like you are using the wrong headers....
C99 declares this as:
extern "C" void* memchr(const void*, int, size_t);
which is what include/c_std/std_cstring.h uses
> 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?
Is this just a libstdc++-v3 patch or are other things involved?
thanks again for doing this,
benjamin