This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] long long, c99 support
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: [v3] long long, c99 support
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 20 Apr 2001 09:07:18 +0200
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <200104200145.f3K1j9n16011@fillmore.constant.com>
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