[PATCH] Fix PR C/19152, IMA and extern inline

Andrew Pinski pinskia@physics.uc.edu
Sat Dec 25 16:37:00 GMT 2004


A christmas present for --enable-intermodule users.  Even though the 
code
which is rejected is not a regression, this is a build regression and
really should be fixed for 4.0.0.
Take the following files:
------ a.c  ------
extern inline void f(void) { }
------ b.c  ------
void f(void) { }
------ c.c  ------
extern inline void f(void) { }

Compiling in any order should work but currently when b.c is listed
before any of the other files, this is rejected saying that f is
redefined.

This patch cleans up the code which rejects the code and fixes the
problem by allowing this and making always the function declaration
in b.c be the function declaration.

OK? Bootstrapped and tested with no regressions.  Plus it fixes
building with --enable-intermodule.

Thanks,
Andrew Pinski

ChangeLog:
	* c-decl.c (diagnose_mismatched_decls): Accept "extern inline" declared
	after the full declaration if the are in two different TUs.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041225/33d9ba59/attachment.txt>


More information about the Gcc-patches mailing list