[Issue 5287] (crash mtype.c) on function with default argument
http://d.puremagic.com/issues/show_bug.cgi?id=5287 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED CC||clugd...@yahoo.com.au Resolution||DUPLICATE --- Comment #2 from Don clugd...@yahoo.com.au 2010-11-29 01:18:53 PST --- *** This issue has been marked as a duplicate of issue 4434 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4434] ICE(mtype.c, 887) alias with const, shared, or immutable
http://d.puremagic.com/issues/show_bug.cgi?id=4434 --- Comment #14 from Don clugd...@yahoo.com.au 2010-11-29 01:18:53 PST --- *** Issue 5287 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: ---
[Issue 5288] New: auto return: forward ref error when using it with recursive functions
http://d.puremagic.com/issues/show_bug.cgi?id=5288 Summary: auto return: forward ref error when using it with recursive functions Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: nfx...@gmail.com --- Comment #0 from nfx...@gmail.com 2010-11-29 03:21:53 PST --- auto x(int z) { if (z == 1) { return x(z); //line 3 } else { return z; //line 5 } } z.d(3): Error: forward reference to x z.d(5): Error: mismatched function return type inference of int and _error_ It works when you switch line 3 and 5. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5289] New: std.conv.parse!double() results in a segmentation fault.
http://d.puremagic.com/issues/show_bug.cgi?id=5289 Summary: std.conv.parse!double() results in a segmentation fault. Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis jmdavisp...@gmx.com 2010-11-29 03:28:32 PST --- This program import std.conv; import std.stdio; void main() { writeln(parse!double(1.0)); } results in a segfault. In fact, _every_ value that I've tried to parse to a double or a float has resulted in a segfault. Maybe there are some that work, but I haven't found them, and the ones that I need to work don't. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5282] Optimize array comparison which use memcmp to something better and remove unnecessary indirections.
http://d.puremagic.com/issues/show_bug.cgi?id=5282 --- Comment #6 from Stewart Gordon s...@iname.com 2010-11-29 03:29:34 PST --- (In reply to comment #3) The conditions for memcmp working as a way of comparing structs are: - no opEquals of a compatible parameter type - no holes due to alignment - no members with reference semantics (dynamic arrays, AAs, classes) - all of this applies recursively to any struct or union members Looks like I was wrong http://www.digitalmars.com/d/1.0/expression.html#CmpExpression Equality for struct objects means the bit patterns of the objects match exactly (the existence of alignment holes in the objects is accounted for, usually by setting them all to 0 upon initialization). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5289] std.conv.parse!double() results in a segmentation fault.
http://d.puremagic.com/issues/show_bug.cgi?id=5289 Bernard Helyer blood.of.l...@gmail.com changed: What|Removed |Added CC||blood.of.l...@gmail.com --- Comment #1 from Bernard Helyer blood.of.l...@gmail.com 2010-11-29 03:55:04 PST --- It's because you're using a string literal. parse takes it's argument by ref, and advances the array. The string literal is not an lvalue, but is permitted by DMD anyway -- this is the real bug. If you put the string in a variable, it will work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5289] std.conv.parse!double() results in a segmentation fault.
http://d.puremagic.com/issues/show_bug.cgi?id=5289 Lars T. Kyllingstad bugzi...@kyllingen.net changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@kyllingen.net Resolution||DUPLICATE --- Comment #2 from Lars T. Kyllingstad bugzi...@kyllingen.net 2010-11-29 05:03:01 PST --- *** This issue has been marked as a duplicate of issue 4309 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4309] String literal passed by ref causes segfault
http://d.puremagic.com/issues/show_bug.cgi?id=4309 Lars T. Kyllingstad bugzi...@kyllingen.net changed: What|Removed |Added CC||jmdavisp...@gmx.com --- Comment #2 from Lars T. Kyllingstad bugzi...@kyllingen.net 2010-11-29 05:03:02 PST --- *** Issue 5289 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: ---
[Issue 5290] New: Static array literals with too few elements
http://d.puremagic.com/issues/show_bug.cgi?id=5290 Summary: Static array literals with too few elements Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha dsim...@yahoo.com 2010-11-29 05:55:24 PST --- The following invalid code is accepted: import std.stdio; void main() { real[2] foo = [1.0L]; writeln(foo); // [1, 0] } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5191] Combination of pure and nothrow result in a function that does nothing
http://d.puremagic.com/issues/show_bug.cgi?id=5191 David Simcha dsim...@yahoo.com changed: What|Removed |Added CC||dsim...@yahoo.com --- Comment #4 from David Simcha dsim...@yahoo.com 2010-11-29 06:37:58 PST --- Note that inlining must be turned off for this test case to fail. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3849] [missing error] Array literal length doesn't match
http://d.puremagic.com/issues/show_bug.cgi?id=3849 Gide Nwawudu g...@nwawudu.com changed: What|Removed |Added Keywords||accepts-invalid, diagnostic CC||g...@nwawudu.com --- Comment #10 from Gide Nwawudu g...@nwawudu.com 2010-11-29 07:39:26 PST --- Real example where the [$] syntax would have been useful. http://www.dsource.org/projects/phobos/changeset/2204 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5274] Impure function call inside impure function nested inside pure function
http://d.puremagic.com/issues/show_bug.cgi?id=5274 --- Comment #3 from Steven Schveighoffer schvei...@yahoo.com 2010-11-29 07:43:03 PST --- (In reply to comment #2) Maybe you are right, there is no much better error message to be invented here. Hm... I'd expect a message like: Error: pure function 'foo.bar' cannot call impure function 'putchar' But this doesn't seem to be a very critical problem, the line number is correct, so you can see where the problem is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5274] Impure function call inside impure function nested inside pure function
http://d.puremagic.com/issues/show_bug.cgi?id=5274 --- Comment #4 from Don clugd...@yahoo.com.au 2010-11-29 14:25:47 PST --- (In reply to comment #3) (In reply to comment #2) Maybe you are right, there is no much better error message to be invented here. Hm... I'd expect a message like: Error: pure function 'foo.bar' cannot call impure function 'putchar' At present, you get that error message if you explicitly mark bar as pure. But, the existing error message tells you why bar is pure. It's because foo is pure. This is helpful if there are several levels of nesting: it tells you the level which was pure. But this doesn't seem to be a very critical problem, the line number is correct, so you can see where the problem is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5291] New: ref parameter and const/immutable == hole in const system
http://d.puremagic.com/issues/show_bug.cgi?id=5291 Summary: ref parameter and const/immutable == hole in const system Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: simen.kja...@gmail.com --- Comment #0 from Simen Kjaeraas simen.kja...@gmail.com 2010-11-29 18:07:18 PST --- Can't believe nobody has noticed this before: void bar( ref int n ) { n++; } void main( string[] args ) { const int n = args.length * 0; assert( is( typeof( n ) == const(int) ) ); bar( n ); // Uhm... assert( n == 1 ); // WTF?!? } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5291] ref parameter and const/immutable == hole in const system
http://d.puremagic.com/issues/show_bug.cgi?id=5291 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2010-11-29 18:29:09 PST --- immutable bug example: bug.d: void bar( ref int n ) { n++; } void main( string[] args ) { immutable int n = args.length * 0; assert( is( typeof( n ) == const(int) ) ); bar( n ); // Uhm... assert( n == 1 ); } compiled with dmd bug.d core.exception.asserter...@bug(11): Assertion failure compiled with dmd bug.d -release -O -inline object.Error: assert(0) or HLT instruction -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5291] ref parameter and const/immutable == hole in const system
http://d.puremagic.com/issues/show_bug.cgi?id=5291 --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2010-11-29 18:30:13 PST --- (In reply to comment #1) immutable bug example: bug.d: void bar( ref int n ) { n++; } void main( string[] args ) { immutable int n = args.length * 0; assert( is( typeof( n ) == const(int) ) ); bar( n ); // Uhm... assert( n == 1 ); } compiled with dmd bug.d core.exception.asserter...@bug(11): Assertion failure compiled with dmd bug.d -release -O -inline object.Error: assert(0) or HLT instruction My bad I forgot about the first assert. Sorry! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5286] To avoid a problem with Template syntax
http://d.puremagic.com/issues/show_bug.cgi?id=5286 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||WONTFIX --- Comment #1 from Walter Bright bugzi...@digitalmars.com 2010-11-29 19:53:38 PST --- I don't agree it is a source of confusion. I don't know anyone who has been confused by it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5286] To avoid a problem with Template syntax
http://d.puremagic.com/issues/show_bug.cgi?id=5286 --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2010-11-29 19:57:37 PST --- I should add that in cases like this, one should be able to document a trail of confusion, such as is well known with (a b || c). The point of operator precedence is to avoid requiring parentheses everywhere, so a reasonably compelling case has to be presented to require them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4172] Improve varargs
http://d.puremagic.com/issues/show_bug.cgi?id=4172 --- Comment #9 from Walter Bright bugzi...@digitalmars.com 2010-11-29 21:56:33 PST --- Unfortunately, the 64 bit C ABI is rather disastrously complex for varargs. I went back and forth for a while on how to implement it, and whether to use the C ABI for D variadic functions as well as C variadic functions. I finally decided that, although the C variadics were inefficient, they are used rarely enough that it doesn't much matter, and that D will follow the C ABI. The result is a much expanded and more complex std.c.stdarg implementation. We can revisit this and look into making it more efficient later, but for now I just want to get it working. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4172] Improve varargs
http://d.puremagic.com/issues/show_bug.cgi?id=4172 --- Comment #10 from Fawzi Mohamed fa...@gmx.ch 2010-11-29 23:33:33 PST --- I don't understand why an ldc like approach (caller has to prepare marshalled array, vararg function is equivalent to (void*,TypeInfo[])) would not work if typeinfo has align info. The use of the C ABI is the reason gdc is broken, using it is not possible to loop on arbitrary arguments, all possible arguments should be accounted for at compile time, which defeats much of the purpose of varargs... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---