Extension: min and max operators


int min = a <? b;
int max = a >? b;

Syntax & Semantics

The extension defines two new binary operators <? and >? whose precedence is the same as < and >. They compute the min and max of their arguments: a <? b is equivalent to a < b ? a : b except that the former only evalutes a and b once.

These operators originated in GNU C.


Not implemented.

Implemented in earlier rscc.

Extend compile: when compiling <?, compile its arguments (eliminating side effects) and then build the equivalent ternary expression and compile it instead.