This is the mail archive of the
mailing list for the GCC project.
Re: g++4.0 diagnostic on casting a static const member initializerto a double
Jonathan Wakely wrote:
*but* this is allowed, even with -pedantic and -pedantic-errors:
static const int scd = 24.2;
$ g++4x int.cc -c -pedantic -pedantic-errors -std=c++98
int.cc:3: warning: converting to 'int' from 'double'
Yes, that's a bug -- independent of this static data member issue.
We're apparently not being strict enough about integral constant
expressions. I'll look into that.