[Issue 19256] std.json: JSONValue allows violating constness

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19256

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
Is this a duplicate of 12885 then?

--


[Issue 19494] [REG 2.080.0][objc] interface `main.NSObject.Class` conflicts with interface `main.NSObject.Class`

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19494

github-bugzi...@puremagic.com changed:

   What|Removed |Added

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

--


[Issue 19494] [REG 2.080.0][objc] interface `main.NSObject.Class` conflicts with interface `main.NSObject.Class`

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19494

--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/c9bc1a68a41303e83e3df06bff7b9182755aceed
Fix issue 19494: Remove implicit `Class` member for Objective-C interfaces

The issue was that when support for Objective-C class methods was
added, the metaclass was accidentally exposed as the `.Class` member
for all Objective-C interfaces.

https://github.com/dlang/dmd/commit/09f2198b25024a8bde75f7ef58609c8218e62ca3
Merge pull request #9083 from jacob-carlborg/19494-class-conflict

Fix issue 19494: Remove implicit `Class` member for Objective-C interfaces

--


[Issue 17960] [REG 2.077-rc1] A 192 bytes leak is created by the GC when `-unittest` is an option

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17960

Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution|--- |WONTFIX

--- Comment #2 from Walter Bright  ---
Why is this marked as a regression?

Also, dmd does not attempt to release all the memory it allocates, for speed
reasons.

--


[Issue 17145] [REG2.066.0] Tuple expansion error in local enum declaration

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17145

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
Would be nice to have a test case that doesn't rely on Phobos?

--


[Issue 11257] Allow whole implicit conversion if one or more overlapped field could.

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11257

--- Comment #3 from Walter Bright  ---
I can't agree with this. A cast should be used to break out of const, and
should not be allowed in @safe code.

--


[Issue 12885] const union wrongly converts implicitly to mutable

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12885

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #4 from Walter Bright  ---
Martin is right.

--


[Issue 12883] implicit conversion of struct to mutable via alias this

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12883

Walter Bright  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=12885

--


[Issue 19256] std.json: JSONValue allows violating constness

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19256

Walter Bright  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=12885

--


[Issue 12885] const union wrongly converts implicitly to mutable

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12885

Walter Bright  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=12883,
   ||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=19256,
   ||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=11257

--


[Issue 11257] Allow whole implicit conversion if one or more overlapped field could.

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11257

Walter Bright  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=12885

--


[Issue 12885] const union wrongly converts implicitly to mutable

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12885

--- Comment #5 from Walter Bright  ---
https://github.com/dlang/dmd/pull/9061

--


[Issue 17911] UDA to scope cause Error

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17911

Walter Bright  changed:

   What|Removed |Added

   Severity|regression  |enhancement

--- Comment #5 from Walter Bright  ---
The { } attribute syntax is not supported for local variables:

void bar()
{
const { int a = 3; }
}

It's never been supported, so it's not a regression. Marked as enhancement
request.

--


[Issue 17911] Add { } block attributes for local variables

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17911

Walter Bright  changed:

   What|Removed |Added

Summary|UDA to scope cause Error|Add { } block attributes
   ||for local variables

--


[Issue 18137] nothrow attribute is not written for some member functions to the JSON file

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18137

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #1 from Walter Bright  ---
A much smaller test case would be most helpful.

--


[Issue 17978] github HEAD gives wrong warning for bitwise unary operation

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17978

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
Why is this marked as a regression?

--


[Issue 19496] Wrong D and C++ ABI caused by scope qualifier in other method

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19496

Илья Ярошенко  changed:

   What|Removed |Added

   Hardware|x86_64  |All

--- Comment #1 from Илья Ярошенко  ---
Both 32 and 64 bit code affected

--


[Issue 19496] New: Wrong D and C++ ABI caused by scope qualifier in other method

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19496

  Issue ID: 19496
   Summary: Wrong D and C++ ABI caused by scope qualifier in other
method
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: major
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: ilyayaroshe...@gmail.com

t1.d:

struct S
{
void* _payload;
~this();
typeof(this) merge() { return this; }
bool foo(ref typeof(this) rhs);
}


t2.d:

struct S
{
void* _payload;
~this();
typeof(this) merge() { return this; }
bool foo(scope ref typeof(this) rhs);
}


As you can see the difference between this two tests is that t2.S.foo's
argument has scope qualifier.

The issue is that t1.S.merge and t2.S.merge have different ABI. Fantastic
issue, ha!

The correct ABI is in t1. The same ABI is in C++ for objects with destructors.
Note, that ABI depends on if destructor presents, both in D and C++.

The issue is represented both in DMD and LDC, both for extern(D) and
extern(C++).

