summaryrefslogtreecommitdiff
path: root/gcc/input.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-10-14 12:04:22 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-10-14 12:04:22 +0200
commit96c169e15643ebffb7144837a54c760331d91c21 (patch)
tree1d09c51355f1f205dbfff2b154b3beaa1ef84a15 /gcc/input.h
parentb29ee46cf2f0010084b621c1d2ec50bb5b6a8964 (diff)
downloadgcc-96c169e15643ebffb7144837a54c760331d91c21.tar.gz
re PR preprocessor/41543 (BUILTINS_LOCATION wrong with -fpreprocessed)
PR preprocessor/41543 * input.h (BUILTINS_LOCATION): Change to 1 from 2. Assert BUILTINS_LOCATION < RESERVED_LOCATION_COUNT. * tree.c: Include intl.h. (expand_location): Handle BUILTINS_LOCATION. * Makefile.in (tree.o): Depend on intl.h. * include/line-map.h (RESERVED_LOCATION_COUNT): Define. * line-map.c (linemap_init): Initialize highest_location and highest_line to RESERVED_LOCATION_COUNT-1 instead of 0. * gcc.dg/debug/dwarf2/pr41543.c: New test. From-SVN: r152761
Diffstat (limited to 'gcc/input.h')
-rw-r--r--gcc/input.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/input.h b/gcc/input.h
index 299f56c3ce6..7f00dc7cd0a 100644
--- a/gcc/input.h
+++ b/gcc/input.h
@@ -1,6 +1,6 @@
/* Declarations for variables relating to reading the source file.
Used by parsers, lexical analyzers, and error message routines.
- Copyright (C) 1993, 1997, 1998, 2000, 2003, 2004, 2007, 2008
+ Copyright (C) 1993, 1997, 1998, 2000, 2003, 2004, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -30,7 +30,12 @@ extern GTY(()) struct line_maps *line_table;
#define UNKNOWN_LOCATION ((source_location) 0)
/* The location for declarations in "<built-in>" */
-#define BUILTINS_LOCATION ((source_location) 2)
+#define BUILTINS_LOCATION ((source_location) 1)
+
+/* line-map.c reserves RESERVED_LOCATION_COUNT to the user. Ensure
+ both UNKNOWN_LOCATION and BUILTINS_LOCATION fit into that. */
+extern char builtins_location_check[(BUILTINS_LOCATION
+ < RESERVED_LOCATION_COUNT) ? 1 : -1];
typedef struct GTY (())
{