OSDN Git Service

* tree-sra.c (scalarize_lsdt): Fix thinko in testing whether
[pf3gnuchains/gcc-fork.git] / libcpp / internal.h
index 857bfe1..59332df 100644 (file)
@@ -1,5 +1,5 @@
 /* Part of CPP library.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
    Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify it
@@ -339,6 +339,14 @@ struct cpp_reader
   /* Token generated while handling a directive, if any. */
   cpp_token directive_result;
 
+  /* When expanding a macro at top-level, this is the location of the
+     macro invocation.  */
+  source_location invocation_location;
+
+  /* True if this call to cpp_get_token should consider setting
+     invocation_location.  */
+  bool set_invocation_location;
+
   /* Search paths for include files.  */
   struct cpp_dir *quote_include;       /* "" */
   struct cpp_dir *bracket_include;     /* <> */
@@ -355,6 +363,10 @@ struct cpp_reader
   struct file_hash_entry *file_hash_entries;
   unsigned int file_hash_entries_allocated, file_hash_entries_used;
 
+  /* Negative path lookup hash table.  */
+  struct htab *nonexistent_file_hash;
+  struct obstack nonexistent_file_ob;
+
   /* Nonzero means don't look for #include "foo" the source-file
      directory.  */
   bool quote_ignores_source_dir;
@@ -448,6 +460,9 @@ struct cpp_reader
   /* A saved list of the defined macros, for dependency checking
      of precompiled headers.  */
   struct cpp_savedstate *savedstate;
+
+  /* Next value of __COUNTER__ macro. */
+  unsigned int counter;
 };
 
 /* Character classes.  Based on the more primitive macros in safe-ctype.h.
@@ -488,6 +503,13 @@ cpp_in_system_header (cpp_reader *pfile)
 #define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic)
 #define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional)
 
+static inline int cpp_in_primary_file (cpp_reader *);
+static inline int
+cpp_in_primary_file (cpp_reader *pfile)
+{
+  return pfile->line_table->depth == 1;
+}
+
 /* In errors.c  */
 extern int _cpp_begin_message (cpp_reader *, int,
                               source_location, unsigned int);
@@ -561,6 +583,17 @@ extern void _cpp_do_file_change (cpp_reader *, enum lc_reason, const char *,
                                 unsigned int, unsigned int);
 extern void _cpp_pop_buffer (cpp_reader *);
 
+/* In directives.c */
+struct _cpp_dir_only_callbacks
+{
+  /* Called to print a block of lines. */
+  void (*print_lines) (int, const void *, size_t);
+  void (*maybe_print_line) (source_location);
+};
+
+extern void _cpp_preprocess_dir_only (cpp_reader *,
+                                     const struct _cpp_dir_only_callbacks *);
+
 /* In traditional.c.  */
 extern bool _cpp_scan_out_logical_line (cpp_reader *, cpp_macro *);
 extern bool _cpp_read_logical_line_trad (cpp_reader *);