digitalmars.D.bugs - [Issue 17786] New: Define the FreeStanding subset of betterC
- via Digitalmars-d-bugs (28/28) Aug 27 2017 https://issues.dlang.org/show_bug.cgi?id=17786
https://issues.dlang.org/show_bug.cgi?id=17786 Issue ID: 17786 Summary: Define the FreeStanding subset of betterC Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: petar.p.kirov gmail.com 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. --
Aug 27 2017