#include "config.h"
#include "system.h"
+#include "real.h"
#include "rtl.h"
#include "tree.h"
#include "expr.h"
#include "input.h"
#include "output.h"
-#include "c-lex.h"
#include "c-tree.h"
#include "c-common.h"
#include "flags.h"
#include "tm_p.h"
#include "splay-tree.h"
#include "debug.h"
-#include "target.h"
#ifdef MULTIBYTE_CHARS
#include "mbchar.h"
/* Number of bytes in a wide character. */
#define WCHAR_BYTES (WCHAR_TYPE_SIZE / BITS_PER_UNIT)
-int indent_level; /* Number of { minus number of }. */
int pending_lang_change; /* If we need to switch languages - C++ only */
int c_header_level; /* depth in C headers - C++ only */
static tree lex_charconst PARAMS ((const cpp_token *));
static void update_header_times PARAMS ((const char *));
static int dump_one_header PARAMS ((splay_tree_node, void *));
-static void cb_register_builtins PARAMS ((cpp_reader *));
static void cb_line_change PARAMS ((cpp_reader *, const cpp_token *, int));
static void cb_ident PARAMS ((cpp_reader *, unsigned int,
const cpp_string *));
cb->ident = cb_ident;
cb->file_change = cb_file_change;
cb->def_pragma = cb_def_pragma;
- cb->register_builtins = cb_register_builtins;
/* Set the debug callbacks if we can use them. */
if (debug_info_level == DINFO_LEVEL_VERBOSE
splay_tree_foreach (file_info_tree, dump_one_header, 0);
}
-/* Register preprocessor built-ins. */
-static void
-cb_register_builtins (pfile)
- cpp_reader *pfile;
-{
- if (c_language == clk_cplusplus)
- {
- if (SUPPORTS_ONE_ONLY)
- cpp_define (pfile, "__GXX_WEAK__");
- else
- cpp_define (pfile, "__GXX_WEAK__=0");
- }
-
- (*targetm.register_cpp_builtins) (pfile);
-}
-
-/* Not yet handled: #pragma, #define, #undef.
- No need to deal with linemarkers under normal conditions. */
-
static void
cb_ident (pfile, line, str)
cpp_reader *pfile ATTRIBUTE_UNUSED;
lineno = included_at;
push_srcloc (new_map->to_file, 1);
- input_file_stack->indent_level = indent_level;
(*debug_hooks->start_source_file) (included_at, new_map->to_file);
#ifndef NO_IMPLICIT_EXTERN_C
if (c_header_level)
--pending_lang_change;
}
#endif
-#if 0
- if (indent_level != input_file_stack->indent_level)
- {
- warning_with_file_and_line
- (input_filename, lineno,
- "this file contains more '%c's than '%c's",
- indent_level > input_file_stack->indent_level ? '{' : '}',
- indent_level > input_file_stack->indent_level ? '}' : '{');
- }
-#endif
pop_srcloc ();
(*debug_hooks->end_source_file) (to_line);
*value = NULL_TREE;
switch (tok->type)
{
- case CPP_OPEN_BRACE: indent_level++; break;
- case CPP_CLOSE_BRACE: indent_level--; break;
-
/* Issue this error here, where we can get at tok->val.c. */
case CPP_OTHER:
if (ISGRAPH (tok->val.c))
unsigned int chars_seen;
int unsignedp;
- result = cpp_interpret_charconst (parse_in, token, warn_multichar,
+ result = cpp_interpret_charconst (parse_in, token,
&chars_seen, &unsignedp);
/* Cast to cppchar_signed_t to get correct sign-extension of RESULT