[Issue 23750] log1p for floats/doubles not actually providing extra accuracy

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23750

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@ibuclaw created dlang/phobos pull request #8701 "fix Issue 23750 - log1p for
floats/doubles not actually providing extra accuracy" fixing this issue:

- fix Issue 23750 - log1p for floats/doubles not actually providing extra
accuracy

https://github.com/dlang/phobos/pull/8701

--


[Issue 11316] Some cases of missing delegate argument type inference

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11316

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #5 from Dlang Bot  ---
dlang/dmd pull request #14929 "Fix 11316: Infer storage class of parameters
with function literals" was merged into master:

- 9ec4f41e332186154213f939b57f616933086211 by Geod24:
  Fix 11316: Infer storage class of parameters with function literals

  This will allow improving functional style code by seamlessly
  adding `ref` (or `in`) and having the compiler do the job.

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

--


[Issue 18472] [Reg 2.078] betterC: cannot use format at compile time.

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18472

--- Comment #16 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #14930 "fix Issue 18472: betterC
cannot use format at compile time" fixing this issue:

- fix Issue 18472: betterC cannot use format at compile time

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

--


[Issue 23739] Can't return by ref from opApply iteration

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23739

--- Comment #4 from timon.g...@gmx.ch ---
(In reply to kinke from comment #2)
> The 1st testcase just requires a `foreach (ref x; s)`, which I think is
> consistent.
> 
> The 2nd one never sets `S.x` before dereferencing it, so adding `ref` there
> still causes a segfault.

Oops. Indeed I screwed up when trying to create a reduced test case... My bad.
Thanks!(In reply to timon.gehr from comment #3)
> (In reply to kinke from comment #2)
> > The 1st testcase just requires a `foreach (ref x; s)`, which I think is
> > consistent.
> > 
> > The 2nd one never sets `S.x` before dereferencing it, so adding `ref` there
> > still causes a segfault.
> 
> Oops. Indeed I screwed up when trying to create a reduced test case... My
> bad. Thanks!

See Issue 23751.

--


[Issue 23751] Returning by ref from opApply fools DIP1000

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23751

timon.g...@gmx.ch changed:

   What|Removed |Added

   Keywords||accepts-invalid, safe

--


[Issue 23739] Can't return by ref from opApply iteration

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23739

timon.g...@gmx.ch changed:

   What|Removed |Added

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

--


[Issue 23751] New: Returning by ref from opApply fools DIP1000

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23751

  Issue ID: 23751
   Summary: Returning by ref from opApply fools DIP1000
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: major
  Priority: P2
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: timon.g...@gmx.ch

DMD 2.102.1:

Test case 1:

---
struct S{
int x;
int opApply(scope int delegate(ref int x)@safe @nogc dg)@safe @nogc{
return dg(x);
}
}

ref int foo(ref S s)@safe @nogc{
foreach(ref x;s)
return x;
assert(0);
}

int *escapeStack()@safe{
S s;
return &foo(s);
}

void main()@safe{
import std.stdio;
auto p=escapeStack();
writeln(*p); // 0
writeln("overwrite stack");
writeln(*p); // garbage
}
---

Test case 2:

---
struct S{
int x;
int opApply(scope int delegate(ref int x)@safe @nogc dg)@safe @nogc{
return dg(x);
}
}

ref int foo(ref S s)@safe @nogc{
foreach(x;s)
return x;
assert(0);
}

int *escapeStack()@safe{
S s;
return &foo(s);
}

void overwriteStack(int depth)@safe{
auto s=S(2);
import std.stdio;
if(depth==0) writeln("overwrite stack: ",s);
else overwriteStack(depth-1);
}

void main()@safe{
import std.stdio;
auto p=escapeStack();
writeln(*p); // 0
overwriteStack(10);
writeln(*p); // garbage
}
---

(Partial reboot of Issue 23739 with proper test cases.)

--


[Issue 11316] Some cases of missing delegate argument type inference

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11316

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #4 from Dlang Bot  ---
@Geod24 created dlang/dmd pull request #14929 "Fix 11316: Infer storage class
of parameters with function literals" fixing this issue:

- Fix 11316: Infer storage class of parameters with function literals

  This will allow improving functional style code by seamlessly
  adding `ref` (or `in`) and having the compiler do the job.

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

--


[Issue 23750] New: log1p for floats/doubles not actually providing extra accuracy

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23750

  Issue ID: 23750
   Summary: log1p for floats/doubles not actually providing extra
accuracy
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: john.michael.h...@gmail.com

As discussed in issue 23677 [1], overloads for log1p were recently added for
floats and doubles. However, these versions don't seem to actually be providing
the additional accuracy that the CEPHES implementation that it is based on
provides. These functions forward to a logImpl function that seems to have some
the CEPHES code, but doesn't actually produce the more accurate result that
CEPHES provides.

I adapted the code below based on a CEPHES mirror [2] for doubles. This
implementation of log1p provides a much more accurate result than the
implementation in phobos (not shown, but comparing to the result before these
overloads were added). Moreover, it doesn't experience the same failure when
the value of x gets smaller. 

I compiled with DMD 2.102. 

```d
enum double SQRTH = 0.70710678118654752440;
enum double SQRT2 = 1.41421356237309504880;

double log1p(double x) {
import std.math.exponential: log;
import std.math.algebraic: poly;
static immutable double[] LP = [
 2.0039553499201281259648E1,
 5.7112963590585538103336E1,
 6.0949667980987787057556E1,
 2.9911919328553073277375E1,
 6.5787325942061044846969E0,
 4.9854102823193375972212E-1,
 4.527862445199635215E-5,
];
static immutable double[] LQ = [
 6.0118660497603843919306E1,
 2.1642788614495947685003E2,
 3.0909872225312059774938E2,
 2.2176239823732856465394E2,
 8.3047565967967209469434E1,
 1.5062909083469192043167E1,
 1.00E0,
];
double z = 1.0 + x;
if ((z < SQRTH) || (z > SQRT2))
return log(z);
z = x * x;
z = -0.5 * z + x * (z * poly(x, LP) / poly(x, LQ));
return x + z;
}

void main() {
import std.stdio;
static import std.math;
double x = 1e-15;
double y = std.math.log(1 + x);
double z1 = log1p(x);
double z2 = std.math.log1p(x);
double z3 = log1p(x / 10);
double z4 = std.math.log1p(x / 10);
writefln("the value of x is %.20e", x);//prints around 1.0e-15
writefln("the value of y is %.20e", y); //prints around 1.11e-15
writefln("the value of z1 is %.20e", z1); //prints around 9.99e-16
writefln("the value of z2 is %.20e", z2); //prints around 1.11e-15
writefln("the value of z3 is %.20e", z3); //prints around 1.0e-15
writefln("the value of z4 is %.20e", z4); //prints 0
}
```

[1] https://issues.dlang.org/show_bug.cgi?id=23677
[2] https://github.com/jeremybarnes/cephes/blob/master/cprob/unity.c

--


[Issue 19346] std.math log* functions only have real versions

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19346

--- Comment #2 from John Hall  ---
Not entirely, it seems the additions of `log1p` overloads for float and double
have messed with the accuracy of those functions (beyond what is to be expected
as a result of not doing intermediate calculations with reals). See:
https://issues.dlang.org/show_bug.cgi?id=23750

--


[Issue 23747] 'auto ref' function return signature does not flag escaping a reference to local variable

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23747

--- Comment #2 from Mike S  ---
Ah noted, that is perhaps my mistake then. Looking at the specification again
with this in mind, I now see how 'auto ref' is deducing the 'refness' of a
function.

This means 'auto ref' snd 'ref auto' have different meanings then to be clear? 

- 'auto ref' deducing if it is possible to return by reference, and 'ref auto'
explicitly indicating return by reference, and deduce the type (e.g. auto may
be a double if possible return values are 1.0 and 1)

--


[Issue 23677] log1p Documentation Doesn't Match Implementation

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23677

--- Comment #2 from John Hall  ---
I double-checked and log1p doesn't provide the same accuracy as the CEPHES
implementation for doubles.

--


[Issue 23749] Can't writeln a static array of strings with -preview=dip1000

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23749

Paul Backus  changed:

   What|Removed |Added

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

--- Comment #1 from Paul Backus  ---
No error when using DMD+Phobos master, so it looks like this has already been
fixed.

--


[Issue 23749] New: Can't writeln a static array of strings with -preview=dip1000

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23749

  Issue ID: 23749
   Summary: Can't writeln a static array of strings with
-preview=dip1000
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: snarwin+bugzi...@gmail.com

As of DMD 2.102.1, the following program fails to compile when using
-preview=dip1000:

---
import std.stdio;

void main() @safe
{
string[1] a = ["hello"];
writeln(a);
}
---

The error message is:

---
bug.d(6): Error: `@safe` function `D main` cannot call `@system` function
`std.stdio.writeln!(string[1]).writeln`
/usr/include/dmd/phobos/std/stdio.d(1708):which calls
`std.stdio.File.write!(string[1], char).write`
/usr/include/dmd/phobos/std/format/write.d(527):which calls
`std.format.write.formattedWrite!(LockingTextWriter, char,
string[1]).formattedWrite`
/usr/include/dmd/phobos/std/format/write.d(1231):which calls
`std.format.write.formatValue!(LockingTextWriter, string[1], char).formatValue`
/usr/include/dmd/phobos/std/format/internal/write.d(1340):which calls
`std.format.internal.write.formatValueImpl!(LockingTextWriter, string[1],
char).formatValueImpl`
/usr/include/dmd/phobos/std/format/internal/write.d(1344):which was
inferred `@system` because of:
/usr/include/dmd/phobos/std/format/internal/write.d(1344):reference to
local variable `obj` assigned to non-scope parameter `obj` calling
`formatValueImpl`
/usr/include/dmd/phobos/std/stdio.d(4209):   
`std.stdio.writeln!(string[1]).writeln` is declared here
---

--


[Issue 23739] Can't return by ref from opApply iteration

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23739

timon.g...@gmx.ch changed:

   What|Removed |Added

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

--- Comment #3 from timon.g...@gmx.ch ---
(In reply to kinke from comment #2)
> The 1st testcase just requires a `foreach (ref x; s)`, which I think is
> consistent.
> 
> The 2nd one never sets `S.x` before dereferencing it, so adding `ref` there
> still causes a segfault.

Oops. Indeed I screwed up when trying to create a reduced test case... My bad.
Thanks!

--


[Issue 21504] Incorrect eponymous overload called by codegen

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21504

--- Comment #1 from Vladimir Panteleev  ---
LDC segfaults instead of producing wrong code:

 #0 0x7f8155ed545a (/usr/lib/libLLVM-14.so+0xcd545a)
 #1 0x7f8155ed2aef llvm::sys::RunSignalHandlers()
(/usr/lib/libLLVM-14.so+0xcd2aef)
 #2 0x7f8155ed2c3d (/usr/lib/libLLVM-14.so+0xcd2c3d)
 #3 0x7f8154c51a00 (/usr/lib/libc.so.6+0x38a00)
 #4 0x55c5f0bed781 DtoLVal(DValue*) (/usr/bin/ldc2+0x98b781)
 #5 0x55c5f0bd86d9 DtoArrayPtr(DValue*) (/usr/bin/ldc2+0x9766d9)
 #6 0x55c5f0bd91f8 DtoArrayAssign(Loc const&, DValue*, DValue*, EXP, bool)
(/usr/bin/ldc2+0x9771f8)
 #7 0x55c5f0b25406 DtoAssign(Loc const&, DValue*, DValue*, EXP, bool)
(/usr/bin/ldc2+0x8c3406)
 #8 0x55c5f0b8823d (/usr/bin/ldc2+0x92623d)
 #9 0x55c5f0b7ab86 toElem(Expression*) (/usr/bin/ldc2+0x918b86)
#10 0x55c5f0b25c54 DtoVarDeclaration(VarDeclaration*)
(/usr/bin/ldc2+0x8c3c54)
#11 0x55c5f0b293a3 DtoDeclarationExp(Dsymbol*) (/usr/bin/ldc2+0x8c73a3)
#12 0x55c5f0b856cc (/usr/bin/ldc2+0x9236cc)
#13 0x55c5f0b7ae16 toElemDtor(Expression*) (/usr/bin/ldc2+0x918e16)
#14 0x55c5f0b63b59 (/usr/bin/ldc2+0x901b59)
#15 0x55c5f0b63189 (/usr/bin/ldc2+0x901189)
#16 0x55c5f0b63189 (/usr/bin/ldc2+0x901189)
#17 0x55c5f0b62a3f Statement_toIR(Statement*, IRState*)
(/usr/bin/ldc2+0x900a3f)
#18 0x55c5f0b1af6d DtoDefineFunction(FuncDeclaration*, bool)
(/usr/bin/ldc2+0x8b8f6d)
#19 0x55c5f0bec420 (/usr/bin/ldc2+0x98a420)
#20 0x55c5f0bec366 Declaration_codegen(Dsymbol*) (/usr/bin/ldc2+0x98a366)
#21 0x55c5f0b32422 codegenModule(IRState*, Module*)
(/usr/bin/ldc2+0x8d0422)
#22 0x55c5f0bffddd ldc::CodeGenerator::emit(Module*)
(/usr/bin/ldc2+0x99)
#23 0x55c5f0bce74c codegenModules(Array&) (/usr/bin/ldc2+0x96c74c)
#24 0x55c5f0852a2a mars_mainBody(Param&, Array&, Array&) (/usr/bin/ldc2+0x5f0a2a)
#25 0x55c5f0bd19f7 cppmain() (/usr/bin/ldc2+0x96f9f7)
#26 0x55c5f0d81d8c _D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv
(/usr/bin/ldc2+0xb1fd8c)
#27 0x55c5f0d81ba6 _d_run_main2 (/usr/bin/ldc2+0xb1fba6)
#28 0x55c5f0d819fe _d_run_main (/usr/bin/ldc2+0xb1f9fe)
#29 0x55c5f0670c86 main (/usr/bin/ldc2+0x40ec86)
#30 0x7f8154c3c290 (/usr/lib/libc.so.6+0x23290)
#31 0x7f8154c3c34a __libc_start_main (/usr/lib/libc.so.6+0x2334a)
#32 0x55c5f0673115 _start (/usr/bin/ldc2+0x45)
Error: Error executing /usr/bin/ldc2: Segmentation fault (core dumped)

--


[Issue 23743] wrong code with `foreach`, `ubyte`, `>=`, ternary operator

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23743

Ketmar Dark  changed:

   What|Removed |Added

 CC||ket...@ketmar.no-ip.org

--


[Issue 23748] associative arrays need 2 lookups to remove and extract, should be 1

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23748

Bolpat  changed:

   What|Removed |Added

   Priority|P1  |P4
 CC||qs.il.paperi...@gmail.com

--


[Issue 23748] New: associative arrays need 2 lookups to remove and extract, should be 1

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23748

  Issue ID: 23748
   Summary: associative arrays need 2 lookups to remove and
extract, should be 1
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: qs.il.paperi...@gmail.com

There is no way to remove a key–value pair and extract the value with one
lookup. One has to make one lookup to get the value (if any), and another to
remove the pair.

Currently, the `remove` function returns a `bool` value indicating via `true`
that a key–value pair with the passed `key` was present, and `false` when it
was not.

This could be improved by instead returning a pointer to the value if they pair
existed, and `null` otherwise, i.e. exactly what `in` does, but additionally
removing the value.

With this enhancement, extract–remove is a trivial one-liner.
Compare this:
```d
Value* v = key in aa;
aa.remove(key);
if (v != null)
{
// handle the value
// *v is valid even after removal.
}
```
with this:
```d
if (Value* v = aa.remove(key))
{
// handle the value
}
```

There should be minimal breakage because most current uses of `remove` will
ignore its result anyways, and if not, the returned pointer converts to `true`
implicitly if it is not `null` and `null` to `false` in contexts where a `bool`
is required.

If that breakage cannot be tolerated or the new implementation is deemed
considerably more expensive than current `remove`, I suggest a new function by
the name `removeAndExtract` or (cf. Scott Mayers: `takeOut`).

--


[Issue 23677] log1p Documentation Doesn't Match Implementation

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23677

--- Comment #1 from John Hall  ---
It looks like my previous comment about CEPHES is in error. What is actually
happening is that the logImpl function has the CEPHES polynomials that are used
for log1p (at least I know it's true for doubles, I don't see them in the
CEPHES code for floats/long double, but I assume it is right).

In other words, the phobos log function seems to try to be more accurate for
values close to 1 in a way that is different from other programming languages
(which is why log1p is typically included as a separate function). 

I'm still showing some funky results for log1p(1.0e-15) vs. log1p(1.0e-16)
compared to when log1p did the calculation at real accuracy.

--


[Issue 23745] Segfault with forward reference mismatched override with undeclared type

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23745

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dmd pull request #14922 "Fix Issue 23745 - Segfault with forward
reference mismatched override with undeclared type" was merged into stable:

- 6558117012a9916353a9172ff99b4d2d395d1539 by RazvanN7:
  Fix Issue 23745 - Segfault with forward reference mismatched override with
undeclared type

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

--


[Issue 10186] default construction is disabled even if default ctor declared

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10186

RazvanN  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |FIXED

--- Comment #11 from RazvanN  ---
I cannot reproduce the first incarnations of this bug [1][2]. As for the 3rd
provided test case [3], the sample is indeed invalid because the array of
classes needs to enclose the the init value of the structs in the array
elements, thus violating the @disable this() of struct S.

As such, this bug has been fixed.

[1] https://issues.dlang.org/show_bug.cgi?id=10186#c0
[2] https://issues.dlang.org/show_bug.cgi?id=10186#c3
[3] https://issues.dlang.org/show_bug.cgi?id=10186#c10

--


[Issue 13577] More informative error message for refused immutable foreach loop

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13577

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@RazvanN7 created dlang/dmd pull request #14924 "Fix Issue 13577 - More
informative error message for refused immutable foreach loop" fixing this
issue:

- Fix Issue 13577 - More informative error message for refused immutable
foreach loop

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

--


[Issue 23747] 'auto ref' function return signature does not flag escaping a reference to local variable

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23747

RazvanN  changed:

   What|Removed |Added

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

--- Comment #1 from RazvanN  ---
This bug report is invalid.

All of the `auto ref` functions work as expected. `Auto ref` does not mean "ref
+ type deduction", but rather "deduce if a function may return by ref + type
deduction". In all the situations presented, the compiler sees that it returns
a reference to the stack and therefore chooses to drop the ref and return by
value.

You can add this code and see the types of the functions:

pragma(msg, typeof(&Func1)); -> int function() ref
pragma(msg, typeof(&Func2)); -> int function() pure nothrow @nogc @safe

I guess the spec indeed is misleading by stating that "they become ref
functions if all return expressions are lvalues". Actually, its more like "they
become ref functions, if possible".

--


[Issue 23671] Installer GPG key fails

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23671

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23691] compilable/test22294.i:16:1: error: unknown type name 'this'

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23691

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23719] runnable/test22071.c:22:16: error: ‘abc’ is a pointer; did you mean to use ‘->’?

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23719

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23692] ImportC: __pragma and __declspec are not documented as supported Visual C extensions

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23692

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23684] std.process.spawnProcess fails if ulimit is too large

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23684

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23746] ICE with bit-wise binops with vector masks

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23746

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23707] File.rawRead/rawWrite should support reading/writing individual values

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23707

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23659] Problem with < and > in C_HEADER_DESCRIPTION for core.stdc docs

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23659

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23627] lazy params don't allocate closures

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23627

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23733] Can't use template type parameter as type of alias parameter

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23733

