Only treat "class" as a token if the current language is C++.
authorFred Fish <fnf@specifix.com>
Thu, 9 Jul 1992 07:15:11 +0000 (07:15 +0000)
committerFred Fish <fnf@specifix.com>
Thu, 9 Jul 1992 07:15:11 +0000 (07:15 +0000)
gdb/c-exp.y

index cc092475cebc45d5bb3ed18622fe228d1d1dcc23..4416253f1ebb00723a682aa474fe30809f864f8e 100644 (file)
@@ -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;