[PATCH 6.6 83/91] minmax: improve macro expansion and type checking