diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2008-07-15 09:04:33 +0000 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2008-07-15 11:04:33 +0200 |
commit | e65d1ec6b0fc79dd2f72ab85f5eb8dbe8d480e57 (patch) | |
tree | 6b29fd2254041440823db2ff9a529b817d92340c /gcc/builtins.c | |
parent | 7ce841d2c832b46c5b72518715c41ba91cde344f (diff) | |
download | gcc-e65d1ec6b0fc79dd2f72ab85f5eb8dbe8d480e57.zip gcc-e65d1ec6b0fc79dd2f72ab85f5eb8dbe8d480e57.tar.gz gcc-e65d1ec6b0fc79dd2f72ab85f5eb8dbe8d480e57.tar.bz2 |
builtins.c (std_canonical_va_list): Treat structure based va_list types.
2008-07-15 Kai Tietz <kai.tietz@onevision.com>
* builtins.c (std_canonical_va_list): Treat structure based
va_list types.
From-SVN: r137819
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 2d6ad2a..60caa81 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -4691,10 +4691,12 @@ std_canonical_va_list_type (tree type) type = TREE_TYPE (type); else if (POINTER_TYPE_P (type) && POINTER_TYPE_P (TREE_TYPE(type))) type = TREE_TYPE (type); - wtype = va_list_type_node; htype = type; - if (TREE_CODE (wtype) == ARRAY_TYPE) + /* Treat structure va_list types. */ + if (TREE_CODE (wtype) == RECORD_TYPE && POINTER_TYPE_P (htype)) + htype = TREE_TYPE (htype); + else if (TREE_CODE (wtype) == ARRAY_TYPE) { /* If va_list is an array type, the argument may have decayed to a pointer type, e.g. by being passed to another function. |