Re: mismatched decls w/ both builtin and explicit decl

2013-11-06 Thread DJ Delorie
Thanks! Committed.

Re: mismatched decls w/ both builtin and explicit decl

2013-11-06 Thread Joseph S. Myers
On Wed, 6 Nov 2013, DJ Delorie wrote: > > Please send a patch that adds a testcase to the testsuite to show the > > diagnostics you get after the patch. > > How's this? > > * c-decl.c (locate_old_decl): If a previous conflicting decl is > both explicit and builtin, print the locatio

Re: mismatched decls w/ both builtin and explicit decl

2013-11-06 Thread DJ Delorie
> Please send a patch that adds a testcase to the testsuite to show the > diagnostics you get after the patch. How's this? * c-decl.c (locate_old_decl): If a previous conflicting decl is both explicit and builtin, print the location of the explicit one. * gcc.dg/mismatc

Re: mismatched decls w/ both builtin and explicit decl

2013-11-06 Thread Joseph S. Myers
On Tue, 5 Nov 2013, DJ Delorie wrote: > > Consider this source: > > extern char *index(const char *,int); > static int index; > > "index" is a builtin as well, but because it's a builtin gcc skips the > "previous declaration was here..." despite having *a* previous decl it > could complain

mismatched decls w/ both builtin and explicit decl

2013-11-05 Thread DJ Delorie
Consider this source: extern char *index(const char *,int); static int index; "index" is a builtin as well, but because it's a builtin gcc skips the "previous declaration was here..." despite having *a* previous decl it could complain about. Note that newlib provides decls for many builtins