[Issue 14613] DMD: Internal error: backend/cod1.c 1567 on '-O' switch

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14613

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

https://github.com/dlang/dmd/commit/a4f584ffdc195cc99a738ba495c8261284813d2a
fix Issue 14613 - DMD: Internal error: backend/cod1.c 1567 on '-O' switch

https://github.com/dlang/dmd/commit/5f803b0d75a722937a13b6590176984c3d436403
Merge pull request #6218 from WalterBright/fix14613

fix Issue 14613 - DMD: Internal error: backend/cod1.c 1567 on '-O' sw…

--


[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576

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

--


[Issue 16658] Win32API: default IE ver. set to 4.0 is too old

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16658

--- Comment #1 from j...@red.email.ne.jp ---
Forgot to mention:

The value cooperating with this is defined that
_WIN32_WINNT = 0x501 ( means WinXP )



So I suppose that _WIN32_IE should be changed as follows.

version (IE10) {
} else version (IE9) {
} else version (IE8) {
   ... snipped ...
} else static if (_WIN32_WINNT >= 0x501) { // ADD
enum uint _WIN32_IE = 0x600;   // ADD
} else static if (_WIN32_WINNT >= 0x410) {
enum uint _WIN32_IE = 0x400;   // this is used now
} else {

--


[Issue 16658] New: Win32API: default IE ver. set to 4.0 is too old

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16658

  Issue ID: 16658
   Summary: Win32API: default IE ver. set to 4.0 is too old
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: normal
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: j...@red.email.ne.jp

About Win32 API shipped with 2.070 druntime,
the condition for IE 'version _WIN32_IE = 0x400' ( by default ) is too old.
# See druntime/src/core/sys/windows/w32api.d.

At least, the value should be 0x600(the version bundled with WinXP),
otherwise some GUI enhansements (switch by that) are ignored because they are
shared with the OS.


Note:
If someone made an old app for Win98 or 2000 with the Win32 Bindings
_AND_ he has fixed it for the current druntime,
it may be subject to change.

--


[Issue 16657] [The D Bug Tracker]

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16657

--- Comment #1 from Eyal  ---
Minor correction: opCmp is not auto-generated anyway and opEquals should just
be exhaustive and not lexicographic.

--


[Issue 16657] New: [The D Bug Tracker]

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16657

  Issue ID: 16657
   Summary: [The D Bug Tracker]
   Product: D
   Version: D2
  Hardware: All
   URL: http://dlang.org/
OS: All
Status: NEW
  Severity: enhancement
  Priority: P3
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: e...@weka.io

When adding an "alias this" to a type, the automatic opEquals and opCmp that
compare the object lexicographically are removed and instead only the alias
this portion of the type is compared via its opEquals/opCmp.

struct A {
int x;
}

struct B {
A a, b;
}
static assert(B(A(1), A(1)) != B(A(1), A(2))); // Works

struct C {
A a, b;
alias a this;
}
static assert(C(A(1), A(1)) != C(A(1), A(2))); // Fails!

Adding alias this should NOT cause a preference for the base type's
comparators.

--


[Issue 2742] std.stdio assumes console works in utf-8

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2742

Martin Krejcirik  changed:

   What|Removed |Added

 CC||m...@krej.cz
   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=15761

--


[Issue 15761] Windows wide character console output broken with MS runtime

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15761

Martin Krejcirik  changed:

   What|Removed |Added

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

--


[Issue 16655] lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655

ag0ae...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||ag0ae...@gmail.com
 Resolution|--- |INVALID

--- Comment #3 from ag0ae...@gmail.com ---
(In reply to Nick Treleaven from comment #0)
> The static asserts below fail:
> 
> struct Color {struct Red {}}
> 
> unittest {
>   import std.traits;
> 
>   alias ls = (string) => "string";
>   static assert(isSomeFunction!ls);
> 
>   with (Color) {
>   alias lc = (Red) => "red";
>   static assert(isSomeFunction!lc);
>   }
> }

This is a gotcha, but it's not a bug. In a function literal, a single
identifier is interpreted as the name of the parameter, not the type. So
`string` and `Red` do not refer to the types of the same names, but they're
parameter names. Consequently, ls and lc are not functions, but templates,
because the parameters are not typed yet.

Closing as invalid. Please reopen if I'm missing something.

--


[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576

--- Comment #2 from Johan Engelen  ---
Bootcamp hint: start looking at `mangleVariable` in `VisualCPPMangler` in
cppmangle.d.

--


[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576

Johan Engelen  changed:

   What|Removed |Added

   Keywords||bootcamp

--


[Issue 15576] extern(C++, namespace) wrong mangling of variables (Windows)

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576

Johan Engelen  changed:

   What|Removed |Added

Summary|extern(C++) wrong mangling  |extern(C++, namespace)
   ||wrong mangling of variables
   ||(Windows)

--


[Issue 15576] extern(C++) wrong mangling

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15576

Johan Engelen  changed:

   What|Removed |Added

 CC||jbc.enge...@gmail.com

--- Comment #1 from Johan Engelen  ---
I ran into the same problem.

Simpler reproducer:

D:
extern (C++, ep) extern __gshared int variable;

C++:
namespace ep {
  int variable;
}

--


[Issue 15984] [REG2.071] Interface contracts retrieve garbage instead of parameters

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15984

--- Comment #9 from MichaelZ  ---
If this can't be readily fixed, then what exactly must we do (or rather, not
do) in our code to avoid triggering the issue?

Must we avoid using pre- (and post?) conditions in an interface at all?
Or must we avoid using pre- (and post?) conditions on 'override' functions?
Or something else entirely?

So far we've had the issue pop up roughly 4 times, some of those after making
apparently unrelated changes; cleaning up the problematic places once and for
all now that we have the issue in mind, will avoid frustrating bug hunting in
the future...

--


[Issue 16656] move embedded zlib to a separate library

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16656

Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@erdani.com
   Assignee|nob...@puremagic.com|lucia.mcojoc...@gmail.com

--


[Issue 16656] New: move embedded zlib to a separate library

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16656

  Issue ID: 16656
   Summary: move embedded zlib to a separate library
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: c...@dawg.eu

We'd like to get rid of the embedded zlib in phobos.
https://github.com/dlang/phobos/tree/fd518eb310a9494cccf28c54892542b052c49669/etc/c/zlib

As a shared zlib is available on literally any non-Windows OS, we should prefer
using that over statically linking.

For Windows we can integrate a DLL and import library with out binary releases,
similarly to how we handle libcurl. That means someone documents and builds
zlib [¹], we upload the results to downloads.dlang.org/other, and integrate it
with the build script [²][³].

[¹]: https://wiki.dlang.org/Curl_on_Windows
[²]:
https://github.com/dlang/installer/blob/8b3c7efe1e049f73ec5fc526a849904bf80b434d/create_dmd_release/build_all.d#L451
[³]:
https://github.com/dlang/installer/blob/8b3c7efe1e049f73ec5fc526a849904bf80b434d/create_dmd_release/build_all.d#L232

--


[Issue 4542] [tdpl] TDPL NVI example results in linker error

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4542

Simon Na.  changed:

   What|Removed |Added

   Keywords||link-failure
 CC||eiderd...@gmail.com

--- Comment #16 from Simon Na.  ---
This bug is still in dmd 2.071.2 and 2.072.

I ran into this today, here's my reduced case:

interface IA {
package void f();
}
void main() {
IA a;
a.f();
}

Nothing new, but I'd like to nudge for resolution. :-) I dustmited my project
due to this bug. The linker error didn't help me.

If this is hard to fix, then maybe error out at compile-time as a hack?

-- Simon

--


[Issue 16655] lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655

--- Comment #2 from Nick Treleaven  ---
BTW parameter names aren't needed because the lambdas are used for
Algebraic().visit!Lambdas:
http://forum.dlang.org/post/pggfdcttxdpernjbx...@forum.dlang.org

--


[Issue 16655] lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655

--- Comment #1 from Nick Treleaven  ---
Workaround is to add parameter names:

alias ls = (string s) => "string";
alias lc = (Red r) => "red";

--


[Issue 16655] New: lambda with type alias parameter fails std.traits.isSomeFunction

2016-11-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16655

  Issue ID: 16655
   Summary: lambda with type alias parameter fails
std.traits.isSomeFunction
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: minor
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: n...@geany.org

The static asserts below fail:

struct Color {struct Red {}}

unittest {
import std.traits;

alias ls = (string) => "string";
static assert(isSomeFunction!ls);

with (Color) {
alias lc = (Red) => "red";
static assert(isSomeFunction!lc);
}
}

If you define ls, lc like this it works:

alias ls = (immutable(char)[]) => "string";
alias lc = (Color.Red) => "red";

--