]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Rename TYPE_ANONYMOUS_P to TYPE_UNNAMED_P.
authorJason Merrill <jason@redhat.com>
Thu, 4 Aug 2016 16:06:17 +0000 (12:06 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 4 Aug 2016 16:06:17 +0000 (12:06 -0400)
* cp-tree.h (TYPE_UNNAMED_P): Rename from TYPE_ANONYMOUS_P.
(TYPE_WAS_UNNAMED): Rename from TYPE_WAS_ANONYMOUS.
* class.c, decl.c, decl2.c, error.c, lambda.c, mangle.c,
name-lookup.c, parser.c, pt.c, semantics.c, tree.c: Adjust.

From-SVN: r239137

21 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/error.c
gcc/cp/lambda.c
gcc/cp/mangle.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/objc/objc-encoding.c
gcc/testsuite/g++.dg/cpp0x/enum26.C
gcc/testsuite/g++.dg/ext/anon-struct4.C
gcc/testsuite/g++.dg/lookup/anon2.C
gcc/testsuite/g++.dg/other/anon3.C
gcc/testsuite/g++.dg/spellcheck-fields.C
gcc/testsuite/g++.dg/warn/deprecated-6.C
gcc/testsuite/g++.dg/warn/deprecated.C

index f8de78c97fa3817b2cdb01e65893b64672f2e823..e7854f7505e2e3cac61c66910aa4496c9eb49410 100644 (file)
@@ -1,5 +1,10 @@
 2016-08-04  Jason Merrill  <jason@redhat.com>
 
+       * cp-tree.h (TYPE_UNNAMED_P): Rename from TYPE_ANONYMOUS_P.
+       (TYPE_WAS_UNNAMED): Rename from TYPE_WAS_ANONYMOUS.
+       * class.c, decl.c, decl2.c, error.c, lambda.c, mangle.c,
+       name-lookup.c, parser.c, pt.c, semantics.c, tree.c: Adjust.
+
        PR c++/72796
        * typeck.c (finish_class_member_access_expr): Avoid stripping
        SCOPE_REF to dependent base.
index b537b7e634cca5871972e1470da9c89d5499ae70..f8349650fe6e4cf2a7eff0aed558887a4d113a37 100644 (file)
@@ -3077,11 +3077,11 @@ finish_struct_anon_r (tree field, bool complain)
         the TYPE_DECL that we create implicitly.  You're
         allowed to put one anonymous union inside another,
         though, so we explicitly tolerate that.  We use
-        TYPE_ANONYMOUS_P rather than ANON_AGGR_TYPE_P so that
+        TYPE_UNNAMED_P rather than ANON_AGGR_TYPE_P so that
         we also allow unnamed types used for defining fields.  */
       if (DECL_ARTIFICIAL (elt)
          && (!DECL_IMPLICIT_TYPEDEF_P (elt)
-             || TYPE_ANONYMOUS_P (TREE_TYPE (elt))))
+             || TYPE_UNNAMED_P (TREE_TYPE (elt))))
        continue;
 
       if (TREE_CODE (elt) != FIELD_DECL)
