#1571: incorrect use of CCTK_BUILTIN_UNREACHABLE in Carpet ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: Component: Carpet | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by eschnett):
One should use builtin_unreachable only in cases where code is indeed manifestly unreachable (to avoid compiler warnings), or in performance critical code (where one wouldn't want and assert either).
You are right, this case is neither. There may be operators that prolongate in some directions, but not in others. Of course, this doesn't make sense in Carpet, but this case should be caught with an assert.