Thread overview | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
November 23, 2008 [Issue 2469] New: arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2469 Summary: arbitrary struct accepted as struct initializer Product: D Version: 1.035 Platform: PC OS/Version: Linux Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: kamm-removethis@incasoftware.de The following code compiles struct Foo { double d; } struct Bar { byte b; } void main() { Foo foo; Bar bar = foo; } even though Foo is not implicitly convertible to Bar. In contrast, assigning Foo foo; Bar bar; bar = foo; fails as expected. -- |
June 18, 2009 [Issue 2469] arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 Christian Kamm <kamm-removethis@incasoftware.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jarrett.billingsley@gmail.c | |om --- Comment #1 from Christian Kamm <kamm-removethis@incasoftware.de> 2009-06-17 23:19:21 PDT --- *** Issue 3076 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 18, 2009 [Issue 2469] arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 Christian Kamm <kamm-removethis@incasoftware.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code --- Comment #2 from Christian Kamm <kamm-removethis@incasoftware.de> 2009-06-17 23:20:41 PDT --- Jarett found this pretty ICE in ztc\cod1.c:1673: This can lead to the ICE mentioned in the description, if the source type is smaller than the destination, at least for some values of "smaller," *and* the source is a function call. The following, for instance, causes it: struct Small { uint x; } struct Large { uint x, y, z; } Small foo() { return Small(); } void main() { Large l = foo(); } // bang! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 18, 2009 [Issue 2469] arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 --- Comment #3 from Jarrett Billingsley <jarrett.billingsley@gmail.com> 2009-06-18 06:45:55 PDT --- Ah poop. I was searching for ICEs and never even came across this one :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 23, 2009 [Issue 2469] arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 --- Comment #4 from Sobirari Muhomori <maxmo@pochta.ru> 2009-06-23 05:16:12 PDT --- possibly related to bug 3036. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 30, 2009 [Issue 2469] ICE(cod1.c) arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 Jarrett Billingsley <jarrett.billingsley@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rayerd.wiz@gmail.com --- Comment #5 from Jarrett Billingsley <jarrett.billingsley@gmail.com> 2009-07-30 08:42:40 PDT --- *** Issue 3216 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 07, 2009 [Issue 2469] ICE(cod1.c) arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 --- Comment #6 from Don <clugdbug@yahoo.com.au> 2009-08-07 01:28:58 PDT --- There are two completely different bugs in this report. One is the implicit conversion one, which is a bad code generation bug. The ICE is actually a quite different bug. Here's a test case which doesn't involve the initialisation bug. struct Small { uint x; } struct Large { uint x, y, z; } Small foo() { return Small(); } void main() { Large l; Small s; l = cast(Large)foo(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 07, 2009 [Issue 2469] ICE(cod1.c) arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxmo@pochta.ru --- Comment #7 from Don <clugdbug@yahoo.com.au> 2009-08-07 01:29:07 PDT --- *** Issue 3036 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 09, 2009 [Issue 2469] ICE(cod1.c) arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 --- Comment #8 from Don <clugdbug@yahoo.com.au> 2009-08-08 22:21:44 PDT --- There's a patch for the original bug in bug 2702. It's unrelated to the ICE. (It's really annoying when new bugs are reported in the comments for existing bugs, it's not clear what to do with them). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 03, 2009 [Issue 2469] ICE(cod1.c) arbitrary struct accepted as struct initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2469 --- Comment #9 from Jarrett Billingsley <jarrett.billingsley@gmail.com> 2009-09-03 09:48:19 PDT --- *** Issue 3287 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation