[Issue 23871] ImportC: __attribute not recognized

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

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dmd pull request #15160 "fix Issue 23871 - ImportC: __attribute not
recognized" was merged into master:

- d9686e153fe35aaf101e841930c820b7e41ace7e by Walter Bright:
  fix Issue 23871 - ImportC: __attribute not recognized

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

--


[Issue 23864] importC fails on assert( pointer != NULL )

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

Walter Bright  changed:

   What|Removed |Added

   Keywords||ImportC
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Walter Bright  ---
Therefore, since the original bug for this issue was fixed, I created a new
issue from Steven's report.

https://issues.dlang.org/show_bug.cgi?id=23875

and closed this one as already fixed.

--


[Issue 23875] New: ImportC: __attribute__ in a cast doesn't work

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

  Issue ID: 23875
   Summary: ImportC: __attribute__ in a cast doesn't work
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: bugzi...@digitalmars.com

int pluto()
{
(__attribute__((__vector_size__ (16))) int) {4,1,2,3};
}

produces:

test.c(5): Error: expression expected, not `__attribute__`
test.c(5): Error: found `int` when expecting `)`
test.c(5): Error: found `)` when expecting `;` following statement
test.c(5): Error: found `}` when expecting `;` following statement
test.c(7): Error: found `End of File` when expecting `}` following compound
statement

--


[Issue 23875] ImportC: __attribute__ in a cast doesn't work

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

Walter Bright  changed:

   What|Removed |Added

   Keywords||ImportC

--


[Issue 23864] importC fails on assert( pointer != NULL )

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

Walter Bright  changed:

   What|Removed |Added

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

--


[Issue 23875] ImportC: __attribute__ in a cast doesn't work

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

Walter Bright  changed:

   What|Removed |Added

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

--


[Issue 23864] importC fails on assert( pointer != NULL )

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

