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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |xry111 at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #6 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
-Wcast-function-type does not warn because it breaks ABI.  It's because calling
a function using a mismatched type invokes undefined behavior in C.

There's no direct correlation between ABI breaks and undefined behaviors.  It's
like if you are writing assembly you can invoke division by zero as long as
your architecture does not trap (like AArch64 or RISC-V) and you don't use the
result (or the architecture has some definition of the result and it suits your
use case), but you still cannot do that in C.

Reply via email to