The following invalid C++ code is not diagnosed with -pedantic by 4.4 or 4.5.
class c { public: static int f (); int i; }; int c::f () { return sizeof (i); } 4.3 correctly diagnoses it: t.C: In static member function 'static int c::f()': t.C:4: error: invalid use of member 'c::i' in static member function t.C:10: error: from this location -- Summary: [4.4/4.5 Regression] invalid use of member in static member function not diagnosed Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40341