http://llvm.org/bugs/show_bug.cgi?id=10338
Douglas Gregor <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Douglas Gregor <[email protected]> 2011-07-12 09:40:17 CDT --- Clang is actually behaving correctly here. It is unsafe to pass a pointer to a function that my return to a parameter that expects a 'noreturn' function pointer, since the callee could have been optimized on the assumption that calling that function pointer won't return. GCC doesn't actually enforce these type-safety constraints on noreturn function pointers. The fix is relatively simple: explicitly cast from the function pointer type to the 'noreturn' function pointer type, e.g., if (setjmp ((*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof (jmp_buf))))) -- Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
