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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900403_01.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do assemble  }
// { dg-do assemble  }
// g++ 1.37.1 bug 900403_01
// g++ 1.37.1 bug 900403_01
// g++ allows casts to be treated as lvalues (even when the -pedantic
// g++ allows casts to be treated as lvalues (even when the -pedantic
// option is used).  Neither the C++ Reference Manual nor cfront 2.0
// option is used).  Neither the C++ Reference Manual nor cfront 2.0
// allow this.  (gcc gives warnings for such usage with -pedantic).
// allow this.  (gcc gives warnings for such usage with -pedantic).
// Cfront 2.0 passes this test.
// Cfront 2.0 passes this test.
// keywords: lvalues, casts
// keywords: lvalues, casts
int i, j;
int i, j;
void f ()
void f ()
{
{
  (int) i = j;          // { dg-error "" }
  (int) i = j;          // { dg-error "" }
  ((int) i) = j;        // { dg-error "" }
  ((int) i) = j;        // { dg-error "" }
}
}
int main () { return 0; }
int main () { return 0; }
 
 

powered by: WebSVN 2.1.0

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