boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

const-divzero-shortcircuit-int.after (541B)


      1             if (l2 == 0) {
      2                 /* C11 §6.6¶3: an unevaluated short-circuited arm of
      3                  * &&/||/?: need not be a valid constant expression.
      4                  * tcc's expr_land/expr_lor/expr_cond bump nocode_wanted
      5                  * around the unevaluated arm but leave const_wanted set,
      6                  * so 1 || (1/0) used to abort here. Honor nocode_wanted. */
      7                 if (const_wanted && !nocode_wanted)
      8                     tcc_error("division by zero in constant");
      9                 goto general_case;