On Fri, Apr 19, 2019 at 11:28:41AM +0200, Christophe Lyon wrote: > > >> > --- a/contrib/check-internal-format-escaping.py > > >> > +++ b/contrib/check-internal-format-escaping.py > > >> > @@ -58,6 +58,10 @@ for i, l in enumerate(lines): > > >> > print('%s: %s' % (origin, text)) > > >> > if re.search("[^%]'", p): > > >> > print('%s: %s' % (origin, text)) > > >> > + # %< should not be preceded by a non-punctuation > > >> > + # %character. > > >> > + if re.search("[a-zA-Z0-9]%<", p): > > >> > + print('%s: %s' % (origin, text)) > > >> > j += 1
I'm not convinced we want this in check-internal-format-escaping.py exactly because it is too fragile. Instead, we want what David Malcolm has proposed, for GCC 10 some -Wformat-something (non-default) style warning or even a warning for all string literals when there is "str " " str2" or "str" "str2" Basically require if there is a line break between two concatenated string literals that there is a single space, either at the end of one chunk or at the beginning of the other one. Jakub