Message ID | 20140819171737.GH14320@redhat.com |
---|---|
State | New |
Headers | show |
On 08/19/2014 10:17 AM, Marek Polacek wrote: > My recent patch broke bootstrap on ppc64, because, by default, > char on ppc defaults to be an unsigned char. But the code relied > on char being signed by default. > Furthermore, the compat warning about // comments shouldn't be issued > in C++ mode at all. > Sorry about that. > > Bootstrapped on ppc64-linux, ok for trunk? Also fixes aarch64. Ok. r~
diff --git gcc/include/cpplib.h gcc/include/cpplib.h index b89ba20..9f87ff8 100644 --- gcc/include/cpplib.h +++ gcc/include/cpplib.h @@ -467,7 +467,7 @@ struct cpp_options bool restore_pch_deps; /* True if warn about differences between C90 and C99. */ - char cpp_warn_c90_c99_compat; + signed char cpp_warn_c90_c99_compat; /* Dependency generation. */ struct diff --git gcc/lex.c gcc/lex.c index 827cfb0..5366dad 100644 --- gcc/lex.c +++ gcc/lex.c @@ -2338,6 +2338,7 @@ _cpp_lex_direct (cpp_reader *pfile) } /* Or if specifically desired via -Wc90-c99-compat. */ else if (CPP_OPTION (pfile, cpp_warn_c90_c99_compat) > 0 + && ! CPP_OPTION (pfile, cplusplus) && ! buffer->warned_cplusplus_comments) { cpp_error (pfile, CPP_DL_WARNING,