digitalmars.D.bugs - delete and CommaExp.
- Dave (6/6) Feb 10 2006 Is this now illegal? As of v0.146 the compiler no longer allows it.
- Derek Parnell (8/14) Feb 10 2006 What made you think that the syntax for 'delete' was
- Dave (2/15) Feb 10 2006
- Jarrett Billingsley (8/14) Feb 10 2006 Delete accepts only one parameter. What's happening here is that delete...
- Dave (4/20) Feb 10 2006 That would explain it.
Is this now illegal? As of v0.146 the compiler no longer allows it. void main() { int[] a = new int[10], b = new int[10]; delete a, b; // 'var has no effect in expression (b) }
Feb 10 2006
On Sat, 11 Feb 2006 16:20:53 +1100, Dave <Dave_member pathlink.com> wrote:Is this now illegal? As of v0.146 the compiler no longer allows it. void main() { int[] a = new int[10], b = new int[10]; delete a, b; // 'var has no effect in expression (b) }What made you think that the syntax for 'delete' was DeleteExpression :: 'delete' <identifier> (',' <identifier>)... On the other hand, I can't find the formal definition of it anywhere in the D documentation. -- Derek Parnell Melbourne, Australia
Feb 10 2006
In article <op.s4snk3k56b8z09 ginger.vic.bigpond.net.au>, Derek Parnell says...On Sat, 11 Feb 2006 16:20:53 +1100, Dave <Dave_member pathlink.com> wrote:C++, and because it worked up until v0.146.Is this now illegal? As of v0.146 the compiler no longer allows it. void main() { int[] a = new int[10], b = new int[10]; delete a, b; // 'var has no effect in expression (b) }What made you think that the syntax for 'delete' was DeleteExpression :: 'delete' <identifier> (',' <identifier>)...On the other hand, I can't find the formal definition of it anywhere in the D documentation.
Feb 10 2006
In article <dsjvfq$ecp$1 digitaldaemon.com>, Dave says...Well, it never actuall worked in D, so it's a good thing dmd now complains about it. And are you sure it actually works in C++, or does it do the same thing? (I sincerely don't know.) NickWhat made you think that the syntax for 'delete' was DeleteExpression :: 'delete' <identifier> (',' <identifier>)...C++, and because it worked up until v0.146.
Feb 11 2006
In article <dskgmo$1fdq$1 digitaldaemon.com>, Nick says...In article <dsjvfq$ecp$1 digitaldaemon.com>, Dave says...No it doesn't work in C++ either.. Sorry, I've been stuck on stupid all week it seems. I'd like to think it's not permanent but others may disagree <g> - DaveWell, it never actuall worked in D, so it's a good thing dmd now complains about it. And are you sure it actually works in C++, or does it do the same thing? (I sincerely don't know.) NickWhat made you think that the syntax for 'delete' was DeleteExpression :: 'delete' <identifier> (',' <identifier>)...C++, and because it worked up until v0.146.
Feb 11 2006
"Dave" <Dave_member pathlink.com> wrote in message news:dsjs7l$ai9$1 digitaldaemon.com...Is this now illegal? As of v0.146 the compiler no longer allows it. void main() { int[] a = new int[10], b = new int[10]; delete a, b; // 'var has no effect in expression (b) }Delete accepts only one parameter. What's happening here is that delete binds more tightly than comma, so it's something like writing delete a; b; And no-ops, such as "b;" have been made illegal (as they always have been in the spec but were never implemented).
Feb 10 2006
In article <dsjudn$d09$1 digitaldaemon.com>, Jarrett Billingsley says..."Dave" <Dave_member pathlink.com> wrote in message news:dsjs7l$ai9$1 digitaldaemon.com...That would explain it. Thanks, - DaveIs this now illegal? As of v0.146 the compiler no longer allows it. void main() { int[] a = new int[10], b = new int[10]; delete a, b; // 'var has no effect in expression (b) }Delete accepts only one parameter. What's happening here is that delete binds more tightly than comma, so it's something like writing delete a; b; And no-ops, such as "b;" have been made illegal (as they always have been in the spec but were never implemented).
Feb 10 2006