{
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;
error ("declaration of %qD as non-function", dname);
return error_mark_node;
}
-
+
if (dname
&& TREE_CODE (dname) == IDENTIFIER_NODE
&& UDLIT_OPER_P (dname)
/* Parse a user-defined string constant. Returns a call to a user-defined
literal operator taking a character pointer and the length of the string
as arguments. */
+
static tree
cp_parser_userdef_string_literal (cp_token *token)
{
/* Return a newly constructed STRING_CST node whose value is
the LEN characters at STR.
+ Note that for a C string literal, LEN should include the trailing NUL.
The TREE_TYPE is not initialized. */
tree