Commit 778f6a08 by Janis Johnson Committed by Janis Johnson

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
parent 6cc1d694
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);
}
......
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