This is the mail archive of the gcc@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]

Re: gcc 4.2 more strict check for "function called through a non-compatible type"



On Jul 5, 2006, at 2:36 AM, Yuri Pudgorodsky wrote:


1) with direct cast: (int (*)(int)) foo
- warn/trap since 3.x
2) with cast through void fptr: (int (*)(int)) (int(*)()) foo
- warn/trap since 4.2 current

I don't see why you are invoking this undefined behavior anyways.
What are you trying to do? I don't see how this can ever work really
anyways even if since most targets don't pass arguments via the stack.
Yes x86 will most likely work but nothing else, even x86_64 will not work
as floating point is passed via the SSE registers.


-- Pinski


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