From f06537f281ee377a580745324c3dcb4dd0061e81 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 15 Jul 2008 15:07:46 +0000 Subject: 2008-07-15 Richard Guenther PR middle-end/36369 * c-common.c (strict_aliasing_warning): Do not warn for TYPE_REF_CAN_ALIAS_ALL pointers. (c_common_get_alias_set): may_alias types are not special. * tree.c (build_pointer_type_for_mode): Look up the may_alias attribute and set can_ref_all accordingly. (build_reference_type_for_mode): Likewise. * doc/extend.texi (may_alias): Clarify. * gcc.dg/Wstrict-aliasing-bogus-ref-all.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137843 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/doc/extend.texi | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gcc/doc') diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index eecb4ca5bf4..4a4c9a3a4a1 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -4240,10 +4240,16 @@ The @code{deprecated} attribute can also be used for functions and variables (@pxref{Function Attributes}, @pxref{Variable Attributes}.) @item may_alias -Accesses to objects with types with this attribute are not subjected to -type-based alias analysis, but are instead assumed to be able to alias -any other type of objects, just like the @code{char} type. See -@option{-fstrict-aliasing} for more information on aliasing issues. +Accesses through pointers to types with this attribute are not subject +to type-based alias analysis, but are instead assumed to be able to alias +any other type of objects. In the context of 6.5/7 an lvalue expression +dereferencing such a pointer is treated like having a character type. +See @option{-fstrict-aliasing} for more information on aliasing issues. +This extension exists to support some vector APIs, in which pointers to +one vector type are permitted to alias pointers to a different vector type. + +Note that an object of a type with this attribute does not have any +special semantics. Example of use: -- cgit v1.2.1