4803 – Inline function never defined (original) (raw)
g++ -c -Wall -ansi test.C g++ accepts that a function that is declared inline is not defined in the current translation unit.
Release: 3.0
Environment: Linux
Comment 1 carlo 2001-11-06 17:06:24 UTC
From: Carlo Wood <carlo@alinoe.com> To: m.duflot@ulg.ac.be Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/4803: Inline function never defined Date: Tue, 6 Nov 2001 17:06:24 +0100
On Tue, Nov 06, 2001 at 02:23:10PM -0000, m.duflot@ulg.ac.be wrote: > >Description: > g++ -c -Wall -ansi test.C > g++ accepts that a function that is declared inline is not defined in the current translation unit. -ansi causes 'inline' to be void, no? Or did this code use inline (I can't see that decoded attachment).
Carlo Wood <carlo@alinoe.com>
Comment 2 Nathan Sidwell 2001-12-15 10:40:43 UTC
State-Changed-From-To: open->analyzed State-Changed-Why: affirmed. [7.1.2]/4 appears to mandate that 'f()' is defined in this TU, as it is used in it.
Comment 3 Nathan Sidwell 2002-01-14 04:14:18 UTC
Responsible-Changed-From-To: unassigned->nathan Responsible-Changed-Why: patch in progress
Comment 4 Nathan Sidwell 2002-12-26 10:24:34 UTC
State-Changed-From-To: analyzed->closed State-Changed-Why: 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
[PR c++/4803](show%5Fbug.cgi?id=4803 "RESOLVED FIXED - Inline function never defined")
* decl2.c (mark_used): Defer inline functions.
(finish_file): Merge deferred_fns loops. Check all used
inline functions have a definition.
* method.c (make_thunk): Thunks are not inline.