PR c++/26114, c++/26115
PR c++/26114, c++/26115 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings. * class.c (check_field_decls): Ditto. From-SVN: r113010
This commit is contained in:
parent
6cc1d69426
commit
778f6a08fd
@ -1,3 +1,9 @@
|
||||
2006-04-17 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
PR c++/26114, c++/26115
|
||||
* typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
|
||||
* class.c (check_field_decls): Ditto.
|
||||
|
||||
2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
* init.c (build_offset_ref): Remove superfluous temporary.
|
||||
|
@ -2935,7 +2935,8 @@ check_field_decls (tree t, tree *access_decls,
|
||||
members. */
|
||||
TYPE_HAS_COMPLEX_ASSIGN_REF (t) = 1;
|
||||
|
||||
if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t))
|
||||
if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t)
|
||||
&& extra_warnings)
|
||||
warning (OPT_Wextra, "non-static reference %q+#D in class without a constructor", x);
|
||||
}
|
||||
|
||||
@ -2981,7 +2982,8 @@ check_field_decls (tree t, tree *access_decls,
|
||||
members. */
|
||||
TYPE_HAS_COMPLEX_ASSIGN_REF (t) = 1;
|
||||
|
||||
if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t))
|
||||
if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t)
|
||||
&& extra_warnings)
|
||||
warning (OPT_Wextra, "non-static const member %q+#D in class without a constructor", x);
|
||||
}
|
||||
/* A field that is pseudo-const makes the structure likewise. */
|
||||
|
@ -4496,7 +4496,7 @@ cxx_mark_addressable (tree exp)
|
||||
("address of explicit register variable %qD requested", x);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
else if (extra_warnings)
|
||||
warning
|
||||
(OPT_Wextra, "address requested for %qD, which is declared %<register%>", x);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user