g++ allows to exist not inited reference in this case: struct X { int &x; };
int main() { X* p_x = new X; // now there is not inited reference (p_x->x) // now we can try to use p_x->x std::cout << p_x->x << std::endl; // segmentation fault return 0; } There are no errors or warnings. Compilation is successfull. I have tested on g++ (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3). Also it "works" on g++ 4.3. -- Summary: Not inited referense. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: alexey dot veselovsky at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39045