From 9ab71c6b292bda7d4826e8f20cf2c45dc0d86ba0 Mon Sep 17 00:00:00 2001 From: manu Date: Mon, 20 Apr 2009 22:12:52 +0000 Subject: 2009-04-21 Manuel Lopez-Ibanez PR c++/13358 * doc/invoke.texi (-Wlong-long): Update description. * 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-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-parser.c (disable_extension_diagnostics): warn_long_long is the same for CPP and FE. (restore_extension_diagnostics): Likewise. libcpp/ * init.c (cpp_create_reader): Wlong_long is disabled by default. * expr.c (cpp_classify_number): Give different messages for C and C++ front-ends. cp/ * parser.c (cp_parser_check_decl_spec): Drop redundant flags. * error.c (pedwarn_cxx98): New. * cp-tree.h (pedwarn_cxx98): Declare. testsuite/ * gcc.dg/wtr-int-type-1.c: Use two dg-warning to match two messages. Test for "long long" in system headers. * gcc.dg/c99-longlong-2.c: New. * g++.dg/warn/pr13358.C: New. * g++.dg/warn/pr13358-2.C: New. * g++.dg/warn/pr13358-3.C: New. * g++.dg/warn/pr13358-4.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146459 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/cp-tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/cp/cp-tree.h') diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index e3fed778e80..c80037d3419 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4462,6 +4462,7 @@ extern const char *class_key_or_enum_as_string (tree); extern void print_instantiation_context (void); extern void maybe_warn_variadic_templates (void); extern void maybe_warn_cpp0x (const char *); +extern bool pedwarn_cxx98 (location_t, int, const char *, ...) ATTRIBUTE_GCC_CXXDIAG(3,4); /* in except.c */ extern void init_exception_processing (void); -- cgit v1.2.1