diff options
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 6 | ||||
-rw-r--r-- | libcpp/macro.cc | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index e2ed956..353227a 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2025-04-09 Jakub Jelinek <jakub@redhat.com> + + PR preprocessor/118674 + * macro.cc (parse_params) <case CPP_ELLIPSIS>: If _cpp_save_parameter + failed for __VA_ARGS__, goto out. + 2025-04-04 Jakub Jelinek <jakub@redhat.com> PR preprocessor/119391 diff --git a/libcpp/macro.cc b/libcpp/macro.cc index aa430e4..be25710 100644 --- a/libcpp/macro.cc +++ b/libcpp/macro.cc @@ -3610,9 +3610,10 @@ parse_params (cpp_reader *pfile, unsigned *n_ptr, bool *variadic_ptr) if (!prev_ident) { /* An ISO bare ellipsis. */ - _cpp_save_parameter (pfile, nparms, - pfile->spec_nodes.n__VA_ARGS__, - pfile->spec_nodes.n__VA_ARGS__); + if (!_cpp_save_parameter (pfile, nparms, + pfile->spec_nodes.n__VA_ARGS__, + pfile->spec_nodes.n__VA_ARGS__)) + goto out; nparms++; pfile->state.va_args_ok = 1; if (! CPP_OPTION (pfile, c99) |