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 c/82323] circular ifunc attribute on a function definition silently accepted


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82323

--- Comment #6 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
I wonder why this condition on the warning is symmetrical:

   (!FUNC_OR_METHOD_TYPE_P (t2)
    || (prototype_p (t1)
        && prototype_p (t2)
        && !types_compatible_p (t1, t2))))

I mean if you have this example

void f() __attribute__((alias("g")));
int g(int a)
{
  return a;
}

only f can be w/o prototype, but g has to use the correct argument list;
thus the term "prototype_p (t2)" should be removed from the condition.

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