+2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/13683
+ * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
+ a sizeof expression.block
+
2004-01-29 Aldy Hernandez <aldyh@redhat.com>
-
- Backport:
-
- 2004-01-17 Fred Fish <fnf@intrinsity.com>
-
- PR c++/11895
- * cp/decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
- except don't call array_type_nelts() with a VECTOR_TYPE.
+
+ Backport:
+
+ 2004-01-17 Fred Fish <fnf@intrinsity.com>
+
+ PR c++/11895
+ * cp/decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
+ except don't call array_type_nelts() with a VECTOR_TYPE.
2004-01-29 Aldy Hernandez <aldyh@redhat.com>
Backport:
2003-06-03 Jason Merrill <jason@redhat.com>
-
- * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
-
- * cp/decl.c (reshape_init): Handle vectors.
-
- * testsuite/g++.dg/init/array10.C: New.
+
+ * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
+
+ * cp/decl.c (reshape_init): Handle vectors.
+
+ * testsuite/g++.dg/init/array10.C: New.
2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
arg = require_complete_type (arg);
- if (arg != error_mark_node && ! pod_type_p (TREE_TYPE (arg)))
- {
- /* Undefined behavior [expr.call] 5.2.2/7. We used to just warn
- here and do a bitwise copy, but now cp_expr_size will abort if we
- try to do that. */
- warning ("cannot pass objects of non-POD type `%#T' through `...'; \
-call will abort at runtime",
- TREE_TYPE (arg));
- arg = call_builtin_trap ();
- }
+ if (arg != error_mark_node\r
+ && !pod_type_p (TREE_TYPE (arg)))\r
+ {\r
+ /* Undefined behavior [expr.call] 5.2.2/7. We used to just warn\r
+ here and do a bitwise copy, but now cp_expr_size will abort if we\r
+ try to do that.\r
+ If the call appears in the context of a sizeof expression,\r
+ there is no need to emit a warning, since the expression won't be\r
+ evaluated. We keep the builtin_trap just as a safety check. */\r
+ if (!skip_evaluation)\r
+ warning ("cannot pass objects of non-POD type `%#T' through `...'; "\r
+ "call will abort at runtime", TREE_TYPE (arg));\r
+ arg = call_builtin_trap ();\r
+ }\r
return arg;
}