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 {
351351 }
352352} unique;
353353
354- struct {
354+ [[maybe_unused]] struct {
355355 template <typename T>
356356 [[nodiscard]] auto cpp2_new (auto && ...args) const -> std::shared_ptr<T> {
357357 return std::make_shared<T>(std::forward<decltype (args)>(args)...);
@@ -1123,7 +1123,19 @@ class c_raii {
11231123};
11241124
11251125inline 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+
11261133 auto x = std::fopen (filename, mode);
1134+
1135+ #ifdef _MSC_VER
1136+ #pragma warning( pop )
1137+ #endif
1138+
11271139 if (!x) {
11281140 throw std::make_error_condition (std::errc::no_such_file_or_directory);
11291141 }
Original file line number Diff line number Diff line change @@ -3287,9 +3287,9 @@ class parser
32873287
32883288 if (body->statements .empty () || body->statements .back ()->statement .index () != statement_node::return_)
32893289 {
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);
32933293
32943294 auto ret = std::make_unique<return_statement_node>();
32953295 ret->identifier = &generated_tokens_->back ();
You can’t perform that action at this time.
0 commit comments