OK.

On Tue, Feb 27, 2018 at 9:41 AM, Jonathan Wakely <jwakely....@gmail.com> wrote:
> Since the fix for PR c++/80955 any suffix on a string literal that
> begins with an underscore is assumed to be a user-defined literal
> suffix, not a macro. This assumption is invalid for a suffix beginning
> with two underscores, because such names are reserved and can't be used
> for UDLs anyway. Checking for exactly one underscore restores support
> for macro expansion in cases like "File: "__FILE__ or "Date: "__DATE__
> (which are formally ill-formed but accepted with a warning, as a
> conforming extension).
>
> gcc/testsuite:
>
>         PR preprocessor/84517
>         * g++.dg/cpp0x/udlit-macros.C: Expect a warning for ""__FILE__.
>
> libcpp:
>
>         PR preprocessor/84517
>         * lex.c (is_macro_not_literal_suffix): New function.
>         (lex_raw_string, lex_string): Use is_macro_not_literal_suffix to
>         decide when to issue -Wliteral-suffix warnings.
>
>
> Tested powerpc64le-linux, OK for trunk?

Reply via email to