__attribute__ vs c++

nbecker@fred.net nbecker@fred.net
Thu Oct 15 08:56:00 GMT 1998


egcs-1.1a i686-pc-linux-gnu.

bug.cc:
class A {
  const int x;
  int X () const __attribute__((const)) {
    return x;
  }
};

gcc -c bug.cc
bug.cc:3: parse error before `{'

Is __attribute__ not usable for methods?



More information about the Gcc-bugs mailing list