digitalmars.D.bugs - [Issue 1030] New: ICE one-liner; struct in delegate
- d-bugmail puremagic.com (17/17) Mar 07 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (6/6) Mar 08 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (9/9) Mar 19 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (10/10) Nov 07 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (5/7) Nov 08 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (6/6) Nov 08 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (21/21) Apr 18 2009 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (39/40) Apr 19 2009 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (14/14) Sep 15 2009 http://d.puremagic.com/issues/show_bug.cgi?id=1030
- d-bugmail puremagic.com (12/12) Jan 18 2010 http://d.puremagic.com/issues/show_bug.cgi?id=1030
http://d.puremagic.com/issues/show_bug.cgi?id=1030
Summary: ICE one-liner; struct in delegate
Product: D
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: default_357-line yahoo.de
The following one-liner causes an ICE in line 0. Verified on GDC .21, .23 and
DMD 1.007:
void main() { void delegate() test={ struct test2 {;} }; }
Greetings, downs
--
Mar 07 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1030 Added to DStress as http://dstress.kuehne.cn/nocompile/s/struct_29_A.d http://dstress.kuehne.cn/run/s/struct_29_B.d --
Mar 08 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1030
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed DMD 1.009
--
Mar 19 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1030
davidl 126.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |regression
Status|RESOLVED |REOPENED
Resolution|FIXED |
Seems 1.022 doesn't compile this, and 1.009 compiles this?
--
Nov 07 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1030Seems 1.022 doesn't compile this, and 1.009 compiles this?Strange. Builds fine on my gdc .24/1.022 under linux/32-bit. --
Nov 08 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1030 it's http://dstress.kuehne.cn/run/s/struct_29_B.d which can't pass the parse stage. seems dmd need a semicolon in the struct in the delegate. --
Nov 08 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1030
clugdbug yahoo.com.au changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |
Summary|ICE one-liner; struct in |struct in delegate requires
|delegate |semicolon
This is really a totally different bug to the original one, and much less
severe. No longer an ICE -- it's a pretty tiny issue.
void main() {
void delegate() test = {
struct test2{}
}
}
---
fog.d(4): expression expected, not 'struct'
fog.d(4): comma expected separating field initializers
fog.d(5): semicolon expected, not '}'
----
--
Apr 18 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1030
smjg iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|struct in delegate requires |Delegate literal as
|semicolon |initializer is confused with
| |struct initializer
Version|unspecified |1.041
fog.d(5): semicolon expected, not '}'
This last message is the one that's correct. A declaration of a variable
(which is what test is) always requires a closing semicolon.
What's actually happening is that it's trying to parse
{ struct test2{} }
as a struct initializer. Nothing to do with the struct that's actually
declared inside. See for yourself:
----------
C:\Users\Stewart\Documents\Programming\D\Tests\bugs>type bz1030a.d
void main() {
void delegate() test = {
struct test2{}
};
}
C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd bz1030a.d
bz1030a.d(4): expression expected, not 'struct'
bz1030a.d(4): comma expected separating field initializers
C:\Users\Stewart\Documents\Programming\D\Tests\bugs>type bz1030b.d
void main() {
void delegate() test;
test = {
struct test2{}
};
}
C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd bz1030b.d
C:\Users\Stewart\Documents\Programming\D\Tests\bugs>
----------
Since AIUI there's no overlap between what's parseable as a struct init and
what's parseable as a delegate literal, there should be little or no problem
getting it to work.
--
Apr 19 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1030
Don <clugdbug yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug yahoo.com.au
Severity|regression |normal
This remaining bug is not a regression. It behaved exactly the same way in
DMD0.175.
Another of these annoying cases where we have two unrelated bugs in the same
report. It should not have been reopened.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 15 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1030
Don <clugdbug yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
The original bug was fixed in 1.009. The bug reported in the comments is the
same as bug 1371; I'm therefore closing this one.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 18 2010









d-bugmail puremagic.com 