[Issue 4559] Disallowing single semicolons

2018-05-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

Dmitry Olshansky  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||dmitry.o...@gmail.com
 Resolution|--- |WORKSFORME

--- Comment #9 from Dmitry Olshansky  ---
Today this prints:

saa.d(2): Deprecation: use { } for an empty statement, not ;

Which is perfectly fine IMHO.

--


[Issue 4559] Disallowing single semicolons

2017-06-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

--- Comment #8 from Nemanja Boric <4bur...@gmail.com> ---
Poor dlang bot got confused by my initial typo in the commit message (wrong
issue referenced), but the commits are pushed to master:
https://github.com/dlang/dmd/pull/6886

--


[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

Nemanja Boric <4bur...@gmail.com> changed:

   What|Removed |Added

 CC||4bur...@gmail.com

--- Comment #7 from Nemanja Boric <4bur...@gmail.com> ---
Not if you compile with `-w`:

```
C:\Users\Burgos>type test.d
void main()
{
int x;;
}

C:\Users\Burgos>dmd -w test.d
test.d(3): Warning: use '{ }' for an empty statement, not a ';'

```

--


[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

Stefan Koch  changed:

   What|Removed |Added

 CC||uplink.co...@gmail.com

--- Comment #6 from Stefan Koch  ---
(In reply to Andrei Alexandrescu from comment #5)

> The warning has been in there for years. The basic idea is to convert
> warnings to errors.

I just tried :

int i;;

It compiles just fine without a warning.

--


[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

--- Comment #5 from Andrei Alexandrescu  ---
(In reply to uplink.coder from comment #4)
> (In reply to Andrei Alexandrescu from comment #3)
> > No need for a DIP, we should just convert this to an error.
> 
> If we do this, then we have to special case for(;;).

We're in good shape, the semicolons in for are part of the grammar.

> Also it might break an unknown amount of code.
> At the very least we should have a cost/benefit analysis.

The warning has been in there for years. The basic idea is to convert warnings
to errors.

--


[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

uplink.co...@googlemail.com changed:

   What|Removed |Added

 CC||uplink.co...@googlemail.com

--- Comment #4 from uplink.co...@googlemail.com ---
(In reply to Andrei Alexandrescu from comment #3)
> No need for a DIP, we should just convert this to an error.

If we do this, then we have to special case for(;;).
Also it might break an unknown amount of code.
At the very least we should have a cost/benefit analysis.

--


[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

--- Comment #3 from Andrei Alexandrescu  ---
No need for a DIP, we should just convert this to an error.

--


[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

dl...@ryanjframe.com changed:

   What|Removed |Added

 CC||dl...@ryanjframe.com

--- Comment #2 from dl...@ryanjframe.com ---
I had thought this was an error, but it's just a warning.

--


[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559

Infiltrator  changed:

   What|Removed |Added

 CC||and...@erdani.com,
   ||lt.infiltra...@gmail.com

--- Comment #1 from Infiltrator  ---
Does this need a DIP?

--