assert(0) behavior
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 4 04:53:29 PDT 2015
On 8/3/15 9:13 PM, Walter Bright wrote:
> On 8/3/2015 5:25 PM, Ali Çehreli wrote:
>> On 08/03/2015 04:57 PM, Steven Schveighoffer wrote:
>>
>> > At the very least, assert(0, "message") should be a compiler error,
>> the
>> > message is unused information.
>>
>> Agreed.
>
> No.
>
> 1. If you want the message, do not use -release.
> 2. Do not use asserts to issue error messages for input/environment errors.
>
Any assert(0) in druntime or phobos with a message printed is an error.
It's compiled in release mode.
I'll look through and find them, and rework them.
-Steve
More information about the Digitalmars-d
mailing list