>Number: 10855
>Category: c
>Synopsis: extern __inline__ does not compile
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 19 10:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: [email protected]
>Release: gcc-3.3
>Organization:
>Environment:
Debian GNU/Linux Sid
>Description:
Hello,
It appears that gcc-3.3 is unable to compile extern __inline__ functions, and thus the Linux kernel. I found this bug as I tried to compile Linux 2.4.21-rc2, where the linker failed to find the extern __inline__ rtnetlink_rcv_skb(struct sk_buff) funktion in /usr/src/linux/net/core/rtnetlink.c, although it was implemented in the same module. I then wrote a little test program which causes gcc to fail:
extern __inline__ void print_hello() { printf("Hello, World!\n"); }
main() { print_hello(); }
gcc then writes this to stderr:
/tmp/ccX11xji.o(.text+0x11): In function `main':
: undefined reference to `print_hello'
collect2: ld returned 1 exit status
Surprisingly it worked once I declared print_hello either extern or __inline__, only the combination did not work.
I attached a tarball including the test.c, test.i, test.s, test.o and test.stderr.txt, the output that gcc -v --save-temps test.c wrote to stderr.
I hope this helps.
Florian Knauf
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/gzip; name="test.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.tar.gz"
H4sIAJaqyD4AA+1XT28bRRTfJKWtV0ICLghxYHBb1VG8613bsVtTV0CaphWhQNWWC5I7uzvenbI7
a3ZmHacIgdQLfAsO3PgCSBzhwvcAiQMHuCOFN/vHXrspToQSVGl/SjL73vvNzpv39r2ZCMKFbisn
CsM0jE67rRiGYXY3jeKYwGx1FKPb6TTNZrPbNVJ+S0HGybqVIuYCRwgpe/G/85bZn1OQiSARQ4MB
ZT5lZDBA45A6aBRRJgYe8f2wto4+T+VhrXpLauro4zDynTc/YdX1t9AXaoApm7HyWdLyf++uxDII
Wf/0ZNdYVv/NWf23u812wu+W9X8quIBMVE0+Aruq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0JNA4jDxJLGOEI3HtMQMsoRz+meZp5kgX6e7RHIwdRl4XJp6deyAyo
qut6FXGCI9tDsqgFRx6JSG9GuQaU64dSsiDI3OQrLQ/MPDGXtpmDwmG+ik9hs0eM8RA++FEU2oRz
+AbTME3D7sTByMKc5FHUcDyZypCVLLVamBK4ChlAW2h8SMpRbbb6OhyyYTCCO4CDrH307Em6urOz
BdGCiueC2rwnCxRHOECua2sBZRqZjCCT/U77KYtH8Eie1WDbNK6oCEMFPUDaR/tTd+e8xrD/AD7t
aOpIUzfb+lVDN3RzznkUc9m83r1541BqEw4XY9PYROke5O4au0mFLE9I6PvEFk1ZZ542hN0QzXOg
DwWI+MOBZENO9hkOqJzPPgVvk/f5TvoWnYd6c+ky0DPTHzsSJkThOHx6BD7QLOJSBlRtdwl5OWO6
fJ40zQdi+ndAPHiwF1VHcJAw55g7h+2oqQe15Lq6YUxMc72HbjOUX0/RQ3kfvNxTeyiG9jKkDD5w
OE+g2pkNRROih4V75WU1z3cP+ZIn4khOMFHSvaFViJiXV8cSJUqUKFGiRIkSJUo81/gH3n4AXQAo
AAA=
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.