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


> 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


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