diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1996-03-12 21:47:30 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1996-03-12 21:47:30 -0800 |
commit | 5bfaaedad796941281dc9e736c7f638c3f9f5690 (patch) | |
tree | 5a0b9f708289b40bd8c97bced4be5f1c4efbf7d7 /gcc | |
parent | d3debd4b78725b7a602150092fdc5ef5895edd9a (diff) | |
download | gcc-5bfaaedad796941281dc9e736c7f638c3f9f5690.zip gcc-5bfaaedad796941281dc9e736c7f638c3f9f5690.tar.gz gcc-5bfaaedad796941281dc9e736c7f638c3f9f5690.tar.bz2 |
dbxout.c (dbxout_type): Better "variant" handling to ignore const/volatile but not typedef names.
* dbxout.c (dbxout_type): Better "variant" handling to ignore
const/volatile but not typedef names. Improves Feb 12 change.
From-SVN: r11523
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/dbxout.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 17c5687..39c61ea 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1057,10 +1057,20 @@ dbxout_type (type, full, show_arg_types) by assuming `int'. */ if (type == error_mark_node) type = integer_type_node; - else if (!(TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL - && DECL_ORIGINAL_TYPE (TYPE_NAME (type)))) + else { - type = TYPE_MAIN_VARIANT (type); + /* Try to find the "main variant" with the same name but not const + or volatile. (Since stabs does not distinguish const and volatile, + there is no need to make them separate types. But types with + different names are usefully distinguished.) */ + + for (tem = TYPE_MAIN_VARIANT (type); tem; tem = TYPE_NEXT_VARIANT (tem)) + if (!TYPE_READONLY (tem) && !TYPE_VOLATILE (tem) + && TYPE_NAME (tem) == TYPE_NAME (type)) + { + type = tem; + break; + } if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (type))) |