diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2003-09-18 21:16:02 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@gcc.gnu.org> | 2003-09-18 21:16:02 +0000 |
commit | 7229527c2c6859c3e172b1a2d9ab16a144c93a91 (patch) | |
tree | 7b37f0334c64b712dec59da9e2fe7960ca5b73d5 | |
parent | 3e86b595ac576217a66fdeb50058d9b44402ce97 (diff) | |
download | gcc-7229527c2c6859c3e172b1a2d9ab16a144c93a91.zip gcc-7229527c2c6859c3e172b1a2d9ab16a144c93a91.tar.gz gcc-7229527c2c6859c3e172b1a2d9ab16a144c93a91.tar.bz2 |
winnt.c (gen_stdcall_suffix): Quit summation of total parm size if a parm has incomplete type.
* config/i386/winnt.c (gen_stdcall_suffix): Quit summation of
total parm size if a parm has incomplete type.
(gen_fastcall_suffix): Likewise.
From-SVN: r71543
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b8d779d..4166ead 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-09-18 Danny Smith <dannysmith@users.sourceforge.net> + + * config/i386/winnt.c (gen_stdcall_suffix): Quit summation of + total parm size if a parm has incomplete type. + (gen_fastcall_suffix): Likewise. + 2003-09-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * except.c (output_function_exception_table): Adjust last change diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 076a293..11a93a4 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -420,7 +420,10 @@ gen_fastcall_suffix (tree decl) { tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl)); - while (TREE_VALUE (formal_type) != void_type_node) + /* Quit if we hit an incomplete type. Error is reported + by convert_arguments in c-typeck.c or cp/typeck.c. */ + while (TREE_VALUE (formal_type) != void_type_node + && COMPLETE_TYPE_P (TREE_VALUE (formal_type))) { int parm_size = TREE_INT_CST_LOW (TYPE_SIZE (TREE_VALUE (formal_type))); @@ -458,7 +461,10 @@ gen_stdcall_suffix (tree decl) { tree formal_type = TYPE_ARG_TYPES (TREE_TYPE (decl)); - while (TREE_VALUE (formal_type) != void_type_node) + /* Quit if we hit an incomplete type. Error is reported + by convert_arguments in c-typeck.c or cp/typeck.c. */ + while (TREE_VALUE (formal_type) != void_type_node + && COMPLETE_TYPE_P (TREE_VALUE (formal_type))) { int parm_size = TREE_INT_CST_LOW (TYPE_SIZE (TREE_VALUE (formal_type))); |