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/TranslationUnit.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/shared/cplusplus/TranslationUnit.h') diff --git a/src/shared/cplusplus/TranslationUnit.h b/src/shared/cplusplus/TranslationUnit.h index 35f79480f0..112d142acb 100644 --- a/src/shared/cplusplus/TranslationUnit.h +++ b/src/shared/cplusplus/TranslationUnit.h @@ -53,7 +53,7 @@ #include "ASTfwd.h" #include "Token.h" #include "Array.h" -#include +#include // for FILE* #include // ### remove me CPLUSPLUS_BEGIN_HEADER @@ -190,16 +190,17 @@ private: MemoryPool *_pool; AST *_ast; TranslationUnit *_previousTranslationUnit; + struct Flags { + unsigned _tokenized: 1; + unsigned _parsed: 1; + unsigned _blockErrors: 1; + unsigned _skipFunctionBody: 1; + unsigned _qtMocRunEnabled: 1; + unsigned _objCEnabled: 1; + }; union { unsigned _flags; - struct { - unsigned _tokenized: 1; - unsigned _parsed: 1; - unsigned _blockErrors: 1; - unsigned _skipFunctionBody: 1; - unsigned _qtMocRunEnabled: 1; - unsigned _objCEnabled: 1; - }; + Flags f; }; }; -- cgit v1.2.1