[Issue 15985] [REG2.068/2.069] Code doesn't link unless compiled with -debug

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #8 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #14855 "fix Issue 15985 -
[REG2.068/2.069] Code doesn't link unless compiled …" fixing this issue:

- fix Issue 15985 - [REG2.068/2.069] Code doesn't link unless compiled with
-debug

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

--


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

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

Ali Cehreli  changed:

   What|Removed |Added

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

--


[Issue 23662] ImportC bad handling of enum arguments for a function

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

Ali Cehreli  changed:

   What|Removed |Added

 CC||acehr...@yahoo.com
   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=23415

--


[Issue 23662] ImportC bad handling of enum arguments for a function

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

Walter Bright  changed:

   What|Removed |Added

   Keywords||ImportC

--


[Issue 23662] New: ImportC bad handling of enum arguments for a function

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

  Issue ID: 23662
   Summary: ImportC bad handling of enum arguments for a function
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: bugzi...@digitalmars.com

>From Dmytro Katyukha :

It seems that ImportC does not allow to pass enums declared with typedef but
without tag to function that receives enum as one of argument


## The code snippets:

```c
// testlib.c
typedef enum /*enum_test_1_t*/ {
E_TEST_1_ITEM_1 = 1,
E_TEST_1_ITEM_2,
} enum_test_1_t;

int some_func(enum_test_1_t val) {
return val;
}
```

```d
//test.d
import testlib;

void main(string[] args) {
enum_test_1_t val1 = E_TEST_1_ITEM_1;

some_func(E_TEST_1_ITEM_1);
}
```

## Attempt to compile produce following output

```
dmd test.d testlib.c
test.d(6): Error: function `testlib.some_func(__tag2 val)` is not callable
using argument types `(__anonymous)`
test.d(6):cannot pass argument `E_TEST_1_ITEM_1` of type `__anonymous`
to parameter `__tag2 val`
```

--


[Issue 23492] Enum types with float base don't match the spec

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

Nick Treleaven  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||n...@geany.org
 Resolution|--- |DUPLICATE

--- Comment #1 from Nick Treleaven  ---


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

--


[Issue 18578] First enum value assigned 0 instead of EnumBaseType.init

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

Nick Treleaven  changed:

   What|Removed |Added

 CC||ajiesk...@gmail.com

--- Comment #5 from Nick Treleaven  ---
*** Issue 23492 has been marked as a duplicate of this issue. ***

--


[Issue 4767] dmd generates useless template bloat

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

RazvanN  changed:

   What|Removed |Added

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

--- Comment #5 from RazvanN  ---
This seems to have been fixed.

nm on a.o simply yields:

 t 
 R _D1a12__ModuleInfoZ
 U _d_dso_registry
 U __start_minfo
 U __stop_minfo

--


[Issue 4447] order of functions greatly affects execution time

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

RazvanN  changed:

   What|Removed |Added

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

--


[Issue 23648] Replace all sprintf with snprintf

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@RazvanN7 updated dlang/dmd pull request #14854 "Fix Issue 23658 - replace uses
of sprintf with snprintf in the compiler" fixing this issue:

- Fix Issue 23648 - replace uses of sprintf with snprintf in the compiler

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

--


[Issue 23658] .di generation of variables should turn them into declarations

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

--- Comment #3 from Dlang Bot  ---
@RazvanN7 created dlang/dmd pull request #14854 "Fix Issue 23658 - replace uses
of sprintf with snprintf in the compiler" fixing this issue:

- Fix Issue 23658 - replace uses of sprintf with snprintf in the compiler

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

--


[Issue 23661] New: Using typeid from template inside __traits(compiles, ...) causes linker error

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

  Issue ID: 23661
   Summary: Using typeid from template inside __traits(compiles,
...) causes linker error
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: blocker
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: teodor.d...@gmail.com

The following code compiles fine to the object file, but linking fails with:

/usr/bin/ld:
bug.o:(.data._D36TypeInfo_S3bug4mainFZ9__lambda1MFZ1S6__initZ+0x28): undefined
reference to `_D3bug4mainFZ9__lambda1MFZ1S6__initZ'

---
__gshared int x;

void foo(T)()
{
auto x = typeid(T);
}

void main()
{
static assert(__traits(compiles,
{
struct S { int *p =  }
foo!S();
}));
}
---

The reason is that the init symbol of the TypeInfo is defined and requires a
relocation to S.init which is undefined:

$ readelf -r bug.o 
[...]
Relocation section
'.rela.data._D36TypeInfo_S3bug4mainFZ9__lambda1MFZ1S6__initZ' at offset 0x900
contains 5 entries:
  Offset  Info   Type   Sym. ValueSym. Name +
Addend
  001f0001 R_X86_64_64   
_D15TypeInfo_Struct6__ + 0
0018  001b0001 R_X86_64_64   
_D36TypeInfo_S3bug4mai + 88
0028  0021 R_X86_64_64   
_D3bug4mainFZ9__lambda + 0
0070  00210001 R_X86_64_64   
_D10TypeInfo_l6__initZ + 0
0080  00220001 R_X86_64_64   
_D6object__T10RTInfoIm + 0

This is blocking https://github.com/dlang/dmd/pull/14664.

--


[Issue 23661] Using typeid from template inside __traits(compiles, ...) causes linker error

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

Teodor Dutu  changed:

   What|Removed |Added

 CC||teodor.d...@gmail.com

--


[Issue 6583] cast() operation not fully specified

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@Robert21721 updated dlang/dlang.org pull request #3502 "Fix Issue  6583 -
cast() operation not fully specified" fixing this issue:

- fix issue 6583 - cast() operation not fully specified

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

--


[Issue 21132] Ff two keys in an associative array literal are equal

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

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dlang.org pull request #3505 "Fix Issue 21132 - Duplicate keys in an AA
literal" was merged into master:

- ca20a21178c3fd9b4be622f8b7848803dfe461d2 by Dumitrache Adrian-George:
  Fix Issue 21132 - Duplicate keys in an AA literal

  I specified the behavior of an associative array literal if pairs with the
same key are declared and offered an example.

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

--


[Issue 21132] Ff two keys in an associative array literal are equal

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@dumitrache-adrian92 created dlang/dlang.org pull request #3505 "Fix Issue
21132 - Duplicate keys in an AA literal" fixing this issue:

- Fix Issue 21132 - Duplicate keys in an AA literal

  I specified the behavior of an associative array literal if pairs with the
same key are declared and offered an example.

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

--


[Issue 22418] Error in documentation on strings

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@andraam21 updated dlang/dlang.org pull request #3501 "Fix issue 22418 - Error
in documentation on strings" fixing this issue:

- Fix Issue 22418

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

--