Commit b930e428 by Matt Austern Committed by Matt Austern

class.c (check_field_decls): Changed warning about const member variables so…

class.c (check_field_decls): Changed warning about const member variables so that it doesn't get issued for...

        * class.c (check_field_decls): Changed warning about const member
        variables so that it doesn't get issued for a class aggregate.

From-SVN: r57749
parent 2282d28d
2002-10-02 Matt Austern <austern@apple.com
* class.c (check_field_decls): Changed warning about const member
variables so that it doesn't get issued for a class aggregate.
2002-10-02 Nathanael Nerode <neroden@gcc.gnu.org>
* doc/vms.texi: Blow away false include file section.
......
......@@ -3338,7 +3338,8 @@ check_field_decls (t, access_decls, empty_p,
*cant_have_default_ctor_p = 1;
TYPE_HAS_COMPLEX_ASSIGN_REF (t) = 1;
if (! TYPE_HAS_CONSTRUCTOR (t) && extra_warnings)
if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t)
&& extra_warnings)
cp_warning_at ("non-static reference `%#D' in class without a constructor", x);
}
......@@ -3372,7 +3373,8 @@ check_field_decls (t, access_decls, empty_p,
*cant_have_default_ctor_p = 1;
TYPE_HAS_COMPLEX_ASSIGN_REF (t) = 1;
if (! TYPE_HAS_CONSTRUCTOR (t) && extra_warnings)
if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t)
&& extra_warnings)
cp_warning_at ("non-static const member `%#D' in class without a constructor", x);
}
/* A field that is pseudo-const makes the structure likewise. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment