Maximum voltages of an op amp comparator
Refer to this literature from

Texas Instruments, Understanding Op Amp Parameters
Analog Devices, MT-041: Op Amp Input and Output Common-Mode and
Differential Voltage Range

Input Common Mode Voltage Range

The input common voltage is defined as the average voltage at the inverting and non inverting input pins. If the common mode voltage gets too high or too low, the inputs will shut down and proper operation ceases. The common mode input voltage range, \$V_{ICR}\$, specifies the range over which normal operation is guaranteed.

image source
For voltage followers, inverting, and non-inverting configuration it is commonly assumed that \$V_{IN+}\$ equals \$V_{IN-}\$ equals \$V_{ICM}\$, since these voltages are approximately the same.

Differential Input Voltage Range

Differential input voltage range is normally specified as an absolute maximum. Exceeding the differential input voltage range can lead to breakdown and part failure.
In normal operation, an op amp has the feedback loop connected; therefore the differential input voltage is held at zero volts  (neglecting the offset voltage). However under certain conditions, such as power-up, the op amp may be subjected to a differential input voltage which is not zero. Certain input structures require limiting of differential input voltage to prevent damage. These opamps will generally have internal back-to-back diodes across the inputs. This will not always show up in the simplified schematics of the amps. It will show up, however, as a differential input voltage specification of  ±700 mV maximum.

Maximum Output Voltage Swing

The maximum output voltage, \$V_{OM±}\$, is defined as  the maximum positive or negative peak output voltage that can be obtained without wave form clipping, when quiescent DC output voltage is zero. \$V_{OM±} \$ is limited by the output impedance of the amplifier, the saturation voltage of the output transistors, and the power supply voltages. This is shown pictorially in the next image

image source


Regarding the use of an opamp as a comparator, refer to this literature from Texas Instruments:
Op Amp and Comparators – Don’t Confuse Them!