Jason Merrill <ja...@redhat.com> writes:

| On 06/01/2013 10:57 AM, Gabriel Dos Reis wrote:
| > Well, we don't want to check cxx0x one place and cxx11 others.
| 
| But we still do.

Fixed with this.

-- Gaby

2013-06-22  Gabriel Dos Reis  <g...@integrable-solutions.net>

        * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
        * c-cppbuiltin.c (c_cpp_builtins): Likewise.
        * c-opts.c (c_common_post_options): Likewise.

cp/
2013-06-22  Gabriel Dos Reis  <g...@integrable-solutions.net>

        * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
        * class.c (add_implicitly_declared_members): Likewise.
        (check_field_decl): Likewise.
        (finalize_literal_type_property): Likewise.
        (check_bases_and_members): Likewise.
        * decl.c (poplevel): Likewise.
        (case_conversion): Likewise.
        (check_initializer): Likewise.
        (grokfndecl): Likewise.
        (check_static_variable_definition): Likewise.
        (compute_array_index_type): Likewise.
        (grokdeclarator): Likewise.
        (build_enumerator): Likewise.
        * friend.c (make_friend_class): Likewise.
        * lex.c (init_reswords): Likewise.
        * method.c (synthesized_method_walk): Likewise.
        (implicitly_declare_fn): Likewise.
        * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
        (cp_parser_constant_expression): Likewise.
        (cp_parser_for_init_statement): Likewise.
        (cp_parser_block_declaration): Likewise.
        (cp_parser_type_name): Likewise.
        (cp_parser_enum_specifier): Likewise.
        (cp_parser_enumerator_list): Likewise.
        (cp_parser_member_declaration): Likewise.
        (cp_nth_tokens_can_be_std_attribute_p): Likewise.
        (cp_parser_template_declaration_after_export): Likewise.
        * pt.c (convert_nontype_argument_function): Likewise.
        (convert_nontype_argument): Likewise.
        (convert_template_argument): Likewise.
        (tsubst_copy_and_build): Likewise.
        (build_non_dependent_expr): Likewise.
        * semantics.c (non_const_var_error): Likewise.
        (potential_constant_expression_1): Likewise.
        * tree.c (lvalue_kind): Likewise.
        (build_vec_init_expr): Likewise.
        (cast_valid_in_integral_constant_expression_p): Likewise.
        * typeck.c (build_x_conditional_expr): Likewise.
        * typeck2.c (check_narrowing): Likewise.

Index: c-family/c-common.c
===================================================================
--- c-family/c-common.c (revision 200347)
+++ c-family/c-common.c (working copy)
@@ -5454,7 +5454,7 @@
     {
       char16_type_node = make_unsigned_type (char16_type_size);
 
-      if (cxx_dialect >= cxx0x)
+      if (cxx_dialect >= cxx11)
        record_builtin_type (RID_CHAR16, "char16_t", char16_type_node);
     }
 
@@ -5470,7 +5470,7 @@
     {
       char32_type_node = make_unsigned_type (char32_type_size);
 
-      if (cxx_dialect >= cxx0x)
+      if (cxx_dialect >= cxx11)
        record_builtin_type (RID_CHAR32, "char32_t", char32_type_node);
     }
 
Index: c-family/c-cppbuiltin.c
===================================================================
--- c-family/c-cppbuiltin.c     (revision 200347)
+++ c-family/c-cppbuiltin.c     (working copy)
@@ -713,7 +713,7 @@
        cpp_define (pfile, "__DEPRECATED");
       if (flag_rtti)
        cpp_define (pfile, "__GXX_RTTI");
-      if (cxx_dialect >= cxx0x)
+      if (cxx_dialect >= cxx11)
         cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX0X__");
     }
   /* Note that we define this for C as well, so that we know if
Index: c-family/c-opts.c
===================================================================
--- c-family/c-opts.c   (revision 200347)
+++ c-family/c-opts.c   (working copy)
@@ -889,7 +889,7 @@
   if (warn_implicit_function_declaration == -1)
     warn_implicit_function_declaration = flag_isoc99;
 
-  if (cxx_dialect >= cxx0x)
+  if (cxx_dialect >= cxx11)
     {
       /* If we're allowing C++0x constructs, don't warn about C++98
         identifiers which are keywords in C++0x.  */
