From 6c876cf3280ba63d6077656476c2fc692e4bb1ff Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 28 Nov 2010 13:56:07 +0200 Subject: Qualify all unqualified name components in pointer types This this necessary since they may not resolve in the typedef that we generate in namespace odb. --- odb/pragma.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'odb/pragma.cxx') diff --git a/odb/pragma.cxx b/odb/pragma.cxx index 3a1bc0f..9970376 100644 --- a/odb/pragma.cxx +++ b/odb/pragma.cxx @@ -3,18 +3,11 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v3; see accompanying LICENSE file +#include #include using namespace std; -// Token spelling. See cpplib.h for details. -// -#define OP(e, s) s , -#define TK(e, s) #e , -static char const* token_spelling[N_TTYPES] = { TTYPE_TABLE }; -#undef OP -#undef TK - // Lists of pragmas. // loc_pragmas loc_pragmas_; @@ -256,11 +249,17 @@ handle_pragma (cpp_reader* reader, } size_t pb (0); + bool punc (false); for (tt = pragma_lex (&t); tt != CPP_EOF && (tt != CPP_CLOSE_PAREN || pb != 0); tt = pragma_lex (&t)) { + if (punc && tt > CPP_LAST_PUNCTUATOR) + val += ' '; + + punc = false; + if (tt == CPP_OPEN_PAREN) pb++; else if (tt == CPP_CLOSE_PAREN) @@ -288,16 +287,17 @@ handle_pragma (cpp_reader* reader, case CPP_NAME: { val += IDENTIFIER_POINTER (t); + punc = true; break; } default: { if (tt <= CPP_LAST_PUNCTUATOR) - val += token_spelling[tt]; + val += cxx_lexer::token_spelling[tt]; else { error ("unexpected token %qs in db pragma %qs", - token_spelling[tt], + cxx_lexer::token_spelling[tt], pc); return; } -- cgit v1.1