+2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
+
+ 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.
+
2010-09-10 Richard Guenther <rguenther@suse.de>
* decl.c (reshape_init_vector): For VECTOR_TYPEs, use
/* scoped enums */
CPP0X_SCOPED_ENUMS,
/* defaulted and deleted functions */
- CPP0X_DEFAULTED_DELETED
+ CPP0X_DEFAULTED_DELETED,
+ /* inline namespaces */
+ CPP0X_INLINE_NAMESPACES
} cpp0x_warn_str;
/* The various kinds of operation used by composite_pointer_type. */
pedwarn (input_location, 0,
"defaulted and deleted functions "
"only available with -std=c++0x or -std=gnu++0x");
+ break;
+ case CPP0X_INLINE_NAMESPACES:
+ pedwarn (input_location, OPT_pedantic,
+ "inline namespaces "
+ "only available with -std=c++0x or -std=gnu++0x");
break;
default:
gcc_unreachable();
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_INLINE))
{
+ maybe_warn_cpp0x (CPP0X_INLINE_NAMESPACES);
is_inline = true;
cp_lexer_consume_token (parser->lexer);
}
+2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
+
+ PR c++/43824
+ * g++.dg/lookup/strong-using-1.C: Set dg-options to "".
+ * g++.dg/lookup/strong-using-2.C: Likewise.
+ * g++.dg/lookup/strong-using-3.C: Likewise.
+ * g++.dg/lookup/strong-using-5.C: Likewise.
+
+ * g++.dg/cpp0x/inline-ns3.C: Add -std=c++0x.
+ * g++.dg/cpp0x/inline-ns4.C: New.
+ * g++.dg/cpp0x/inline-ns5.C: New.
+
2010-09-10 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/45634
+// { dg-options -std=c++0x }
+
namespace C
{
void f();
--- /dev/null
+// { dg-options "-std=gnu++98 -pedantic" }
+inline namespace { } // { dg-warning "inline namespaces" }
--- /dev/null
+// { dg-options "-std=gnu++98 -pedantic-errors" }
+inline namespace { } // { dg-error "inline namespaces" }
// PR c++/13594 (secondary)
+// { dg-options "" }
// { dg-do compile }
namespace fool {
// PR c++/13594
+// { dg-options "" }
// { dg-do compile }
namespace foo {
// PR c++/13659
+// { dg-options "" }
// { dg-do compile }
namespace bar {
// PR c++/33486
+// { dg-options "" }
+
namespace A
{
inline namespace B