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


> Date: Tue, 19 Nov 2002 15:51:36 -0800
> From: Richard Henderson <rth@redhat.com>
> Cc: gcc-patches@gcc.gnu.org
> Mail-Followup-To: Richard Henderson <rth@redhat.com>,
> 	Geoff Keating <geoffk@geoffk.org>, gcc-patches@gcc.gnu.org
> Content-Disposition: inline
> User-Agent: Mutt/1.4i
> X-OriginalArrivalTime: 19 Nov 2002 23:51:40.0507 (UTC) FILETIME=[9B192AB0:01C29026]
> 
> On Tue, Nov 19, 2002 at 03:40:45PM -0800, Geoff Keating wrote:
> > I'd argue that the redefinition of any function should be an error.
> 
> extern inline is special, since it means "this function will
> be defined out of line somewhere else".

The way that ISO C handles this is that you write

inline int foo(void) { return 1; }  // in header
extern int foo(void);  // in .c

and the compiler's supposed to produce an out-of-line copy of the
function.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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