aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/lex.cc')
-rw-r--r--libcpp/lex.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/libcpp/lex.cc b/libcpp/lex.cc
index 5aa3799..c9e44e6 100644
--- a/libcpp/lex.cc
+++ b/libcpp/lex.cc
@@ -4235,8 +4235,13 @@ _cpp_lex_direct (cpp_reader *pfile)
case ':':
result->type = CPP_COLON;
- if (*buffer->cur == ':' && CPP_OPTION (pfile, scope))
- buffer->cur++, result->type = CPP_SCOPE;
+ if (*buffer->cur == ':')
+ {
+ if (CPP_OPTION (pfile, scope))
+ buffer->cur++, result->type = CPP_SCOPE;
+ else
+ result->flags |= COLON_SCOPE;
+ }
else if (*buffer->cur == '>' && CPP_OPTION (pfile, digraphs))
{
buffer->cur++;