On 09/30/2016 11:05 AM, Martin Sebor wrote:
+ permerror (input_location, "ISO C++11 only allows pointer "
+ "conversions for integer literals");
FWIW, I think it would be clearer to either mention the currently
selected language version or leave it out completely rather than
hardcoding C++11. When the user specifies -std=c++14 (or later),
or when that's the current version used by the compiler, a warning
that tells them what C++ 11 allows isn't really relevant (or
meaningful), and becomes less so as time goes on.
Btw., I realize there are other instances where the C++ version
has been hardcoded and so I should have made it clear that I meant
my comment as a general suggestion, not as an objection to the patch.
Sorry if that wasn't apparent.
I've quickly surveyed some of the existing messages that mention
a C++ version and found instances where it applies only to the
referenced version of the standard and prior but not later versions.
For example:
msgid "in C++98 %q+D may not be static because it is a member of a union"
msgid "in C++03 a class-key must be used when declaring a friend"
But I also came across another form that may resolve the concern
I raised: mentioning the version along with whether it's the first
or last that supports (or doesn't support) the construct, such as
"C++11 and above." Here's one example of it:
msgid "in C++11 and above a default constructor can be explicit"
It might be worth to come up with a convention to adopt in new
messages and (gradually) change what's already there to use it.
Martin