[Bug c++/45923] constexpr diagnostic w/ non-literal
bkoz at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 3 20:55:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45923
--- Comment #8 from Benjamin Kosnik <bkoz at gcc dot gnu.org> 2010-11-03 20:55:42 UTC ---
Created attachment 22268
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22268
constexpr diagnostics test case #04
This is just a test case for previously-reported-and fixed bug. Let's keep it
around to avoid regressions.
%$bin/H-x86_64-gcc-trunk/bin/g++ -c -std=gnu++0x
constexpr-diagnostics-initalizer1.cc
constexpr-diagnostics-initalizer1.cc: In function ‘int main()’:
constexpr-diagnostics-initalizer1.cc:21:21: in constexpr expansion of ‘A((* &
a1))’
constexpr-diagnostics-initalizer1.cc:21:21: error: the value of ‘a1’ is not
usable in a constant expression
constexpr-diagnostics-initalizer1.cc:20:13: note: ‘a1’ was not declared
‘constexpr’
What we really need is the last line, the note: 'a1' was not declared constexpr
More information about the Gcc-bugs
mailing list