c/2891: extern inline - undefined references
rohloff@in.tum.de
rohloff@in.tum.de
Mon May 21 11:56:00 GMT 2001
>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 <string.h> 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:
More information about the Gcc-bugs
mailing list