c-pretty-print.c (pp_c_parameter_type_list): Print ...
2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic functions. testsuite: 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de> * gcc.dg/Wincompatible-pointer-types-1.c: New test. From-SVN: r253460
This commit is contained in:
parent
9add86be80
commit
4bc4b2b482
4 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
* c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
|
||||
functions.
|
||||
|
||||
2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
|
||||
|
||||
* c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
|
||||
|
|
|
@ -521,6 +521,11 @@ pp_c_parameter_type_list (c_pretty_printer *pp, tree t)
|
|||
else
|
||||
pp->abstract_declarator (TREE_VALUE (parms));
|
||||
}
|
||||
if (!first && !parms)
|
||||
{
|
||||
pp_separate_with (pp, ',');
|
||||
pp_c_ws_string (pp, "...");
|
||||
}
|
||||
}
|
||||
pp_c_right_paren (pp);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
* gcc.dg/Wincompatible-pointer-types-1.c: New test.
|
||||
|
||||
2017-10-05 Tamar Christina <tamar.christina@arm.com>
|
||||
|
||||
* gcc.dg/vect/slp-perm-9.c: Use vect_sizes_16B_8B.
|
||||
|
|
12
gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c
Normal file
12
gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-pedantic-errors" } */
|
||||
|
||||
void f (int, ...);
|
||||
|
||||
int
|
||||
f1 (void)
|
||||
{
|
||||
int (*x) ();
|
||||
x = f; /* { dg-error "assignment to 'int \\(\\*\\)\\(\\)' from incompatible pointer type 'void \\(\\*\\)\\(int, \.\.\.\\)'" } */
|
||||
return x (1);
|
||||
}
|
Loading…
Add table
Reference in a new issue