Bug 17786 – Define the FreeStanding subset of betterC

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-08-27T09:52:47Z
Last change time
2024-12-13T18:54:21Z
Keywords
bare-metal, betterC, spec
Assigned to
No Owner
Creator
ZombineDev
See also
https://issues.dlang.org/show_bug.cgi?id=17787
Moved to GitHub: dmd#19310 →

Comments

Comment #0 by petar.p.kirov — 2017-08-27T09:52:47Z
As it stands, `-betterC` is a subset of D under which features requiring druntime are unavailable (and should probably be disallowed). `-betterC` however still assumes that the C runtime / standard library is available and the compiler freely emits references to it (such as to memset). As of several releases, the compiler has a FreeStanding predefined version, which according to the spec (https://dlang.org/spec/version.html#predefined-versions) is defined as: An environment without an operating system (such as Bare-metal targets) We should: * Add a compiler switch, so that code targeting bare-metal can actually use this predefined version, and third party libraries could offer bare-metal friendly implementations of their functionalities. * Teach the compiler to not emit references to the C runtime. * Define in the language specification all the features that are not available.
Comment #1 by robert.schadek — 2024-12-13T18:54:21Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19310 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB