This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR21982



On Jun 9, 2005, at 4:03 PM, Joseph S. Myers wrote:


On Thu, 9 Jun 2005, Diego Novillo wrote:

testsuite/ChangeLog

	PR 21982
	* gcc.dg/pr21982-1.c: New test.

Apart from the issues I listed with the values or or pointed to by the
second printf being affected by the first, I think the test needs to cover
making sure that %n inhibits merging or at least the effect of this that
the integer pointed to by %n gets only the number of bytes from the source
printf in which it appears, making sure that $ operand numbers inhibit
merging or are adjusted to allow for the new operand numbers, and making
sure that if the first printf has excess arguments


  printf("%d ", 1, i++);
  printf("%d\n", 3);

the correct arguments are printed (in this case "1 3\n") but all arguments
are evaluated.
And the return value of printf is ignored too, which most people forget about.


Thanks, andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]