[Issue 23430] ImportC include <> didn't work but quotes does

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23430

Ali Cehreli  changed:

   What|Removed |Added

   Keywords||ImportC
 CC||acehr...@yahoo.com

--


[Issue 23415] ImportC: typedef'd struct as const parameter "is not callable"

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23415

Ali Cehreli  changed:

   What|Removed |Added

   Keywords||ImportC

--


[Issue 23618] New: Right Shift equals expressions on unsigned shorts don't behave the same as regular shifts

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23618

  Issue ID: 23618
   Summary: Right Shift equals expressions on unsigned shorts
don't behave the same as regular shifts
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: maxha...@gmail.com

unittest {
const ushort tru = 1028;
ushort ee = tru;
ee <<= 5U;
ee >>= 5U;
assert(((tru << 5U) >> 5U) == ee);
}

Seems similar to regression 3583 from 2009

--


[Issue 23583] ImportC: undefined identifier __builtin___memmove_chk

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23583

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #3 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #14801 "fix Issue 23583 - ImportC:
undefined identifier __builtin___memmove_chk" fixing this issue:

- fix Issue 23583 - ImportC: undefined identifier __builtin___memmove_chk

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

--


[Issue 23583] ImportC: undefined identifier __builtin___memmove_chk

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23583

Walter Bright  changed:

   What|Removed |Added

Summary|ImportC: undefined  |ImportC: undefined
   |identifier  |identifier
   |`__builtin___memmove_chk`   |__builtin___memmove_chk

--


[Issue 23617] New: traits(child) compile error need this for something that doesn't need this

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23617

  Issue ID: 23617
   Summary: traits(child) compile error need this for something
that doesn't need this
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: P3
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: destructiona...@gmail.com

This code WORKS:

```
struct S {
void foo() {}
}

struct Wrapper {
  size_t currentIndex;
  S[] arrayOfS;
  auto opDispatch(string name, T ...)(T t) {
assert(currentIndex < arrayOfS.length);
alias member = __traits(getMember, S, name);
return __traits(child, arrayOfS[this.currentIndex], member)(t);
  }
}


void main() {
Wrapper w;
w.opDispatch!"foo"();
}
```

But change the alias to inline:

```
struct S {
void foo() {}
}

struct Wrapper {
  size_t currentIndex;
  S[] arrayOfS;
  auto opDispatch(string name, T ...)(T t) {
assert(currentIndex < arrayOfS.length);
// no more separate alias
return __traits(child, arrayOfS[this.currentIndex], __traits(getMember, S,
name))(t);
  }
}

void main() {
Wrapper w;
w.opDispatch!"foo"();
}
```

And get:

wtflol.d(10): Error: symbol expected as second argument of __traits `child`
instead of `this.foo`
wtflol.d(16): Error: template instance `wtflol.Wrapper.opDispatch!"foo"` error
instantiating



OR, change the `this.currentIndex` to just `currentIndex` in either example and
get:

wtflol.d(10): Error: need `this` for `currentIndex` of type `ulong`


So both arguments are attaching things incorrectly.

--


[Issue 23616] ImportC: clang __has_feature and __has_extension not recognized

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23616

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dmd pull request #14799 "fix Issue 23616 - ImportC: clang __has_feature
and __has_extension no…" was merged into master:

- ff13a7c69e25dcafc9a07a0dae5ce40604339c80 by Walter Bright:
  fix Issue 23616 - ImportC: clang __has_feature and __has_extension not
recognized

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

--


[Issue 20802] [REG2.088.0] Link failure with writefln

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20802

Iain Buclaw  changed:

   What|Removed |Added

 CC||ibuc...@gdcproject.org

--- Comment #1 from Iain Buclaw  ---
Now:
---
issue20802.o: in function
`_D4core8internal7switch___T14__switch_errorZQrFNaNbNiNfAyamZv':
issue20802.d:(.text._D4core8internal7switch___T14__switch_errorZQrFNaNbNiNfAyamZv[_D4core8internal7switch___T14__switch_errorZQrFNaNbNiNfAyamZv]+0x19):
undefined reference to
`_D4core9exception__T15__switch_errorTZQsFNaNbNiNeAyamZv'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

--


[Issue 22495] SECURITY: unicode directionality overrides should be rejected

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22495

Iain Buclaw  changed:

   What|Removed |Added

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

--- Comment #6 from Iain Buclaw  ---
This was fixed.

--


[Issue 22374] [REG 2.093] 'import std;' with -checkaction=context causes link error

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22374

Iain Buclaw  changed:

   What|Removed |Added

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

--


[Issue 22902] dmd 2.099 regression: unittest -checkaction=context and import std.regex causes link error

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22902

Iain Buclaw  changed:

   What|Removed |Added

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

--


[Issue 23616] ImportC: clang __has_feature and __has_extension not recognized

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23616

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23078] importC: generated code shouldn't depend on druntime

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23078

--- Comment #2 from kinke  ---
The CI logs of that PR showing the required symbols from druntime are probably
unavailable by now. What I recall are the mentioned TypeInfos codegen'd into
those C object files, which reference the TypeInfo vtable from druntime etc.

--


[Issue 22099] scope(exit) / finally blocks not are always executed inside of a anonymous function

2023-01-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22099

Walter Bright  changed:

   What|Removed |Added

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

--- Comment #2 from Walter Bright  ---
The trouble here is that a RangeError is being thrown. A RangeError is an
Error, and finally blocks are not executed when unwinding an Error. The
rationale is that Errors are fatal, and may be thrown because the program has
entered an invalid state. Executing finally blocks may cause further undefined
behavior.

Changing the exception type to Exception causes the program to work as
expected, as Exceptions execute finally blocks when unwinding.

Marked as INVALID.

--