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/52615] function pointer casting bug


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-19 13:20:36 UTC ---
I believe your program invokes undefined behavior.

But, since 4.7 we can DWIM, the middle-end should be able to handle a local
differing call ABI by means of gimple_call_fntype which can be different from
the type of the FUNCTION_DECL we refer to.  I think the only requirement
for the frontends is that the function in the CALL_EXPR is (fntype2 *)&f
with f being of fntype1.


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