diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2000-03-08 10:26:40 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-03-08 10:26:40 +0000 |
commit | 8ce5ef1923e1bc826b4159ecee825db5fc9b8cd9 (patch) | |
tree | 9b71723ad6ac6ebf13f95182c7fb191a2aac726c /gcc | |
parent | 6a5fcef1a188e8daf70da14633e043e3ef87e818 (diff) | |
download | gcc-8ce5ef1923e1bc826b4159ecee825db5fc9b8cd9.zip gcc-8ce5ef1923e1bc826b4159ecee825db5fc9b8cd9.tar.gz gcc-8ce5ef1923e1bc826b4159ecee825db5fc9b8cd9.tar.bz2 |
* g++.old-deja/g++.other/string2.C: New test.
From-SVN: r32417
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/string2.C | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8ef05b4..44dd18a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-03-08 Nathan Sidwell <nathan@codesourcery.com> + + * g++.old-deja/g++.other/string2.C: New test. + 2000-03-06 Nathan Sidwell <nathan@codesourcery.com> * g++.old-deja/g++.warn/impint2.C: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.other/string2.C b/gcc/testsuite/g++.old-deja/g++.other/string2.C new file mode 100644 index 0000000..0442094 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/string2.C @@ -0,0 +1,17 @@ +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 6 Mar 2000 <nathan@codesourcery.com> + +// A char const array should never be confused for a string literal. + +int main () +{ + static const char ary[] = "wibble"; + void const *ptr = 0; + + ptr = ary; + if (ptr == "wibble") + return 1; + if (ptr != ary) + return 1; + return 0; +} |