Bug 24628 – Display of linkage in the compiler versus docs and examples

Status
NEW
Severity
minor
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-06-25T15:27:34Z
Last change time
2024-12-13T19:35:59Z
Assigned to
No Owner
Creator
Bolpat
Moved to GitHub: dmd#18250 →

Comments

Comment #0 by qs.il.paperinik — 2024-06-25T15:27:34Z
In the vast majority of uses, linkage is expressed without a space: e.g. `extern(C)` instead `extern (C)`, however, when DMD displays linkage, it inserts this space. ```d extern(C) void f() { } pragma(msg, typeof(&f)); ``` Prints: ``` extern (C) void function() ``` Expected: ``` extern(C) void function() ```
Comment #1 by nick — 2024-06-25T20:12:49Z
The spec uses a space, see code examples: https://dlang.org/spec/attribute.html#linkage The files I have open from dmd use a space by about 4:1. Not saying what's best, just providing some data points.
Comment #2 by robert.schadek — 2024-12-13T19:35:59Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18250 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB