diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-15 15:07:46 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-15 15:07:46 +0000 |
commit | f06537f281ee377a580745324c3dcb4dd0061e81 (patch) | |
tree | 0bcb9d1a50290f889709fe4909b9f2295332dc22 /gcc/doc | |
parent | 890c45fff2c369be2a2cfffa169ea8642000464d (diff) | |
download | gcc-f06537f281ee377a580745324c3dcb4dd0061e81.tar.gz |
2008-07-15 Richard Guenther <rguenther@suse.de>
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
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 14 |
1 files changed, 10 insertions, 4 deletions
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: |