@@ -6718,7 +6718,7 @@ find_flexarrays (tree t, flexmems_t *fmem)
       tree fldtype = TREE_TYPE (fld);
       if (TREE_CODE (fld) != TYPE_DECL
          && RECORD_OR_UNION_TYPE_P (fldtype)
-         && TYPE_ANONYMOUS_P (fldtype))
+         && TYPE_UNNAMED_P (fldtype))
        {
          /* Members of anonymous structs and unions are treated as if
             they were members of the containing class.  Descend into
@@ -6798,7 +6798,7 @@ diagnose_flexarrays (tree t, const flexmems_t *fmem)
 {
   /* Members of anonymous structs and unions are considered to be members
      of the containing struct or union.  */
-  if (TYPE_ANONYMOUS_P (t) || !fmem->array)
+  if (TYPE_UNNAMED_P (t) || !fmem->array)
     return;
 
   const char *msg = 0;
index 76616c611d810650cc1d5ec3880320ff0804941a..d6fb387aced995026ed0f7a79d10c62200392290 100644 (file)
@@ -761,7 +761,7 @@ struct GTY (()) tree_trait_expr {
   enum cp_trait_kind kind;
 };
 
-/* Based off of TYPE_ANONYMOUS_P.  */
+/* Based off of TYPE_UNNAMED_P.  */
 #define LAMBDA_TYPE_P(NODE) \
   (CLASS_TYPE_P (NODE) && CLASSTYPE_LAMBDA_EXPR (NODE))
 
@@ -1553,7 +1553,7 @@ enum languages { lang_c, lang_cplusplus, lang_java };
 #define TYPE_NAME_LENGTH(NODE) (IDENTIFIER_LENGTH (TYPE_IDENTIFIER (NODE)))
 
 /* Nonzero if NODE has no name for linkage purposes.  */
-#define TYPE_ANONYMOUS_P(NODE) \
+#define TYPE_UNNAMED_P(NODE) \
   (OVERLOAD_TYPE_P (NODE) && anon_aggrname_p (TYPE_LINKAGE_IDENTIFIER (NODE)))
 
 /* The _DECL for this _TYPE.  */
@@ -4116,7 +4116,8 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
 
 /* Define fields and accessors for nodes representing declared names.  */
 
-#define TYPE_WAS_ANONYMOUS(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->was_anonymous)
+/* Nonzero if TYPE is an unnamed class with a typedef for linkage purposes.  */
+#define TYPE_WAS_UNNAMED(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->was_anonymous)
 
 /* C++: all of these are overloaded!  These apply only to TYPE_DECLs.  */
 
@@ -4270,8 +4271,8 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
    equivalent to `struct S {}; typedef struct S S;' in C.
    DECL_IMPLICIT_TYPEDEF_P will hold for the typedef indicated in this
    example.  In C++, there is a second implicit typedef for each
-   class, in the scope of `S' itself, so that you can say `S::S'.
-   DECL_SELF_REFERENCE_P will hold for that second typedef.  */
+   class, called the injected-class-name, in the scope of `S' itself, so that
+   you can say `S::S'.  DECL_SELF_REFERENCE_P will hold for that typedef.  */
 #define DECL_IMPLICIT_TYPEDEF_P(NODE) \
   (TREE_CODE (NODE) == TYPE_DECL && DECL_LANG_FLAG_2 (NODE))
 #define SET_DECL_IMPLICIT_TYPEDEF_P(NODE) \
index d2ba7baadc72207e94d42b07c012f3229523a8a3..04a0df6414d99a3b8dc098aa428eddf3c8121e8b 100644 (file)
@@ -4614,7 +4614,7 @@ check_tag_decl (cp_decl_specifier_seq *declspecs,
     }
   /* Check for an anonymous union.  */
   else if (declared_type && RECORD_OR_UNION_CODE_P (TREE_CODE (declared_type))
-          && TYPE_ANONYMOUS_P (declared_type))
+          && TYPE_UNNAMED_P (declared_type))
     {
       /* 7/3 In a simple-declaration, the optional init-declarator-list
         can be omitted only when declaring a class (clause 9) or
@@ -10773,7 +10773,7 @@ grokdeclarator (const cp_declarator *declarator,
          && unqualified_id
          && TYPE_NAME (type)
          && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
-         && TYPE_ANONYMOUS_P (type)
+         && TYPE_UNNAMED_P (type)
          && declspecs->type_definition_p
          && attributes_naming_typedef_ok (*attrlist)
          && cp_type_quals (type) == TYPE_UNQUALIFIED)
@@ -10785,7 +10785,7 @@ grokdeclarator (const cp_declarator *declarator,
            {
              if (anon_aggrname_p (TYPE_IDENTIFIER (t)))
                /* We do not rename the debug info representing the
-                  anonymous tagged type because the standard says in
+                  unnamed tagged type because the standard says in
                   [dcl.typedef] that the naming applies only for
                   linkage purposes.  */
                /*debug_hooks->set_name (t, decl);*/
@@ -10793,7 +10793,7 @@ grokdeclarator (const cp_declarator *declarator,
            }
 
          if (TYPE_LANG_SPECIFIC (type))
-           TYPE_WAS_ANONYMOUS (type) = 1;
+           TYPE_WAS_UNNAMED (type) = 1;
 
          /* If this is a typedef within a template class, the nested
             type is a (non-primary) template.  The name for the
@@ -10802,7 +10802,7 @@ grokdeclarator (const cp_declarator *declarator,
            DECL_NAME (CLASSTYPE_TI_TEMPLATE (type))
              = TYPE_IDENTIFIER (type);
 
-         /* Adjust linkage now that we aren't anonymous anymore.  */
+         /* Adjust linkage now that we aren't unnamed anymore.  */
          reset_type_linkage (type);
 
          /* FIXME remangle member functions; member functions of a
index 2ff6f53ba4ff3dc105b455f0584a19270982f86b..1daa9f525d6acfc59c9951bbebb8c8824244b6b2 100644 (file)
@@ -838,7 +838,7 @@ finish_static_data_member_decl (tree decl,
   else
     for (tree t = current_class_type; TYPE_P (t);
         t = CP_TYPE_CONTEXT (t))
-      if (TYPE_ANONYMOUS_P (t))
+      if (TYPE_UNNAMED_P (t))
        {
          if (permerror (DECL_SOURCE_LOCATION (decl),
                         "static data member %qD in unnamed class", decl))
@@ -1306,7 +1306,7 @@ save_template_attributes (tree *attr_p, tree *decl_p)
 }
 
 /* Return true iff ATTRS are acceptable attributes to be applied in-place
-   to a typedef which gives a previously anonymous class or enum a name for
+   to a typedef which gives a previously unnamed class or enum a name for
    linkage purposes.  */
 
 bool
@@ -4257,12 +4257,12 @@ no_linkage_error (tree decl)
   else if (CLASS_TYPE_P (t) && TYPE_BEING_DEFINED (t))
     /* The type might end up having a typedef name for linkage purposes.  */
     vec_safe_push (no_linkage_decls, decl);
-  else if (TYPE_ANONYMOUS_P (t))
+  else if (TYPE_UNNAMED_P (t))
     {
       bool d = false;
       if (cxx_dialect >= cxx11)
        d = permerror (DECL_SOURCE_LOCATION (decl), "%q#D, declared using "
-                      "anonymous type, is used but never defined", decl);
+                      "unnamed type, is used but never defined", decl);
       else if (DECL_EXTERN_C_P (decl))
        /* Allow this; it's pretty common in C.  */;
       else if (VAR_P (decl))
@@ -4270,11 +4270,11 @@ no_linkage_error (tree decl)
           no linkage can only be used to declare extern "C"
           entities.  Since it's not always an error in the
           ISO C++ 90 Standard, we only issue a warning.  */
-       d = warning_at (DECL_SOURCE_LOCATION (decl), 0, "anonymous type "
+       d = warning_at (DECL_SOURCE_LOCATION (decl), 0, "unnamed type "
                        "with no linkage used to declare variable %q#D with "
                        "linkage", decl);
       else
-       d = permerror (DECL_SOURCE_LOCATION (decl), "anonymous type with no "
+       d = permerror (DECL_SOURCE_LOCATION (decl), "unnamed type with no "
                       "linkage used to declare function %q#D with linkage",
                       decl);
       if (d && is_typedef_decl (TYPE_NAME (t)))
index 69a40cc7950b81161fbfdf240f0c4658c667d809..36e26cc1b1da407be0c52ad1f8549b9a1ff3453c 100644 (file)
@@ -679,9 +679,9 @@ dump_aggr_type (cxx_pretty_printer *pp, tree t, int flags)
   if (name == 0 || anon_aggrname_p (name))
     {
       if (flags & TFF_CLASS_KEY_OR_ENUM)
-       pp_string (pp, M_("<anonymous>"));
+       pp_string (pp, M_("<unnamed>"));
       else
-       pp_printf (pp, M_("<anonymous %s>"), variety);
+       pp_printf (pp, M_("<unnamed %s>"), variety);
     }
   else if (LAMBDA_TYPE_P (t))
     {
@@ -1745,7 +1745,7 @@ dump_function_name (cxx_pretty_printer *pp, tree t, int flags)
     {
       if (LAMBDA_TYPE_P (DECL_CONTEXT (t)))
        name = get_identifier ("<lambda>");
-      else if (TYPE_ANONYMOUS_P (DECL_CONTEXT (t)))
+      else if (TYPE_UNNAMED_P (DECL_CONTEXT (t)))
        name = get_identifier ("<constructor>");
       else
        name = constructor_name (DECL_CONTEXT (t));
index 9bf8a560d020be028160d9039623848272550023..abb967a9aaec983f8f41486510d6e552e4063f40 100644 (file)
@@ -134,7 +134,7 @@ begin_lambda_type (tree lambda)
 
   {
     /* Unique name.  This is just like an unnamed class, but we cannot use
-       make_anon_name because of certain checks against TYPE_ANONYMOUS_P.  */
+       make_anon_name because of certain checks against TYPE_UNNAMED_P.  */
     tree name;
     name = make_lambda_name ();
 
index d1bf3effbd25edef1f1e6653737738be26536e99..b6c96283f4fee5ec62d58b100cfefcc7d7c12427 100644 (file)
@@ -1320,7 +1320,7 @@ write_unqualified_name (tree decl)
       tree type = TREE_TYPE (decl);
 
       if (TREE_CODE (decl) == TYPE_DECL
-          && TYPE_ANONYMOUS_P (type))
+          && TYPE_UNNAMED_P (type))
         write_unnamed_type_name (type);
       else if (TREE_CODE (decl) == TYPE_DECL
                && LAMBDA_TYPE_P (type))
@@ -1449,7 +1449,7 @@ nested_anon_class_index (tree type)
        tree memtype = TREE_TYPE (member);
        if (memtype == type)
          return index;
-       else if (TYPE_ANONYMOUS_P (memtype))
+       else if (TYPE_UNNAMED_P (memtype))
          ++index;
       }
 
@@ -1734,7 +1734,7 @@ static int
 local_class_index (tree entity)
 {
   int ix, discriminator = 0;
-  tree name = (TYPE_ANONYMOUS_P (entity) ? NULL_TREE
+  tree name = (TYPE_UNNAMED_P (entity) ? NULL_TREE
               : TYPE_IDENTIFIER (entity));
   tree ctx = TYPE_CONTEXT (entity);
   for (ix = 0; ; ix++)
@@ -1744,7 +1744,7 @@ local_class_index (tree entity)
        return discriminator;
       if (TYPE_CONTEXT (type) == ctx
          && (name ? TYPE_IDENTIFIER (type) == name
-             : TYPE_ANONYMOUS_P (type)))
+             : TYPE_UNNAMED_P (type)))
        ++discriminator;
     }
   gcc_unreachable ();
@@ -1772,7 +1772,7 @@ discriminator_for_local_entity (tree entity)
       entity = TREE_TYPE (entity);
 
       /* Lambdas and unnamed types have their own discriminators.  */
-      if (LAMBDA_TYPE_P (entity) || TYPE_ANONYMOUS_P (entity))
+      if (LAMBDA_TYPE_P (entity) || TYPE_UNNAMED_P (entity))
        return 0;
 
       return local_class_index (entity);
index 7c3942a52934b03d76a1afea27d25a5cd323efb5..11957fd28069c5437ce146d8a6e8d4141bad2cc0 100644 (file)
@@ -2089,7 +2089,7 @@ constructor_name_p (tree name, tree type)
 static GTY(()) int anon_cnt;
 
 /* Return an IDENTIFIER which can be used as a name for
-   anonymous structs and unions.  */
+   unnamed structs and unions.  */
 
 tree
 make_anon_name (void)
@@ -2103,7 +2103,7 @@ make_anon_name (void)
 /* This code is practically identical to that for creating
    anonymous names, but is just used for lambdas instead.  This isn't really
    necessary, but it's convenient to avoid treating lambdas like other
-   anonymous types.  */
+   unnamed types.  */
 
 static GTY(()) int lambda_cnt = 0;
 
index fdb0ab0b035f4482464c45710ab0e3972f1c5514..72a494dae9e92313e5296c3a5fce3cf444951b55 100644 (file)
@@ -17043,7 +17043,7 @@ cp_parser_enum_specifier (cp_parser* parser)
   bool nested_being_defined = false;
   bool new_value_list = false;
   bool is_new_type = false;
-  bool is_anonymous = false;
+  bool is_unnamed = false;
   tree underlying_type = NULL_TREE;
   cp_token *type_start_token = NULL;
   bool saved_colon_corrects_to_scope_p = parser->colon_corrects_to_scope_p;
@@ -17137,10 +17137,10 @@ cp_parser_enum_specifier (cp_parser* parser)
       else
        {
          identifier = make_anon_name ();
-         is_anonymous = true;
+         is_unnamed = true;
          if (scoped_enum_p)
            error_at (type_start_token->location,
-                     "anonymous scoped enum is not allowed");
+                     "unnamed scoped enum is not allowed");
        }
     }
   pop_deferring_access_checks ();
@@ -17321,9 +17321,9 @@ cp_parser_enum_specifier (cp_parser* parser)
       /* If the next token is not '}', then there are some enumerators.  */
       else if (cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_BRACE))
        {
-         if (is_anonymous && !scoped_enum_p)
+         if (is_unnamed && !scoped_enum_p)
            pedwarn (type_start_token->location, OPT_Wpedantic,
-                    "ISO C++ forbids empty anonymous enum");
+                    "ISO C++ forbids empty unnamed enum");
        }
       else
        cp_parser_enumerator_list (parser, type);
