------- Comment #1 from pinskia at gcc dot gnu dot org 2010-08-15 19:31 ------- > "*(void **)(&comp_compress) = dlsym(handle, "comp_compress");"
That is not alias safe. Try instead: comp_compress = (__typeof__(comp_compress)) dlsym(handle, "comp_compress"); Which is alias safe. In fact reading what posix standard says it talks about conversion between pointer to function types being safe but not access to a function pointer type via a pointer to void type. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45289