to the untranslated one. */
int c_lex_string_translate = 1;
+/* True if strings should be passed to the caller of c_lex completely
+ unmolested (no concatenation, no translation). */
+bool c_lex_return_raw_strings = false;
+
static tree interpret_integer (const cpp_token *, unsigned int);
static tree interpret_float (const cpp_token *, unsigned int);
static enum integer_type_kind narrowest_unsigned_type
struct cpp_callbacks *cb;
struct c_fileinfo *toplevel;
- /* Set up filename timing. Must happen before cpp_read_main_file. */
- file_info_tree = splay_tree_new ((splay_tree_compare_fn)strcmp,
- 0,
- (splay_tree_delete_value_fn)free);
+ /* The get_fileinfo data structure must be initialized before
+ cpp_read_main_file is called. */
toplevel = get_fileinfo ("<top level>");
if (flag_detailed_statistics)
{
splay_tree_node n;
struct c_fileinfo *fi;
+ if (!file_info_tree)
+ file_info_tree = splay_tree_new ((splay_tree_compare_fn)strcmp,
+ 0,
+ (splay_tree_delete_value_fn)free);
+
n = splay_tree_lookup (file_info_tree, (splay_tree_key) name);
if (n)
return (struct c_fileinfo *) n->value;
input_filename = new_map->to_file;
input_line = new_map->to_line;
#endif
-
- /* Hook for C++. */
- extract_interface_info ();
}
static void
case CPP_STRING:
case CPP_WSTRING:
- return lex_string (tok, value, false);
+ if (!c_lex_return_raw_strings)
+ return lex_string (tok, value, false);
+ /* else fall through */
+
+ case CPP_PRAGMA:
+ *value = build_string (tok->val.str.len, (char *)tok->val.str.text);
break;
/* These tokens should not be visible outside cpplib. */
if (itk > itk_unsigned_long
&& (flags & CPP_N_WIDTH) != CPP_N_LARGE
&& ! in_system_header && ! flag_isoc99)
- pedwarn ("integer constant is too large for \"%s\" type",
+ pedwarn ("integer constant is too large for %qs type",
(flags & CPP_N_UNSIGNED) ? "unsigned long" : "long");
value = build_int_cst_wide (type, integer.low, integer.high);
??? That's a dubious reason... is this a mandatory diagnostic or
isn't it? -- zw, 2001-08-21. */
if (REAL_VALUE_ISINF (real) && pedantic)
- warning ("floating constant exceeds range of \"%s\"", type_name);
+ warning ("floating constant exceeds range of %<%s%>", type_name);
/* Create a node with determined type and value. */
value = build_real (type, real);