The program below compiles cleanly with GCC 4.0.1, although the definition of Foo::foo required by the standard (9.4.2/4) is missing.
It probably makes sense to accept such programs as a GNU extension (as long as the address of the member is not taken). #include <cstdio> struct Foo { static const int foo = 42; }; int main () { std::printf ("%d\n", Foo::foo); return 0; } -- Summary: Missing declaration of static const members Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fw at deneb dot enyo dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23147