Avoid incomplete function type in casts