diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2011-10-26 15:31:16 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-10-26 15:31:16 -0400 |
commit | 1ca3916f5688863f49976febd57b1a9640d1c71a (patch) | |
tree | 21ade8d4825d9024836e5cce7f12ddde0032b6c9 /gcc/c-family/c-lex.c | |
parent | 3ce4f9e4d2643273f11647e97b2c7796a64a73dd (diff) | |
download | gcc-1ca3916f5688863f49976febd57b1a9640d1c71a.zip gcc-1ca3916f5688863f49976febd57b1a9640d1c71a.tar.gz gcc-1ca3916f5688863f49976febd57b1a9640d1c71a.tar.bz2 |
build_string comments
From-SVN: r180537
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; |