changeset 24444:53ca76c5cc8d

maint: Indent pragmas as other preprocessor directives.
author John W. Eaton <jwe@octave.org>
date Thu, 21 Dec 2017 12:34:51 -0500
parents 92f0d6013ddd
children fe54e9633815
files libinterp/corefcn/ft-text-renderer.cc libinterp/corefcn/oct-tex-lexer.in.ll libinterp/corefcn/oct-tex-parser.in.yy libinterp/dldfcn/__ode15__.cc libinterp/options-usage.h libinterp/parse-tree/lex.ll libinterp/parse-tree/oct-parse.in.yy liboctave/util/quit.cc
diffstat 8 files changed, 69 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/ft-text-renderer.cc	Thu Dec 21 12:14:10 2017 -0500
+++ b/libinterp/corefcn/ft-text-renderer.cc	Thu Dec 21 12:34:51 2017 -0500
@@ -31,8 +31,8 @@
 #if defined (HAVE_FREETYPE)
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wold-style-cast"
 #endif
 
 #include <ft2build.h>
@@ -43,7 +43,7 @@
 #endif
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-#pragma GCC diagnostic pop
+#  pragma GCC diagnostic pop
 #endif
 
 #include <clocale>
--- a/libinterp/corefcn/oct-tex-lexer.in.ll	Thu Dec 21 12:14:10 2017 -0500
+++ b/libinterp/corefcn/oct-tex-lexer.in.ll	Thu Dec 21 12:34:51 2017 -0500
@@ -26,16 +26,16 @@
 #endif
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// This one needs to be global.
-#pragma GCC diagnostic ignored "-Wunused-function"
+   // This one needs to be global.
+#  pragma GCC diagnostic ignored "-Wunused-function"
 
-// Disable these warnings for code that is generated by flex, including
-// pattern rules.  Push the current state so we can restore the warning
-// state prior to functions we define at the bottom of the file.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+   // Disable these warnings for code that is generated by flex, including
+   // pattern rules.  Push the current state so we can restore the warning
+   // state prior to functions we define at the bottom of the file.
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wold-style-cast"
+#  pragma GCC diagnostic ignored "-Wsign-compare"
+#  pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
 #endif
 
 // Define away the deprecated register storage class specifier to avoid
@@ -178,17 +178,17 @@
 
 %{
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Also disable this warning for functions that is generated by flex
-// after the pattern rules.
-#pragma GCC diagnostic ignored "-Wunused-parameter"
+   // Also disable this warning for functions that are generated by flex
+   // after the pattern rules.
+#  pragma GCC diagnostic ignored "-Wunused-parameter"
 #endif
 %}
 
 %%
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Restore prevailing warning state for remainder of the file.
-#pragma GCC diagnostic pop
+   // Restore prevailing warning state for remainder of the file.
+#  pragma GCC diagnostic pop
 #endif
 
 void *
--- a/libinterp/corefcn/oct-tex-parser.in.yy	Thu Dec 21 12:14:10 2017 -0500
+++ b/libinterp/corefcn/oct-tex-parser.in.yy	Thu Dec 21 12:34:51 2017 -0500
@@ -38,11 +38,12 @@
 #define yyalloc octave_tex_yyalloc
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Disable this warning for code that is generated by Bison, including
-// grammar rules.  Push the current state so we can restore the warning
-// state prior to functions we define at the bottom of the file.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
+   // Disable this warning for code that is generated by Bison,
+   // including grammar rules.  Push the current state so we can
+   // restore the warning state prior to functions we define at
+   // the bottom of the file.
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wold-style-cast"
 #endif
 
 %}
@@ -201,8 +202,8 @@
 %%
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Restore prevailing warning state for remainder of the file.
-#pragma GCC diagnostic pop
+   // Restore prevailing warning state for remainder of the file.
+#  pragma GCC diagnostic pop
 #endif
 
 text_element*
--- a/libinterp/dldfcn/__ode15__.cc	Thu Dec 21 12:14:10 2017 -0500
+++ b/libinterp/dldfcn/__ode15__.cc	Thu Dec 21 12:34:51 2017 -0500
@@ -57,18 +57,18 @@
 nv_data_s (N_Vector& v)
 {
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Disable warning from GCC about old-style casts in Sundials macro
-// expansions.  Do this in a function so that this diagnostic may still
-// be enabled for the rest of the file.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
+   // Disable warning from GCC about old-style casts in Sundials
+   // macro expansions.  Do this in a function so that this
+   // diagnostic may still be enabled for the rest of the file.
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wold-style-cast"
 #endif
 
   return NV_DATA_S (v);
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Restore prevailing warning state for remainder of the file.
-#pragma GCC diagnostic pop
+   // Restore prevailing warning state for remainder of the file.
+#  pragma GCC diagnostic pop
 #endif
 }
 
