This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Putting builtins in the std namespace
On 18 Oct 2000 at 16:24 (-0700), Benjamin Kosnik wrote:
|
|
| The end result is that both of these cases have to compile, when using -fhonor-std,
| hopefully with one <new> header.
|
| #if 1
| // stddef.h
| extern "C" {typedef unsigned int size_t ;}
| #else
| // cstddef
| namespace _C_legacy {
| extern "C" {
| typedef unsigned int size_t;
| }
| } // namespace _C_legacy
|
| namespace std {
| using _C_legacy::size_t;
| } // namespace std
| #endif
|
| void *operator new (std::size_t) throw (std::bad_alloc);
I believe Mark's patch may be correct. it _does_ however require
us to actually declare the size_t in the global namespace.
I was seeing.
9 namespace _C_legacy {
10 extern "C" {
18 typedef unsigned int size_t;
22 }
23 }
24 namespace std {
26 using _C_legacy::size_t;
27 }
58 extern "C++" {
69 void *operator new (size_t) throw (std::bad_alloc);
79 }
which clearly does _not_ delcare the size_t in ::. so adding to the
bottom of -v3/include/c_std/bits/std_cstddef.h
using std::size_t;
using std::ptrdiff_t;
allows me to pass the failure point you mention, but I'm still
failing on that whole langinfo.h thing...
brent
--
All opinions expressed are My own, unless otherwise attributed. In
presenting facts, I expressly reserve the right to be Wrong. Portions
of this message authored by Me are subject to the Free Thought License.