Go to file
David Malcolm c24300baea Cleanup of libcpp diagnostic callbacks
This patch renames the "error" callback within libcpp
to "diagnostic", and uses the pair of enums in cpplib.h, rather
than passing two different kinds of "int" around.

gcc/c-family/ChangeLog:
	* c-common.c (c_option_controlling_cpp_error): Rename to...
	(c_option_controlling_cpp_diagnostic): ...this, and convert
	"reason" from int to enum.
	(c_cpp_error): Rename to...
	(c_cpp_diagnostic): ...this, converting level and reason to enums.
	* c-common.h (c_cpp_error): Rename to...
	(c_cpp_diagnostic): ...this, converting level and reason to enums.
	* c-opts.c (c_common_init_options): Update for renaming.

gcc/fortran/ChangeLog:
	* cpp.c (gfc_cpp_init_0): Update for renamings.
	(cb_cpp_error): Rename to...
	(cb_cpp_diagnostic): ...this, converting level and reason to
	enums.

gcc/ChangeLog:
	* genmatch.c (error_cb): Rename to...
	(diagnostic_cb): ...this, converting int params to enums.
	(fatal_at): Update for renaming.
	(warning_at): Likewise.
	(main): Likewise.
	* input.c (selftest::ebcdic_execution_charset::apply):
	Update for renaming of...
	(selftest::ebcdic_execution_charset::on_error): ...this, renaming
	to...
	(selftest::ebcdic_execution_charset::on_diagnostic): ...this,
	converting level and reason to enums.
	(class selftest::lexer_error_sink): Rename to...
	(class selftest::lexer_test_options): ...this, renaming field
	"m_errors" to "m_diagnostics".
	(selftest::lexer_test_options::apply): Update for renaming of...
	(selftest::lexer_test_options::on_error): ...this, renaming to...
	(selftest::lexer_test_options::on_diagnostic): ...this
	converting level and reason to enums.
	(selftest::test_lexer_string_locations_raw_string_unterminated):
	Update for renamings.
	* opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
	"reason".

libcpp/ChangeLog:
	* charset.c (noop_error_cb): Rename to...
	(noop_diagnostic_cb): ...this, converting params to enums.
	(cpp_interpret_string_ranges): Update for renaming and enums.
	* directives.c (check_eol_1): Convert reason to enum.
	(do_diagnostic): Convert code and reason to enum.
	(do_error): Use CPP_W_NONE rather than 0.
	(do_pragma_dependency): Likewise.
	* errors.c (cpp_diagnostic_at): Convert level and reason to enums.
	Update for renaming.
	(cpp_diagnostic): Convert level and reason to enums.
	(cpp_error): Convert level to enum.
	(cpp_warning): Convert reason to enums.
	(cpp_pedwarning): Likewise.
	(cpp_warning_syshdr): Likewise.
	(cpp_diagnostic_with_line): Convert level and reason to enums.
	Update for renaming.
	(cpp_error_with_line): Convert level to enum.
	(cpp_warning_with_line): Convert reason to enums.
	(cpp_pedwarning_with_line): Likewise.
	(cpp_warning_with_line_syshdr): Likewise.
	(cpp_error_at): Convert level to enum.
	(cpp_errno): Likewise.
	(cpp_errno_filename): Likewise.
	* include/cpplib.h (enum cpp_diagnostic_level): Name this enum,
	and move to before struct cpp_callbacks.
	(enum cpp_warning_reason): Likewise.
	(cpp_callbacks::diagnostic): Convert params from int to enums.
	(cpp_error): Convert int param to enum cpp_diagnostic_level.
	(cpp_warning): Convert int param to enum cpp_warning_reason.
	(cpp_pedwarning): Likewise.
	(cpp_warning_syshdr): Likewise.
	(cpp_errno): Convert int param to enum cpp_diagnostic_level.
	(cpp_errno_filename): Likewise.
	(cpp_error_with_line): Likewise.
	(cpp_warning_with_line): Convert int param to enum
	cpp_warning_reason.
	(cpp_pedwarning_with_line): Likewise.
	(cpp_warning_with_line_syshdr): Likewise.
	(cpp_error_at): Convert int param to enum cpp_diagnostic_level.
	* macro.c (create_iso_definition): Convert int to enum.
	(_cpp_create_definition): Likewise.

From-SVN: r264999
2018-10-09 23:37:19 +00:00
INSTALL
config Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
contrib contrib: unused_functions.py: Handle archives 2018-10-05 00:28:18 +02:00
fixincludes fixincludes: vxworks: remove unnecessary parentheses in ioctl wrapper macro 2018-09-03 13:26:45 +00:00
gcc Cleanup of libcpp diagnostic callbacks 2018-10-09 23:37:19 +00:00
gnattools
gotools Ignore chmod errors during mostlyclean-local, check-go-tool 2018-09-26 12:56:09 +00:00
include Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
intl libgnuintl.h (_INTL_MAY_RETURN_STRING_ARG, [...]): Backport changes from upstream gettext. 2018-09-18 22:08:49 -06:00
libada Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libatomic Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libbacktrace re PR libbacktrace/87529 (libbacktrace API forces users to have memory leaks) 2018-10-05 14:09:07 +00:00
libcc1
libcpp Cleanup of libcpp diagnostic callbacks 2018-10-09 23:37:19 +00:00
libdecnumber Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libffi Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libgcc * config/pdp11/t-pdp11: Remove -mfloat32 switch. 2018-10-08 12:49:48 -04:00
libgfortran Use gfc_charlen_type instead of int for string lenghts 2018-10-06 21:21:00 +03:00
libgo runtime: skip testSetPanicOnFault for gollvm 2018-10-09 16:51:10 +00:00
libgomp [nvptx] Remove use of CUDA unified memory in libgomp 2018-09-18 08:41:54 -07:00
libhsail-rt
libiberty [libiberty] Use pipe inside pex_run 2018-10-01 18:46:51 +00:00
libitm Remove nfs bogon 2018-08-03 14:53:48 -06:00
libobjc Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
liboffloadmic
libquadmath
libsanitizer Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libssp Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libstdc++-v3 2018-10-09 François Dumont <fdumont@gcc.gnu.org> 2018-10-09 20:38:06 +00:00
libvtv Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
lto-plugin Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog List myself as "libgomp (OpenACC)" and "OpenACC" maintainer 2018-10-04 17:50:34 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS List myself as "libgomp (OpenACC)" and "OpenACC" maintainer 2018-10-04 17:50:34 +02:00
Makefile.def
Makefile.in
Makefile.tpl
README
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
symlink-tree
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.