gcc/libcpp
Lewis Hyatt 6f46d14d49 libcpp: Fix paste error with unknown pragma after macro expansion
In directives.cc, do_pragma() contains logic to handle a case such as the new
testcase pragma-omp-unknown.c, where an unknown pragma was the result of macro
expansion (for pragma namespaces that permit expansion). This no longer works
correctly as shown by the testcase, fixed by adding PREV_WHITE to the flags on
the second token to prevent an unwanted paste.  Also fixed the memory leak,
since the temporary tokens are pushed on their own context, nothing prevents
freeing of the buffer that holds them when the context is eventually popped.

libcpp/ChangeLog:

	* directives.cc (do_pragma): Fix memory leak in token buffer.  Fix
	unwanted paste between two tokens.

gcc/testsuite/ChangeLog:

	* c-c++-common/gomp/pragma-omp-unknown.c: New test.
2022-11-21 17:47:19 -05:00
..
include pch: Fix streaming of strings with embedded null bytes 2022-10-19 09:26:09 -04:00
po Daily bump. 2022-10-11 00:17:00 +00:00
aclocal.m4 libcpp: Enable Intel CET on Intel CET enabled host for jit 2020-05-12 09:17:45 -07:00
ChangeLog Daily bump. 2022-11-21 00:16:46 +00:00
ChangeLog.jit
charset.cc preprocessor: C2x identifier rules 2022-10-14 23:07:50 +00:00
config.in build: re-configure 2 files 2022-11-21 09:03:35 +01:00
configure libcpp: Add missing config for --enable-valgrind-annotations [PR107691] 2022-11-19 12:17:48 +01:00
configure.ac libcpp: Add missing config for --enable-valgrind-annotations [PR107691] 2022-11-19 12:17:48 +01:00
directives.cc libcpp: Fix paste error with unknown pragma after macro expansion 2022-11-21 17:47:19 -05:00
errors.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
expr.cc middle-end, c++, i386, libgcc: std::bfloat16_t and __bf16 arithmetic support 2022-10-14 09:37:01 +02:00
files.cc libcpp/remap: Only override if string matched 2022-11-21 13:37:05 +01:00
generated_cpp_wcwidth.h libcpp: Update cpp_wcwidth() to Unicode 14.0.0 2022-06-26 14:13:26 -04:00
identifiers.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
init.cc preprocessor: C2x identifier rules 2022-10-14 23:07:50 +00:00
internal.h preprocessor: -Wbidi-chars and UCNs [PR104030] 2022-01-24 17:48:23 -05:00
lex.cc c++: libcpp: Support raw strings with newlines in directives [PR55971] 2022-11-05 10:23:20 -04:00
line-map.cc Add instruction level discriminator support. 2022-09-28 14:25:18 -07:00
location-example.txt PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
macro.cc libcpp: Avoid remapping filenames within directives 2022-11-18 13:13:50 -07:00
Makefile.in preprocessor: Extract messages from cpp_*_at calls for translation 2022-02-11 23:22:07 +00:00
makeucnid.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
makeuname2c.cc libcpp: Update to Unicode 15 2022-11-04 18:18:42 +01:00
mkdeps.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
pch.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
symtab.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
system.h Update copyright years. 2022-01-03 10:42:10 +01:00
traditional.cc Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
ucnid.h libcpp: Update to Unicode 15 2022-11-04 18:18:42 +01:00
ucnid.tab Update copyright years. 2022-01-03 10:42:10 +01:00
uname2c.h libcpp: Update to Unicode 15 2022-11-04 18:18:42 +01:00