This is the mail archive of the cygwin mailing list for the Cygwin 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: 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 **.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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