[Bug c/82435] new __attribute__((alias)) warning gets in the way

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 6 15:17:00 GMT 2017


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
Thanks for the background.  It's unfortunate that the kernel chose to exploit
one kind of undefined behavior in order to protect itself from another.  From
your description it doesn't sound to me like it's going to be possible to
change the macros to declare the aliases with matching signatures and have the
kernel benefit from the type checking.  A new option to suppress the warning
might be the next best solution.  A variant to consider might be to make it a
two-level warning to allow this sort of abuse while still detecting other
mismatches.  I don't know if it's worth the effort.

Let me confirm this bug as a request to add a new option to control the
warning.


More information about the Gcc-bugs mailing list