From: Fred Fish Date: Thu, 9 Jul 1992 07:15:11 +0000 (+0000) Subject: Only treat "class" as a token if the current language is C++. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=866ecded64f95d14bfc4ac313211a5cb9a289afa;p=binutils-gdb.git Only treat "class" as a token if the current language is C++. --- diff --git a/gdb/c-exp.y b/gdb/c-exp.y index cc092475ceb..4416253f1eb 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1369,7 +1369,8 @@ yylex () return SIZEOF; break; case 5: - if (!strncmp (tokstart, "class", 5)) + if (current_language->la_language == language_cplus + && !strncmp (tokstart, "class", 5)) return CLASS; if (!strncmp (tokstart, "union", 5)) return UNION;