[Issue 19709] CRuntime_Musl is missing implementation for ARM

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19709

Andre  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Andre  ---
Solved with pr
https://github.com/dlang/druntime/pull/2605

--


[Issue 17985] Implement -stdin for rdmd

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17985

Andre  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Andre  ---
As rdmd is deprecated, I will close this issue. In the meantime this feature
was also added to dub.

--


[Issue 19967] New: segmentation fault when auto ref with default values

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19967

  Issue ID: 19967
   Summary: segmentation fault when auto ref with default values
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: qs.il.paperi...@gmail.com

Compiling this code

void f(Ts...)(auto ref Ts args = Ts.init) { }

void main()
{
int x;
f(x);
}

ends the compiler with a segmentation fault.

--


[Issue 19954] ICE: Casting AliasSeq to array and passing to a function

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19954

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #4 from Dlang Bot  ---
@JinShil updated dlang/dmd pull request #10036 "Fix Issue 19954 - ICE: Casting
AliasSeq to array and passing to a function" fixing this issue:

- Fix Issue 19954 - ICE: Casting AliasSeq to array and passing to a function

https://github.com/dlang/dmd/pull/10036

--


[Issue 19966] New: [DIP1000] DIP1000 with a template behaves differently

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19966

  Issue ID: 19966
   Summary: [DIP1000] DIP1000 with a template behaves differently
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: safe
  Severity: critical
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: d...@me.com

The following code compile successfully with DIP1000 enabled:

struct Foo()
{
int* bar;

int* foo() @safe return
{
return bar;
}
}

int* a;

void main() @safe
{
Foo!() f;
a = f.foo;
}

But if `Foo` is not a template it fails to compile, complaining that the return
value of `foo` outlives `f`.

I think there are two errors here:

1. `Foo` as a template and as a non-template struct behaves differently
2. I think the above code is actually valid because it's not provable that
`foo` escapes a pointer to the internal state of `Foo`

--


[Issue 19965] New: [DIP1000] Template allows to escape internal pointer

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19965

  Issue ID: 19965
   Summary: [DIP1000] Template allows to escape internal pointer
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Keywords: safe
  Severity: critical
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: d...@me.com

The following code compiles successfully with DIP1000 enabled:

struct Buffer
{
int[10] data;

int[] getData() @safe return
{
return data[];
}
}

struct Foo()
{
Buffer buffer;

int[] toArray() @safe return
{
return buffer.getData;
}
}

int[] a;

void main() @safe
{
Foo!() f;
a = f.toArray;
}

In the above example, a pointer to `data` (through the dynamic array returned
by `getData`) is escaped to `a`. If `Foo` is not a template the code fails to
compile, as expected.

--


[Issue 19963] [Regression 2.066 - 2.067.1] nested pure functions variable access

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19963

--- Comment #1 from Nicholas Wilson  ---
*** Issue 19964 has been marked as a duplicate of this issue. ***

--


[Issue 19964] [Regression 2.066 - 2.067.1] nested pure functions variable access

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19964

Nicholas Wilson  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Nicholas Wilson  ---


*** This issue has been marked as a duplicate of issue 19963 ***

--


[Issue 19964] New: [Regression 2.066 - 2.067.1] nested pure functions variable access

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19964

  Issue ID: 19964
   Summary: [Regression 2.066 - 2.067.1] nested pure functions
variable access
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: iamthewilsona...@hotmail.com

>From the source code of DMD no less!

void f() {
  int fx;
  pure void g() {
int gx;
/+pure+/ void h() {
  int hx;
  /+pure+/ void i() { fx = 0; }
}
   }
}

should give 

Error: pure nested function 'g' cannot access mutable data 'fx'
if the commented out `purees are removed it should give 

Error: pure nested function 'i' cannot access mutable data 'fx'

three times.

--


[Issue 19963] New: [Regression 2.066 - 2.067.1] nested pure functions variable access

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19963

  Issue ID: 19963
   Summary: [Regression 2.066 - 2.067.1] nested pure functions
variable access
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: iamthewilsona...@hotmail.com

>From the source code of DMD no less!

void f() {
  int fx;
  pure void g() {
int gx;
/+pure+/ void h() {
  int hx;
  /+pure+/ void i() { fx = 0; }
}
   }
}

should give 

Error: pure nested function 'g' cannot access mutable data 'fx'
if the commented out `purees are removed it should give 

