On 10/25/2017 12:03 AM, Mukesh Kapoor wrote:

Thanks for pointing this out. Checking in the front end will be difficult because the front end gets tokens after macro expansion. I think the difficulty of fixing this bug comes because of the requirement to maintain backward compatibility with the option -Wliteral-suffix for -std=c++11.

IIUC the warning's intent is to catch cases of:
printf ("some format"PRIx64 ..., ...);
where there's no space between the string literals and the PRIx64 macro. I suspect it's very common for there to be a following string-literal, so perhaps the preprocessor could detect:

<string-literal>NON-FN-MACRO<maybe-space><string-literal>

and warn on that sequence?

nathan

--
Nathan Sidwell

Reply via email to