This is the mail archive of the
mailing list for the Cygwin project.
Re: rebase src patch (Was: rebase not compilable)
Reini Urban wrote:
> Got it:
> - for (; (char *)&relocp->SizeOfBlock < (char *)relocs + size &&
> relocp->SizeOfBlock != 0; ((char *)relocp) += relocp->SizeOfBlock)
> + for (; (char *)&relocp->SizeOfBlock < *(char**)relocs + size &&
> relocp->SizeOfBlock != 0; (*(char**)relocp) += relocp->SizeOfBlock)
I don't think that's a very good solution, it just trades one error for
another. Whenever Cygwin finally moves to gcc 4 it's going to break
again because the above violates the C aliasing rules. Making relocp a
char * should be the right solution because char * can alias everything,
but (struct _IMAGE_BASE_RELOCATION *) cannot alias char **.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html