This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug target/81333] Bad alignment of global variables on Alpha


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81333

--- Comment #3 from mikulas at artax dot karlin.mff.cuni.cz ---
> Only C11 and above.  C99 and C98 does not have any requirements like that :)

Accessing any variable with the char pointer is allowed in C89 and newer
standards. Threading is not covered at all in C89 and C99.

See this quote from C89:
A.6.2 Undefined behavior:
* An object has its stored value accessed by an lvalue that does not have one
of the following types: the declared type of the object, a qualified version of
the declared type of the object, the signed or unsigned type corresponding to
the declared type of the object, the signed or unsigned type corresponding to a
qualified version of the declared type of the object, an aggregate or union
type that (recursively) includes one of the aforementioned types among its
members, or a character type ($3.3).

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