This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/2891: extern inline - undefined references



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]