This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: Propagation of pointer alignment information


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~


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