]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cpplib.c
Merge basic-improvements-branch to trunk
[thirdparty/gcc.git] / gcc / cpplib.c
index f8a702d8c1a43743d48c5ca19f5e6b8921f8efec..e032e75bef52433ab2af89c419722ce59b828ff3 100644 (file)
@@ -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;
     }
 }