🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #709

type conflict keeps inline function from getting written

#709
From: Eirik Fuller
Date: Sun, 15 Oct 1989 05:30
20 lines
1241 bytes
With the following source file

static inline int f() {return 1;}
void F() {static void f(); c(f);}

gcc-1.36 fails to output a definition for f(), even though it is needed so
that its address can be passed to c().  This happens on a sun3, a sun4, and
a vax, with the same warning message in each case, so it appears to be
machine-independent.  With the following source file

static inline int f() {return 1;}
void F() {static int f(); c(f);}

there is no warning message, and f() gets written.

It's not clear to me what gcc should do with the first source file, but as
a result of a similar problem, hidden beneath some preprocessor layers, I
was unable to compile gdb for a sun4 using -finline-functions.  Recompiling
just readline/readline.c without -finline-functions eliminated the link
errors.
Technical Details
Message-ID: <8910150530.AA08282@elf.LABS.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!labs.labs.tek.com!eirik

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!labs.labs.tek.com!eirik
From: eirik@labs.labs.tek.com (Eirik Fuller)
Newsgroups: gnu.gcc.bug
Subject: type conflict keeps inline function from getting written
Message-ID: <8910150530.AA08282@elf.LABS.TEK.COM>
Date: 15 Oct 89 05:30:11 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 20