X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <48444091.EBA40B22@dessent.net> Date: Mon, 02 Jun 2008 11:48:49 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Reini Urban CC: cygwin AT cygwin DOT com Subject: Re: rebase src patch (Was: rebase not compilable) References: <6910a60806020741t7ff86d8bgbb7866e62acf1c09 AT mail DOT gmail DOT com> <484411AA DOT AF8A9011 AT dessent DOT net> <484427D6 DOT 4030103 AT x-ray DOT at> <48443F8B DOT 6070104 AT x-ray DOT at> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/