This is a wrong program: void main() { main(; } But DMD 2.049 shows too many errors: test.d(2): expression expected, not ';' test.d(3): found '}' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF' test.d(3): found 'EOF' when expecting ',' test.d(3): expression expected, not 'EOF'
https://github.com/D-Programming-Language/dmd/commit/9466d6c8668ca8005ebf1d991647ee6451113fae https://github.com/D-Programming-Language/dmd/commit/9302e96e7cf164420d5e44ae3ae2020050cf724d
After the latest DMD updates (minutes ago), the program now gives me: test.d(2): expression expected, not ';' test.d(3): found '}' when expecting ',' test.d(3): found 'EOF' when expecting ')' test.d(3): found 'EOF' when expecting ';' following statement test.d(3): found 'EOF' when expecting '}' following compound statement This is an improvement. Note: among the errors I don't see the "premature end of file" error message that's inside Walter change: + + if (token.value == TOKeof) + { error("premature end of file"); + break; + }
(In reply to comment #2) > Note: among the errors I don't see the "premature end of file" error message > that's inside Walter change: > > + > + if (token.value == TOKeof) > + { error("premature end of file"); > + break; > + } This is inside Parser::parseEnum - when eof is encountered inside and enum declaration's body.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル