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 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.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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