This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug with function attributes in class scope.


template <class T, class tag>
struct __math_traits_base {
  static bool specialized (void) throw () __attribute__ ((__const__));
  static bool specialized (void) throw () { return false; }
};

causes an error on the definition line claiming the function is already
defined.

template <class T, class tag>
struct __math_traits_base {
  static bool specialized (void) throw () __attribute__ ((__const__)) {
return false; }
};

causes a "parse error before {" on the function definition line.

template <class T, class tag>
struct __math_traits_base {
  static bool specialized (void) throw () { return false; } __attribute__
((__const__));
};

causes a very strange error message for the same line.

template <class T, class tag>
struct __math_traits_base {
  static bool specialized (void) __attribute__ ((__const__)) throw () {
return false; }
};

causes a "parse error before 'throw'".

Since egcs seems to puke no matter where I put the attribute, it's not just
being picky about where I put it. It's a bug.

-- 
   .*.  "Clouds are not spheres, mountains are not cones, coastlines are not
-()  <  circles, and bark is not smooth, nor does lightning travel in a
   `*'  straight line."    -------------------------------------------------
        -- B. Mandelbrot  |http://surf.to/pgd.net
_____________________ ____|________     Paul Derbyshire     pderbysh@usa.net
Programmer & Humanist|ICQ: 10423848|


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]