Bug 22959 – Documentation for C/D main is incomplete

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-29T20:56:44Z
Last change time
2022-04-04T09:29:45Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2022-03-29T20:56:44Z
Some aspects of the implementation is not found in the documentation for main functions (both C and D). - qualifiers are allowed for parameter / return types - enums with appropriate base types are allowed - extern(C) main may be used without -betterC - some valid signatures for extern(C) main are missing - no workaround for exotic main signatures
Comment #1 by dlang-bot — 2022-03-29T21:05:32Z
@MoonlightSentinel created dlang/dlang.org pull request #3266 "Fix 22959 - Extend documentation for C/D main functions." fixing this issue: - Fix 22959 - Extend documentation for C/D main functions. For D mains, document that parameter / return types may be qualified and also can be replaced by enums with appropriate base types. For C mains, document that it may be used without -betterC and how it interacts with runtime initialization. Replaced the list of allowed signatures with a proper grammar and also added a workaround for exotic main signatures. https://github.com/dlang/dlang.org/pull/3266
Comment #2 by dlang-bot — 2022-04-04T09:29:45Z
dlang/dlang.org pull request #3266 "Fix 22959 - Extend documentation for C/D main functions." was merged into master: - d2c21e2cf77da571ea21697a78e0dc3b3c68cf8d by MoonlightSentinel: Fix 22959 - Extend documentation for C/D main functions. For D mains, document that parameter / return types may be qualified and also can be replaced by enums with appropriate base types. For C mains, document that it may be used without -betterC and how it interacts with runtime initialization. Replaced the list of allowed signatures with a proper grammar and also added a workaround for exotic main signatures. https://github.com/dlang/dlang.org/pull/3266