https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68301
Bug ID: 68301 Summary: self-dependent reference member initialization not diagnosed Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- While verifying that bug 68208 has been fixed (it has been), I noticed that other, slightly more involved cases of reference members than the trivial "m(m)" in the bug are not diagnosed. For example, the following program which is diagnosed by Clang as shown is accepted by GCC without a warning even with -Wall and -Wextra. cat u.cpp && /build/llvm-trunk/bin/clang++ -S -Wall -o/dev/null u.cppstruct S { const int &r1, &r2; S (): r1 (r2), r2 (r1) { } }; u.cpp:5:9: warning: reference 'r2' is not yet bound to a value when used here [-Wuninitialized] r1 (r2), ^ 1 warning generated.