[v3] long long, c99 support
Gabriel Dos Reis
Gabriel.Dos-Reis@cmla.ens-cachan.fr
Fri Apr 20 01:03:00 GMT 2001
Thanks for doing this.
| + #if defined(_GLIBCPP_USE_C99) && defined(__cplusplus)
| + // Placeholder for declarations in c99 namespace.
| + namespace c99 { };
| + namespace std
| + {
| + using namespace c99;
| + }
| + #endif
I'd rather have c99 inside std::. We can't make the assumption that
c99 isn't a sensible user-reserved identifier name (generated codes
tends to looks really ugly). If afterwards, it turns out that c99 is
really a reserved name, then it is easy to use namespace alias to do
the right thing.
namespace std
{
namespace c99 { }
using namespace c99;
}
(There is no semi-colon after the definition of c99).
| Index: testsuite/26_numerics/c99_macros.cc
| ===================================================================
| RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/26_numerics/c99_macros.cc,v
| retrieving revision 1.2
| diff -c -p -r1.2 c99_macros.cc
| *** c99_macros.cc 2001/04/06 19:14:27 1.2
| --- c99_macros.cc 2001/04/20 01:34:34
| ***************
| *** 1,6 ****
| // 2001-04-06 gdr
|
| ! // Copyright (C) 1999, 2000 Free Software Foundation, Inc.
| //
| // This file is part of the GNU ISO C++ Library. This library is free
| // software; you can redistribute it and/or modify it under the
| --- 1,6 ----
| // 2001-04-06 gdr
|
| ! // Copyright (C) 2001 Free Software Foundation, Inc.
Oops. That was the result of a sloppy copy-n-paste :-(
| //
| // This file is part of the GNU ISO C++ Library. This library is free
| // software; you can redistribute it and/or modify it under the
| ***************
| *** 29,35 ****
|
| // { dg-do compile }
|
| ! #include <math.h>
|
| void fpclassify() { }
|
| --- 29,35 ----
|
| // { dg-do compile }
|
| ! #include <cmath>
Well, I prefer to leave <math.h> as is: to test C++ as proper.
One add additional test for testing <cmath> but the test with <math.h>
should not be removed.
Thanks,
-- Gaby
More information about the Libstdc++
mailing list