http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45829
--- Comment #2 from Sander Land <sander.land at gmail dot com> 2010-09-29
12:49:23 UTC ---
I did define the constant, though now see the attachment apparently failed?
Full text below:
struct x {
static const double a = 3.14;
double f() {
double b = -a; // undefined reference to `x::a'
//double b = 0.0-a; // works fine
return a;
}
};
int main() {
x o;
o.f();
return 0;
}
