diff options
author | Richard Guenther <rguenther@suse.de> | 2008-06-11 18:19:28 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-06-11 18:19:28 +0000 |
commit | 4653cae5b8dc090912f262572d0105f27ec2c83b (patch) | |
tree | 7589856308b10e4f1fc7740be354b769d8e54ff6 /gcc/c-common.c | |
parent | 8981c15b8cbb3a7e129c7bcf85823eff3db9c6a7 (diff) | |
download | gcc-4653cae5b8dc090912f262572d0105f27ec2c83b.zip gcc-4653cae5b8dc090912f262572d0105f27ec2c83b.tar.gz gcc-4653cae5b8dc090912f262572d0105f27ec2c83b.tar.bz2 |
alias.c (get_alias_set): Use the element alias-set for arrays.
2008-06-11 Richard Guenther <rguenther@suse.de>
* alias.c (get_alias_set): Use the element alias-set for arrays.
(record_component_aliases): For arrays and vectors do nothing.
* c-common.c (strict_aliasing_warning): Handle the cases
of alias set zero explicitly.
* Makefile.in (dfp.o-warn): Add -Wno-error.
From-SVN: r136679
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 377db57..b783c53 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1093,7 +1093,8 @@ strict_aliasing_warning (tree otype, tree type, tree expr) get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0))); alias_set_type set2 = get_alias_set (TREE_TYPE (type)); - if (!alias_sets_conflict_p (set1, set2)) + if (set1 != set2 && set2 != 0 + && (set1 == 0 || !alias_sets_conflict_p (set1, set2))) { warning (OPT_Wstrict_aliasing, "dereferencing type-punned " "pointer will break strict-aliasing rules"); |