--- a/libinterp/options-usage.h	Thu Dec 21 12:14:10 2017 -0500
+++ b/libinterp/options-usage.h	Thu Dec 21 12:34:51 2017 -0500
@@ -48,9 +48,9 @@
 
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Disable warning temporarily
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+   // Disable warning temporarily.
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
 #endif
 
 // Long options.  See the comments in getopt.h for the meanings of the
@@ -112,8 +112,8 @@
 };
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Restore prevailing warning state for remainder of the file.
-#pragma GCC diagnostic pop
+   // Restore prevailing warning state for remainder of the file.
+#  pragma GCC diagnostic pop
 #endif
 
 // Usage message with extra help.
--- a/libinterp/parse-tree/lex.ll	Thu Dec 21 12:14:10 2017 -0500
+++ b/libinterp/parse-tree/lex.ll	Thu Dec 21 12:34:51 2017 -0500
@@ -37,20 +37,19 @@
 #endif
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// This one needs to be global.
-#pragma GCC diagnostic ignored "-Wunused-function"
-
-// Disable these warnings for code that is generated by flex, including
-// pattern rules.  Push the current state so we can restore the warning
-// state prior to functions we define at the bottom of the file.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
-#if defined (HAVE_WARNING_IMPLICIT_FALLTHROUGH)
-#  pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
-#endif
-
+   // This one needs to be global.
+#  pragma GCC diagnostic ignored "-Wunused-function"
+   // Disable these warnings for code that is generated by flex,
+   // including pattern rules.  Push the current state so we can
+   // restore the warning state prior to functions we define at
+   // the bottom of the file.
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wold-style-cast"
+#  pragma GCC diagnostic ignored "-Wsign-compare"
+#  pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+#  if defined (HAVE_WARNING_IMPLICIT_FALLTHROUGH)
+#    pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#  endif
 #endif
 
 // Define away the deprecated register storage class specifier to avoid
@@ -1780,17 +1779,17 @@
 
 %{
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Disable these warnings for flex code.
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
+   // Disable these warnings for flex code.
+#  pragma GCC diagnostic ignored "-Wold-style-cast"
+#  pragma GCC diagnostic ignored "-Wunused-parameter"
 #endif
 %}
 
 %%
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Restore prevailing warning state for remainder of the file.
-#pragma GCC diagnostic pop
+   // Restore prevailing warning state for remainder of the file.
+#  pragma GCC diagnostic pop
 #endif
 
 void *
--- a/libinterp/parse-tree/oct-parse.in.yy	Thu Dec 21 12:14:10 2017 -0500
+++ b/libinterp/parse-tree/oct-parse.in.yy	Thu Dec 21 12:34:51 2017 -0500
@@ -99,11 +99,12 @@
 #define scanner lexer.scanner
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Disable this warning for code that is generated by Bison, including
-// grammar rules.  Push the current state so we can restore the warning
-// state prior to functions we define at the bottom of the file.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wold-style-cast"
+   // Disable this warning for code that is generated by Bison,
+   // including grammar rules.  Push the current state so we can
+   // restore the warning state prior to functions we define at
+   // the bottom of the file.
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wold-style-cast"
 #endif
 
 %}
@@ -2071,8 +2072,8 @@
 %%
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-// Restore prevailing warning state for remainder of the file.
-#pragma GCC diagnostic pop
+   // Restore prevailing warning state for remainder of the file.
+#  pragma GCC diagnostic pop
 #endif
 
 // Generic error messages.
--- a/liboctave/util/quit.cc	Thu Dec 21 12:14:10 2017 -0500
+++ b/liboctave/util/quit.cc	Thu Dec 21 12:34:51 2017 -0500
@@ -90,14 +90,14 @@
   octave_exception_state = octave_quit_exception;
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #endif
 
   throw octave_exit_exception (exit_status, safe_to_return);
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-#pragma GCC diagnostic pop
+#  pragma GCC diagnostic pop
 #endif
 }
 
@@ -122,8 +122,8 @@
           break;
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #endif
 
         case octave_quit_exception:
@@ -132,7 +132,7 @@
           break;
 
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
-#pragma GCC diagnostic pop
+#  pragma GCC diagnostic pop
 #endif
 
         default: