File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,12 @@ CBMC_NORETURN void report_invariant_failure(
509
509
INVARIANT (false , " Unreachable" ); \
510
510
__builtin_unreachable (); \
511
511
} while (false )
512
+ # define UNREACHABLE_BECAUSE (REASON ) \
513
+ do \
514
+ { \
515
+ INVARIANT (false , REASON); \
516
+ __builtin_unreachable (); \
517
+ } while (false )
512
518
# define UNREACHABLE_STRUCTURED (TYPENAME, ...) \
513
519
do \
514
520
{ \
@@ -517,6 +523,7 @@ CBMC_NORETURN void report_invariant_failure(
517
523
} while (false )
518
524
#else
519
525
# define UNREACHABLE INVARIANT (false , " Unreachable" )
526
+ # define UNREACHABLE_BECAUSE (REASON ) INVARIANT(false , REASON);
520
527
# define UNREACHABLE_STRUCTURED (TYPENAME, ...) \
521
528
EXPAND_MACRO (INVARIANT_STRUCTURED(false , TYPENAME, __VA_ARGS__))
522
529
#endif
You can’t perform that action at this time.
0 commit comments