http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45923
--- Comment #6 from Benjamin Kosnik <bkoz at gcc dot gnu.org> 2010-11-03 17:42:08 UTC --- Created attachment 22257 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22257 constexpr diagnostics test case #02 This diagnostic is for defaulted constructors. At this point, g++ is going a pretty good job on this diagnostic. This testcase just marks the effort needed to get to this point so that in the future there are no regressions. struct base { int _M_i; constexpr base() = default; }; constexpr base obj; gives: %$bin/H-x86_64-gcc-trunk.20101101/bin/g++ -g -std=gnu++0x constexpr-diagnostics-defaulted.cc constexpr-diagnostics-defaulted.cc:2:8: error: ‘constexpr base::base()’ cannot be declared as constexpr constexpr-diagnostics-defaulted.cc:9:16: error: uninitialized const ‘obj’ [-fpermissive] constexpr-diagnostics-defaulted.cc:2:8: note: ‘const struct base’ has no user-provided default constructor constexpr-diagnostics-defaulted.cc:6:13: note: constructor is not user-provided because it is explicitly defaulted in the class body