File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -422,8 +422,25 @@ debug:
422
422
}
423
423
------
424
424
425
+ $(H3 $(LNAME2 DebugStatement, Debug Statement))
425
426
426
- $(H3 $(LNAME2 debug_specification, Debug Specification))
427
+ $(P A $(GLINK ConditionalStatement) that has a $(GLINK DebugCondition) is called
428
+ a $(I DebugStatement). $(I DebugStatements) have relaxed semantic checks in that
429
+ `pure`, `@nogc`, `nothrow` and `@safe` checks are not done.
430
+ Neither do $(I DebugStatements) influence the inference of `pure`, `@nogc`, `nothrow`
431
+ and `@safe` attributes.)
432
+
433
+ $(UNDEFINED_BEHAVIOR Since these checks are bypassed, it is up to the programmer
434
+ to ensure the code is correct. For example, throwing an exception in a `nothrow`
435
+ function is undefined behavior.
436
+ )
437
+
438
+ $(BEST_PRACTICE This enables the easy insertion of code to provide debugging help,
439
+ by bypassing the otherwise stringent attribute checks.
440
+ Never ship release code that has $(I DebugStatements) enabled.
441
+ )
442
+
443
+ $(H2 $(LNAME2 debug_specification, Debug Specification))
427
444
428
445
$(GRAMMAR
429
446
$(GNAME DebugSpecification):
You can’t perform that action at this time.
0 commit comments