OSDN Git Service

/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / string2.C
1 // { dg-do run  }
2 // Copyright (C) 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 6 Mar 2000 <nathan@codesourcery.com>
4
5 // A char const array should never be confused for a string literal.
6
7 int main ()
8 {
9   static const char ary[] = "wibble";
10   void const *ptr = 0;
11   
12   ptr = ary;
13   if (ptr == "wibble")
14     return 1;
15   if (ptr != ary)
16     return 1;
17   return 0;
18 }