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]

[PATCH] Fix PR C/23104, the same extern functions in two different TUs


:PATCHADD C:

Right now on the mainline, we accept the following two TUs when
compiled with -combine which is just wrong.
file1.c:
int f(void) {}
---- cut ---
file2.c:
int f(void) {}
--- cut ---

This brings back the code was before in 4.0.x and changes the check for the both
decls not having "extern inline" to the correct check.


OK? Bootstrapped and tested on x86_64-pc-linux-gnu with no regressions.
Also bootstrapped on powerpc-darwin with --enable-intermodule to check that
we don't regression there either.


Thanks,
Andrew Pinski

PS I will be asking for approval for the patch against 4.0 after 4.0 reopens.

ChangeLog:

	Revert part of:
	2005-06-28  Eric Christopher  <echristo@redhat.com>
	* c-decl.c (diagnose_mismatched_decls): Define DECL_EXTERN_INLINE.
	Use. Fix detection of invalid extern inline redefinition.
	
	* c-decl.c (diagnose_mismatched_decls): Really fix detection of invalid
	extern inline redefinition.

Attachment: t.diff.txt
Description: Text document



The diff from 4.0:

Attachment: t.diff.txt
Description: Text document


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