summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-16 17:58:39 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-16 17:58:39 +0000
commit8e539fdc2f558ef2e7689ac34ea98a6a654a9008 (patch)
tree93cf42ad410155446825d7dc6543b00c7cbd90c5 /gcc/c-family/c-common.c
parent1f41d977a07af07a57447f3325ad8416f25e9b0e (diff)
downloadgcc-8e539fdc2f558ef2e7689ac34ea98a6a654a9008.tar.gz
* c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
* c-common.c (c_common_get_alias_set): Likewise. (handle_visibility_attribute): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index f8ccb6d62c0..a062f81a1c3 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -5344,19 +5344,15 @@ c_common_get_alias_set (tree t)
TREE_CODE (t2) == POINTER_TYPE;
t2 = TREE_TYPE (t2))
;
- if (TREE_CODE (t2) != RECORD_TYPE
- && TREE_CODE (t2) != ENUMERAL_TYPE
- && TREE_CODE (t2) != QUAL_UNION_TYPE
- && TREE_CODE (t2) != UNION_TYPE)
+ if (!RECORD_OR_UNION_TYPE_P (t2)
+ && TREE_CODE (t2) != ENUMERAL_TYPE)
return -1;
if (TYPE_SIZE (t2) == 0)
return -1;
}
/* These are the only cases that need special handling. */
- if (TREE_CODE (t) != RECORD_TYPE
+ if (!RECORD_OR_UNION_TYPE_P (t)
&& TREE_CODE (t) != ENUMERAL_TYPE
- && TREE_CODE (t) != QUAL_UNION_TYPE
- && TREE_CODE (t) != UNION_TYPE
&& TREE_CODE (t) != POINTER_TYPE)
return -1;
/* Undefined? */
@@ -8644,7 +8640,7 @@ handle_visibility_attribute (tree *node, tree name, tree args,
{
if (TREE_CODE (*node) == ENUMERAL_TYPE)
/* OK */;
- else if (TREE_CODE (*node) != RECORD_TYPE && TREE_CODE (*node) != UNION_TYPE)
+ else if (!RECORD_OR_UNION_TYPE_P (*node))
{
warning (OPT_Wattributes, "%qE attribute ignored on non-class types",
name);