[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#796076: gcc-5: undefined reference errors with extern __inline__ (regression)



On 08/20/2015 02:39 AM, Vincent Lefevre wrote:
> On 2015-08-19 17:36:47 +0200, Matthias Klose wrote:
>> On 08/19/2015 10:48 AM, Vincent Lefevre wrote:
>>> extern __inline__ fn1() { fn2(); }
>>>
>>> main() {}
>>
>> not a bug. if you want to keep gnu89 inline semantics, build using -fgnu89-inline.
> 
> Well, I haven't chosen the gnu89 inline semantics. This comes from
> gmp.h (GMP 4.1). So, that's actually a bug in GMP, which uses this
> semantics unconditionally with all GCC versions. Fortunately,
> GMP 4.1 is very old and this has been improved in later GMP
> versions.

see https://gcc.gnu.org/gcc-5/porting_to.html

__attribute__ ((gnu_inline)) should be your fix.


Reply to: