|
97 | 97 | #if defined (__clang__) |
98 | 98 | # define lest_SUPPRESS_WMISBRACES _Pragma( "clang diagnostic push" ) \ |
99 | 99 | _Pragma( "clang diagnostic ignored \"-Wmissing-braces\"" ) |
| 100 | +# define lest_RESTORE_WMISBRACES _Pragma( "clang diagnostic pop" ) |
| 101 | + |
100 | 102 | # define lest_SUPPRESS_WSHADOW _Pragma( "clang diagnostic push" ) \ |
101 | 103 | _Pragma( "clang diagnostic ignored \"-Wshadow\"" ) |
102 | 104 | # define lest_SUPPRESS_WUNUSED _Pragma( "clang diagnostic push" ) \ |
|
105 | 107 |
|
106 | 108 | #elif defined (__GNUC__) |
107 | 109 | # define lest_SUPPRESS_WMISBRACES /*empty*/ |
| 110 | +# define lest_RESTORE_WMISBRACES /*empty*/ |
| 111 | + |
108 | 112 | # define lest_SUPPRESS_WSHADOW _Pragma( "GCC diagnostic push" ) \ |
109 | 113 | _Pragma( "GCC diagnostic ignored \"-Wshadow\"" ) |
110 | 114 | # define lest_SUPPRESS_WUNUSED _Pragma( "GCC diagnostic push" ) \ |
111 | 115 | _Pragma( "GCC diagnostic ignored \"-Wunused-value\"" ) |
112 | 116 | # define lest_RESTORE_WARNINGS _Pragma( "GCC diagnostic pop" ) |
113 | 117 | #else |
114 | 118 | # define lest_SUPPRESS_WMISBRACES /*empty*/ |
| 119 | +# define lest_RESTORE_WMISBRACES /*empty*/ |
115 | 120 | # define lest_SUPPRESS_WSHADOW /*empty*/ |
116 | 121 | # define lest_SUPPRESS_WUNUSED /*empty*/ |
117 | 122 | # define lest_RESTORE_WARNINGS /*empty*/ |
|
198 | 203 | # define lest_CASE( proposition ) \ |
199 | 204 | lest_SUPPRESS_WMISBRACES \ |
200 | 205 | proposition, []( lest::env & lest_env ) \ |
201 | | - lest_RESTORE_WARNINGS |
| 206 | + lest_RESTORE_WMISBRACES |
202 | 207 |
|
203 | 208 | # define lest_CASE_ON( proposition, ... ) \ |
204 | 209 | lest_SUPPRESS_WMISBRACES \ |
205 | 210 | proposition, [__VA_ARGS__]( lest::env & lest_env ) \ |
206 | | - lest_RESTORE_WARNINGS |
| 211 | + lest_RESTORE_WMISBRACES |
207 | 212 |
|
208 | 213 | # define lest_MODULE( specification, module ) \ |
209 | 214 | namespace { lest::add_module _( specification, module ); } |
|
0 commit comments