dbxout.c (dbxout_type): When printing type index of range type whose bounds are print...
authorJoel Brobecker <brobecker@gnat.com>
Fri, 4 Apr 2003 22:34:52 +0000 (22:34 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 4 Apr 2003 22:34:52 +0000 (17:34 -0500)
        * 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

gcc/ChangeLog
gcc/dbxout.c

index 01a858ba20bd4e0041e25dcec968aa5c77049db3..544f911bf9748e1ec741cc700b615685f7909a25 100644 (file)
@@ -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
index 683745fc56b54c899a350254f4a5a2c7ea7959d8..58208fffad2e8d1a5568b193574b84d6de635e85 100644 (file)
@@ -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));