Very interesting... :-) class minor { int i; public: minor:i(0){} }; ====> class minor { int i; public: ((int)(() & 0xff)):i(0){} }; On Tue, 5 Oct 2004 17:05:04 +0400, Sergey Zaharchenko <doublef@xxxxxxxxxxx> wrote: > Hello list, > > I'm not sure whether it is a bug, or I am overlooking something, but I > have the problem best described by this printout (with and without the > #include): > > Script started on Tue Oct 5 16:41:54 2004 > $ g++ -v > Using built-in specs. > Configured with: FreeBSD/i386 system compiler > Thread model: posix > gcc version 3.4.2 [FreeBSD] 20040728 > $ cat 1.cc > class minor > { > int i; > > public: > minor():i(0){} > }; > > int > main(void) > { > } > $ cat 2.cc > #include <string> > > class minor > { > int i; > > public: > minor():i(0){} > }; > > int > main(void) > { > } > $ g++ 1.cc > $ g++ 2.cc > 2.cc:8: error: expected unqualified-id before "int" > 2.cc:8: error: expected `)' before "int" > 2.cc:8: error: expected `)' before "int" > > FWIW, g++ 2.95.4 doesn't barf at any of the sources. > > If I change the name `minor' to something else, everything works. But > what if I happen to like the name:)? > > Please CC me in any replies. > > TIA, > > -- > DoubleF > "Humor is a drug which it's the fashion to abuse." > -- William Gilbert > > >