[Bug target/60906] target attribute causes other attributes to be ignored

harald at gigawatt dot nl gcc-bugzilla@gcc.gnu.org
Tue Apr 22 18:51:00 GMT 2014


--- Comment #8 from Harald van Dijk <harald at gigawatt dot nl> ---
Oh, based on the existing error for

void f();
void f() __attribute__((regparm(3)));

which is accepted on x86-64, but fails on x86-32 with

test.cc:2:36: error: new declaration ‘void f()’
 void f() __attribute__((regparm(3)));
test.cc:1:6: error: ambiguates old declaration ‘void f()’
 void f();

even though things like

void f();
void f() __attribute__((noreturn));


void f();
void f() __attribute__((deprecated));

are accepted, I assumed that the existing logic to check attribute
compatibility (which I suggested to reuse) was a reliable way of determining
which attributes are and which aren't safe. If that's incorrect, then sure, my
suggestion is not suitable, I can completely see how huge of a maintenance
burden that would become.

More information about the Gcc-bugs mailing list