gcc/libcpp
Jakub Jelinek 58a40e76eb libcpp: Ignore CPP_PADDING tokens in _cpp_parse_expr [PR105732]
The first part of the following testcase (m1-m3 macros and its use)
regressed with my PR89971 fix, but as the m1,m4-m5 and its use part shows,
the problem isn't new, we can emit a CPP_PADDING token to avoid it from
being adjacent to whatever comes after the __VA_OPT__ (in this case there
is nothing afterwards, true).

In most cases these CPP_PADDING tokens don't matter, all other
callers of cpp_get_token_with_location either ignore CPP_PADDING tokens
completely (e.g. c_lex_with_flags) or they just remember them and
take them into account when printing stuff whether there should be
added whitespace or not (scan_translation_unit + token_streamer::stream).
So, I think we should just ignore CPP_PADDING tokens the same way in
_cpp_parse_expr.

2022-05-27  Jakub Jelinek  <jakub@redhat.com>

	PR preprocessor/105732
	* expr.cc (_cpp_parse_expr): Handle CPP_PADDING by just another
	token.

	* c-c++-common/cpp/va-opt-10.c: New test.
2022-05-29 21:57:51 +02:00
..
include preprocessor: -Wbidi-chars and UCNs [PR104030] 2022-01-24 17:48:23 -05:00
po Daily bump. 2022-05-05 00:16:29 +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-05-21 00:16:32 +00:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
charset.cc Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
config.in aix: handle 64bit inodes for include directories 2022-01-12 16:59:47 +01:00
configure aix: handle 64bit inodes for include directories 2022-01-12 16:59:47 +01:00
configure.ac aix: handle 64bit inodes for include directories 2022-01-12 16:59:47 +01:00
directives.cc libcpp: Avoid PREV_WHITE and other random content on CPP_PADDING tokens 2022-02-01 20:42:49 +01:00
errors.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
expr.cc libcpp: Ignore CPP_PADDING tokens in _cpp_parse_expr [PR105732] 2022-05-29 21:57:51 +02:00
files.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
generated_cpp_wcwidth.h libcpp: Update cpp_wcwidth() to Unicode 13.0.0 2020-11-07 09:36:43 -05:00
identifiers.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
init.cc Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
internal.h preprocessor: -Wbidi-chars and UCNs [PR104030] 2022-01-24 17:48:23 -05:00
lex.cc Use "final" and "override" directly, rather than via macros 2022-05-20 10:05:54 -04:00
line-map.cc pack fields in line-map data structures 2022-01-18 14:33:01 +01:00
location-example.txt PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
macro.cc libcpp: Fix up padding handling in funlike_invocation_p [PR104147] 2022-02-01 20:48:03 +01: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
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 Update copyright years. 2022-01-03 10:42:10 +01:00
ucnid.tab Update copyright years. 2022-01-03 10:42:10 +01:00