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/libs/cplusplus/SimpleLexer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs/cplusplus/SimpleLexer.cpp') diff --git a/src/libs/cplusplus/SimpleLexer.cpp b/src/libs/cplusplus/SimpleLexer.cpp index 60ce47cd8fc..7fa9677bda5 100644 --- a/src/libs/cplusplus/SimpleLexer.cpp +++ b/src/libs/cplusplus/SimpleLexer.cpp @@ -129,14 +129,14 @@ QList SimpleLexer::operator()(const QString &text, int state) break; SimpleToken simpleTk; - simpleTk._kind = int(tk.kind); + simpleTk._kind = int(tk.f.kind); simpleTk._position = int(lex.tokenOffset()); simpleTk._length = int(lex.tokenLength()); simpleTk._text = text.midRef(simpleTk._position, simpleTk._length); lex.setScanAngleStringLiteralTokens(false); - if (tk.newline && tk.is(T_POUND)) + if (tk.f.newline && tk.is(T_POUND)) inPreproc = true; else if (inPreproc && tokens.size() == 1 && simpleTk.is(T_IDENTIFIER) && simpleTk.text() == QLatin1String("include")) -- cgit v1.2.3