# HG changeset patch # User John W. Eaton # Date 1513877691 18000 # Node ID 53ca76c5cc8d6f2ae39bfbead9ecd100c4cabe39 # Parent 92f0d6013ddd772813b0d3ed816ccdaec85e58c9 maint: Indent pragmas as other preprocessor directives. diff -r 92f0d6013ddd -r 53ca76c5cc8d libinterp/corefcn/ft-text-renderer.cc --- 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 @@ -43,7 +43,7 @@ #endif #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) -#pragma GCC diagnostic pop +# pragma GCC diagnostic pop #endif #include diff -r 92f0d6013ddd -r 53ca76c5cc8d libinterp/corefcn/oct-tex-lexer.in.ll --- 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 * diff -r 92f0d6013ddd -r 53ca76c5cc8d libinterp/corefcn/oct-tex-parser.in.yy --- 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* diff -r 92f0d6013ddd -r 53ca76c5cc8d libinterp/dldfcn/__ode15__.cc --- 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 } diff -r 92f0d6013ddd -r 53ca76c5cc8d libinterp/options-usage.h --- 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. diff -r 92f0d6013ddd -r 53ca76c5cc8d libinterp/parse-tree/lex.ll --- 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 * diff -r 92f0d6013ddd -r 53ca76c5cc8d libinterp/parse-tree/oct-parse.in.yy --- 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. diff -r 92f0d6013ddd -r 53ca76c5cc8d liboctave/util/quit.cc --- 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: