GCC ignores function attributes

Nikos Chantziaras realnc@gmail.com
Fri Jun 13 13:23:00 GMT 2014


On 12/06/14 21:47, Jonathan Wakely wrote:
> On 12 June 2014 17:48, Nikos Chantziaras wrote:
>>    int __attribute__((visibility("hidden"))) spec();
>
>
> But this isn't hidden:
>
> int* __attribute__((visibility("hidden"))) spec();
>
> because the attribute binds to the return type, which is what the
> warning tells you.

So what's the difference between 'int' and 'int*' here? Why does:

  int HIDE spec();

bind to 'spec' but

   int* HIDE spec();

doesn't?



More information about the Gcc-help mailing list