aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900403_01.C
blob: 124654fbfb68f7430cb930c8aa52cc7c24caa7e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { 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; }