[Issue 13211] Expand macros in comments within code sections

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13211

Vladimir Panteleev  changed:

   What|Removed |Added

   Keywords||ddoc
   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=12383
   Severity|enhancement |normal

--- Comment #3 from Vladimir Panteleev  ---
Whether or not macros should be expanded in code blocks at all, the current
behaviour is at least inconsistent, so there is certainly a bug here.

--


[Issue 12383] dlang.org operator overloading text with DDoc macro.

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12383

Vladimir Panteleev  changed:

   What|Removed |Added

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

--


[Issue 12648] Array operation return type

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12648

Vladimir Panteleev  changed:

   What|Removed |Added

   Hardware|x86 |All
 OS|Windows |All

--


[Issue 2347] opIs is missing

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2347

Vladimir Panteleev  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Hardware|x86 |All
 Resolution|--- |WONTFIX
 OS|Linux   |All

--- Comment #4 from Vladimir Panteleev  ---
(In reply to Stewart Gordon from comment #1)
> I think that having opIs is philosophically wrong.  The whole point of is is
> to override any type-defined equality operator by forcing a byte-for-byte
> comparison.  There are probably plenty of template libraries and the like
> that rely on this.

Agreed. Currently `is` provides a guarantee that it compares bits and will
never invoke any other user-defined comparison mechanisms. This applies to
user-defined types (structs, classes) as well as floating-point types (where
x==x may not always be true due to NaNs). An opIs operator would break that
guarantee.

User-defined smart references and slices could instead expose identity
comparison via a ".ptr" property, which could then be compared using `==` or
`is`.

Also, I understand that such language additions would need to be done via a DIP
today.

@Andrei: I'll close this (also because this issue is close to a decade old),
but please reopen if you disagree.

--


[Issue 7464] Better Error Message When Using S.tupleof within S

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7464

Vladimir Panteleev  changed:

   What|Removed |Added

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

--- Comment #2 from Vladimir Panteleev  ---
FWIW, the code compiled before https://github.com/dlang/dmd/pull/595.

--


[Issue 7190] Tuple length incorrect

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7190

Vladimir Panteleev  changed:

   What|Removed |Added

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

--


[Issue 10540] variable used before set for empty static arrays, with -inline -O

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10540

Vladimir Panteleev  changed:

   What|Removed |Added

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

--- Comment #2 from Vladimir Panteleev  ---
No longer reproducible after https://github.com/dlang/dmd/pull/3467, closing.
Please reopen if you can still provide a reproducible test case.

--


[Issue 7953] DMD Error: variable r used before set when compiling with -O

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7953

Vladimir Panteleev  changed:

   What|Removed |Added

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

--


[Issue 12212] Static array assignment makes slice implicitly

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12212

Vladimir Panteleev  changed:

   What|Removed |Added

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

--


[Issue 10540] variable used before set for empty static arrays, with -inline -O

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10540

Vladimir Panteleev  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--


[Issue 15537] Private function is not accessible from other module when compiling with -debug flag

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15537

Vladimir Panteleev  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Vladimir Panteleev  ---
The reason why this doesn't compile with -debug is mentioned briefly in the
assumeSorted documentation:

> In debug mode, a few random elements of r are checked for sortedness. 

-- https://dlang.org/library/std/range/assume_sorted.html

Thus, std.range is failing to use your private compare function when attempting
to perform this sortedness check.

Note that even if the code compiled without -debug, the result would still not
be useful, as you would not be able to pass the resulting SortedRange e.g. to
std.algorithm.searching.find. It would fail with the same problem, being unable
to access your private opCmp function.

Whether symbols passed by alias parameter should be exempted from visibility
checks is a separate matter.

You can work around this problem by making the comparison function public, but
also wrapping it inside a private struct:

private struct Hidden
{
public static bool myCmp(Data a, Data b) {
return a[0] < b[0];
}
}

auto bar() {
return [Data(1, "one"), Data(2, "two")].assumeSorted!(Hidden.myCmp);
}

--


[Issue 15537] Private function is not accessible from other module when compiling with -debug flag

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15537

Vladimir Panteleev  changed:

   What|Removed |Added

  Component|dmd |phobos

--


[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697

--- Comment #9 from Vladimir Panteleev  ---
OK, I got the Mercurial server running again, and uploaded a copy of the
repository to GitHub. The files are here:

https://github.com/CyberShadow/dstress/tree/master/run/a

Still, looking at these test cases, it's still questionable whether there is
much value in them. For instance, asm_di_02_A.d has:

const short x = 0x40404040;

This is clearly invalid code.

The `db 1+2` part of this issue is a valid enhancement request, but should be
filed separately. If you have a need for the feature in your programs, please
file a new enhancement request.

--


[Issue 17663] header generation (-H) is broken with public override of private default

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17663

Vladimir Panteleev  changed:

   What|Removed |Added

   Severity|enhancement |normal

--


[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697

--- Comment #8 from Vladimir Panteleev  ---
Stewart, "someone" is not enough. For a bug report to be useful, anyone should
be able to reproduce the issue. There is very little value in keeping open a
bug report where you have to go on an archaeology quest to find crucial
details.

Since you still have the files, please attach them here (or to a new bug
report)?

--


[Issue 16079] memoize should cache objects too

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16079

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

https://github.com/dlang/phobos/commit/9e58ecab2aa6eb2d800d1e7e0635f7eee1a774aa
Fix issue 16079 - memoize should work with arrays and objects

https://github.com/dlang/phobos/commit/aefb5892a3ee1dbbb3433db951e261f3a1b5635c
Merge pull request #4367 from wilzbach/fix_16079

Fix issue 16079 - memoize should work with arrays and objects

--


[Issue 15933] GDC support for core.cpuid

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15933

Marco Leise  changed:

   What|Removed |Added

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

--- Comment #1 from Marco Leise  ---
This was fixed in 2.072 with commit
https://github.com/dlang/druntime/commit/c230cd4d52de1b05d15f61f6fb6d0e74b084f5c9pidgi
as far as I understand the tag range given by GitHub.

--


[Issue 17663] New: header generation (-H) is broken with public override of private default

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17663

  Issue ID: 17663
   Summary: header generation (-H) is broken with public override
of private default
   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

Example breakage:

// test_di_gen.d:
private:
public struct Export {}

dmd -H generates the following di file:

// D import file generated from 'test_di_gen.d'
private public struct Export
{
}

Needless to say "private public" does not compile.

background: I use "private:" in beginning of all my modules/structs to reverse
the default - I want my exports to be explicit and narrow.

--


[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697

--- Comment #7 from Stewart Gordon  ---
(In reply to Vladimir Panteleev from comment #6)
> The original test case as presented in the issue description now works, as
> per comment 3, so I'm going to close this.
> 
> (In reply to Don from comment #5)
> > I'm reopening this since there are 7 dstress bugs which depend on it.
> 
> DStress is no longer online, so these are no longer easily available.

Doesn't follow - somebody might have a local copy of Dstress from back in the
day.  Indeed, I've found that I have.  Not sure how complete it is, but I've
found all of those listed in comment 5 therein.  As I try under DMD 2.074, they
all give a compile error.

--


[Issue 16412] instance variable shadowing with inheritance

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16412

feklushkin.de...@gmail.com changed:

   What|Removed |Added

 CC||feklushkin.de...@gmail.com

--


[Issue 16160] selective imports in aggregation shadow @property functions

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16160

feklushkin.de...@gmail.com changed:

   What|Removed |Added

 CC||feklushkin.de...@gmail.com

--


[Issue 12389] Operating system C functions should be marked as 'nothrow'

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12389

Vladimir Panteleev  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Vladimir Panteleev  ---
(In reply to qznc from comment #1)
> Resolved as of https://github.com/dlang/druntime/commit/3c9aee8fcb1d9 ?

Seems like it.

Closing; please reopen or file a new bug if any specific modules are still
missing the annotation.

--


[Issue 13039] combinations

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13039

Vladimir Panteleev  changed:

   What|Removed |Added

   Keywords||patch

--


[Issue 697] No const folding on asm db,dw, etc

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=697

Vladimir Panteleev  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #6 from Vladimir Panteleev  ---
The original test case as presented in the issue description now works, as per
comment 3, so I'm going to close this.

(In reply to Don from comment #5)
> I'm reopening this since there are 7 dstress bugs which depend on it.

DStress is no longer online, so these are no longer easily available.

Please reopen or file a new issue if you can provide a reproducible test case.

--


[Issue 9641] Wrong module init order when a thread is created in a module ctor

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9641

--- Comment #2 from Vladimir Panteleev  ---
(In reply to Martin Nowak from comment #1)
> I think the fix would need a mutex which blocks all created threads until
> all shared module constructors are finished. This might easily cause
> deadlocks though.

Sounds very similar to how Windows blocks threads created in DllMain. The
deadlock issue is there as well (threads will remain suspended until
initialization completes).

--


[Issue 17604] Reject mutable fields initialized with reference types to data segment

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17604

Vladimir Panteleev  changed:

   What|Removed |Added

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

--


[Issue 13646] static darray & pointer initializers always allocated in shared(global) memory rather than in TLS

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13646

Vladimir Panteleev  changed:

   What|Removed |Added

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

--


[Issue 7720] asm silent wrong code generation

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7720

Vladimir Panteleev  changed:

   What|Removed |Added

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

--- Comment #4 from Vladimir Panteleev  ---
No longer compiles since https://github.com/dlang/dmd/pull/4260, with error
message "cannot directly load TLS variable 'globalThreadLocal'".

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

--


[Issue 13938] IASM shouldn't be able to access TLS variables

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13938

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||deadal...@gmail.com

--- Comment #6 from Vladimir Panteleev  ---
*** Issue 7720 has been marked as a duplicate of this issue. ***

--


[Issue 5254] Low performance code with struct constructor

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5254

Vladimir Panteleev  changed:

   What|Removed |Added

   Hardware|x86 |All
 OS|Windows |All

--


[Issue 12930] static and the access modifiers aren't legal on the right-hand side of a function

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12930

Vladimir Panteleev  changed:

   What|Removed |Added

   Keywords||spec

--


[Issue 13584] "not callable using argument types" despite perfect match

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13584

Vladimir Panteleev  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Hardware|x86_64  |All
 Resolution|--- |WORKSFORME
 OS|Linux   |All

--- Comment #2 from Vladimir Panteleev  ---
I couldn't reproduce this issue, as reported. Closing, as this was reported in
2014 and has had no activity since 2015; if you can provide a reproducible test
case, please reopen.

--


[Issue 9991] Optimizer Doesn't Enregister Static Array Elements With Compile-Time Constant Index

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9991

--- Comment #5 from Vladimir Panteleev  ---
FWIW, after https://github.com/dlang/dmd/pull/6176 (2.073.0) the generated
assembly code changed, however a simple benchmark shows that performance did
not noticeably change.

--


[Issue 16512] std.allocator: Nullify the argument passed to allocator.dispose

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16512

Vladimir Panteleev  changed:

   What|Removed |Added

  Component|dmd |phobos
   Hardware|x86_64  |All
Summary|Nullify the argument passed |std.allocator: Nullify the
   |to allocator.dispose|argument passed to
   ||allocator.dispose
 OS|Linux   |All

--- Comment #1 from Vladimir Panteleev  ---
I understand this to be a std.allocator enhancement request (not a dmd issue as
originally filed), so I've updated the issue accordingly. Please update it if
I'm wrong.

--


[Issue 15297] std.stdio readf cryptic error message

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15297

Vladimir Panteleev  changed:

   What|Removed |Added

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

--- Comment #1 from Vladimir Panteleev  ---


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

--


[Issue 12260] Improve error of std.stdio.readf when involving whitespace

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12260

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||pastuho...@gmail.com

--- Comment #2 from Vladimir Panteleev  ---
*** Issue 15297 has been marked as a duplicate of this issue. ***

--


[Issue 11500] Bringing mixed-in operators and constructors to the overload set

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11500

Vladimir Panteleev  changed:

   What|Removed |Added

   Keywords||rejects-valid

--


[Issue 8204] Alias causes error: "auto can only be used for template function parameters"

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8204

--- Comment #2 from Vladimir Panteleev  ---
(In reply to dlang+issues from comment #0)
> void foo(T)(ref auto T v) { }
> alias foo!int bar; // Error: auto can only be used for template function
> parameters

What is the expected type of "bar" here? The compiler can't know whether the
instantiated function should take its parameter by ref or not, so I'm not sure
whether this issue is valid. What is the expected behaviour?

As a workaround, you can move the type to a separate outer template using the
eponymous template pattern:

template foo(T)
{
void foo()(auto ref T v) { }
}
alias foo!int bar;

Unfortunately, this breaks calling foo (as in `foo(5)`). The type will need to
be indicated explicitly (e.g. `foo!int(5)`).

--


[Issue 17224] Foreach documentation still refers to TypeTuples, rather than AliasSequences

2017-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17224

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

https://github.com/dlang/phobos/commit/c336bb96cf8a0a1b4be57c25d6ef59e3ef781b54
Issue 17224 - Remove std.typetuple from the documentation build

https://github.com/dlang/phobos/commit/df14606f997df393c49a7e9e8b494e4fb57913b0
Merge pull request #5485 from wilzbach/remove-typetuple-from-docs

Issue 17224 - Remove std.typetuple from the documentation build
merged-on-behalf-of: Andrei Alexandrescu 

--