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.