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(
509509 INVARIANT (false , " Unreachable" ); \
510510 __builtin_unreachable (); \
511511 } while (false )
512+ # define UNREACHABLE_BECAUSE (REASON ) \
513+ do \
514+ { \
515+ INVARIANT (false , REASON); \
516+ __builtin_unreachable (); \
517+ } while (false )
512518# define UNREACHABLE_STRUCTURED (TYPENAME, ...) \
513519 do \
514520 { \
@@ -517,6 +523,7 @@ CBMC_NORETURN void report_invariant_failure(
517523 } while (false )
518524#else
519525# define UNREACHABLE INVARIANT (false , " Unreachable" )
526+ # define UNREACHABLE_BECAUSE (REASON ) INVARIANT(false , REASON)
520527# define UNREACHABLE_STRUCTURED (TYPENAME, ...) \
521528 EXPAND_MACRO (INVARIANT_STRUCTURED(false , TYPENAME, __VA_ARGS__))
522529#endif
You can’t perform that action at this time.
0 commit comments