http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965



             Bug #: 55965

           Summary: gcc -std=c99 emits code for inline even without extern

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: jerem...@macports.org





$ cat /tmp/testa.c 

inline int isalnum(int _c) { return 1; }

inline int _isalnum(int _c) { return 1; }



$ /opt/local/bin/gcc-mp-4.8 -c /tmp/testa.c -o /tmp/test.o -std=c99



$ nm /tmp/test.o 

0000000000000010 s EH_frame1

0000000000000000 T _isalnum



---



isalnum is being emitted with external linkage even though it is inline and

never declared as 'extern inline'  It looks like gcc may have implicit extern

declarations for some functions which is forcing this 'inline' definition to be

treated asn an 'extern inline' definition.

Reply via email to