From 866ecded64f95d14bfc4ac313211a5cb9a289afa Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Thu, 9 Jul 1992 07:15:11 +0000 Subject: [PATCH] Only treat "class" as a token if the current language is C++. --- gdb/c-exp.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.30.2