From mboxrd@z Thu Jan 1 00:00:00 1970 From: rohloff@in.tum.de To: gcc-gnats@gcc.gnu.org Subject: c/2891: extern inline - undefined references Date: Mon, 21 May 2001 11:56:00 -0000 Message-id: <20010521184936.22532.qmail@sourceware.cygnus.com> X-SW-Source: 2001-05/msg00596.html List-Id: >Number: 2891 >Category: c >Synopsis: extern inline - undefined references >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon May 21 11:56:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Ingo Rohloff >Release: unknown-1.0 >Organization: >Environment: gcc-2.95.2 >Description: Define a function "extern inline" compiling without "-O1", "-O2" or with "-fno-inline" will result in undefined references. (This bug is triggered, if you compile a C file which uses and strcpy and use "-O -fno-inline" as compiler flags) >How-To-Repeat: Compile with "gcc -o t t.c" or "gcc -O -fno-inline -o t t.c" -------------t.c------------------------------------- extern inline void t(int a) { int b=a; } int main() { t(3); } ------------------------------------------------------ >Fix: Compile with "gcc -O -o t t.c". >Release-Note: >Audit-Trail: >Unformatted: