* g++.old-deja/g++.other/string2.C: New test.
From-SVN: r32417
This commit is contained in:
parent
6a5fcef1a1
commit
8ce5ef1923
@ -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.
|
||||
|
17
gcc/testsuite/g++.old-deja/g++.other/string2.C
Normal file
17
gcc/testsuite/g++.old-deja/g++.other/string2.C
Normal file
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user