@@ -17341,7 +17341,7 @@ cp_parser_enum_specifier (cp_parser* parser)
        and additional restrictions apply.  */
       if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON))
        {
-         if (is_anonymous)
+         if (is_unnamed)
            error_at (type_start_token->location,
                      "opaque-enum-specifier without name");
          else if (nested_name_specifier)
@@ -19347,9 +19347,9 @@ cp_parser_direct_declarator (cp_parser* parser,
                    else if (IDENTIFIER_TYPENAME_P (unqualified_name))
                      sfk = sfk_conversion;
                    else if (/* There's no way to declare a constructor
-                               for an anonymous type, even if the type
+                               for an unnamed type, even if the type
                                got a name for linkage purposes.  */
-                            !TYPE_WAS_ANONYMOUS (class_type)
+                            !TYPE_WAS_UNNAMED (class_type)
                             /* Handle correctly (c++/19200):
 
                                struct S {
index a23a05aff35ed591fa168b17940bb119502dee8c..bf729ea3107f7b7457c7fc2e843ac67e5e3acbe1 100644 (file)
@@ -17340,8 +17340,8 @@ check_instantiated_arg (tree tmpl, tree t, tsubst_flags_t complain)
             type deduction to fail.  */
          if (complain & tf_error)
            {
-             if (TYPE_ANONYMOUS_P (nt))
-               error ("%qT is/uses anonymous type", t);
+             if (TYPE_UNNAMED_P (nt))
+               error ("%qT is/uses unnamed type", t);
              else
                error ("template argument for %qD uses local type %qT",
                       tmpl, t);
index 2fe2d091a3a0c0748007149785b024477b431690..4bffe6dc8514c8c654fb913c2ab28c3fd89d4c22 100644 (file)
@@ -2916,7 +2916,7 @@ begin_class_definition (tree t)
   /* Reset the interface data, at the earliest possible
      moment, as it might have been set via a class foo;
      before.  */
-  if (! TYPE_ANONYMOUS_P (t))
+  if (! TYPE_UNNAMED_P (t))
     {
       struct c_fileinfo *finfo = \
        get_fileinfo (LOCATION_FILE (input_location));
index 6adeb63dd06df52bd573685c116532cb4bb839df..2e58615e1d721bfc5d45b91e9d3a4960d5cf0f64 100644 (file)
@@ -2353,9 +2353,9 @@ no_linkage_check (tree t, bool relaxed_p)
        return NULL_TREE;
       /* Fall through.  */
     case ENUMERAL_TYPE:
-      /* Only treat anonymous types as having no linkage if they're at
+      /* Only treat unnamed types as having no linkage if they're at
         namespace scope.  This is core issue 966.  */
-      if (TYPE_ANONYMOUS_P (t) && TYPE_NAMESPACE_SCOPE_P (t))
+      if (TYPE_UNNAMED_P (t) && TYPE_NAMESPACE_SCOPE_P (t))
        return t;
 
       for (r = CP_TYPE_CONTEXT (t); ; )
index 41ac6a40f6fd3cdc6e53acfae370e8e83288562f..95e9c8bd272a272db286dd9a62099a9d04d2fc37 100644 (file)
@@ -553,7 +553,7 @@ encode_aggregate_within (tree type, int curtype, int format, int left,
      args as a composite struct tag name. */
   if (name && TREE_CODE (name) == IDENTIFIER_NODE
       /* Did this struct have a tag?  */
-      && !TYPE_WAS_ANONYMOUS (type))
+      && !TYPE_WAS_UNNAMED (type))
     obstack_grow (&util_obstack,
                  decl_as_string (type, TFF_DECL_SPECIFIERS | TFF_UNQUALIFIED_NAME),
                  strlen (decl_as_string (type, TFF_DECL_SPECIFIERS | TFF_UNQUALIFIED_NAME)));
index cfc5df3a3f560f1b7aca2615f9ff2332f95533f2..3883da92afffb5dd5479b159218cd997a8b6945c 100644 (file)
@@ -2,8 +2,8 @@
 // { dg-do compile { target c++11 } }
 // { dg-options "-pedantic" }
 
-enum {};            // { dg-warning "empty anonymous" }
+enum {};            // { dg-warning "empty unnamed" }
 
-enum class {};      // { dg-error "anonymous" }
+enum class {};      // { dg-error "unnamed" }
 
-enum class { x };   // { dg-error "anonymous" }
+enum class { x };   // { dg-error "unnamed" }
index 0097ba1244c2ebb312bf0661050be539dd988690..8eff728cc1194a74ad82631cf968df1ecb882f66 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/14401
 
 struct { struct { int& i ; } bar ; } foo ; // { dg-error "deleted|uninitialized" "uninit" }
-// { dg-warning "anonymous" "anon" { target { ! c++11 } } 3 }
+// { dg-warning "unnamed" "anon" { target { ! c++11 } } 3 }
 // { dg-message "should be initialized" "ref-uninit" { target { ! c++11 } } 3 }
index 4984307e454089b7e837580e2107b1a377a9a351..dbda79fefcf156b0972283846c4831202861a14c 100644 (file)
@@ -4,6 +4,6 @@
 // Make sure we issue a diagnostic if a type with no linkage is used
 // to declare a a variable that has linkage.
 
-struct { int i; } a; // { dg-warning "anonymous type" }
+struct { int i; } a; // { dg-warning "unnamed type" }
 
 void foo() { a.i; }
index 586a40e5eef608ff7f4ed654b9cb4a5368631043..d33eb413ccfa53d8915faa3da4a36c8a7713e3a1 100644 (file)
@@ -4,4 +4,4 @@
 
 // { dg-do compile }
 
-enum { a = 3 } x; // { dg-warning "anonymous type" "" { target { ! c++11 } } }
+enum { a = 3 } x; // { dg-warning "unnamed type" "" { target { ! c++11 } } }
index df49c92f7a6a03fb9797bce9782b5cb196ee6182..1ac77a6efe863af10b571fd05d9b1ec24441ca9b 100644 (file)
@@ -59,7 +59,7 @@ struct has_anon
 
 int test7 (struct has_anon *ptr)
 {
-  return ptr->s.colour; /* { dg-error "'struct has_anon::<anonymous>' has no member named 'colour'; did you mean 'color'?" } */
+  return ptr->s.colour; /* { dg-error "'struct has_anon::<unnamed>' has no member named 'colour'; did you mean 'color'?" } */
 }
 
 int test8 (foo &ref)
index 4afb2841a74aafbf976feabf4df12ee3f0d10040..159a8c71cd860179a5ec7d3fb6c35406436c05f4 100644 (file)
@@ -68,7 +68,7 @@ int func2(S1 *p)
   
   p->u1.field5 = g1 + p->field7;
   p->u2.field9;                                /* { dg-warning "'S1::u2' is deprecated: Please avoid u2" "" } */
-  return p->u1.field6 + p->field8;     /* { dg-warning "'S1::<anonymous union>::field6' is deprecated: Please avoid field6" "" } */
+  return p->u1.field6 + p->field8;     /* { dg-warning "'S1::<unnamed union>::field6' is deprecated: Please avoid field6" "" } */
                                        /* { dg-warning "'S1::field8' is deprecated: Please avoid field8" "field8" { target *-*-* } 71 } */
 }
 
index 210740814f953ae37f829999520c147cc5d332f4..0c684efe29d9802ca609cd6d81ee0edadc834f9e 100644 (file)
@@ -70,7 +70,7 @@ int func2(S1 *p)
   
   p->u1.field5 = g1 + p->field7;
   p->u2.field9;                                /* { dg-warning "'S1::u2' is deprecated" "" } */
-  return p->u1.field6 + p->field8;     /* { dg-warning "'S1::<anonymous union>::field6' is deprecated" "" } */
+  return p->u1.field6 + p->field8;     /* { dg-warning "'S1::<unnamed union>::field6' is deprecated" "" } */
                                        /* { dg-warning "'S1::field8' is deprecated" "field8" { target *-*-* } 73 } */
 }