Error: pure nested function 'i' cannot access mutable data 'fx'

three times.

--


[Issue 19962] [DIP1000] scope on delegate no affect with DIP1000

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19962

Radu Racariu  changed:

   What|Removed |Added

   Keywords||safe
 CC||radu.raca...@gmail.com

--


[Issue 19961] context pointer does not apply qualifiers properly

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19961

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #3 from Walter Bright  ---
Partial fix: https://github.com/dlang/dmd/pull/10035

--


[Issue 19962] New: [DIP1000] scope on delegate no affect with DIP1000

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19962

  Issue ID: 19962
   Summary: [DIP1000] scope on delegate no affect with DIP1000
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: d...@me.com

The following code snippet compiles successfully WITHOUT DIP1000 enabled:

void main(string[] args) @safe @nogc
{
scope f = () {
auto a = args;
};
}

But compiling the same code WITH DIP100 enabled, the following compile error
occurs:

main.d(1): Error: function `D main` is @nogc yet allocates closures with the GC
main.d(3):main.main.__lambda2 closes over variable args at main.d(1)

--


[Issue 19961] context pointer does not apply qualifiers properly

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19961

Nicholas Wilson  changed:

   What|Removed |Added

   Keywords||accepts-invalid,
   ||rejects-valid
   Severity|enhancement |major

--


[Issue 12950] Lexer interprets UFCS on hex integer as hex float literal

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12950

Dlang Bot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Dlang Bot  ---
dlang/dmd pull request #10019 "fix issue 12950 - Lexer interprets UFCS on hex
integer as hex float literal" was merged into stable:

- 29c785c767c11776eb02db1b15513981c3e932f6 by Basile Burg:
  fix issue 12950 - Lexer interprets UFCS on hex integer as hex float literal

https://github.com/dlang/dmd/pull/10019

--


[Issue 19961] context pointer does not apply qualifiers properly

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19961

--- Comment #2 from Nicholas Wilson  ---
Bleaugh. That should be 
auto dg2 = delegate int() const { return *p++; };

--


[Issue 19961] context pointer does not apply qualifiers properly

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19961

--- Comment #1 from Nicholas Wilson  ---
Bleaugh. That should be 
auto dg2 = delegate int() const { return *p++; };

--


[Issue 19961] New: context pointer does not apply qualifiers properly

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19961

  Issue ID: 19961
   Summary: context pointer does not apply qualifiers properly
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: iamthewilsona...@hotmail.com

void main()
{
int i = 42;
// const should not be able to access mutable.
int* p = 
auto dg2 = delegate int() const { return *p; };
assert(dg2() == i);
}

fails to error.

Also 

void main()
{
int i = 42;
// shared cannot access mutable
int* p = 
auto dg2 = delegate int() shared { return *p; };
assert(dg2() == i);
}

errors, the context should be captured as shared so that should be allowed.
Issue 15306 declared this accepts invalid as shared aliasing but I believe that
is incorrect. Shared doesn't offer any useful guaruntees on that front anyway.

--


[Issue 19956] Subclassing Thread with synchronized (this) may deadlock

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19956

--- Comment #1 from anonymous4  ---
Nice; one reason why synchronized methods are now considered an antipattern in
.net is because object's monitor is public and there's no way to restrict
access to it, so it can accidentally end up being used in unrelated scenarios.

--


[Issue 18449] dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449

Mathias LANG  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||pro.mathias.l...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #3 from Mathias LANG  ---
Marking as duplicate of 18845 as the later is better worded

*** This issue has been marked as a duplicate of issue 18845 ***

--


[Issue 18845] Extern(C++) class with no virtual functions

2019-06-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18845

Mathias LANG  changed:

   What|Removed |Added

 CC||timothee.co...@gmail.com

--- Comment #3 from Mathias LANG  ---
*** Issue 18449 has been marked as a duplicate of this issue. ***

--