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]

Re: [PATCH] Fix PR c/8518


On Sun, Nov 17, 2002 at 02:23:19AM +0100, Eric Botcazou wrote:
> ... the compiler gets confused because of 
> the redefinition of an extern inline function:
> 
> extern int inline bar () { return 0; }
> static int inline bar () { return foo(); }

Incidentally, this seems like error material.  The redefinition of an
extern inline function should be neither static nor inline itself.

> 	PR c/8518
> 	* c-decl.c (duplicate_decls): Outline the second definition
> 	of an extern inline function in all cases.
> 	* gcc.c-torture/compile/20021117-1.c: New test
> 	* gcc.c-torture/compile/20021117-2.c: New test

I guess this is ok though.


r~


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