aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-03-22 20:55:07 +0000
committerJoel Brobecker <brobecke@gcc.gnu.org>2004-03-22 20:55:07 +0000
commit886de2d4dcf3ade25fb76c32522fd4aa2f9510b8 (patch)
tree2038d47aa44a1982499e945228c2755253e04697
parentd915eec0db44e5b9c50585ea77cf12daaf71de4a (diff)
downloadgcc-886de2d4dcf3ade25fb76c32522fd4aa2f9510b8.zip
gcc-886de2d4dcf3ade25fb76c32522fd4aa2f9510b8.tar.gz
gcc-886de2d4dcf3ade25fb76c32522fd4aa2f9510b8.tar.bz2
dwarf2out.c (is_subrange_type): Minor code rework.
* dwarf2out.c (is_subrange_type): Minor code rework. No behavior change. From-SVN: r79837
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c22
2 files changed, 18 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9e06227..4237524 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-22 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2out.c (is_subrange_type): Minor code rework. No behavior
+ change.
+
2004-03-22 Jakub Jelinek <jakub@redhat.com>
PR c/14069
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index b3dcda0..ad2bf63 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8000,15 +8000,19 @@ is_subrange_type (tree type)
{
tree subtype = TREE_TYPE (type);
- if (TREE_CODE (type) == INTEGER_TYPE
- && subtype != NULL_TREE)
- {
- if (TREE_CODE (subtype) == INTEGER_TYPE)
- return true;
- if (TREE_CODE (subtype) == ENUMERAL_TYPE)
- return true;
- }
- return false;
+ /* Subrange types are identified by the fact that they are integer
+ types, and that they have a subtype which is either an integer type
+ or an enumeral type. */
+
+ if (TREE_CODE (type) != INTEGER_TYPE
+ || subtype == NULL_TREE)
+ return false;
+
+ if (TREE_CODE (subtype) != INTEGER_TYPE
+ && TREE_CODE (subtype) != ENUMERAL_TYPE)
+ return false;
+
+ return true;
}
/* Given a pointer to a tree node for a subrange type, return a pointer