[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Bug Report (offset+cast)

From: Rob Landley
Subject: Re: [Tinycc-devel] Bug Report (offset+cast)
Date: Fri, 11 May 2007 20:54:47 -0400
User-agent: KMail/1.9.1

On Friday 11 May 2007 11:43 am, Dave Dodge wrote:

> Well, the term "correctly" is a bit suspect.  You can't convert an
> arbitrary char* to a short* and dereference it without risking
> undefined behavior, because among other things there's no guarantee
> that the pointed-to location will be aligned properly as a short.

If there's a situation where we're going to produce wrong code, I think we 
should at the _very_ least warn, and more likely error out the compile.

Producing working code and letting the trap occur at runtime is another 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]