1 /* Declarations for variables relating to reading the source file.
2 Used by parsers, lexical analyzers, and error message routines.
3 Copyright (C) 1993, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
25 /* The data structure used to record a location in a translation unit. */
26 struct location_s
GTY (())
28 /* The name of the source file involved. */
31 /* The line-location in the source file. */
34 typedef struct location_s location_t
;
38 struct file_stack
*next
;
42 /* Top-level source file. */
43 extern const char *main_input_filename
;
45 extern location_t input_location
;
46 #define input_line (input_location.line)
47 #define input_filename (input_location.file)
49 /* Stack of currently pending input files.
50 The line member is not accurate for the innermost file on the stack. */
51 extern struct file_stack
*input_file_stack
;
53 /* Incremented on each change to input_file_stack. */
54 extern int input_file_stack_tick
;
56 extern void push_srcloc (const char *name
, int line
);
57 extern void pop_srcloc (void);