summaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index f8a702d8c1a..e032e75bef5 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -21,6 +21,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "cpplib.h"
#include "cpphash.h"
@@ -364,8 +366,8 @@ _cpp_handle_directive (pfile, indented)
if (dname->type == CPP_NAME)
{
- if (dname->val.node->directive_index)
- dir = &dtable[dname->val.node->directive_index - 1];
+ if (dname->val.node->is_directive)
+ dir = &dtable[dname->val.node->directive_index];
}
/* We do not recognize the # followed by a number extension in
assembler code. */
@@ -2002,6 +2004,7 @@ _cpp_init_directives (pfile)
for (i = 0; i < (unsigned int) N_DIRECTIVES; i++)
{
node = cpp_lookup (pfile, dtable[i].name, dtable[i].length);
- node->directive_index = i + 1;
+ node->is_directive = 1;
+ node->directive_index = i;
}
}