Index: cp/call.c
===================================================================
--- cp/call.c   (revision 200347)
+++ cp/call.c   (working copy)
@@ -554,7 +554,7 @@
   if (CP_INTEGRAL_TYPE_P (TREE_TYPE (t)))
     {
       /* Core issue 903 says only literal 0 is a null pointer constant.  */
-      if (cxx_dialect < cxx0x)
+      if (cxx_dialect < cxx11)
        t = maybe_constant_value (fold_non_dependent_expr_sfinae (t, tf_none));
       STRIP_NOPS (t);
       if (integer_zerop (t) && !TREE_OVERFLOW (t))
Index: cp/class.c
===================================================================
--- cp/class.c  (revision 200347)
+++ cp/class.c  (working copy)
@@ -2971,7 +2971,7 @@
 {
   bool move_ok = false;
 
-  if (cxx_dialect >= cxx0x && !CLASSTYPE_DESTRUCTORS (t)
+  if (cxx_dialect >= cxx11 && !CLASSTYPE_DESTRUCTORS (t)
       && !TYPE_HAS_COPY_CTOR (t) && !TYPE_HAS_COPY_ASSIGN (t)
       && !type_has_move_constructor (t) && !type_has_move_assign (t))
     move_ok = true;
@@ -2998,7 +2998,7 @@
     {
       TYPE_HAS_DEFAULT_CONSTRUCTOR (t) = 1;
       CLASSTYPE_LAZY_DEFAULT_CTOR (t) = 1;
-      if (cxx_dialect >= cxx0x)
+      if (cxx_dialect >= cxx11)
        TYPE_HAS_CONSTEXPR_CTOR (t)
          /* This might force the declaration.  */
          = type_has_constexpr_default_constructor (t);
@@ -3199,7 +3199,7 @@
 
   /* In C++98 an anonymous union cannot contain any fields which would change
      the settings of CANT_HAVE_CONST_CTOR and friends.  */
-  if (ANON_UNION_TYPE_P (type) && cxx_dialect < cxx0x)
+  if (ANON_UNION_TYPE_P (type) && cxx_dialect < cxx11)
     ;
   /* And, we don't set TYPE_HAS_CONST_COPY_CTOR, etc., for anonymous
      structs.  So, we recurse through their fields here.  */
@@ -3220,7 +3220,7 @@
         make it through without complaint.  */
       abstract_virtuals_error (field, type);
 
-      if (TREE_CODE (t) == UNION_TYPE && cxx_dialect < cxx0x)
+      if (TREE_CODE (t) == UNION_TYPE && cxx_dialect < cxx11)
        {
          static bool warned;
          int oldcount = errorcount;
@@ -5181,7 +5181,7 @@
 {
   tree fn;
 
-  if (cxx_dialect < cxx0x
+  if (cxx_dialect < cxx11
       || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t))
     CLASSTYPE_LITERAL_P (t) = false;
   else if (CLASSTYPE_LITERAL_P (t) && !TYPE_HAS_TRIVIAL_DFLT (t)
@@ -5321,7 +5321,7 @@
 
   /* Deduce noexcept on destructors.  This needs to happen after we've set
      triviality flags appropriately for our bases.  */
-  if (cxx_dialect >= cxx0x)
+  if (cxx_dialect >= cxx11)
     deduce_noexcept_on_destructors (t);
 
   /* Check all the method declarations.  */
Index: cp/decl.c
===================================================================
--- cp/decl.c   (revision 200347)
+++ cp/decl.c   (working copy)
@@ -652,7 +652,7 @@
       if (leaving_for_scope && VAR_P (link)
          /* It's hard to make this ARM compatibility hack play nicely with
             lambdas, and it really isn't necessary in C++11 mode.  */
-         && cxx_dialect < cxx0x
+         && cxx_dialect < cxx11
          && DECL_NAME (link))
        {
          tree name = DECL_NAME (link);
@@ -3090,7 +3090,7 @@
   if (value == NULL_TREE)
     return value;
 
-  if (cxx_dialect >= cxx0x
+  if (cxx_dialect >= cxx11
       && (SCOPED_ENUM_P (type)
          || !INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (TREE_TYPE (value))))
     {
@@ -5757,7 +5757,7 @@
     {
       static int explained = 0;
 
-      if (cxx_dialect < cxx0x)
+      if (cxx_dialect < cxx11)
        error ("initializer invalid for static member with constructor");
       else
        error ("non-constant in-class initialization invalid for static "
@@ -7653,7 +7653,7 @@
     grokclassfn (ctype, decl, flags);
 
   /* 12.4/3  */
-  if (cxx_dialect >= cxx0x
+  if (cxx_dialect >= cxx11
       && DECL_DESTRUCTOR_P (decl)
       && !TYPE_BEING_DEFINED (DECL_CONTEXT (decl))
       && !processing_template_decl)
@@ -8053,7 +8053,7 @@
      in check_initializer.  */
   if (DECL_P (decl) && DECL_DECLARED_CONSTEXPR_P (decl))
     return 0;
-  else if (cxx_dialect >= cxx0x && !INTEGRAL_OR_ENUMERATION_TYPE_P (type))
+  else if (cxx_dialect >= cxx11 && !INTEGRAL_OR_ENUMERATION_TYPE_P (type))
     {
       if (!COMPLETE_TYPE_P (type))
        error ("in-class initialization of static data member %q#D of "
@@ -8175,7 +8175,7 @@
 
       mark_rvalue_use (size);
 
-      if (cxx_dialect < cxx0x && TREE_CODE (size) == NOP_EXPR
+      if (cxx_dialect < cxx11 && TREE_CODE (size) == NOP_EXPR
          && TREE_SIDE_EFFECTS (size))
        /* In C++98, we mark a non-constant array bound with a magic
           NOP_EXPR with TREE_SIDE_EFFECTS; don't fold in that case.  */;
@@ -9534,7 +9534,7 @@
                  }
                else if (declarator->u.function.late_return_type)
                  {
-                   if (cxx_dialect < cxx0x)
+                   if (cxx_dialect < cxx11)
                      /* Not using maybe_warn_cpp0x because this should
                         always be an error.  */
                      error ("trailing return type only available with "
@@ -12842,7 +12842,7 @@
                                  && double_int_fits_to_tree_p (type, di))
                                break;
                            }
-                         if (type && cxx_dialect < cxx0x
+                         if (type && cxx_dialect < cxx11
                              && itk > itk_unsigned_long)
                            pedwarn (input_location, OPT_Wlong_long, pos ? "\
 incremented enumerator value is too large for %<unsigned long%>" :  "\
Index: cp/friend.c
===================================================================
--- cp/friend.c (revision 200347)
+++ cp/friend.c (working copy)
@@ -230,8 +230,8 @@
         (possibly cv-qualified) class type, that class is declared as a
         friend; otherwise, the friend declaration is ignored.
 
-         So don't complain in C++0x mode.  */
-      if (cxx_dialect < cxx0x)
+         So don't complain in C++11 mode.  */
+      if (cxx_dialect < cxx11)
        pedwarn (input_location, complain ? 0 : OPT_Wpedantic,
                 "invalid type %qT declared %<friend%>", friend_type);
       return;
Index: cp/lex.c
===================================================================
--- cp/lex.c    (revision 200347)
+++ cp/lex.c    (working copy)
@@ -171,7 +171,7 @@
   tree id;
   int mask = 0;
 
-  if (cxx_dialect < cxx0x)
+  if (cxx_dialect < cxx11)
     mask |= D_CXX0X;
   if (flag_no_asm)
     mask |= D_ASM | D_EXT;
Index: cp/method.c
===================================================================
--- cp/method.c (revision 200347)
+++ cp/method.c (working copy)
@@ -1179,7 +1179,7 @@
   bool ctor_p;
 
   if (spec_p)
-    *spec_p = (cxx_dialect >= cxx0x ? noexcept_true_spec : empty_except_spec);
+    *spec_p = (cxx_dialect >= cxx11 ? noexcept_true_spec : empty_except_spec);
 
   if (deleted_p)
     {
@@ -1271,7 +1271,7 @@
      resolution, so a constructor can be trivial even if it would otherwise
      call a non-trivial constructor.  */
   if (expected_trivial
-      && (!copy_arg_p || cxx_dialect < cxx0x))
+      && (!copy_arg_p || cxx_dialect < cxx11))
     {
       if (constexpr_p && sfk == sfk_constructor)
        {
@@ -1632,7 +1632,7 @@
   if (deleted_p)
     constexpr_p = false;
   /* A trivial copy/move constructor is also a constexpr constructor.  */
-  else if (trivial_p && cxx_dialect >= cxx0x
+  else if (trivial_p && cxx_dialect >= cxx11
           && (kind == sfk_copy_constructor
               || kind == sfk_move_constructor))
     gcc_assert (constexpr_p);
@@ -1713,7 +1713,7 @@
   DECL_IN_AGGR_P (fn) = 1;
   DECL_ARTIFICIAL (fn) = 1;
   DECL_DEFAULTED_FN (fn) = 1;
-  if (cxx_dialect >= cxx0x)
+  if (cxx_dialect >= cxx11)
     {
       DECL_DELETED_FN (fn) = deleted_p;
       DECL_DECLARED_CONSTEXPR_P (fn) = constexpr_p;
Index: cp/parser.c
===================================================================
--- cp/parser.c (revision 200347)
+++ cp/parser.c (working copy)
@@ -2829,7 +2829,7 @@
           template <typename T> struct B : public A<T> { X x; };
 
         The user should have said "typename A<T>::X".  */
-      if (cxx_dialect < cxx0x && id == ridpointers[(int)RID_CONSTEXPR])
+      if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_CONSTEXPR])
        inform (location, "C++11 %<constexpr%> only available with "
                "-std=c++11 or -std=gnu++11");
       else if (processing_template_decl && current_class_type
@@ -8259,7 +8259,7 @@
   /* We are now parsing a constant-expression.  */
   parser->integral_constant_expression_p = true;
   parser->allow_non_integral_constant_expression_p
-    = (allow_non_constant_p || cxx_dialect >= cxx0x);
+    = (allow_non_constant_p || cxx_dialect >= cxx11);
   parser->non_integral_constant_expression_p = false;
   /* Although the grammar says "conditional-expression", we parse an
      "assignment-expression", which also permits "throw-expression"
@@ -8276,7 +8276,7 @@
     = saved_integral_constant_expression_p;
   parser->allow_non_integral_constant_expression_p
     = saved_allow_non_integral_constant_expression_p;
-  if (cxx_dialect >= cxx0x)
+  if (cxx_dialect >= cxx11)
     {
       /* Require an rvalue constant expression here; that's what our
         callers expect.  Reference constant expressions are handled
@@ -10428,7 +10428,7 @@
          /* It is a range-for, consume the ':' */
          cp_lexer_consume_token (parser->lexer);
          is_range_for = true;
-         if (cxx_dialect < cxx0x)
+         if (cxx_dialect < cxx11)
            {
              error_at (cp_lexer_peek_token (parser->lexer)->location,
                        "range-based %<for%> loops are not allowed "
@@ -10916,7 +10916,7 @@
        cp_parser_using_directive (parser);
       /* If the second token after 'using' is '=', then we have an
         alias-declaration.  */
-      else if (cxx_dialect >= cxx0x
+      else if (cxx_dialect >= cxx11
               && token2->type == CPP_NAME
               && ((cp_lexer_peek_nth_token (parser->lexer, 3)->type == CPP_EQ)
                   || (cp_nth_tokens_can_be_attribute_p (parser, 3))))
@@ -14533,7 +14533,7 @@
   /* If it's not a class-name, keep looking.  */
   if (!cp_parser_parse_definitely (parser))
     {
-      if (cxx_dialect < cxx0x)
+      if (cxx_dialect < cxx11)
        /* It must be a typedef-name or an enum-name.  */
        return cp_parser_nonclass_name (parser);
 
@@ -15069,7 +15069,7 @@
   if (cp_lexer_next_token_is_keyword (parser->lexer, RID_CLASS)
       || cp_lexer_next_token_is_keyword (parser->lexer, RID_STRUCT))
     {
-      if (cxx_dialect < cxx0x)
+      if (cxx_dialect < cxx11)
         maybe_warn_cpp0x (CPP0X_SCOPED_ENUMS);
 
       /* Consume the `struct' or `class' token.  */
@@ -15163,7 +15163,7 @@
       if (!cp_parser_parse_definitely (parser))
        return NULL_TREE;
 
-      if (cxx_dialect < cxx0x)
+      if (cxx_dialect < cxx11)
         maybe_warn_cpp0x (CPP0X_SCOPED_ENUMS);
 
       has_underlying_type = true;
@@ -15181,7 +15181,7 @@
   /* Look for the `{' but don't consume it yet.  */
   if (!cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE))
     {
-      if (cxx_dialect < cxx0x || (!scoped_enum_p && !underlying_type))
+      if (cxx_dialect < cxx11 || (!scoped_enum_p && !underlying_type))
        {
          cp_parser_error (parser, "expected %<{%>");
          if (has_underlying_type)
@@ -15381,7 +15381,7 @@
       /* If the next token is a `}', there is a trailing comma.  */
       if (cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_BRACE))
        {
-         if (cxx_dialect < cxx0x && !in_system_header)
+         if (cxx_dialect < cxx11 && !in_system_header)
            pedwarn (input_location, OPT_Wpedantic,
                      "comma at end of enumerator list");
          break;
@@ -19730,7 +19730,7 @@
   /* Check for a using-declaration.  */
   if (cp_lexer_next_token_is_keyword (parser->lexer, RID_USING))
     {
-      if (cxx_dialect < cxx0x)
+      if (cxx_dialect < cxx11)
        {
          /* Parse the using-declaration.  */
          cp_parser_using_declaration (parser,
@@ -19834,7 +19834,7 @@
            {
              /* If the `friend' keyword was present, the friend must
                 be introduced with a class-key.  */
-              if (!declares_class_or_enum && cxx_dialect < cxx0x)
+              if (!declares_class_or_enum && cxx_dialect < cxx11)
                 pedwarn (decl_spec_token_start->location, OPT_Wpedantic,
                          "in C++03 a class-key must be used "
                          "when declaring a friend");
@@ -20034,7 +20034,7 @@
                    initializer = cp_parser_pure_specifier (parser);
                  else if (decl_specifiers.storage_class != sc_static)
                    initializer = cp_parser_save_nsdmi (parser);
-                 else if (cxx_dialect >= cxx0x)
+                 else if (cxx_dialect >= cxx11)
                    {
                      bool nonconst;
                      /* Don't require a constant rvalue in C++11, since we
@@ -20573,7 +20573,7 @@
 
 #if 0
   /* Enable this once a lot of code has transitioned to noexcept?  */
-  if (cxx_dialect >= cxx0x && !in_system_header)
+  if (cxx_dialect >= cxx11 && !in_system_header)
     warning (OPT_Wdeprecated, "dynamic exception specifications are "
             "deprecated in C++0x; use %<noexcept%> instead");
 #endif
@@ -21041,7 +21041,7 @@
 {
   cp_token *token = cp_lexer_peek_nth_token (parser->lexer, n);
 
-  return (cxx_dialect >= cxx0x
+  return (cxx_dialect >= cxx11
          && ((token->type == CPP_KEYWORD && token->keyword == RID_ALIGNAS)
              || (token->type == CPP_OPEN_SQUARE
                  && (token = cp_lexer_peek_nth_token (parser->lexer, n + 1))
@@ -22457,7 +22457,7 @@
   if (cp_lexer_next_token_is_keyword (parser->lexer,
                                      RID_TEMPLATE))
     cp_parser_template_declaration_after_export (parser, member_p);
-  else if (cxx_dialect >= cxx0x
+  else if (cxx_dialect >= cxx11
           && cp_lexer_next_token_is_keyword (parser->lexer, RID_USING))
     decl = cp_parser_alias_declaration (parser);
   else
Index: cp/pt.c
===================================================================
--- cp/pt.c     (revision 200347)
+++ cp/pt.c     (working copy)
@@ -5151,9 +5151,9 @@
     }
 
   linkage = decl_linkage (fn_no_ptr);
-  if (cxx_dialect >= cxx0x ? linkage == lk_none : linkage != lk_external)
+  if (cxx_dialect >= cxx11 ? linkage == lk_none : linkage != lk_external)
     {
-      if (cxx_dialect >= cxx0x)
+      if (cxx_dialect >= cxx11)
        error ("%qE is not a valid template argument for type %qT "
               "because %qD has no linkage",
               expr, type, fn_no_ptr);
@@ -5178,7 +5178,7 @@
   STRIP_NOPS (expr);
   if (expr && (null_ptr_cst_p (expr) || TREE_CODE (expr) == PTRMEM_CST))
     return true;
-  if (cxx_dialect >= cxx0x && null_member_pointer_value_p (expr))
+  if (cxx_dialect >= cxx11 && null_member_pointer_value_p (expr))
     return true;
   if (complain & tf_error)
     {
@@ -5510,7 +5510,7 @@
      arbitrary constant expressions.  Pointer and pointer to
      member arguments can be general constant expressions that evaluate
      to a null value, but otherwise still need to be of a specific form.  */
-  if (cxx_dialect >= cxx0x)
+  if (cxx_dialect >= cxx11)
     {
       if (TREE_CODE (expr) == PTRMEM_CST)
        /* A PTRMEM_CST is already constant, and a valid template
@@ -5644,7 +5644,7 @@
       if (DECL_P (expr) && DECL_TEMPLATE_PARM_P (expr))
        /* Non-type template parameters are OK.  */
        ;
-      else if (cxx_dialect >= cxx0x && integer_zerop (expr))
+      else if (cxx_dialect >= cxx11 && integer_zerop (expr))
        /* Null pointer values are OK in C++11.  */;
       else if (TREE_CODE (expr) != ADDR_EXPR
               && TREE_CODE (expr_type) != ARRAY_TYPE)
@@ -5681,14 +5681,14 @@
                     expr, type, decl);
              return NULL_TREE;
            }
-         else if (cxx_dialect < cxx0x && !DECL_EXTERNAL_LINKAGE_P (decl))
+         else if (cxx_dialect < cxx11 && !DECL_EXTERNAL_LINKAGE_P (decl))
            {
              error ("%qE is not a valid template argument of type %qT "
                     "because %qD does not have external linkage",
                     expr, type, decl);
              return NULL_TREE;
            }
-         else if (cxx_dialect >= cxx0x && decl_linkage (decl) == lk_none)
+         else if (cxx_dialect >= cxx11 && decl_linkage (decl) == lk_none)
            {
              error ("%qE is not a valid template argument of type %qT "
                     "because %qD has no linkage",
@@ -5787,7 +5787,7 @@
            return error_mark_node;
        }
 
-      if (cxx_dialect >= cxx0x && integer_zerop (expr))
+      if (cxx_dialect >= cxx11 && integer_zerop (expr))
        /* Null pointer values are OK in C++11.  */
        return perform_qualification_conversions (type, expr);
 
@@ -6216,7 +6216,7 @@
       tree t = maybe_get_template_decl_from_type_decl (TYPE_NAME (arg));
       if (TREE_CODE (t) == TEMPLATE_DECL)
        {
-         if (cxx_dialect >= cxx0x)
+         if (cxx_dialect >= cxx11)
            /* OK under DR 1004.  */;
          else if (complain & tf_warning_or_error)
            pedwarn (input_location, OPT_Wpedantic, "injected-class-name %qD"
@@ -13518,7 +13518,7 @@
        decl = finish_id_expression (t, decl, NULL_TREE,
                                     &idk,
                                     integral_constant_expression_p,
-          /*allow_non_integral_constant_expression_p=*/(cxx_dialect >= cxx0x),
+          /*allow_non_integral_constant_expression_p=*/(cxx_dialect >= cxx11),
                                     &non_integral_constant_expression_p,
                                     /*template_p=*/false,
                                     /*done=*/true,
@@ -19834,7 +19834,7 @@
            /* If there are no operands, it must be an expression such
               as "int()". This should not happen for aggregate types
               because it would form non-constant expressions.  */
-           gcc_assert (cxx_dialect >= cxx0x
+           gcc_assert (cxx_dialect >= cxx11
                        || INTEGRAL_OR_ENUMERATION_TYPE_P (type));
 
            return false;
@@ -20701,7 +20701,7 @@
 #ifdef ENABLE_CHECKING
   /* Try to get a constant value for all non-dependent expressions in
       order to expose bugs in *_dependent_expression_p and constexpr.  */
-  if (cxx_dialect >= cxx0x)
+  if (cxx_dialect >= cxx11)
     maybe_constant_value (fold_non_dependent_expr_sfinae (expr, tf_none));
 #endif
 
Index: cp/semantics.c
===================================================================
--- cp/semantics.c      (revision 200347)
+++ cp/semantics.c      (working copy)
@@ -7790,7 +7790,7 @@
     }
   else
     {
-      if (cxx_dialect >= cxx0x && !DECL_DECLARED_CONSTEXPR_P (r))
+      if (cxx_dialect >= cxx11 && !DECL_DECLARED_CONSTEXPR_P (r))
        inform (DECL_SOURCE_LOCATION (r),
                "%qD was not declared %<constexpr%>", r);
       else
@@ -8741,7 +8741,7 @@
     case STATIC_CAST_EXPR:
     case REINTERPRET_CAST_EXPR:
     case IMPLICIT_CONV_EXPR:
-      if (cxx_dialect < cxx0x
+      if (cxx_dialect < cxx11
          && !dependent_type_p (TREE_TYPE (t))
          && !INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (t)))
        /* In C++98, a conversion to non-integral type can't be part of a
Index: cp/tree.c
===================================================================
--- cp/tree.c   (revision 200347)
+++ cp/tree.c   (working copy)
@@ -211,7 +211,7 @@
       /* We just return clk_ordinary for NON_DEPENDENT_EXPR in C++98, but
         in C++11 lvalues don't bind to rvalue references, so we need to
         work harder to avoid bogus errors (c++/44870).  */
-      if (cxx_dialect < cxx0x)
+      if (cxx_dialect < cxx11)
        return clk_ordinary;
       else
        return lvalue_kind (TREE_OPERAND (ref, 0));
@@ -566,7 +566,7 @@
   TREE_SIDE_EFFECTS (init) = true;
   SET_EXPR_LOCATION (init, input_location);
 
-  if (cxx_dialect >= cxx0x
+  if (cxx_dialect >= cxx11
       && potential_constant_expression (elt_init))
     VEC_INIT_EXPR_IS_CONSTEXPR (init) = true;
   VEC_INIT_EXPR_VALUE_INIT (init) = value_init;
@@ -3956,7 +3956,7 @@
 cast_valid_in_integral_constant_expression_p (tree type)
 {
   return (INTEGRAL_OR_ENUMERATION_TYPE_P (type)
-         || cxx_dialect >= cxx0x
+         || cxx_dialect >= cxx11
          || dependent_type_p (type)
          || type == error_mark_node);
 }
Index: cp/typeck.c
===================================================================
--- cp/typeck.c (revision 200347)
+++ cp/typeck.c (working copy)
@@ -5945,7 +5945,7 @@
                                    orig_ifexp, orig_op1, orig_op2);
       /* In C++11, remember that the result is an lvalue or xvalue.
          In C++98, lvalue_kind can just assume lvalue in a template.  */
-      if (cxx_dialect >= cxx0x
+      if (cxx_dialect >= cxx11
          && lvalue_or_rvalue_with_address_p (expr)
          && !lvalue_or_rvalue_with_address_p (min))
        TREE_TYPE (min) = cp_build_reference_type (TREE_TYPE (min),
Index: cp/typeck2.c
===================================================================
--- cp/typeck2.c        (revision 200347)
+++ cp/typeck2.c        (working copy)
@@ -890,7 +890,7 @@
 
   if (!ok)
     {
-      if (cxx_dialect >= cxx0x)
+      if (cxx_dialect >= cxx11)
        pedwarn (EXPR_LOC_OR_HERE (init), OPT_Wnarrowing,
                 "narrowing conversion of %qE from %qT to %qT inside { }",
                 init, ftype, type);

Reply via email to