From d0457b70e33f1a090a91b0037e9254a0e14b8427 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 27 Jul 2009 21:47:03 +0200 Subject: Compile the C++ parser library with Sun CC 5.9. Things you mustn't do: 1) end an enum with a comma 2) #include and not use std:: 3) use anonymous structures All three things are invalid C++. Anonymous structures inside anonymous unions are allowed by GCC, but that doesn't mean it's valid. --- src/shared/cplusplus/Token.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/cplusplus/Token.cpp') diff --git a/src/shared/cplusplus/Token.cpp b/src/shared/cplusplus/Token.cpp index 828da8da31..8f8a722aab 100644 --- a/src/shared/cplusplus/Token.cpp +++ b/src/shared/cplusplus/Token.cpp @@ -114,7 +114,7 @@ const char *Token::name(int kind) const char *Token::spell() const { - switch (kind) { + switch (f.kind) { case T_IDENTIFIER: return identifier->chars(); @@ -128,7 +128,7 @@ const char *Token::spell() const return literal->chars(); default: - return token_names[kind]; + return token_names[f.kind]; } // switch } -- cgit v1.2.1