aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2003-04-04 22:34:52 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2003-04-04 17:34:52 -0500
commit08b0f5f900e6c9bb997e6b098488384feb805874 (patch)
treef417bb102919c8c97a1e2254cf237747021b5095
parent45ca21065864f404f5bb27b7ecf43a40b8efbda0 (diff)
downloadgcc-08b0f5f900e6c9bb997e6b098488384feb805874.zip
gcc-08b0f5f900e6c9bb997e6b098488384feb805874.tar.gz
gcc-08b0f5f900e6c9bb997e6b098488384feb805874.tar.bz2
dbxout.c (dbxout_type): When printing type index of range type whose bounds are printed in octal format...
* dbxout.c (dbxout_type): When printing type index of range type whose bounds are printed in octal format, print type of parent type if it exists so enumerated type descriptions are not transformed into unsigned types. From-SVN: r65252
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dbxout.c12
2 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 01a858b..544f911 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Fri Apr 4 17:33:24 2003 Joel Brobecker <brobecker@gnat.com>
+
+ * dbxout.c (dbxout_type): When printing type index of range type
+ whose bounds are printed in octal format, print type of parent type if
+ it exists so enumerated type descriptions are not transformed
+ into unsigned types.
+
2003-04-04 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300-protos.h: Add a prototype for
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 683745f..58208ff 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -1330,7 +1330,17 @@ dbxout_type (type, full)
{
fprintf (asmfile, "r");
CHARS (1);
- dbxout_type_index (type);
+
+ /* If this type derives from another type, output type index of
+ parent type. This is particularly important when parent type
+ is an enumerated type, because not generating the parent type
+ index would transform the definition of this enumerated type
+ into a plain unsigned type. */
+ if (TREE_TYPE (type) != 0)
+ dbxout_type_index (TREE_TYPE (type));
+ else
+ dbxout_type_index (type);
+
fprintf (asmfile, ";");
CHARS (1);
print_int_cst_octal (TYPE_MIN_VALUE (type));