]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[1/7] Preprocessor cleanup
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Oct 2018 14:41:35 +0000 (14:41 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Oct 2018 14:41:35 +0000 (14:41 +0000)
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg02037.html
* directives.c (DIRECTIVE_TABLE): Drop historical frequency
comments.
* files.c (_cpp_stack_file): Fix indentation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265685 138bc75d-0d04-0410-961f-82ee72b054a4

libcpp/ChangeLog
libcpp/directives.c
libcpp/files.c

index fd08a330ccaa24e40bc66e82d1cecb5396a0b2ee..07361746eb465edd3f3510e6b0e4e084cb91c5b4 100644 (file)
@@ -1,3 +1,9 @@
+2018-10-31  Nathan Sidwell  <nathan@acm.org>
+
+       * directives.c (DIRECTIVE_TABLE): Drop historical frequency
+       comments.
+       * files.c (_cpp_stack_file): Fix indentation.
+
 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
 
        * include/cpplib.h (enum c_lang): Add CLK_GNUC2X and CLK_STDC2X.
index 9793e6b65b13cce1fc5cadcb484500276125d429..b91c2e918a5378c1fb711ce021038d09d8837246 100644 (file)
@@ -133,35 +133,30 @@ static void do_pragma_push_macro (cpp_reader *);
 static void do_pragma_pop_macro (cpp_reader *);
 static void cpp_pop_definition (cpp_reader *, struct def_pragma_macro *);
 
-/* This is the table of directive handlers.  It is ordered by
-   frequency of occurrence; the numbers at the end are directive
-   counts from all the source code I have lying around (egcs and libc
-   CVS as of 1999-05-18, plus grub-0.5.91, linux-2.2.9, and
-   pcmcia-cs-3.0.9).  This is no longer important as directive lookup
-   is now O(1).  All extensions other than #warning, #include_next,
-   and #import are deprecated.  The name is where the extension
-   appears to have come from.  */
+/* This is the table of directive handlers.  All extensions other than
+   #warning, #include_next, and #import are deprecated.  The name is
+   where the extension appears to have come from.  */
 
 #define DIRECTIVE_TABLE                                                        \
-D(define,      T_DEFINE = 0,   KANDR,     IN_I)           /* 270554 */ \
-D(include,     T_INCLUDE,      KANDR,     INCL | EXPAND)  /*  52262 */ \
-D(endif,       T_ENDIF,        KANDR,     COND)           /*  45855 */ \
-D(ifdef,       T_IFDEF,        KANDR,     COND | IF_COND) /*  22000 */ \
-D(if,          T_IF,           KANDR, COND | IF_COND | EXPAND) /*  18162 */ \
-D(else,                T_ELSE,         KANDR,     COND)           /*   9863 */ \
-D(ifndef,      T_IFNDEF,       KANDR,     COND | IF_COND) /*   9675 */ \
-D(undef,       T_UNDEF,        KANDR,     IN_I)           /*   4837 */ \
-D(line,                T_LINE,         KANDR,     EXPAND)         /*   2465 */ \
-D(elif,                T_ELIF,         STDC89,    COND | EXPAND)  /*    610 */ \
-D(error,       T_ERROR,        STDC89,    0)              /*    475 */ \
-D(pragma,      T_PRAGMA,       STDC89,    IN_I)           /*    195 */ \
-D(warning,     T_WARNING,      EXTENSION, 0)              /*     22 */ \
-D(include_next,        T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND)  /*     19 */ \
-D(ident,       T_IDENT,        EXTENSION, IN_I)           /*     11 */ \
-D(import,      T_IMPORT,       EXTENSION, INCL | EXPAND)  /* 0 ObjC */ \
-D(assert,      T_ASSERT,       EXTENSION, DEPRECATED)     /* 0 SVR4 */ \
-D(unassert,    T_UNASSERT,     EXTENSION, DEPRECATED)     /* 0 SVR4 */ \
-D(sccs,                T_SCCS,         EXTENSION, IN_I)           /* 0 SVR4? */
+  D(define,    T_DEFINE = 0,   KANDR,     IN_I)                        \
+  D(include,   T_INCLUDE,      KANDR,     INCL | EXPAND)               \
+  D(endif,     T_ENDIF,        KANDR,     COND)                        \
+  D(ifdef,     T_IFDEF,        KANDR,     COND | IF_COND)              \
+  D(if,                T_IF,           KANDR,     COND | IF_COND | EXPAND)     \
+  D(else,      T_ELSE,         KANDR,     COND)                        \
+  D(ifndef,    T_IFNDEF,       KANDR,     COND | IF_COND)              \
+  D(undef,     T_UNDEF,        KANDR,     IN_I)                        \
+  D(line,      T_LINE,         KANDR,     EXPAND)                      \
+  D(elif,      T_ELIF,         STDC89,    COND | EXPAND)               \
+  D(error,     T_ERROR,        STDC89,    0)                           \
+  D(pragma,    T_PRAGMA,       STDC89,    IN_I)                        \
+  D(warning,   T_WARNING,      EXTENSION, 0)                           \
+  D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND)            \
+  D(ident,     T_IDENT,        EXTENSION, IN_I)                        \
+  D(import,    T_IMPORT,       EXTENSION, INCL | EXPAND)  /* ObjC */   \
+  D(assert,    T_ASSERT,       EXTENSION, DEPRECATED)     /* SVR4 */   \
+  D(unassert,  T_UNASSERT,     EXTENSION, DEPRECATED)     /* SVR4 */   \
+  D(sccs,      T_SCCS,         EXTENSION, IN_I)           /*  SVR4? */
 
 /* #sccs is synonymous with #ident.  */
 #define do_sccs do_ident
index 08b7c647c91406bfac0bf3d8ba55e8ada65be6f7..0f0cc7be1b60d78d48100960c92568f64806b4cb 100644 (file)
@@ -898,7 +898,7 @@ _cpp_stack_file (cpp_reader *pfile, _cpp_file *file, bool import,
   int sysp;
 
   if (!should_stack_file (pfile, file, import, loc))
-      return false;
+    return false;
 
   if (pfile->buffer == NULL || file->dir == NULL)
     sysp = 0;