------- Comment #7 from joseph at codesourcery dot com 2009-09-05 11:35 ------- Subject: Re: [4.5 Regression] FAIL: gcc.dg/matrix/matrix-2.c scan-ipa-dump-times matrix-reorg "Flattened 2 dimensions" 1
On Sat, 5 Sep 2009, rguenth at gcc dot gnu dot org wrote: > It's glibc prototyping printf as > > extern int printf (__const char * __restrict __format, ...); > > note the __restrict qualifier on __format. This doesn't match up exactly with > our builtin function definition which is > > extern int printf (__const char * __format, ...); > > No idea why glibc adds __restrict everywhere. Because in C99 that is the correct prototype for printf (and a lot of other standard functions also have restrict qualifiers on pointer parameters). Qualifiers on function parameters are ignored for the purposes of type compatibility and composite types (6.7.5.3#15) so it shouldn't matter whether the "restrict" is present on the built-in function or not - the qualifiers only matter within the function definition, not for callers of the function. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41271