Undefined static functions

Joseph S. Myers jsm@polyomino.org.uk
Wed Sep 1 00:10:00 GMT 2004


On Tue, 31 Aug 2004, Mark Mitchell wrote:

> > (e) Consider the following C++ variation on the above program:
> > 
> > inline static void f1(void);
> > void g1(void) { if (0) { f1(); } }
> > 
> > Does "no diagnostic required" in C++03 [basic.def.odr] paragraph 3 apply to
> > the whole paragraph, or only to the sentence it appears in?  That is, is "An
> > inline function shall be defined in every translation unit in which it is
> > used." a diagnosable rule?  
> Yes.  (And there's nothing wrong with issuing diagnostics that are not
> strictly required.)

Thanks - I've filed bug 17256 to record this issue as I wouldn't expect to 
be looking at fixing it myself in the near future.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
  http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 3.5
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)



More information about the Gcc mailing list