gcc/libcpp
Joseph Myers 148e4216a4 re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent)
PR preprocessor/34695

gcc:
	* Makefile.in (c-opts.o): Depend on c-tree.h.
	* c-common.c: Move down include of diagnostic.h.
	(done_lexing, c_cpp_error): New.
	* c-common.h (done_lexing): Declare.
	* c-decl.c (c_write_global_declarations): Don't check cpp_errors
	(parse_in).
	* c-opts.c: Include c-tree.h.
	(c_common_init_options): Set preprocessor error callback.
	(c_common_handle_option): Do not set preprocessor
	inhibit_warnings, warnings_are_errors, warn_system_headers,
	pedantic_errors or inhibit_warnings flags.
	(c_common_post_options): Do not check cpp_errors (parse_in).
	(c_common_finish): Do not output dependencies if there were
	errors.  Do not check return value of cpp_finish.
	* c-ppoutput.c (pp_file_change): Set input_location.
	* c-tree.h (c_cpp_error): Declare.
	* diagnostic.c (diagnostic_set_info_translated): Also initialize
	override_column.
	(diagnostic_build_prefix): Check override_column.
	* diagnostic.h (diagnostic_info): Add override_column field.
	(diagnostic_override_column): Define.

gcc/cp:
	* cp-tree.h (cp_cpp_error): Remove.
	* error.c (cp_cpp_error): Remove.
	* parser.c (cp_lexer_new_main): Set done_lexing instead of
	client_diagnostic and error callback.

gcc/fortran:
	* cpp.c (cb_cpp_error): New.
	(gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
	Don't check cpp_errors (cpp_in).
	(gfc_cpp_init_0): Set cb->error.

gcc/testsuite:
	* gcc.dg/builtin-redefine.c, gcc.dg/cpp/redef2.c,
	gcc.dg/cpp/redef3.c, gcc.dg/cpp/trad/redef2.c: Use dg-message
	instead of dg-warning for "previous definition" messages.
	* gcc.dg/cpp/Wvariadic-1.c, gcc.dg/cpp/Wvariadic-3.c: Expect
	"warnings being treated as errors" message.
	* gcc.dg/fltconst-1.c: Use -fshow-column.

libcpp:
	* makedepend.c: Remove.
	* Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
	(all, clean, TAGS_SOURCES, include): Remove makedepend handling.
	* directives.c (cpp_errors): Remove.
	* errors.c (print_location, _cpp_begin_message, v_message):
	Remove.
	(cpp_error, cpp_error_with_line): Always use error callback.
	(cpp_error, cpp_error_with_line, cpp_errno): Return bool.
	* include/cpplib.h (cpp_options): Remove pedantic_errors,
	inhibit_warnings, warn_system_headers, inhibit_errors,
	warnings_are_errors, client_diagnostic.
	(cpp_callbacks): Add extra arguments to error callback; make it
	return bool.
	(cpp_finish): Return void.
	(cpp_destroy): Remove inaccurate comment about return value.
	(cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
	(CPP_DL_NOTE): Define.
	* include/line-map.h (linemap_print_containing_files): Remove.
	* init.c (cpp_finish): Do not check for or return number of
	errors.
	* internal.h (cpp_reader): Remove errors field.
	* line-map.c (linemap_print_containing_files): Remove.
	* macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
	about previous definition.  Only emit it if previous diagnostic
	was emitted.

From-SVN: r145263
2009-03-29 23:56:07 +01:00
..
include re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
po * cpplib.pot: Regenerate. 2009-03-28 06:57:06 +00:00
ChangeLog re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
Makefile.in re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
aclocal.m4 re PR other/35457 (Error building GCC trunk on CELL SPU) 2008-04-18 10:28:53 +00:00
charset.c re PR preprocessor/36479 (Short buffer in libcpp) 2008-06-12 10:03:41 -07:00
config.in revert: configure.ac: Enable LFS. 2009-02-15 11:11:13 +00:00
configure revert: configure.ac: Enable LFS. 2009-02-15 11:11:13 +00:00
configure.ac revert: configure.ac: Enable LFS. 2009-02-15 11:11:13 +00:00
directives-only.c line-map.h (linenum_type): New typedef. 2008-07-21 09:33:38 +00:00
directives.c re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
errors.c re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
expr.c expr.c (struct op): Add location. 2008-10-31 22:00:37 +00:00
files.c re PR preprocessor/36649 (-H option doesn't work as expected) 2008-07-31 21:12:14 +02:00
identifiers.c traditional.c (lex_identifier): Use CPP_HASHNODE. 2008-02-20 02:16:43 +00:00
init.c re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
internal.h re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
lex.c lex.c (lex_string): Return a CPP_LESS token for missing '>' in a header name. 2009-02-21 21:25:39 +00:00
line-map.c re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
macro.c re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent) 2009-03-29 23:56:07 +01:00
makeucnid.c
mkdeps.c re PR preprocessor/35458 (Dependency generation (-M) does not quote '#' in filenames) 2008-03-06 18:08:40 +00:00
pch.c re PR target/37033 (Revision 138733 breaks -g vs -g0 for PCH) 2008-12-10 17:31:07 +00:00
symtab.c symtab.h (HT_ALLOCED): Remove. 2008-05-21 15:00:59 +00:00
system.h
traditional.c line-map.h (linenum_type): New typedef. 2008-07-21 09:33:38 +00:00
ucnid.h
ucnid.tab