--- Comment #3 from RazvanN  ---
(In reply to Paul Backus from comment #2)
> The spec you linked to says:
> 
> > Alias parameters can also be typed. These parameters will accept symbols of 
> > that type
> 
> ...which is not "tight" at all--it places no restrictions on the type
> whatsoever.

When I said "tight", I meant "brief, not too explanatory".

> 
> The *grammar* says that the type must be a BasicType, but the definition of
> BasicType is as follows:
> 
> > BasicType:
> > FundamentalType
> > . QualifiedIdentifier
> > QualifiedIdentifier
> > Typeof
> > Typeof . QualifiedIdentifier
> > TypeCtor ( Type )
> > Vector
> > TraitsExpression
> > MixinType
> 
> Since this includes QualifiedIdentifier, Typeof, and MixinType, it also does
> not place any restriction on the type used. And in any case, the example
> given in this issue parses successfully.
> 
> It's possible that the type was intended to be restricted in some way, but
> in that case, this is a bug in the spec. Either way, it is certainly not an
> enhancement request.

What I meant is that the way I read the spec, it seems that template alias
parameters would work only for concrete types. I don't know if this was
intentional or not, but if the design is extended to work for abstract types as
well, then that is an enhancement request. If the person that implemented this
did intend to exclude abstract types, then indeed it is a "normal" spec bug.

--


[Issue 23739] Can't return by ref from opApply iteration

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23739

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23687] IFTI fails forwarding an alias to struct field

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23687

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23714] compilable/testcstuff1.c:213:1: error: static assertion failed: u'ab' == 0x610062

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23714

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23704] need `this` for a function accessed through a member alias tuple

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23704

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23741] Functions in core.sys.windows.dbghelp should be marked @nogc nothrow

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23741

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23698] ImportC: __stdcall is not documented as supported MSVC/DMC extensions

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23698

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23675] Error on direct double.NaN comparison

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23675

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23713] compilable/testcstuff1.c:206:1: error: static assertion failed: sizeof(u'a') == 4

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23713

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23689] ImportC: C tests in the testsuite are not valid C

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23689

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23742] Functions in core.sys.windows.imagehlp should be marked @nogc nothrow

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23742

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23693] ImportC: Unclear documentation of #line and linemarker support

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23693

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23697] ImportC: No examples of invalid forward references in C code accepted by ImportC

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23697

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23712] ImportC: Unclear documentation of what type is inferred from integer literals (type of '9223372036854775808' is undefined)

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23712

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23744] Static If Compilation Differences / Attribute inference bug

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23744

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23718] runnable/initializer.c:583:10: error: cast specifies array type

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23718

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23735] 'extern' storage class affects function declarations

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23735

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23685] Confusing error with mutual imports

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23685

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23701] ImportC: __int64 is not documented as supported Visual C extension

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23701

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23747] 'auto ref' function return signature does not flag escaping a reference to local variable

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23747

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23708] Cannot return shared class with -preview=nosharedaccess

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23708

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23649] Incorrect alignof for struct member field

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23649

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23702] compilable/test23616.c:3:20: error: missing binary operator before token "("

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23702

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23648] Replace all sprintf with snprintf

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23648

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23715] ImportC: No rejection of _Thread_local variables declared at function scope without "static" as per C11 6.2.4-5

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23715

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23722] Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23722

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23699] ImportC: Unclear documentation that struct/union/enum introduce implicit typedefs in ImportC

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23699

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 23645] IFTI for templated overload set depends on order of overloads

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23645

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23677] log1p Documentation Doesn't Match Implementation

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23677

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23670] Add ability to not overwrite prompt (PS1)

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23670

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23646] A nastier forward reference bug

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23646

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23652] Valid code rejected with a "circular reference" error

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23652

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23740] Alias breaks valid array operation code using operator overloading

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23740

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23673] import dependencies should identify how they were imported

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23673

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23644] Reordering template parameters causes IFTI to fail

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23644

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23666] Recognize template opApply pattern

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23666

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23642] DMD installer should set up PATH in the same order as it was before reinstall

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23642

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23643] [betterC] Better Error Message For CTFE GC Usage

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23643

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23725] ImportC fails to parse __asm __volatile on FreeBSD stdatomic.h and fenv.h

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23725

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23665] Add traits

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23665

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23733] Can't use template type parameter as type of alias parameter

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23733

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23632] [ImportC] undefined identifier `_Float128`

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23632

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23664] Infer `const` for lambdas/closures

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23664

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23680] Support static classes in D

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23680

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23743] wrong code with `foreach`, `ubyte`, `>=`, ternary operator

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23743

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23629] importC: Need to support code coverage analysis

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23629

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23737] std.regex is slow to import and use

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23737

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23638] [betterC] Better Error Message For Runtime Usage

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23638

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 23745] Segfault with forward reference mismatched override with undeclared type

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23745

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@RazvanN7 created dlang/dmd pull request #14922 "Fix Issue 23745 - Segfault
with forward reference mismatched override with undeclared type" fixing this
issue:

- Fix Issue 23745 - Segfault with forward reference mismatched override with
undeclared type

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

--


[Issue 23745] Segfault with forward reference mismatched override with undeclared type

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23745

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com
   Severity|normal  |regression

--


[Issue 23730] Clarify IsExpression `Identifier :` and `== TypeCtor` spec

2023-02-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23730

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dlang.org pull request #3534 "[spec] Improve `is(Type == keyword)` and
Identifier docs" was merged into master:

- 759d5424087dea558944e5e2b7ed78804df5c5c1 by Nick Treleaven:
  Split up type vs pattern forms & add examples

  Add example of type implicitly converting to match pattern.
  Update `Identifier ==` example and add pattern example.
  Fixes Issue 23730 - Clarify IsExpression `Identifier :` and `==
  TypeCtor` spec.

https://github.com/dlang/dlang.org/pull/3534

--