File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ struct {
351
351
}
352
352
} unique;
353
353
354
- struct {
354
+ [[maybe_unused]] struct {
355
355
template <typename T>
356
356
[[nodiscard]] auto cpp2_new (auto && ...args) const -> std::shared_ptr<T> {
357
357
return std::make_shared<T>(std::forward<decltype (args)>(args)...);
@@ -1123,7 +1123,19 @@ class c_raii {
1123
1123
};
1124
1124
1125
1125
inline auto fopen ( const char * filename, const char * mode ) {
1126
+
1127
+ // Suppress annoying deprecation warning about fopen
1128
+ #ifdef _MSC_VER
1129
+ #pragma warning( push )
1130
+ #pragma warning( disable : 4996 )
1131
+ #endif
1132
+
1126
1133
auto x = std::fopen (filename, mode);
1134
+
1135
+ #ifdef _MSC_VER
1136
+ #pragma warning( pop )
1137
+ #endif
1138
+
1127
1139
if (!x) {
1128
1140
throw std::make_error_condition (std::errc::no_such_file_or_directory);
1129
1141
}
Original file line number Diff line number Diff line change @@ -3287,9 +3287,9 @@ class parser
3287
3287
3288
3288
if (body->statements .empty () || body->statements .back ()->statement .index () != statement_node::return_)
3289
3289
{
3290
- auto pos = body->statements .back ()->position ();
3291
- ++pos .lineno ;
3292
- generated_tokens_->emplace_back ( " return" , pos , lexeme::Keyword);
3290
+ auto last_pos = body->statements .back ()->position ();
3291
+ ++last_pos .lineno ;
3292
+ generated_tokens_->emplace_back ( " return" , last_pos , lexeme::Keyword);
3293
3293
3294
3294
auto ret = std::make_unique<return_statement_node>();
3295
3295
ret->identifier = &generated_tokens_->back ();
You can’t perform that action at this time.
0 commit comments