OSDN Git Service

* gcc.c (default_compilers): Add missing initializers.
[pf3gnuchains/gcc-fork.git] / gcc / cpphash.h
index 6606746..4e86bf3 100644 (file)
@@ -64,6 +64,13 @@ typedef unsigned char uchar;
 #define CPP_BUF_COLUMN(BUF, CUR) ((CUR) - (BUF)->line_base)
 #define CPP_BUF_COL(BUF) CPP_BUF_COLUMN(BUF, (BUF)->cur)
 
+#define CPP_INCREMENT_LINE(PFILE, COLS_HINT) do { \
+    const struct line_map *map \
+      = linemap_lookup (PFILE->line_table, PFILE->line); \
+    unsigned int line = SOURCE_LINE (map, PFILE->line) + 1; \
+    PFILE->line = linemap_line_start (PFILE->line_table, line, COLS_HINT); \
+  } while (0)
+
 /* Maximum nesting of cpp_buffers.  We use a static limit, partly for
    efficiency, and partly to limit runaway recursion.  */
 #define CPP_STACK_MAX 200
@@ -296,24 +303,26 @@ struct cpp_buffer
      The warning happens only for C89 extended mode with -pedantic on,
      or for -Wtraditional, and only once per file (otherwise it would
      be far too noisy).  */
-  unsigned char warned_cplusplus_comments;
+  unsigned int warned_cplusplus_comments : 1;
 
   /* True if we don't process trigraphs and escaped newlines.  True
      for preprocessed input, command line directives, and _Pragma
      buffers.  */
-  unsigned char from_stage3;
+  unsigned int from_stage3 : 1;
+
+  /* At EOF, a buffer is automatically popped.  If RETURN_AT_EOF is
+     true, a CPP_EOF token is then returned.  Otherwise, the next
+     token from the enclosing buffer is returned.  */
+  unsigned int return_at_eof : 1;
 
-  /* Nonzero means that the directory to start searching for ""
-     include files has been calculated and stored in "dir" below.  */
-  unsigned char search_cached;
+  /* One for a system header, two for a C system header file that therefore
+     needs to be extern "C" protected in C++, and zero otherwise.  */
+  unsigned char sysp;
 
   /* The directory of the this buffer's file.  Its NAME member is not
      allocated, so we don't need to worry about freeing it.  */
   struct cpp_dir dir;
 
-  /* Used for buffer overlays by cpptrad.c.  */
-  const uchar *saved_cur, *saved_rlimit;
-
   /* Descriptor for converting from the input character set to the
      source character set.  */
   struct cset_converter input_cset_desc;
@@ -335,7 +344,6 @@ struct cpp_reader
 
   /* Source line tracking.  */
   struct line_maps *line_table;
-  const struct line_map *map;
   fileline line;
 
   /* The line of the '#' of the current directive.  */
@@ -455,6 +463,9 @@ struct cpp_reader
     fileline first_line;
   } out;
 
+  /* Used for buffer overlays by cpptrad.c.  */
+  const uchar *saved_cur, *saved_rlimit, *saved_line_base;
+
   /* Used to save the original line number during traditional
      preprocessing.  */
   unsigned int saved_line;
@@ -493,12 +504,18 @@ extern unsigned char _cpp_trigraph_map[UCHAR_MAX + 1];
 
 /* Macros.  */
 
-#define CPP_IN_SYSTEM_HEADER(PFILE) ((PFILE)->map && (PFILE)->map->sysp)
+static inline int cpp_in_system_header (cpp_reader *);
+static inline int
+cpp_in_system_header (cpp_reader *pfile)
+{
+  return pfile->buffer ? pfile->buffer->sysp : 0;
+}
 #define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic)
 #define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional)
 
 /* In cpperror.c  */
-extern int _cpp_begin_message (cpp_reader *, int, fileline, unsigned int);
+extern int _cpp_begin_message (cpp_reader *, int,
+                              source_location, unsigned int);
 
 /* In cppmacro.c */
 extern void _cpp_free_definition (cpp_hashnode *);
@@ -579,9 +596,6 @@ extern size_t _cpp_replacement_text_len (const cpp_macro *);
 extern cppchar_t _cpp_valid_ucn (cpp_reader *, const uchar **,
                                 const uchar *, int);
 extern void _cpp_destroy_iconv (cpp_reader *);
-extern bool _cpp_interpret_string_notranslate (cpp_reader *,
-                                              const cpp_string *,
-                                              cpp_string *);
 extern uchar *_cpp_convert_input (cpp_reader *, const char *, uchar *,
                                  size_t, size_t, off_t *);
 extern const char *_cpp_default_encoding (void);