diff options
author | Jason Merrill <jason@redhat.com> | 2009-01-12 16:07:46 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-01-12 16:07:46 -0500 |
commit | 72114ca181693d665b90fea3b21899a59fcaccbf (patch) | |
tree | 5b39c7860423ed416ea776332d63cc58543945cd /gcc/cp | |
parent | 9251175fa57a0c24a720d1772bc2998abd67be77 (diff) | |
download | gcc-72114ca181693d665b90fea3b21899a59fcaccbf.zip gcc-72114ca181693d665b90fea3b21899a59fcaccbf.tar.gz gcc-72114ca181693d665b90fea3b21899a59fcaccbf.tar.bz2 |
re PR c++/31488 (va_list considered non-POD)
PR c++/31488
* tree.c (pod_type_p): Return 1 for structs created by the back end.
From-SVN: r143308
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/tree.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c81a1e6..1a9ca4f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2009-01-12 Jason Merrill <jason@redhat.com> + + PR c++/31488 + * tree.c (pod_type_p): Return 1 for structs created by the back end. + 2009-01-12 Jakub Jelinek <jakub@redhat.com> PR c/32041 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 1f2c631..ad84cc8 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2127,8 +2127,10 @@ pod_type_p (const_tree t) if (TREE_CODE (t) == VECTOR_TYPE) return 1; /* vectors are (small) arrays of scalars */ - if (! CLASS_TYPE_P (t)) + if (! RECORD_OR_UNION_CODE_P (TREE_CODE (t))) return 0; /* other non-class type (reference or function) */ + if (! CLASS_TYPE_P (t)) + return 1; /* struct created by the back end */ if (CLASSTYPE_NON_POD_P (t)) return 0; return 1; |