This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [google/integration] Extend C++11 UDLs to be compatible with inttypes.h macros (issue6104051)

On Sun, Apr 22, 2012 at 22:54, Ollie Wild <> wrote:
> Add new option, -Wreserved-user-defined-literal.
> This option, which is enabled by default, causes the preprocessor to warn
> when a string or character literal is followed by a ud-suffix which does
> not begin with an underscore. ÂAccording to [lex.ext]p10, this is
> ill-formed.
> Also modifies the preprocessor to treat such ill-formed suffixes as separate
> preprocessing tokens. ÂThis is consistent with the Clang front end (see
>, and enables
> backwards compatibility with code that uses formatting macros from
> <inttypes.h>, as in the following code block:
> Âint main() {
> Â Âint64_t i64 = 123;
> Â Âprintf("My int64: %"PRId64"\n", i64);
> Â}
> Google ref b/6377711.
> 2012-04-22 Â Ollie Wild Â<>
> Â Â Â Â* gcc/c-family/c-common.c:
> Â Â Â Â* gcc/c-family/c-opts.c (c_common_handle_option):
> Â Â Â Â* gcc/c-family/c.opt:
> Â Â Â Â* gcc/doc/invoke.texi (struct A):
> Â Â Â Â* gcc/testsuite/g++.dg/cpp0x/Wreserved-user-defined-literal.C (test):
> Â Â Â Â(main):
> Â Â Â Â* libcpp/include/cpplib.h (struct cpp_options):
> Â Â Â Â* libcpp/init.c (cpp_create_reader):
> Â Â Â Â* libcpp/lex.c (lex_raw_string):
> Â Â Â Â(lex_string):

This would be for google/main, right?  It does not seem fit for


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]