LLVM output (DMD's assembler is less informative):



t.ll.S.merge:
// ABI signature returns void (as for objects with destructors)

define void @_D22t11S5mergeMFZSQBkQp(%t1.S* noalias nocapture sret align 8
%.sret_arg, %t1.S* nocapture nonnull readonly %.this_arg) local_unnamed_addr #1
comdat {

  %1 = bitcast %t1.S* %.this_arg to i64* ; [#uses = 1]
  %2 = bitcast %t1.S* %.sret_arg to i64* ; [#uses = 1]
  %3 = load i64, i64* %1, align 1 ; [#uses = 1]
  store i64 %3, i64* %2, align 8
  ret void
}

t2.ll.S.merge:

// ABI signature returns S (as for objects without destructors)

define %t2.S @_D22t21S5mergeMFZSQBkQp(%t2.S* nocapture nonnull readonly
%.this_arg) local_unnamed_addr #1 comdat {

  %1 = getelementptr inbounds %t2.S, %t2.S* %.this_arg, i64 0, i32 0 ; [#uses = 
1, type = i8**]
  %.unpack = load i8*, i8** %1, align 8   ; [#uses = 1]
  %2 = insertvalue %t2.S undef, i8* %.unpack, 0 ; [#uses = 1]
  ret %t2.S %2
}

--


[Issue 19496] Wrong D and C++ ABI caused by scope qualifier in other method

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19496

Илья Ярошенко  changed:

   What|Removed |Added

   Keywords||C++, industry, wrong-code

--


[Issue 19497] New: the program crash using dmd with -O, it works fine without optimizations.

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19497

  Issue ID: 19497
   Summary: the program crash using dmd with -O, it works fine
without optimizations.
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: critical
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: georges.toutoun...@gmail.com

module t;

import std.stdio;

void main()
{
ubyte[1024] data;

ushort* ushortPtr = cast(ushort*) data.ptr;

*ushortPtr++ = 0xfe00;

writefln("ushortPtr(%s)", ushortPtr);
std.stdio.stdout.flush;
}

this little program crash with: dmd -O t.d
it works fine without the -O switch.

---

module t;

import std.stdio;

void main()
{
ubyte[1024] data;

ushort* ushortPtr = cast(ushort*) data.ptr;

*ushortPtr = 0xfe00;

ushortPtr++;

writefln("ushortPtr(%s)", ushortPtr);
std.stdio.stdout.flush;
}

this little modification, solve the problem.

no problem with ldc2.
the test done on MacOS, dmd v2.083.1

Thanks,
Georges Toutoungis

--


[Issue 18372] REG(2.072): error missing line number: Error: undefined identifier __va_list_tag

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18372

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
https://github.com/dlang/dmd/pull/9087

--


[Issue 19256] std.json: JSONValue allows violating constness

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19256

--- Comment #3 from FeepingCreature  ---
I'd call it a consequence or subset of 12885, in that fixing 12885 also fixes
this.

But if 12885 was closed wontfix, this one would still need a separate fix.

--


[Issue 19496] Wrong D and C++ ABI caused by scope qualifier in other method

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19496

ki...@gmx.net changed:

   What|Removed |Added

 CC||ki...@gmx.net

--- Comment #2 from ki...@gmx.net ---
Wow, that's a curious major issue indeed. Somehow that little `scope` seems to
affect `StructDeclaration.isPOD()`.

--


[Issue 18938] Dmd segfault when compiling this dub package in test release

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18938

--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/19f49cf4216323af3f27292a243c5d576b5e857c
Fix Issue 18938 - Dmd segfault when compiling this dub package in test release

https://github.com/dlang/dmd/commit/e4aee5829153d5bcbe2c48d28606691865158e09
Merge pull request #9075 from RazvanN7/Issue_18938

Fix Issue 18938 - Dmd segfault when compiling this dub package in test release

--


[Issue 16652] [Reg 2.071] returned rvalue destroyed too early

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16652

github-bugzi...@puremagic.com changed:

   What|Removed |Added

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

--


[Issue 19227] S.init is S.init failing for struct with float member

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19227

--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/e1dce1a8f90aee8c6922ca12cba99cc22c4122f8
fix Issue 19227 - S.init is S.init failing for struct with float member

https://github.com/dlang/dmd/commit/883b5930856756045d86382fa1eb28e205dd438e
Merge pull request #9073 from WalterBright/fix19227

fix Issue 19227 - S.init is S.init failing for struct with float member

--


[Issue 18938] Dmd segfault when compiling this dub package in test release

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18938

github-bugzi...@puremagic.com changed:

   What|Removed |Added

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

--


[Issue 19227] S.init is S.init failing for struct with float member

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19227

github-bugzi...@puremagic.com changed:

   What|Removed |Added

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

--


[Issue 19473] DMD Segfault on circular struct reference

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19473

--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/d2b6fc972aec7b5a518b437f4ec0f8e184d549be
fix Issue 19473 - DMD Segfault on circular struct reference

https://github.com/dlang/dmd/commit/5aa95b571b473666b9e68dd1cb07c8dd0b008925
Merge pull request #9072 from WalterBright/fix19473

fix Issue 19473 - DMD Segfault on circular struct reference

--


[Issue 16652] [Reg 2.071] returned rvalue destroyed too early

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16652

--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/535e8a4f47393fda584d315718833e504f4e69e7
fix Issue 16652 - [Reg 2.071] returned rvalue destroyed too early

https://github.com/dlang/dmd/commit/040320dbb881961ed1f00b4eac39f67400af1d02
Merge pull request #9081 from WalterBright/fix16652

fix Issue 16652 - [Reg 2.071] returned rvalue destroyed too early

--


[Issue 19473] DMD Segfault on circular struct reference

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19473

github-bugzi...@puremagic.com changed:

   What|Removed |Added

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

--


[Issue 19497] the program crash using dmd with -O, it works fine without optimizations.

2018-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19497

ag0aep6g  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||ag0ae...@gmail.com

--