[Issue 3852] New: Default struct constructors needed
http://d.puremagic.com/issues/show_bug.cgi?id=3852 Summary: Default struct constructors needed Product: D Version: future Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: samu...@voliacable.com --- Comment #0 from Max Samukha samu...@voliacable.com 2010-02-25 02:19:18 PST --- Qt has quite a lot of types with pass-by-value semantics. For example, all COW types are value types (http://doc.trolltech.com/4.6/shared.html#list-of-classes). Currently, QtD implements such types as classes, which implies an excessive heap allocation happens every time a value of such a type is passed to D. We are trying to solve this problem by wrapping Qt's value types in D structs. Those structs must always be properly initialized via a call to Qt. It would be incorrect to just declare a variable like this: QString s; We would have to force the programmer to explicitly run a function emulating the default constructor (e.g. opCall), or expect him to suffer badly when he forgets to do so. Possible solutions: 1. Implement proper default constructors for structs. 2. Make it possible to forbid the use of uninitialized structs. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3853] New: core.sys.posix.stdio.pclose is missing
http://d.puremagic.com/issues/show_bug.cgi?id=3853 Summary: core.sys.posix.stdio.pclose is missing Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: s...@invisibleduck.org ReportedBy: bugzi...@kyllingen.net --- Comment #0 from Lars T. Kyllingstad bugzi...@kyllingen.net 2010-02-25 04:52:24 PST --- The following declaration is missing from core.sys.posix.stdio: int pclose(FILE*); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3854] New: Error on static initialization of arrays with trailing comma.
http://d.puremagic.com/issues/show_bug.cgi?id=3854 Summary: Error on static initialization of arrays with trailing comma. Product: D Version: 1.056 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: s...@q1cc.net --- Comment #0 from Markus Dangl s...@q1cc.net 2010-02-25 12:16:37 PST --- The following code worked in DMD 1.045, but not with 1.056 and i think it should: uint[][] b = [[ 1, 2, ]]; The following code always works, which is odd: uint[] a = [ 1, 2, ]; I assume it is a minor parser bug. Workaround: Omit the last comma. Here is the full code i used: module main; int main(char[][] args) { uint[][] b = [[ 1, 2, ]]; return 0; } And the output of dmd main.d: main.d(3): expression expected, not ']' main.d(3): comma expected separating array initializers, not ; main.d(4): semicolon expected, not 'return' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3854] Error on static initialization of arrays with trailing comma.
http://d.puremagic.com/issues/show_bug.cgi?id=3854 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #1 from Don clugd...@yahoo.com.au 2010-02-25 12:39:25 PST --- I think this is a duplicate of bug 3716. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3855] New: Misleading error messages for return expression in void methods.
http://d.puremagic.com/issues/show_bug.cgi?id=3855 Summary: Misleading error messages for return expression in void methods. Product: D Version: 1.056 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: s...@q1cc.net --- Comment #0 from Markus Dangl s...@q1cc.net 2010-02-25 12:45:45 PST --- dmd 1.056 gives a misleading error message on invalid code. The error was not even reported in my previous version (1.045). Consider the following invalid code: class C { int i; void m() { return i; } } And output of dmd main.d: main.d(4): Error: dotvar has no effect in expression (this.i) The error message could be much clearer about not being able to return something for a void method. Testing the same thing with a simple function: void m() { return 1; } gives the following output of dmd main.d: main.d(2): Error: long has no effect in expression (1) Which is still not very clear. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3855] Misleading error messages for return expression in void methods.
http://d.puremagic.com/issues/show_bug.cgi?id=3855 Markus Dangl s...@q1cc.net changed: What|Removed |Added Severity|normal |minor -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3854] Error on static initialization of arrays with trailing comma.
http://d.puremagic.com/issues/show_bug.cgi?id=3854 --- Comment #2 from Markus Dangl s...@q1cc.net 2010-02-25 12:54:14 PST --- (In reply to comment #1) I think this is a duplicate of bug 3716. It was named D2 only and does not mention problems with trailing commas, thus i made it a seperate bug. I tested the code of #3716 with dmd 1.056 and it worked, so i suppose it really is a different bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3854] Error on static initialization of arrays with trailing comma.
http://d.puremagic.com/issues/show_bug.cgi?id=3854 Ellery Newcomer ellery-newco...@utulsa.edu changed: What|Removed |Added CC||ellery-newco...@utulsa.edu --- Comment #3 from Ellery Newcomer ellery-newco...@utulsa.edu 2010-02-25 20:27:36 PST --- (In reply to comment #2) (In reply to comment #1) I think this is a duplicate of bug 3716. It was named D2 only and does not mention problems with trailing commas, thus i made it a seperate bug. I tested the code of #3716 with dmd 1.056 and it worked, so i suppose it really is a different bug. The trailing commas are deliberate and part of the spec. If you want to complain about trailing commas, complain that array initializers allow them and array literal expressions don't. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3716] Regression (D2 only) with multi dimensional array literals
http://d.puremagic.com/issues/show_bug.cgi?id=3716 Ellery Newcomer ellery-newco...@utulsa.edu changed: What|Removed |Added CC||ellery-newco...@utulsa.edu --- Comment #2 from Ellery Newcomer ellery-newco...@utulsa.edu 2010-02-25 20:45:10 PST --- looks like it parses an expression rather than an initializer. this should fix it: --- parse.c (revision 400) +++ parse.c (working copy) @@ -3248,6 +3248,7 @@ { t = peek(t); if (t-value != TOKsemicolon t-value != TOKcomma + t-value != TOKrbracket t-value != TOKrcurly) goto Lexpression; break; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---