Bounty for -minimal compiler flag
Jacob Carlborg
doob at me.com
Fri Feb 14 12:26:33 PST 2014
On 2014-02-14 15:07, Daniel Murphy wrote:
> It's probably platform dependent, I guess it should work everywhere that
> C supports TLS.
Well, on OS X it's natively supported on since 10.7 but DMD still uses
emulated TLS:
>> Dynamic cast can be disabled.
>
> Sure, but should it be an error or be replaced with a static cast?
>
>> static this/~this is tougher. If it is possible for it to work, then
>> it should. I feel that this is more of a language feature.
>
> These might work with init sections, but maybe not.
>
>> similarly, I'd expect scope(exit) to still work.
>
> With no exceptions, scope(xxx) will work just fine.
>
> Similarly, try-catch will be valid, just not throwing.
>
>> profiling and code coverage are fine left out, since other tools can
>> fill the same task.
>
> Yah.
>
>> It would be nice if assert didn't depend on the runtime, but it's easy
>> enough to implement. conditional, message and exit();
>
> mmm...
>
>> unittests are out as well.
>
> Most likely.
Theoretically it should be possible to just disabled the ModuleInfo part
and then use __traits(getUnitTests) instead.
> I don't think it's worth throwing out assert over. A runtime that
> supported assert + Object would be about 8 lines and would IMO be
> worthwhile.
Perhaps leave the assert handler, which could be overridden, which could
default to a halt like assert(0) does in release mode?
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list