FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.dg / other / const1.C
blob1d5450a2cc068a956af21bae412c3e17fcd0e487
1 // { dg-do compile }
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 26 Dec 2001 <nathan@nathan@codesourcery.com>
6 // PR 335. Missed diagnostic
8 struct Foo
10   unsigned i;
11   void Modify(unsigned j) const;
14 void Foo::Modify(unsigned j) const
16   Foo::i = j;  // { dg-error "assignment of data-member" "" }