gcc/libcpp
Nathan Sidwell b224c3763e preprocessor: Reimplement directives only processing, support raw literals.
The existing directives-only code (a) punched a hole through the
libcpp interface and (b) didn't support raw string literals.  This
reimplements this preprocessing mode.  I added a proper callback
interface, and adjusted c-ppoutput to use it.  Sadly I cannot get rid
of the libcpp/internal.h include for unrelated reasons.

The new scanner is in lex.x, and works doing some backwards scanning
when it finds a charater of interest.  This reduces the number of
cases one has to deal with in forward scanning.  It may have different
failure mode than forward scanning on bad tokenization.

Finally, Moved some cpp tests from the c-specific dg.gcc/cpp directory
to the c-c++-common/cpp shared directory,

	libcpp/
	* directives-only.c: Delete.
	* Makefile.in (libcpp_a_OBJS, libcpp_a_SOURCES): Remove it.
	* include/cpplib.h (enum CPP_DO_task): New enum.
	(cpp_directive_only_preprocess): Declare.
	* internal.h (_cpp_dir_only_callbacks): Delete.
	(_cpp_preprocess_dir_only): Delete.
	* lex.c (do_peek_backslask, do_peek_next, do_peek_prev): New.
	(cpp_directives_only_process): New implementation.

	gcc/c-family/
	Reimplement directives only processing.
	* c-ppoutput.c (token_streamer): Ne.
	(directives_only_cb): New.  Swallow ...
	(print_lines_directives_only): ... this.
	(scan_translation_unit_directives_only): Reimplment using the
	published interface.

	gcc/testsuite/
	* gcc.dg/cpp/counter-[23].c: Move to c-c+_-common/cpp.
	* gcc.dg/cpp/dir-only-*: Likewise.
	* c-c++-common/cpp/dir-only-[78].c: New.
2020-05-08 11:13:29 -07:00
..
include preprocessor: Reimplement directives only processing, support raw literals. 2020-05-08 11:13:29 -07:00
po Update cpplib eo.po. 2020-04-06 21:34:20 +00:00
ChangeLog preprocessor: Reimplement directives only processing, support raw literals. 2020-05-08 11:13:29 -07:00
ChangeLog.jit
Makefile.in preprocessor: Reimplement directives only processing, support raw literals. 2020-05-08 11:13:29 -07:00
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
charset.c Update copyright years. 2020-01-01 12:51:42 +01:00
config.in Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
configure Fixes after recent configure changes relating to static libraries 2020-02-01 00:34:28 +00:00
configure.ac Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
directives.c preprocessor: Make __has_include a builtin macro [PR93452] 2020-01-28 08:02:17 -08:00
errors.c Update copyright years. 2020-01-01 12:51:42 +01:00
expr.c preprocessor: Make __has_include a builtin macro [PR93452] 2020-01-28 08:02:17 -08:00
files.c [PR 80005] Fix __has_include 2020-01-20 05:39:59 -08:00
generated_cpp_wcwidth.h Byte vs column awareness for diagnostic-show-locus.c (PR 49973) 2019-12-09 20:03:47 +00:00
identifiers.c [PR 80005] Fix __has_include 2020-01-20 05:39:59 -08:00
init.c preprocessor: Make __has_include a builtin macro [PR93452] 2020-01-28 08:02:17 -08:00
internal.h preprocessor: Reimplement directives only processing, support raw literals. 2020-05-08 11:13:29 -07:00
lex.c preprocessor: Reimplement directives only processing, support raw literals. 2020-05-08 11:13:29 -07:00
line-map.c Add diagnostic paths 2020-01-10 21:22:12 +00:00
location-example.txt PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
macro.c c++: Partially implement P1042R1: __VA_OPT__ wording clarifications [PR92319] 2020-02-14 09:04:14 +01:00
makeucnid.c Update copyright years. 2020-01-01 12:51:42 +01:00
mkdeps.c Work around array out of bounds warning in mkdeps 2020-01-16 11:09:24 +01:00
pch.c preprocessor: Make __has_include a builtin macro [PR93452] 2020-01-28 08:02:17 -08:00
symtab.c Update copyright years. 2020-01-01 12:51:42 +01:00
system.h Update copyright years. 2020-01-01 12:51:42 +01:00
traditional.c preprocessor: Make __has_include a builtin macro [PR93452] 2020-01-28 08:02:17 -08:00
ucnid.h Update copyright years. 2020-01-01 12:51:42 +01:00
ucnid.tab Update copyright years. 2020-01-01 12:51:42 +01:00