File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33#include < system_error>
44
5+ // Because g++ wants to be a pedantic little brat about fallthroughs
6+ #ifdef CXX_CSV_HAS_17
7+ #define FALLTHROUGH_TO_NEXT_CASE [[fallthrough]];
8+ #else
9+ #define FALLTHROUGH_TO_NEXT_CASE goto next_newline_case;
10+ #endif
11+
512namespace csv {
613 namespace internals {
714 CSV_INLINE size_t get_file_size (csv::string_view filename) {
@@ -182,15 +189,10 @@ namespace csv {
182189 this ->data_pos_ ++;
183190 }
184191
185- #if defined(__GNUC__) || defined(__clang__)
186- #pragma GCC diagnostic push
187- #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
188- #endif
192+ FALLTHROUGH_TO_NEXT_CASE
189193
194+ next_newline_case:
190195 case ParseFlags::NEWLINE:
191- #if defined(__GNUC__) || defined(__clang__)
192- #pragma GCC diagnostic pop
193- #endif
194196 this ->data_pos_ ++;
195197
196198 // End of record. Preserve intentional empty fields such as
You can’t perform that action at this time.
0 commit comments