This is the mail archive of the gcc-patches@gcc.gnu.org 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] |
CPP and the FE were using different semantics. invoke.texi said that Wlong-long was the default. This was not correct. It was the default for CPP but -Wno-long-long was the default for the FE. Now there is only one semantic: the one from the FE. However, we were inhibiting warning even if the user requested it through Wlong-long. Now explicit Wlong-long (or Wno-long-long) overrides everything else, except in system headers. Bootstrapped and regression tested on x86_64-unknown-linux-gnu with --enable-languages=all,ada with --target_board=\{-m32,-m64\} OK for trunk? 2008-08-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 13358 * doc/invoke.texi (-Wlong-long): Update description. * c-opts.c (sanitize_cpp_opts): Synchronize cpp's warn_long_long and front-end warn_long_long. Wlong-long only depends on other flags if it is uninitialized. * c-lex (interpret_integer): Only warn if there was no previous overflow and -Wlong-long is enabled. * c-decl.c (declspecs_add_type): Drop redundant flags. * c.opt (Wlong-long): Init to -1. * c-parser.c (disable_extension_diagnostics): warn_long_long is the same for CPP and FE. (restore_extension_diagnostics): Likewise. cp/ * parser.c (cp_parser_check_decl_spec): Drop redundant flags. testsuite/ * g++.dg/warn/pr13358.C: New. * g++.dg/warn/pr13358-2.C: New. * g++.dg/warn/pr13358-3.C: New. * gcc.dg/wtr-int-type-1.c: Use two dg-warning to match two messages. Test for "long long" in system headers.
Attachment:
fix-pr13358-try2.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |