From 5a4e72150520b0379fc6bce7debd6e98b0b3ec26 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Mon, 27 Jan 1992 22:10:05 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 6 ++++++ gdb/buildsym.c | 6 ++++-- gdb/c-exp.y | 6 ++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b66ef36d851..8330e921f3c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/buildsym.c b/gdb/buildsym.c index ae1d9f93e66..243cbe2b2b7 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -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 == '~') { diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 7d4b1777ad3..6592076e25b 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -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' }; -- 2.30.2