comparison libinterp/parse-tree/lex.ll @ 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 268d31e7aa4f
children fe54e9633815
comparison
equal deleted inserted replaced
24443:92f0d6013ddd 24444:53ca76c5cc8d
35 #if defined (HAVE_CONFIG_H) 35 #if defined (HAVE_CONFIG_H)
36 # include "config.h" 36 # include "config.h"
37 #endif 37 #endif
38 38
39 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) 39 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
40 // This one needs to be global. 40 // This one needs to be global.
41 #pragma GCC diagnostic ignored "-Wunused-function" 41 # pragma GCC diagnostic ignored "-Wunused-function"
42 42 // Disable these warnings for code that is generated by flex,
43 // Disable these warnings for code that is generated by flex, including 43 // including pattern rules. Push the current state so we can
44 // pattern rules. Push the current state so we can restore the warning 44 // restore the warning state prior to functions we define at
45 // state prior to functions we define at the bottom of the file. 45 // the bottom of the file.
46 #pragma GCC diagnostic push 46 # pragma GCC diagnostic push
47 #pragma GCC diagnostic ignored "-Wold-style-cast" 47 # pragma GCC diagnostic ignored "-Wold-style-cast"
48 #pragma GCC diagnostic ignored "-Wsign-compare" 48 # pragma GCC diagnostic ignored "-Wsign-compare"
49 #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" 49 # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
50 #if defined (HAVE_WARNING_IMPLICIT_FALLTHROUGH) 50 # if defined (HAVE_WARNING_IMPLICIT_FALLTHROUGH)
51 # pragma GCC diagnostic ignored "-Wimplicit-fallthrough" 51 # pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
52 #endif 52 # endif
53
54 #endif 53 #endif
55 54
56 // Define away the deprecated register storage class specifier to avoid 55 // Define away the deprecated register storage class specifier to avoid
57 // potential warnings about it. 56 // potential warnings about it.
58 #if ! defined (register) 57 #if ! defined (register)
1778 } 1777 }
1779 } 1778 }
1780 1779
1781 %{ 1780 %{
1782 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) 1781 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1783 // Disable these warnings for flex code. 1782 // Disable these warnings for flex code.
1784 #pragma GCC diagnostic ignored "-Wold-style-cast" 1783 # pragma GCC diagnostic ignored "-Wold-style-cast"
1785 #pragma GCC diagnostic ignored "-Wunused-parameter" 1784 # pragma GCC diagnostic ignored "-Wunused-parameter"
1786 #endif 1785 #endif
1787 %} 1786 %}
1788 1787
1789 %% 1788 %%
1790 1789
1791 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) 1790 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1792 // Restore prevailing warning state for remainder of the file. 1791 // Restore prevailing warning state for remainder of the file.
1793 #pragma GCC diagnostic pop 1792 # pragma GCC diagnostic pop
1794 #endif 1793 #endif
1795 1794
1796 void * 1795 void *
1797 octave_alloc (yy_size_t size, yyscan_t) 1796 octave_alloc (yy_size_t size, yyscan_t)
1798 { 1797 {