Re: Multiple translation unit regression

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

 



On Fri, Jul 10, 2009 at 1:53 PM, Ramsay Jones<ramsay@xxxxxxxxxxxxxxxxxxx> wrote:
>    11  extern int g(int);
>    12
>    13  extern __inline__ int
>    14  g(int x)
>    15  {
>    16          return x;
>    17  }
>    18

Err, that is ugly. I just find out what happen there.
The none inline version picks up the function definition
from the inline version because they are both "extern".
Sparse only has one global extern scope.

Later even the inline version get remove from the
filescope, the second file still conflict with the non-inline
version of the function body, which steal from the inline
version.

I add two lines to distinguish the "extern inline" vs "extern".
They are not the same_symbol any more. Because effectly
the "extern inline" is not visiable in the global "extern" scope.
Any one see problem using this approach?

I attach the patch follows. Can you give it a try?

Chris

Attachment: extern-inline-1
Description: Binary data


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux