[PATCH, C] Fix format warnings

Joseph S. Myers joseph@codesourcery.com
Tue Apr 26 15:47:00 GMT 2005


On Tue, 26 Apr 2005, Richard Guenther wrote:

> As soon as &a is canonicalized to &a[0] currently existing testcases
> fail and get fixed by this patch.  Without a patch it is not possible
> to construct a testcase with &a[0] or &a[1] as this is emitted by
> the C frontend as &a and &a + 1 (which is handled explicitly in
> c-format.c).

It is possible to construct tests with &a[0] or &a[1] - they just wouldn't 
exercise the new code paths.  Because &a[0] and &a[1] being handled is a 
feature which is untested, my point is that it would also be useful to add 
such tests to make sure that the subsequent changes in this area don't 
break that feature.

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



More information about the Gcc-patches mailing list