History log of /openbsd-current/gnu/gcc/gcc/config/pa/pa.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.2 29-Aug-2010 kettenis

Make sure local arrays of chars are word-aligned on strict alignment
architectures, just like what is done for global ones. This isn't
just an optiization. There is a long tradition of building packets in
arrays of chars on the stack by using casts to types that require
stricter alignment. Ignore the language lawyers say it isn't
explicitly allowed by the C standard. Historically many (all?) C
compilers have handled that just fine, so it is stupid to break this.

Thanks to mikeb@ for finding the GCC bug report against upstream GCC
4.2.1. This fixes hppa/hppa64 and sparc/sparc64 as discuessed with
miod@ (upstream only fixed sparc/sparc64). Other strict alignment
architectures will need similar fixes.

ok deraadt@, mikeb@, miod@


# 1.1 15-Oct-2009 robert

branches: 1.1.1;
Initial revision