diff options
Diffstat (limited to 'gcc/c-family/c-lex.c')
-rw-r--r-- | gcc/c-family/c-lex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c index baee8eb..7b220ab 100644 --- a/gcc/c-family/c-lex.c +++ b/gcc/c-family/c-lex.c @@ -344,6 +344,8 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, { tree suffix_id = get_identifier (suffix); int len = tok->val.str.len - strlen (suffix); + /* If this is going to be used as a C string to pass to a + raw literal operator, we need to add a trailing NUL. */ tree num_string = build_string (len + 1, (const char *) tok->val.str.text); TREE_TYPE (num_string) = char_array_type_node; |