This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] for C++/52369
- From: Jason Merrill <jason at redhat dot com>
- To: Fabien Chêne <fabien dot chene at gmail dot com>, Dodji Seketeli <dodji at seketeli dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Feb 2014 16:27:05 -0500
- Subject: Re: [C++ patch] for C++/52369
- Authentication-results: sourceware.org; auth=none
- References: <CAFH4-diup6eH5j3MhZcknAAia+6ZSyzwD5D94WV0NMa+otgjFg at mail dot gmail dot com> <CAFH4-dgpyn56MQN-7bXM9teA9tBWSFYbcsjiAG5TT53YU04XjA at mail dot gmail dot com> <530F8315 dot 5010703 at redhat dot com> <CAFH4-dgj=JNDHuy2gaW0G9VcdwgrLMiGQg1JHuJHdB-Fcb2SQQ at mail dot gmail dot com>
On 02/28/2014 04:03 PM, Fabien Chêne wrote:
The first two lines are fine in my opinion. The third line should
actually be split into an error + an inform. By doing that, I think we
also need to reformulate the error message like this:
testsuite/g++.dg/init/pr44086.C:4:8: error: 'struct A' needs its
non-static const members to be initialized
testsuite/g++.dg/init/pr44086.C:6:19: note: 'A::i' should be initialized
What do you think ? (before I bother adjusting the testsuite)
Let's change the C++11 diagnostic to match the C++98 diagnostic. So,
"uninitialized const member in %q#T" + "%qD should be initialized".
Incidentally, while moving the diagnostic concerning the uninitialized
field from an error to an inform, I realized that the syntactic sugar
%q#D is no longer honored an is treated as %qD, is it expected ?
No, how do you mean?
Jason