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 about. Note that newlib provides decls for many > builtins (the decl above is from newlib), so this could be a common > case. > > So I added a check for !C_DECL_DECLARED_BUILTIN (decl) which seems to > specifically cover this case. Ok to apply?
Please send a patch that adds a testcase to the testsuite to show the diagnostics you get after the patch. -- Joseph S. Myers jos...@codesourcery.com