This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60906

--- 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));

and

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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]