[Issue 12802] New: Allow optional 'StorageClasses' for new alias syntax
https://issues.dlang.org/show_bug.cgi?id=12802 Issue ID: 12802 Summary: Allow optional 'StorageClasses' for new alias syntax Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: k.hara...@gmail.com Old style alias declaration can have optional 'StorageClasses'. alias extern(C) ref pure nothrow int function() FP; pragma(msg, FP); // prints: extern (C) int function() pure nothrow ref But new alias syntax (introduced in enhancement issue 3011) does not support it. alias FP = extern(C) ref pure nothrow int function(); --- test.d(1): Error: basic type expected, not extern test.d(1): Error: semicolon expected to close alias declaration test.d(1): Error: no identifier for declarator extern (C) int function() The latter syntax should also be accepted and have same semantics with the former. --
[Issue 12802] Allow optional 'StorageClasses' for new alias syntax
https://issues.dlang.org/show_bug.cgi?id=12802 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com --- Compiler fix: https://github.com/D-Programming-Language/dmd/pull/3585 Grammar fix: https://github.com/D-Programming-Language/dlang.org/pull/582 --
[Issue 11396] Function alias declaration not valid according to spec
https://issues.dlang.org/show_bug.cgi?id=11396 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #2 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dlang.org/pull/582 --
[Issue 12615] Warn against, and then deprecate old alias syntax
https://issues.dlang.org/show_bug.cgi?id=12615 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Depends on||12802 --- Comment #8 from Kenji Hara k.hara...@gmail.com --- (In reply to Andrej Mitrovic from comment #6) (In reply to bearophile_hugs from comment #5) What other constructs are a problem for the warn against the old alias syntax? Function pointers. There's an issue where 'alias f = extern(C) void function()' does not work (it's a filed bug). Until that is fixed we can't plan to go forward with this warning. I filed it as the issue 12802. --
[Issue 12802] Allow optional 'StorageClasses' for new alias syntax
https://issues.dlang.org/show_bug.cgi?id=12802 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Blocks||12615 --
[Issue 12803] New: __traits(getFunctionAttributes) is not documented
https://issues.dlang.org/show_bug.cgi?id=12803 Issue ID: 12803 Summary: __traits(getFunctionAttributes) is not documented Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: websites Assignee: nob...@puremagic.com Reporter: k.hara...@gmail.com It's not listed in: http://dlang.org/traits#TraitsKeyword and: http://dlang.org/grammar#TraitsKeyword --
[Issue 12804] New: DMD segfault with template parameter specialisation 'typeof(T.init)'
https://issues.dlang.org/show_bug.cgi?id=12804 Issue ID: 12804 Summary: DMD segfault with template parameter specialisation 'typeof(T.init)' Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Keywords: ice Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: anoneu...@gmail.com compiler crashes (segfault) and outputs nothing with this code: template Foo(T1, T2 : typeof(T1.init)) {}; tested on Windows XP 32-bit with DMD 2.065.0; %errorlevel% is -1073741819 tested on DPaste with DMD 2.065.0 (http://dpaste.dzfl.pl/c99c82b8501b); return code is 11 tested on DPaste with LDC 2.063 (http://dpaste.dzfl.pl/903b69e7602f); same return code, but also emitted a stack trace (as you can see on the DPaste page) --
[Issue 12660] Wrong non-@nogc function invariant error
https://issues.dlang.org/show_bug.cgi?id=12660 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #4 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/3586 --
[Issue 12519] Some implicit array casts are missing
https://issues.dlang.org/show_bug.cgi?id=12519 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Kenji Hara k.hara...@gmail.com --- void[] is an array of untyped *mutable* data. So appending const data to mutable array will violate type system. --
[Issue 12642] Avoid some heap allocation cases for fixed-size arrays
https://issues.dlang.org/show_bug.cgi?id=12642 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #7 from Kenji Hara k.hara...@gmail.com --- (In reply to bearophile_hugs from comment #6) There is one more missing case, is this worth opening another ER, or not? import core.simd; ulong2 foo() @nogc { return [0, 0]; } void main() {} test.d(3,12): Error: array literal in @nogc function foo may cause GC allocation https://github.com/D-Programming-Language/dmd/pull/3587 --
[Issue 12642] Avoid some heap allocation cases for fixed-size arrays
https://issues.dlang.org/show_bug.cgi?id=12642 --- Comment #8 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f8c228cf20b656db91ef478b20a34d290888647b Additional issue 12642 fix for vector literal and @nogc https://github.com/D-Programming-Language/dmd/commit/d060bdb123b93bd69de95c4494bdbbc40260aa8b Merge pull request #3587 from 9rnsr/fix12642 Additional issue 12642 fix for vector literal and @nogc --
[Issue 12642] Avoid some heap allocation cases for fixed-size arrays
https://issues.dlang.org/show_bug.cgi?id=12642 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --
[Issue 11543] multiple definition of std.regex with shared library
https://issues.dlang.org/show_bug.cgi?id=11543 --- Comment #10 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/82c9b2deba705ed00d18ef9f992a58ed3e72b779 fix for Issue 11543 - multiple definition of std.regex with shared library - Detect copy relocated ModuleInfos when checking for conflicting module definitions. https://github.com/D-Programming-Language/druntime/commit/09ea3d684b6a815d2b9013b6cf2d4e30a4c70301 Merge pull request #791 from MartinNowak/fix11543 fix for Issue 11543 - multiple definition of std.regex with shared library --
[Issue 11774] Lambda argument to templated function changes its signature forever
https://issues.dlang.org/show_bug.cgi?id=11774 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #2 from Kenji Hara k.hara...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/3589 --
[Issue 12670] std.algorithm.sum @nogc for simple cases
https://issues.dlang.org/show_bug.cgi?id=12670 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #1 from bearophile_h...@eml.cc --- Now it works. --
[Issue 12671] std.complex abs and ^^ @nogc
https://issues.dlang.org/show_bug.cgi?id=12671 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from bearophile_h...@eml.cc --- Now it works (fixed by Walter). --
[Issue 12805] New: @nogc std.range.iota(FP)
https://issues.dlang.org/show_bug.cgi?id=12805 Issue ID: 12805 Summary: @nogc std.range.iota(FP) Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: bearophile_h...@eml.cc void main() @nogc { import std.range: iota; foreach (x; iota(5.0)) {} } test.d(3,21): Error: @nogc function 'D main' cannot call non-@nogc function 'std.range.iota!double.iota' --
[Issue 12519] Some implicit array casts are missing
https://issues.dlang.org/show_bug.cgi?id=12519 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #2 from Denis Shelomovskij verylonglogin@gmail.com --- (In reply to Kenji Hara from comment #1) void[] is an array of untyped *mutable* data. So appending const data to mutable array will violate type system. But `byte` has no indirections so `const byte` is convertible to `byte` and this logically equivalent code is valid: --- void main() { void[] va; const byte[] cba; const byte[1] csba; byte[] tmp; tmp ~= cba; tmp ~= csba; va = tmp; } --- --
[Issue 7954] x86_64 Windows fibers do not save nonvolatile XMM registers
https://issues.dlang.org/show_bug.cgi?id=7954 Johannes Blume jbl...@jblume.com changed: What|Removed |Added Keywords||pull CC||jbl...@jblume.com --- Comment #2 from Johannes Blume jbl...@jblume.com --- https://github.com/D-Programming-Language/druntime/pull/810 --
[Issue 10691] real type on Win 64 broken (?)
https://issues.dlang.org/show_bug.cgi?id=10691 Johannes Blume jbl...@jblume.com changed: What|Removed |Added CC||jbl...@jblume.com --- Comment #2 from Johannes Blume jbl...@jblume.com --- = DMD v2.065 official (32-bit): 3.3621e-4932 1.18973e+4932 3.3621e-4932 1.18973e+4932 3.3621e-4932 1.18973e+4932 DMD v2.065 official (64-bit): 2.27151e-312 2.27151e-312 2.79471e-312 2.79471e-312 1.74681e-312 1.74681e-312 = DMD v2.066 git MSVC2013 (32-bit): 3.3621e-4932 1.18973e+4932 3.3621e-4932 1.18973e+4932 3.3621e-4932 1.18973e+4932 DMD v2.066 git MSVC2013 (64-bit): 0 inf 0 inf 0 inf = So the random results on Win64 seem to be fixed on git. --
[Issue 12806] New: Does std.traits.isArray include associative arrays?
https://issues.dlang.org/show_bug.cgi?id=12806 Issue ID: 12806 Summary: Does std.traits.isArray include associative arrays? Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: trivial Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: peter.alexander...@gmail.com The documentation for std.traits.isArray is: Detect whether type T is an array. It is not immediately clear whether this includes associative arrays or not (it doesn't), which has forced me to test it manually more than once. I'd suggest changing the documentation to cast away any doubt: Detect whether type T is either a static or dynamic array. --
[Issue 11774] Lambda argument to templated function changes its signature forever
https://issues.dlang.org/show_bug.cgi?id=11774 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 11774] Lambda argument to templated function changes its signature forever
https://issues.dlang.org/show_bug.cgi?id=11774 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9c52a1e1538981586b24913f33e03af1d2df7ce3 fix Issue 11774 - Lambda argument to templated function changes its signature forever https://github.com/D-Programming-Language/dmd/commit/77e92c17e6a66aac18cb552e65b78b0579d1a20d Merge pull request #3589 from 9rnsr/fix11774 Issue 11774 - Lambda argument to templated function changes its signature forever --
[Issue 12660] Wrong non-@nogc function invariant error
https://issues.dlang.org/show_bug.cgi?id=12660 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 10691] real type on Win 64 broken (?)
https://issues.dlang.org/show_bug.cgi?id=10691 Rainer Schuetze r.sagita...@gmx.de changed: What|Removed |Added CC||r.sagita...@gmx.de --- Comment #3 from Rainer Schuetze r.sagita...@gmx.de --- Yeah, the output was fixed when the unittests for Win64 were enabled. Unfortunately the runtime still uses C's sprintf for printing floating point numbers, and the MS library only supports double, not real. --
[Issue 12660] Wrong non-@nogc function invariant error
https://issues.dlang.org/show_bug.cgi?id=12660 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/dae8ad7b17a18e6f1aad85a2fab1bf32bce28910 fix Issue 12660 - Wrong non-@nogc function invariant error https://github.com/D-Programming-Language/dmd/commit/e9bb4a2e7c6a0c11d37c3fb8d655af980cae7feb Merge pull request #3586 from 9rnsr/fix12660 Issue 12660 - Wrong non-@nogc function invariant error --
[Issue 10948] BitArray.opEquals is invalid
https://issues.dlang.org/show_bug.cgi?id=10948 Johannes Blume jbl...@jblume.com changed: What|Removed |Added Keywords||pull CC||jbl...@jblume.com --- Comment #3 from Johannes Blume jbl...@jblume.com --- I have gone ahead and packaged the fix in a PR, attributing nbelov: https://github.com/D-Programming-Language/phobos/pull/2204 --
[Issue 12807] New: UFCS checks alias this attributes even when not called
https://issues.dlang.org/show_bug.cgi?id=12807 Issue ID: 12807 Summary: UFCS checks alias this attributes even when not called Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: monarchdo...@gmail.com Basically, if you call a function UFCS style, on an object that has an alias this, then the compiler (from what I can observe) will consider the alias this as called to evaluate the attributes, even if the alias this is not actually called. Example: // void foo(T)(ref T t) { pragma(msg, T.stringof); } struct S { int impure() {assert(0);} alias impure this; } void main() pure { S s; foo(s); //YES s.foo(); //NO } // Error: pure function 'D main' cannot call impure function 'main.S.impure' // What's funny is that is you remove the pure on main, we can verify that impure is never actually called. Discovered while writing: https://github.com/D-Programming-Language/phobos/pull/2202 Originally: assert(!source.doesPointTo(source), msg); Worked around with: assert(!doesPointTo(source, source), msg); --
[Issue 12808] New: Small amount of escape analysis to allow more @nogc functions
https://issues.dlang.org/show_bug.cgi?id=12808 Issue ID: 12808 Summary: Small amount of escape analysis to allow more @nogc functions Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: bearophile_h...@eml.cc DMD 2.066alpha accepts this code: // Program#1 void main() @nogc { int[2] tmp = [1, 2]; foreach (x; tmp) {} } While it refuses this code: // Program#2 void main() @nogc { foreach (x; [1, 2]) {} } With: test.d(3,17): Error: array literal in @nogc function main may cause GC allocation I suggest to start introducing a small amount of Escape Analysis in D, to support the @nogc attribute for the Program#2. Eventually even this program could be supported: // Program#3 void main() @nogc { import std.algorithm: filter; foreach (x; [1, 2].filter!(x = true)) {} } Note that with the []s suffix syntax for fixed-size arrays there is no ambiguity: // Program#4 void main() @nogc { foreach (x; [1, 2]s) {} } And this can generate a clean error message (escape of pointer to stack frame fixed-size array): // Program#5 int[] foo() @nogc { return [1, 2]s; } void main() {} See also Issue 10242 --
[Issue 11435] Nondeterministic 32bit release mode access violation
https://issues.dlang.org/show_bug.cgi?id=11435 --- Comment #4 from safety0ff.bugz safety0ff.b...@gmail.com --- (In reply to monarchdodra from comment #1) Have you been unable to reproduce locally, or do you just have no access to 32 bit machines? I had tried to reproduce locally before, but failed. I'll try again with your reduced code though. Today I set up a FreeBSD VM (GhostBSD via virtual box,) and I can finally reproduce the bug. --
[Issue 10233] [Tracker] Grammar issues
https://issues.dlang.org/show_bug.cgi?id=10233 briancsch...@gmail.com changed: What|Removed |Added Depends on||12801 --
[Issue 11616] Introduce virtual keyword and remove virtual-by-default
https://issues.dlang.org/show_bug.cgi?id=11616 briancsch...@gmail.com changed: What|Removed |Added Depends on||12801 --
[Issue 12801] virtual keyword added to compiler without being added to language specification
https://issues.dlang.org/show_bug.cgi?id=12801 briancsch...@gmail.com changed: What|Removed |Added Keywords||pull Blocks||10233, 11616 --- Comment #1 from briancsch...@gmail.com --- https://github.com/D-Programming-Language/dlang.org/pull/584 --
[Issue 12615] Warn against, and then deprecate old alias syntax
https://issues.dlang.org/show_bug.cgi?id=12615 Issue 12615 depends on issue 12802, which changed state. Issue 12802 Summary: Allow optional 'StorageClasses' for new alias syntax https://issues.dlang.org/show_bug.cgi?id=12802 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 12802] Allow optional 'StorageClasses' for new alias syntax
https://issues.dlang.org/show_bug.cgi?id=12802 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 10233] [Tracker] Grammar issues
https://issues.dlang.org/show_bug.cgi?id=10233 Issue 10233 depends on issue 11396, which changed state. Issue 11396 Summary: Function alias declaration not valid according to spec https://issues.dlang.org/show_bug.cgi?id=11396 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 11396] Function alias declaration not valid according to spec
https://issues.dlang.org/show_bug.cgi?id=11396 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/162c92c95874b4469c2fc8efc3e9e723c309935a fix Issue 11396 - Function alias declaration not valid according to spec https://github.com/D-Programming-Language/dlang.org/commit/b1fec9fdfc0e7fc82690e39097e4c5cecd02a3a7 Merge pull request #582 from 9rnsr/fix_aliasdecl Issue 11396 12802 - Allow optional 'StorageClasses' for old/new alias syntax --
[Issue 12802] Allow optional 'StorageClasses' for new alias syntax
https://issues.dlang.org/show_bug.cgi?id=12802 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/97a706dcb59c9255309a2f6e3a9b14b258d35fd4 fix Issue 12802 - Allow optional 'StorageClasses' for new alias syntax https://github.com/D-Programming-Language/dlang.org/commit/b1fec9fdfc0e7fc82690e39097e4c5cecd02a3a7 Merge pull request #582 from 9rnsr/fix_aliasdecl Issue 11396 12802 - Allow optional 'StorageClasses' for old/new alias syntax --
[Issue 11396] Function alias declaration not valid according to spec
https://issues.dlang.org/show_bug.cgi?id=11396 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 11435] -O optimization flag causes invalid codegen
https://issues.dlang.org/show_bug.cgi?id=11435 safety0ff.bugz safety0ff.b...@gmail.com changed: What|Removed |Added Summary|Nondeterministic 32bit |-O optimization flag causes |release mode access |invalid codegen |violation | Severity|normal |critical --- Comment #5 from safety0ff.bugz safety0ff.b...@gmail.com --- I've managed to reduce it to a test that consistently fails. The reduced test case is posix only (posix with MAP_ANON extension,) but the bug manifests itself on all 32 bit x86 platforms. Disassembly snippet: Here is part of the loop in S.foo(), DMD creates a 4 byte read on +85, but it is only valid to read one byte. This causes the segfault. ebx is the loop index and ecx is the pointer to the array. +80:mov-0x4(%ebp),%ecx +83:mov%esi,%eax = +85:pushl (%ebx,%ecx,1) +88:push %ebx +89:call 0x8070f70 _D6_114351S13opIndexAssignMFbkZb +94:inc%ebx +95:cmp0x8(%ebp),%ebx +98:jb 0x8070f41 _D6_114351S3fooMFAbZv+65 --
[Issue 11435] -O optimization flag causes invalid codegen
https://issues.dlang.org/show_bug.cgi?id=11435 --- Comment #6 from safety0ff.bugz safety0ff.b...@gmail.com --- Created attachment 1358 -- https://issues.dlang.org/attachment.cgi?id=1358action=edit Posix reduced test --
[Issue 11435] -O optimization flag causes invalid 32 bit codegen
https://issues.dlang.org/show_bug.cgi?id=11435 safety0ff.bugz safety0ff.b...@gmail.com changed: What|Removed |Added Summary|-O optimization flag causes |-O optimization flag causes |invalid codegen |invalid 32 bit codegen --
[Issue 12802] Allow optional 'StorageClasses' for new alias syntax
https://issues.dlang.org/show_bug.cgi?id=12802 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/700bdb7b61c0abc1c053dc436aa766b168e7f957 fix Issue 12802 - Allow optional 'StorageClasses' for new alias syntax https://github.com/D-Programming-Language/dmd/commit/884be6709b70105ff01a25f066b5b391bf48bde6 Merge pull request #3585 from 9rnsr/fix12802 Issue 12802 - Allow optional 'StorageClasses' for new alias syntax --
[Issue 12809] New: More strict nothrow check for try-finally statement
https://issues.dlang.org/show_bug.cgi?id=12809 Issue ID: 12809 Summary: More strict nothrow check for try-finally statement Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: k.hara...@gmail.com This is throwable function. void test_finally1() nothrow { try throw new Exception();// error finally {} } But if add assert(0); in finally block, the throwing exception should not cause nothrow violation. void test_finally2() nothrow { try throw new Exception();// should not be error finally assert(0); // unconditional halt } I found the issue when I tested the following snippet. void main() nothrow { scope(exit) assert(0); throw new Exception(); } --
[Issue 12810] New: PrimaryExpression grammar does not allow type constructors
https://issues.dlang.org/show_bug.cgi?id=12810 Issue ID: 12810 Summary: PrimaryExpression grammar does not allow type constructors Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: websites Assignee: nob...@puremagic.com Reporter: briancsch...@gmail.com Simple example: --- int a = immutable(int).init; --- The grammar has a rule for --- int a = int.init; --- which is PrimaryExpression: BasicTypeX . Identifier but it does not have TypeCtor(BasicType) . Identifier --