mrustc icon indicating copy to clipboard operation
mrustc copied to clipboard

Compatibility with macOS 10.7

Open catap opened this issue 3 years ago • 0 comments

Let assume that ::std::istream marks itself as reached EOF after reading the last character from file which is ':' in case of minicargo's build.cpp.

This leads to missing ':' because the next call of get_token_int() returns "" because ifp.eof() is true, instead of returning ":" as it should.

This missed ':' leads to assert that dependency file aren't well formatted on some wired system.

The same happened with Lexer::getc_byte when m_istream.get() returns not EOF but marks stream as reached EOF that means the next read returns EOF.

Thus, this fixes: https://github.com/thepowersgang/mrustc/issues/284

catap avatar Aug 08 '22 17:08 catap