Exact inform format escape sequence (GCC 10 or GCC 11)
Basile Starynkevitch
basile@starynkevitch.net
Tue Sep 14 09:43:33 GMT 2021
On 9/14/21 11:32 AM, Martin Liška wrote:
> On 9/10/21 15:05, Basile Starynkevitch wrote:
>> Hello all,
>>
>> In the Bismon static source code analyzer on
>> https://github.com/bstarynk/bismon/ commit ad8b6270691e
>>
>> (funded by http://decoder-project.eu/ ....) which contains some
>> GPLv3+ GCC plugin code under directory gccplugins/
>>
>> I am getting when compiling it
>>
>>
>> gcc10_metaplugin_BMGCC.cc: In function ‘int
>> plugin_init(plugin_name_args*, plugin_gcc_version*)’:
>> gcc10_metaplugin_BMGCC.cc:165:85: warning: unquoted whitespace
>> character ‘\x0a’ in format [-Wformat-diag]
>> 165 | warning(UNKNOWN_LOCATION, "BISMON GCC10 METAPLUGIN:
>> datestamp difference for %s:\n"
>> | ^~~
>> 166 | " plugin has %s, GCC had %s; this is risky.",
>> | ~~
>> gcc10_metaplugin_BMGCC.cc:169:84: warning: unquoted whitespace
>> character ‘\x0a’ in format [-Wformat-diag]
>> 169 | warning(UNKNOWN_LOCATION, "BISMON GCC10 METAPLUGIN:
>> devphase difference for %s:\n"
>> | ^~~
>> 170 | " plugin has %s, GCC had %s; this is risky.",
>> | ~~
>> gcc10_metaplugin_BMGCC.cc:174:89: warning: unquoted whitespace
>> character ‘\x0a’ in format [-Wformat-diag]
>> 174 | warning(UNKNOWN_LOCATION, "BISMON GCC10 METAPLUGIN:
>> configuration difference for %s:\n"
>> | ^~~
>> 175 | " plugin has %s, GCC had %s; this is risky.",
>> | ~~
>> gcc10_metaplugin_BMGCC.cc: In function ‘void
>> parse_plugin_arguments(const char*, plugin_name_args*)’:
>> gcc10_metaplugin_BMGCC.cc:405:53: warning: unquoted sequence of 2
>> consecutive space characters in format [-Wformat-diag]
>> 405 | inform (UNKNOWN_LOCATION, "Bismon plugin %qs (%s:%d)
>> will handle GCC include-file events with prefix %qs",
>> | ^~
>>
>
> Hello.
>
> The warning -Wformat-diag is internal GCC warning that hasn't been
> documented. I'm CC'ing the warning author.
>
>>
>>
>> Where can I read the complete specification of % escape sequences for
>> inform?
>
> You can read it just in source code if I'm correct, that's the only
> option you have:
> gcc/c-family/c-format.c:3031.
Sorry, even after looking inside it (function check_tokens presumably),
I don't understand them.
Could anyone on the list give a better explanation, or at least a dozen
of examples covering most of the cases!
Thanks
--
Basile Starynkevitch <basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/
More information about the Gcc
mailing list