Bug 23952 – Cannot declare pointer to function with linkage

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-06-01T14:27:26Z
Last change time
2024-12-13T19:29:22Z
Assigned to
No Owner
Creator
Bolpat
Moved to GitHub: dmd#18171 →

Comments

Comment #0 by qs.il.paperinik — 2023-06-01T14:27:26Z
Similar to issue 2753 (Cannot declare pointer to function returning ref), the type syntax cannot express explicit linkage of a function pointer: ```d alias CFunc = extern(C) int function(int); void f(CFunc fp) { } // okay pragma(msg, CFunc); void g(extern(C) int function(int) fp) { } // does not parse ``` The same is true for delegates: ```d struct S { int x; extern(C) int f() => x; } pragma(msg, typeof(&S().f)); // extern (C) int delegate() //void h(extern (C) int delegate() dg) { } // does not parse ```
Comment #1 by robert.schadek — 2024-12-13T19:29:22Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18171 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB