[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824 Paolo Carlini changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 --- Comment #7 from Paolo Carlini 2010-10-31 10:13:30 UTC --- I understand this is fixed.
[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings
--- Comment #6 from jason at gcc dot gnu dot org 2010-09-10 18:29 --- Subject: Bug 43824 Author: jason Date: Fri Sep 10 18:28:59 2010 New Revision: 164201 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164201 Log: PR c++/43824 * error.c (maybe_warn_cpp0x): Add new warning CPP0X_INLINE_NAMESPACES. * parser.c (cp_parser_namespace_definition): Likewise. * cp-tree.h (cpp0x_warn_str): Likewise. Added: trunk/gcc/testsuite/g++.dg/cpp0x/inline-ns4.C trunk/gcc/testsuite/g++.dg/cpp0x/inline-ns5.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/error.c trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp0x/inline-ns3.C trunk/gcc/testsuite/g++.dg/lookup/strong-using-1.C trunk/gcc/testsuite/g++.dg/lookup/strong-using-2.C trunk/gcc/testsuite/g++.dg/lookup/strong-using-3.C trunk/gcc/testsuite/g++.dg/lookup/strong-using-5.C -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824
[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings
--- Comment #5 from rodrigorivascosta at gmail dot com 2010-07-26 09:59 --- Created an attachment (id=21313) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21313&action=view) Patch to add pedantic warning to inline namespaces in C++98 I think that this tiny patch should do the trick. Regards. -- Rodrigo. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824
[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings
--- Comment #4 from redi at gcc dot gnu dot org 2010-04-21 17:04 --- good point then #pragma GCC system_header must disable the warning, so we can use inline namespaces and variadic templates in the standard library -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824
[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings
--- Comment #3 from pinskia at gcc dot gnu dot org 2010-04-21 16:54 --- (In reply to comment #2) > Right, this is a GNU extension used to implement the library, which was later > standardised. We also support 'long long' in C++03 mode. Yes but with -pedantic we do warn about long long: t.cc:1:1: warning: ISO C++ 1998 does not support âlong longâ (and with -pedantic-error we error out). So the argument using long long as an example is incorrect. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||accepts-invalid Last reconfirmed|-00-00 00:00:00 |2010-04-21 16:54:00 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824
[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings
--- Comment #2 from redi at gcc dot gnu dot org 2010-04-21 09:40 --- Right, this is a GNU extension used to implement the library, which was later standardised. We also support 'long long' in C++03 mode. GCC is not intended to be a strict ANSI C++ verification tool, so doesn't reject all non-portable programs -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824
[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings
--- Comment #1 from paolo dot carlini at oracle dot com 2010-04-21 00:24 --- This new feature of C++0x has been pioneered by GCC, used for the implementation of the special modes of the C++ library (eg, debug-mode, then parallel-mode, etc). I'm not sure how much we can tighten the warnings without breaking the long standing usages as implementation detail. If/when we change something we should also make sure variadic templates are treated consistently. Adding Jason in CC. -- paolo dot carlini at oracle dot com changed: What|Removed |Added CC||jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824