Hi!

On Wed, Jan 13, 2021 at 12:49:42AM +0000, Joseph Myers wrote:
> On Tue, 12 Jan 2021, Segher Boessenkool wrote:
> > On Sat, Jan 09, 2021 at 07:44:31PM +0100, Matthias Klose wrote:
> > > These warnings, including the suggested fixes are seen on power*-linux 
> > > builds.
> > > 
> > > warning: misspelled term 'builtin function' in format; use 'bult-in 
> > > function'
> > > instead [-Wformat-diag]
> > 
> > This one is wrong.  Almost all the functions are called __builtin_xxx
> > so changing the warning message like that is just silly.  Instead, just
> > rephrase it so you do not need to repeat it,
> 
> As documented in codingconventions.html we use "built-in" as an adjective 
> in English text (as opposed to literal sequences of characters from C 
> source code).  Text in diagnostics that is meant to be source code rather 
> than English words should be enclosed in %<%>.  A literal %<__builtin%> 
> should be unchanged in translations, whereas "built-in" used as an 
> adjective should be translated.

My point is that "built-in function `__builtin_blablabla'" looks silly.
It is much better to not mention "built-in" again (it isn't useful
anyway).

> > > warning: spurious trailing punctuation sequence '].' in format 
> > > [-Wformat-diag]
> > 
> > This is also wrong (it says
> >   error ("Second argument of %qs must be in the range [0, 3].", name);
> > which is obviously correct: "]" is not punctuation, and that makes the
> > error message (again, not phrased as a warning) incorrect as well.
> 
> The leading capital letter is incorrect, as is the trailing '.'; both of 
> those are contrary to the GNU Coding Standards for diagnostics.

Yes, and yes.  But the warning message is *wrong*, that is my point.  It
says "]." is a punctuation sequence, and it is not (the "[" isn't
punctuation at all, it is a mathematical symbol).

I am not saying the diagnostics could not be improved, they certainly
could.  But the warning messages are just wrong on many levels as well,
and the suggested "fixes" make things worse in many cases (and the
messages do not say "maybe" or "we suggest" or similar).

Thanks,


Segher

Reply via email to