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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900403_01.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// g++ 1.37.1 bug 900403_01

// g++ allows casts to be treated as lvalues (even when the -pedantic
// option is used).  Neither the C++ Reference Manual nor cfront 2.0
// allow this.  (gcc gives warnings for such usage with -pedantic).

// Cfront 2.0 passes this test.

// keywords: lvalues, casts

int i, j;

void f ()
{
  (int) i = j;          // { dg-error "" } 
  ((int) i) = j;        // { dg-error "" } 
}

int main () { return 0; }

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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