* buildsym.c (read_struct_type): Circumvent sun3 sunos "--" compiler bug.
authorJohn Gilmore <gnu@cygnus>
Mon, 27 Jan 1992 22:10:05 +0000 (22:10 +0000)
committerJohn Gilmore <gnu@cygnus>
Mon, 27 Jan 1992 22:10:05 +0000 (22:10 +0000)
* c-exp.y (yylex):  `this' and `template' are only tokens in C++.
* target.c (target_xfer_memory):  Return errno in preference to EIO.

gdb/ChangeLog
gdb/buildsym.c
gdb/c-exp.y

index b66ef36d8512423bc8de1fcd16004f247fb2596b..8330e921f3c71c1b2e575e6a5e716757b6900871 100644 (file)
@@ -1,5 +1,11 @@
 Mon Jan 27 13:43:26 1992  John Gilmore  (gnu at cygnus.com)
 
+       * buildsym.c (read_struct_type):  Circumvent sun3 sunos "--"
+       compiler bug.
+       * c-exp.y (yylex):  `this' and `template' are only tokens in C++.
+
+       * target.c (target_xfer_memory):  Return errno in preference to EIO.
+
        * xm-convex.h, xm-hp300bsd.h, xm-isi.h, xm-merlin.h, xm-news.h,
        xm-np1.h, xm-pn.h, xm-pyr.h, xm-rtbsd.h, xm-symmetry.h, xm-umax.h:
        Remove MISSING_VPRINTF declaration, and superfluous "kgdb" defines.
index ae1d9f93e66583adc7cc7baeb22f10ba523defd9..243cbe2b2b75fde6735d61c92b805d5b96054293 100644 (file)
@@ -2475,8 +2475,10 @@ read_struct_type (pp, type)
        TYPE_NFN_FIELDS_TOTAL (TYPE_BASECLASS (type, i));
   }
 
-  for (n = nfn_fields; mainlist; mainlist = mainlist->next)
-    TYPE_FN_FIELDLISTS (type)[--n] = mainlist->fn_fieldlist;
+  for (n = nfn_fields; mainlist; mainlist = mainlist->next) {
+    --n;                      /* Circumvent Sun3 compiler bug */
+    TYPE_FN_FIELDLISTS (type)[n] = mainlist->fn_fieldlist;
+  }
 
   if (**pp == '~')
     {
index 7d4b1777ad3d8c4b710567319945d3c80b06c393..6592076e25bb7edc7c32773c93abec127f50ee1e 100644 (file)
@@ -1297,7 +1297,8 @@ yylex ()
     case 8:
       if (!strncmp (tokstart, "unsigned", 8))
        return UNSIGNED;
-      if (!strncmp (tokstart, "template", 8))
+      if (current_language->la_language == language_cplus
+         && !strncmp (tokstart, "template", 8))
        return TEMPLATE;
       break;
     case 6:
@@ -1319,7 +1320,8 @@ yylex ()
        return ENUM;
       if (!strncmp (tokstart, "long", 4))
        return LONG;
-      if (!strncmp (tokstart, "this", 4))
+      if (current_language->la_language == language_cplus
+         && !strncmp (tokstart, "this", 4))
        {
          static const char this_name[] =
                                 { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };