This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Propagation of pointer alignment information
- To: Jeffrey A Law <law at hurl dot cygnus dot com>, richard dot earnshaw at arm dot com
- Subject: Re: Propagation of pointer alignment information
- From: Richard Henderson <rth at cygnus dot com>
- Date: Fri, 18 Dec 1998 16:17:30 -0800
- Cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, egcs at egcs dot cygnus dot com
- References: <199812161354.NAA04076@sun52.NIS.cambridge> <29262.913874805@hurl.cygnus.com>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Wed, Dec 16, 1998 at 11:06:45PM -0700, Jeffrey A Law wrote:
> I'm not a big fan of having lots of options to work around bad user code.
Neither am I.
> I'm willing to go along with this patch if you think this problem is important
> enough to warrant adding the change. But we shouldn't make a habit of hacking
> the compiler to work around bugs in user code.
If the only problem code you've seen is for Ghostscript, I'm not
sure I'd bother. I hacked up the source to make it work for the
Alpha. The key to the hack is that gcc will propogate through a
cast, but not through an assignment to a properly typed variable.
+#define PACKED(pref) ({ const ushort *_T_ = (const ushort *)(pref); _T_; })
Does the trick. I can pass the whole patch along if you are interested.
r~