OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [string2.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// Copyright (C) 2000 Free Software Foundation, Inc.
3
// Contributed by Nathan Sidwell 6 Mar 2000 
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.