diff options
author | Jason Merrill <jason@redhat.com> | 2010-03-22 16:38:57 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-03-22 16:38:57 -0400 |
commit | cc72bbaac742dd66ce5aaa9791a20903cdbac3ec (patch) | |
tree | 498717f3a2592be450d23ddf277ef43ad3174304 /gcc/testsuite | |
parent | 189327376c98168ad9445537dcd04d467b09d143 (diff) | |
download | gcc-cc72bbaac742dd66ce5aaa9791a20903cdbac3ec.zip gcc-cc72bbaac742dd66ce5aaa9791a20903cdbac3ec.tar.gz gcc-cc72bbaac742dd66ce5aaa9791a20903cdbac3ec.tar.bz2 |
re PR c++/43333 (__is_pod seems broken)
PR c++/43333
* tree.c (pod_type_p): Use old meaning in C++98 mode.
From-SVN: r157652
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/is_pod.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/is_pod_98.C | 16 |
3 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 99f6747..e01b7ad 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2010-03-22 Jason Merrill <jason@redhat.com> + PR c++/43333 + * g++.dg/ext/is_pod.C: Pass -std=c++0x. + * g++.dg/ext/is_pod_98.C: New. + PR c++/43281 * g++.dg/cpp0x/auto18.C: New. diff --git a/gcc/testsuite/g++.dg/ext/is_pod.C b/gcc/testsuite/g++.dg/ext/is_pod.C index c984283..570d235 100644 --- a/gcc/testsuite/g++.dg/ext/is_pod.C +++ b/gcc/testsuite/g++.dg/ext/is_pod.C @@ -1,3 +1,4 @@ +// { dg-options "-std=c++0x" } // { dg-do "run" } #include <cassert> diff --git a/gcc/testsuite/g++.dg/ext/is_pod_98.C b/gcc/testsuite/g++.dg/ext/is_pod_98.C new file mode 100644 index 0000000..80a87c8 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/is_pod_98.C @@ -0,0 +1,16 @@ +// PR c++/43333 +// { dg-options "-std=c++98" } +// { dg-do run } + +struct strPOD +{ + const char *const foo; + const char *const bar; +}; +extern "C" void abort (void); +int main () +{ + if (!__is_pod (strPOD)) + abort (); + return 0; +} |