File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -706,11 +706,17 @@ bool fs_validate_filename(const std::string & filename) {
706
706
// disable C++17 deprecation warning for std::codecvt_utf8
707
707
# pragma clang diagnostic push
708
708
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
709
+ #elif defined(__GNUC__)
710
+ # pragma GCC diagnostic push
711
+ # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
709
712
#endif
713
+
710
714
std::wstring_convert<std::codecvt_utf8<char32_t >, char32_t > converter;
711
715
712
716
#if defined(__clang__)
713
717
# pragma clang diagnostic pop
718
+ #elif defined(__GNUC__)
719
+ # pragma GCC diagnostic pop
714
720
#endif
715
721
716
722
filename_utf32 = converter.from_bytes (filename);
Original file line number Diff line number Diff line change 69
69
#if defined(__clang__)
70
70
# pragma clang diagnostic push
71
71
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
72
+ #elif defined(__GNUC__)
73
+ # pragma GCC diagnostic push
74
+ # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
72
75
#endif
73
76
74
77
namespace fs = std::filesystem;
@@ -91,6 +94,8 @@ static std::string path_str(const fs::path & path) {
91
94
92
95
#if defined(__clang__)
93
96
# pragma clang diagnostic pop
97
+ #elif defined(__GNUC__)
98
+ # pragma GCC diagnostic pop
94
99
#endif
95
100
96
101
#ifdef _WIN32
Original file line number Diff line number Diff line change @@ -204,12 +204,17 @@ static inline std::wstring unicode_wstring_from_utf8(const std::string & s) {
204
204
// disable C++17 deprecation warning for std::codecvt_utf8
205
205
# pragma clang diagnostic push
206
206
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
207
+ #elif defined(__GNUC__)
208
+ # pragma GCC diagnostic push
209
+ # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
207
210
#endif
208
211
209
212
std::wstring_convert<std::codecvt_utf8<wchar_t >> conv;
210
213
211
214
#if defined(__clang__)
212
215
# pragma clang diagnostic pop
216
+ #elif defined(__GNUC__)
217
+ # pragma GCC diagnostic pop
213
218
#endif
214
219
215
220
return conv.from_bytes (s);
You can’t perform that action at this time.
0 commit comments