diff options
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/dwarf2out.c | 22 |
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 |
