[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] inline functions
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] inline functions |
Date: |
Wed, 11 Dec 2013 11:33:38 +0800 |
User-agent: |
KMail/4.11.3 (Linux/2.6.38-ac2-ac100; KDE/4.11.3; armv7l; ; ) |
Le mardi 10 décembre 2013, 14:59:03 Pierre a écrit :
> Hello,
>
> About TCC inline functions, the default storage class is extern, is it a
> choice ?
I didn't check the code yet but inline function are marked with VT_INLINE,
that is neither static nor extern. I guess somewhere there must be a check if
the storage is static or not and since it is inline it behave as if extern.
> Normally an inline must be locally defined ?
Makes sense.
>
> In my code I have several c sources sharing a .h where an inline
> function code is declared.
> Then at link it produce an error (error: 'func' defined twice").
>
> Could it be a good idea to define default inline storage class as static
> in TCC ?
>
> then
> inline proc => static
> static inline => static
> extern inline => extern , export symbol
I'll take a look at it later if nobody beats me to it. There is another bug I
want to fix first and then I might have time.
>
> Thanks
> Pierre
Best regards,
Thomas