This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug with function attributes in class scope.
- To: egcs at egcs dot cygnus dot com, egcs-bugs at egcs dot cygnus dot com
- Subject: Bug with function attributes in class scope.
- From: Paul Derbyshire <pderbysh at usa dot net>
- Date: Sat, 27 Feb 1999 20:43:12 -0500
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|