From 2b69f877f5c1709b02a0bd6ec374bdf6484dd751 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 26 Oct 2008 20:55:23 +0000 Subject: [PATCH] In C++ (most) character literals are of type char. [r23218] --- lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lexer.c b/lexer.c index 779f4b3..2d1df82 100644 --- a/lexer.c +++ b/lexer.c @@ -1177,7 +1177,7 @@ end_of_char_constant:; lexer_token.type = T_CHARACTER_CONSTANT; lexer_token.v.string.begin = string; lexer_token.v.string.size = size; - lexer_token.datatype = type_int; + lexer_token.datatype = c_mode & _CXX && size == 1 ? type_char : type_int; } /** -- 2.20.1