gcc/libcpp
Jakub Jelinek 5545d1edcb libcpp: Fix up ##__VA_OPT__ handling [PR89971]
In the following testcase we incorrectly error about pasting / token
with padding token (which is a result of __VA_OPT__); instead we should
like e.g. for ##arg where arg is empty macro argument clear PASTE_LEFT
flag of the previous token if __VA_OPT__ doesn't add any real tokens
(which can happen either because the macro doesn't have any tokens
passed to ... (i.e. __VA_ARGS__ expands to empty) or when __VA_OPT__
doesn't have any tokens in between ()s).

2021-12-30  Jakub Jelinek  <jakub@redhat.com>

	PR preprocessor/89971
libcpp/
	* macro.c (replace_args): For ##__VA_OPT__, if __VA_OPT__ expands
	to no tokens at all, drop PASTE_LEFT flag from the previous token.
gcc/testsuite/
	* c-c++-common/cpp/va-opt-9.c: New test.
2021-12-30 22:23:58 +01:00
..
include pch: Add support for PCH for relocatable executables [PR71934] 2021-12-03 11:03:30 +01:00
po Daily bump. 2021-12-21 00:16:24 +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. 2021-12-05 00:16:28 +00:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
charset.c libcpp: Enable P1949R7 for C++98 too [PR100977] 2021-12-01 10:21:20 +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 Make etags path used by build system configurable 2021-11-29 13:24:12 -05:00
configure.ac Make etags path used by build system configurable 2021-11-29 13:24:12 -05:00
directives.c libcpp: Fix _Pragma expansion [PR102409] 2021-10-29 22:55:32 +02:00
errors.c diagnostics: escape non-ASCII source bytes for certain diagnostics 2021-11-01 09:35:46 -04:00
expr.c preprocessor: Fix pp-number lexing of digit separators [PR83873, PR97604] 2021-05-06 23:20:35 +00:00
files.c diagnostics: Support for -finput-charset [PR93067] 2021-08-25 11:15:28 -04:00
generated_cpp_wcwidth.h libcpp: Update cpp_wcwidth() to Unicode 13.0.0 2020-11-07 09:36:43 -05:00
identifiers.c Update copyright years. 2021-01-04 10:26:59 +01:00
init.c libcpp: Enable P1949R7 for C++98 too [PR100977] 2021-12-01 10:21:20 +01:00
internal.h libcpp: Fix _Pragma stringification [PR103165] 2021-11-22 22:29:20 +01:00
lex.c libcpp: Fix up handling of deferred pragmas [PR102432] 2021-12-04 11:00:09 +01:00
line-map.c diagnostics: escape non-ASCII source bytes for certain diagnostics 2021-11-01 09:35:46 -04:00
location-example.txt PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
macro.c libcpp: Fix up ##__VA_OPT__ handling [PR89971] 2021-12-30 22:23:58 +01:00
Makefile.in Make etags path used by build system configurable 2021-11-29 13:24:12 -05:00
makeucnid.c libcpp: Implement C++23 P1949R7 - C++ Identifier Syntax using Unicode Standard Annex 31 2021-09-01 22:33:06 +02:00
mkdeps.c preprocessor: Make quoting : [PR 95253] 2021-01-15 08:56:20 -08:00
pch.c Update copyright years. 2021-01-04 10:26:59 +01:00
symtab.c Update copyright years. 2021-01-04 10:26:59 +01:00
system.h libcpp: Fix ATTR_LIKELY definition PR preprocessor/103355 2021-11-23 16:06:42 +00:00
traditional.c Update copyright years. 2021-01-04 10:26:59 +01:00
ucnid.h libcpp: Implement C++23 P1949R7 - C++ Identifier Syntax using Unicode Standard Annex 31 2021-09-01 22:33:06 +02:00
ucnid.tab Update copyright years. 2021-01-04 10:26:59 +01:00