diff options
author | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-18 21:22:17 +0000 |
---|---|---|
committer | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-18 21:22:17 +0000 |
commit | 255ce7f88da4435f0c65ea99c3dea544334025ca (patch) | |
tree | 082e617cb7d59065265e93f21029a0e7a485cfc2 /gcc/cp | |
parent | a155f1e5cea8b0a1d58de4ff034cf3ce6b159ecb (diff) | |
download | gcc-255ce7f88da4435f0c65ea99c3dea544334025ca.tar.gz |
PR c++/12320
* call.c (type_passed_as): Check for incomplete type.
(convert_for_arg_passing): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ad41de2c00e..1bc2abf5e9c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 4f86cc67c3c..b2b9d000c6b 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -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); |