--- Comment #5 from Walter Bright  ---
(In reply to Steven Schveighoffer from comment #3)
> Walter, this is the same issue I got when building stb_image.h (one of them)

Your's appears to be a completely different problem, which is:

__attribute__((__vector_size__ (16))) int

--


[Issue 23864] importC fails on assert( pointer != NULL )

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

--- Comment #4 from Walter Bright  ---
(In reply to emteria_wegwerf from comment #2)
> I get
> 
> $ dmd test.i
> test.c(8): Error: expression expected, not `{`

This is because of the expression statement. This problem was fixed with:

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

--


[Issue 23874] -profile=gc segfaults / ICE regression

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

--- Comment #2 from Jan Jurzitza  ---
alternative reproduction that works with master:

reduced2.d
```
string myToString()
{
}

enum x = myToString ~ "";
```
dmd -c -profile=gc reduced2.d

this one regressed in
https://github.com/dlang/dmd/commit/1db1ba87fd23d45f1bffaea07efe7dc8070ffef1

different commit, but the issue is also introduced by template translation
here. So it looks like there is some issue further up

blocks the same msgpack-d / DCD project

--


[Issue 23874] -profile=gc segfaults / ICE regression

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

--- Comment #1 from Jan Jurzitza  ---
note: the code to reproduce has been fixed with
https://github.com/dlang/dmd/commit/abb7836dd705be4f3c82e606b31d54dd69276476 on
master, but that did not seem intentional and I'm keeping this open until the
real regression cause has been identified and can be confirmed fixed by this.

Regression was introduced by
https://github.com/dlang/dmd/commit/276ef2145b2cab876c82845d2d1e943847ea2f3a

--


[Issue 23871] ImportC: __attribute not recognized

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #15160 "fix Issue 23871 - ImportC:
__attribute not recognized" fixing this issue:

- fix Issue 23871 - ImportC: __attribute not recognized

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

--


[Issue 23871] ImportC: __attribute not recognized

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

Walter Bright  changed:

   What|Removed |Added

   Keywords||ImportC

--


[Issue 23871] ImportC: __attribute not recognized

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

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com
Summary|ImportC:|ImportC: __attribute not
   |__attribute((noreturn)) not |recognized
   |recognized  |

--


[Issue 23874] New: -profile=gc segfaults / ICE regression

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

  Issue ID: 23874
   Summary: -profile=gc segfaults / ICE regression
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: d.b...@webfreak.org

reproduction:

reduced.d
```
static if (is(typeof(new Object(
void foo()
{
}
```

dmd -c -profile=gc reduced.d

currently breaks building msgpack-d / DCD with profile-gc, which is needed for
CI / measuring memory usage in a PR.

Regressed with DMD 2.103.0

--


[Issue 23873] New: [ICE] segfault on imported `static if ; else auto x`

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

  Issue ID: 23873
   Summary: [ICE] segfault on imported `static if ; else auto x`
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: d.b...@webfreak.org

foo.d
```
struct Foo
{
import bar;
}
```

bar.d
```
static if ;
else auto x
```

interesting note: if `Foo` is a function and not an aggregate type, this
doesn't ICE.

--


[Issue 23870] ImportC doesn't accept '\' followed by newline, whereas VC does

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

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #7 from Dlang Bot  ---
dlang/dmd pull request #15157 "fix Issue 23870 - ImportC doesn't accept '\'
followed by newline, whe…" was merged into master:

- d4e10579275a360daf23b5853b0f8472df571b14 by Walter Bright:
  fix Issue 23870 - ImportC doesn't accept '\' followed by newline, whereas VC
does

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

--


[Issue 23870] ImportC doesn't accept '\' followed by newline, whereas VC does

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #6 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #15157 "fix Issue 23870 - ImportC
doesn't accept '\' followed by newline, whe…" fixing this issue:

- fix Issue 23870 - ImportC doesn't accept '\' followed by newline, whereas VC
does

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

--


[Issue 23870] ImportC doesn't accept '\' followed by newline, whereas VC does

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

--- Comment #5 from Walter Bright  ---
(In reply to Max Samukha from comment #4)
> Note that VC compiler still accepts the code with the \.

I know. It's still a bug in that compiler. I've noticed many times over the
years that when there's a bug in VC, somebody writes code that relies on it.
Sigh :-)

--


[Issue 22739] Segmentation fault in CppMangleVisitor.headOfType

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

--- Comment #3 from Dlang Bot  ---
dlang/dmd pull request #15156 "merge stable" was merged into master:

- bd23d5972b551e233bb08337f4735060edd5ff1c by Razvan Nitu:
  Fix Issue 22739 - Segmentation fault in CppMangleVisitor.headOfType (#15098)

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

--


[Issue 23859] [REG 2.103] Throwing while in a deep callstack causes memory corruption

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

--- Comment #3 from Dlang Bot  ---
dlang/dmd pull request #15156 "merge stable" was merged into master:

- ca016bd979a479c47942c2a472d62dc03bfe21a2 by Rainer Schuetze:
  fix issue 23859 - [REG 2.103] Throwing while in a deep callstack causes
memory corruption (#15127)

  avoid writing beyond the end of the trace buffer

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

--


[Issue 20090] Header generation wrongfully outputs constructor bodies

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

--- Comment #5 from Dlang Bot  ---
dlang/dmd pull request #15156 "merge stable" was merged into master:

- 4531b0c6ca7c9218b8d22ae309e44273da880fc4 by Razvan Nitu:
  Fix Issue 20090 - Header generation wrongfully outputs constructor bodies
(#15115)

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

--


[Issue 23816] Typing invalid mnemonic in asm{} block segfaults

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

--- Comment #4 from Dlang Bot  ---
dlang/dmd pull request #15156 "merge stable" was merged into master:

- b2a24bb959d521d367d9b26b6a67683a3ce480d1 by Razvan Nitu:
  Fix Issue 23816 - Typing invalid mnemonic in asm{} block segfaults (#15060)

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

--


[Issue 22857] Segfault for malformed static if in imported template

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

--- Comment #3 from Dlang Bot  ---
dlang/dmd pull request #15156 "merge stable" was merged into master:

- 997b00bf45eb4ad2cd97c6cb872308e9797bcf0a by Razvan Nitu:
  Fix Issue 22857 - Segfault for malformed static if in imported template
(#15097)

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

--


[Issue 22765] Assertion failure in CppMangleVisitor.template_args

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

--- Comment #4 from Dlang Bot  ---
dlang/dmd pull request #15156 "merge stable" was merged into master:

- b7b1d8f83a5ed66035ff26cc619a1dcd4f6717fa by Razvan Nitu:
  Fix Issue 22765 - Assertion failure in CppMangleVisitor.template_args
(#15100)

- dc9aeabc2383d39adcd4bb3955083f396c01a592 by Razvan Nitu:
  Fix Issue 22765 for windows (#15118)

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

--


[Issue 19454] Name collisions with unnamed function parameters

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

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #4 from Dlang Bot  ---
dlang/dmd pull request #15153 "Fix 19454 - Name collisions with unnamed
function parameters" was merged into master:

- ba2f9222fd46cb450332dbad776b19767d3f2d42 by Dennis Korpel:
  Fix 19454 - Name collisions with unnamed function parameters

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

--


[Issue 14478] isInputRange should allow ranges of non-copyable elements

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

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #18 from Dlang Bot  ---
dlang/phobos pull request #8721 "fix 14478: support non-copyable elements in
many range algorithms" was merged into master:

- 1e161a0e0ecc5fd9dba2996ec883e371adb66aae by WebFreak001:
  fix 14478: support non-copyable elements in many range algorithms

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

--


[Issue 19454] Name collisions with unnamed function parameters

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #3 from Dlang Bot  ---
@dkorpel created dlang/dmd pull request #15153 "Fix 19454 - Name collisions
with unnamed function parameters" fixing this issue:

- Fix 19454 - Name collisions with unnamed function parameters

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

--


[Issue 23865] duplicate alias not detected

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

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com
   Severity|minor   |critical

--- Comment #1 from RazvanN  ---
Using `back` when `element` is aliased leads to an ice:

  class AssignableRange
  {
  int element;
  int front()
  {
  return element;
  }
  alias back = front;

  void front(int newValue)
  {
  element = newValue;
  }
  alias back = element;
  }

  void main()
  {
  AssignableRange a = new AssignableRange();

  a.back;   
  }

core.exception.AssertError@src/dmd/access.d(341): Non overloadable Aliasee in
overload list

--


[Issue 23870] ImportC doesn't accept '\' followed by newline, whereas VC does

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

--- Comment #4 from Max Samukha  ---
(In reply to Walter Bright from comment #3)

> (It should not do that.)

Note that VC compiler still accepts the code with the \.

> I'll see what I can do about it.

Nice, thanks!

--


[Issue 23872] Wrong example in Interfacing to C: Calling printf section

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

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #3 from Dlang Bot  ---
dlang/dlang.org pull request #3594 "Fix issue 23872 - Wrong example in
Interfacing to C, calling `printf`" was merged into master:

- 19fb81762be53e4bbcc6182a40dd840723d48569 by Petar Kirov:
  Fix issue 23872 - Wrong example in Interfacing to C, calling `printf`

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

--


[Issue 23872] Wrong example in Interfacing to C: Calling printf section

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

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@PetarKirov created dlang/dlang.org pull request #3594 "Fix issue 23872 - Wrong
example in Interfacing to C, calling `printf`" fixing this issue:

- Fix issue 23872 - Wrong example in Interfacing to C, calling `printf`

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

--


[Issue 23872] New: Wrong example in Interfacing to C: Calling printf section

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

  Issue ID: 23872
   Summary: Wrong example in Interfacing to C: Calling printf
section
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: petar.p.ki...@gmail.com

--


[Issue 23872] Wrong example in Interfacing to C: Calling printf section

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

--- Comment #1 from ZombineDev  ---
Reported here:
https://forum.dlang.org/post/wodeaztcqwxulrfrg...@forum.dlang.org

--


[Issue 23870] ImportC doesn't accept '\' followed by newline, whereas VC does

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

--- Comment #3 from Walter Bright  ---
(In reply to Max Samukha from comment #2)
> In the original test code, \ is immediately followed by a newline. You or
> your text editor must have added the space.

I see you are right. I don't know how that space got in there!

Running VC preprocessor without the trailing space still emits the \ into its
output. (It should not do that.) This explains the behavior you are seeing.
I'll see what I can do about it.

Thanks for the help!

--