aboutsummaryrefslogtreecommitdiff
path: root/libcpp/ChangeLog
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-05-08 11:06:49 -0700
committerNathan Sidwell <nathan@acm.org>2020-05-08 11:13:29 -0700
commitb224c3763e018e8bdd0047b3eb283992fb655ce0 (patch)
tree0b9853fb61dcbb380a433dec1f58679c77036663 /libcpp/ChangeLog
parentbc484e250990393e887f7239157cc85ce6fadcce (diff)
downloadgcc-b224c3763e018e8bdd0047b3eb283992fb655ce0.zip
gcc-b224c3763e018e8bdd0047b3eb283992fb655ce0.tar.gz
gcc-b224c3763e018e8bdd0047b3eb283992fb655ce0.tar.bz2
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.
Diffstat (limited to 'libcpp/ChangeLog')
-rw-r--r--libcpp/ChangeLog12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 307cf3a..a1b78bb 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,15 @@
+2020-05-08 Nathan Sidwell <nathan@acm.org>
+
+ Reimplement directives only processing, support raw literals.
+ * 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.
+
2020-02-14 Jakub Jelinek <jakub@redhat.com>
Partially implement P1042R1: __VA_OPT__ wording clarifications