From: Richard Sandiford Date: Mon, 30 Sep 2019 14:49:07 +0000 (+0000) Subject: [C] Print ", ..." rather than ", ..." in diagnostics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9343bf99b5e36fa11b723aafa282fd5900a5e525;p=gcc.git [C] Print ", ..." rather than ", ..." in diagnostics pp_separate_with inserts a space after the separator, so there's no need to add whitespace before "..." as well. 2019-09-30 Richard Sandiford gcc/c-family/ * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing two spaces between a comma and "...". gcc/testsuite/ * gcc.dg/Wincompatible-pointer-types-1.c (f1): Expect only one space between the comma and "...". From-SVN: r276302 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 9334ed5df33..d0973ddd03a 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2019-09-30 Richard Sandiford + + * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing + two spaces between a comma and "...". + 2019-09-27 Jakub Jelinek PR c++/88203 diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index 3e25624d3a3..e5cad67946e 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -525,7 +525,7 @@ pp_c_parameter_type_list (c_pretty_printer *pp, tree t) if (!first && !parms) { pp_separate_with (pp, ','); - pp_c_ws_string (pp, "..."); + pp_string (pp, "..."); } } pp_c_right_paren (pp); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84139ef0fb0..868b4aa3438 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-09-30 Richard Sandiford + + * gcc.dg/Wincompatible-pointer-types-1.c (f1): Expect only one + space between the comma and "...". + 2019-09-30 Martin Jambor PR ipa/91853 diff --git a/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c b/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c index 9ffdc2effbe..4ae7b1d99ce 100644 --- a/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c +++ b/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c @@ -7,6 +7,6 @@ int f1 (void) { int (*x) (); - x = f; /* { dg-error "assignment to 'int \\(\\*\\)\\(\\)' from incompatible pointer type 'void \\(\\*\\)\\(int, \.\.\.\\)'" } */ + x = f; /* { dg-error "assignment to 'int \\(\\*\\)\\(\\)' from incompatible pointer type 'void \\(\\*\\)\\(int, \.\.\.\\)'" } */ return x (1); }