]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/12320 (ICE on use of undefined enum)
authorDanny Smith <dannysmith@users.sourceforge.net>
Thu, 18 Sep 2003 21:22:17 +0000 (21:22 +0000)
committerDanny Smith <dannysmith@gcc.gnu.org>
Thu, 18 Sep 2003 21:22:17 +0000 (21:22 +0000)
PR c++/12320
* call.c (type_passed_as): Check for incomplete type.
(convert_for_arg_passing): Likewise.

From-SVN: r71546

gcc/cp/ChangeLog
gcc/cp/call.c

index ad41de2c00e839276011b6d8df5f28f07b0a9ed7..1bc2abf5e9c44888bd72da44db268607d358448e 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       PR c++/12320
+       * call.c (type_passed_as): Check for incomplete type.
+       (convert_for_arg_passing): Likewise.
+
 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/9848
index 4f86cc67c3c8e814f07da5b207ca273020fc1c0b..b2b9d000c6bccfdacc25b658bb5f3f2c1c2f8f14 100644 (file)
@@ -4342,6 +4342,7 @@ type_passed_as (tree type)
     type = build_reference_type (type);
   else if (PROMOTE_PROTOTYPES
           && INTEGRAL_TYPE_P (type)
+          && COMPLETE_TYPE_P (type)
           && INT_CST_LT_UNSIGNED (TYPE_SIZE (type),
                                   TYPE_SIZE (integer_type_node)))
     type = integer_type_node;
@@ -4361,6 +4362,7 @@ convert_for_arg_passing (tree type, tree val)
     val = build1 (ADDR_EXPR, build_reference_type (type), val);
   else if (PROMOTE_PROTOTYPES
           && INTEGRAL_TYPE_P (type)
+          && COMPLETE_TYPE_P (type)
           && INT_CST_LT_UNSIGNED (TYPE_SIZE (type),
                                   TYPE_SIZE (integer_type_node)))
     val = perform_integral_promotions (val);