diff options
Diffstat (limited to 'gcc/cp/parser.cc')
-rw-r--r-- | gcc/cp/parser.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index f519ab0..94069d7 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -25770,6 +25770,16 @@ cp_parser_parameter_declaration_clause (cp_parser* parser, omitted. */ else if (token->type == CPP_ELLIPSIS) { + /* Deprecated by P3176R1 in C++26. */ + if (warn_deprecated_variadic_comma_omission) + { + gcc_rich_location richloc (token->location); + richloc.add_fixit_insert_before (", "); + warning_at (&richloc, OPT_Wdeprecated_variadic_comma_omission, + "omission of %<,%> before varargs %<...%> is " + "deprecated in C++26"); + } + /* Consume the `...' token. */ cp_lexer_consume_token (parser->lexer); /* And remember that we saw it. */ |