[Issue 23989] Regression in rdmd when running an empty eval

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 13 13:15:02 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23989

Richard Cattermole <alphaglosined at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alphaglosined at gmail.com

--- Comment #1 from Richard Cattermole <alphaglosined at gmail.com> ---
Not a regression in rdmd.

In dmd 2.104.0 empty statements with semicolons now error.

https://dlang.org/changelog/2.104.0.html#dmd.empty-statement-error

You do not need anything passed to the eval flag and it would not emit the
semicolon.

However in saying that, rdmd in innerEvalCode should be made smarter so that it
checks if last character is either a semicolon or a close brace, rather than
just a semicolon. That way loops can work.

https://github.com/dlang/tools/blob/master/rdmd.d#L875

I suppose making it even smarter with comment detection ext. would be good too.

--


More information about the Digitalmars-d-bugs mailing list