If a program not is ill-formed, the compiler must produce executable output. If the program contains no UB, the executable must behave as the abstract machine the standard describes states it will behave. If it does contain UB, the executable can do anything.
If the program is ill-formed with no diagnostic required, the compiler can do anything. It can produce an executable output, or not. That executable output can do anything at all. It could design a program that seems to match the intent of the code, for example.
Compilers are free to print diagnostics whenever they want.
Compilers are mandated to print diagnostics in some situations. "Most" ill-formed programs require a diagnostic. What a diagnostic is exactly is implementation defined. It has been noted that printing a single blank newline, or a space, is a valid diagnostic under the standard.
That would be considered a poor quality of implementation.
Once the diagnostic is printed when there is an ill-formed program that requires a diagnostic, the compiler is free to do anything. It can produce an executable that somewhat matches what you ask for, produce an executable that does anything it wants, or produce no executable.
The standard does not differentiate between warnings and errors.
An ill-formed program that requires a diagnostic that print a warning, then continue to compile, does not violate the standard.
An ill-formed program that requires a diagnostic that prints an error, then doesn't continue to compile, does not violate the standard.
An ill-formed program with no diagnistic required can print a diagnostic. It may choose to produce an executable or not. The executable could do something reasonable or not.
A well formed program can have the compiler issuing a diagnostic. This diagnostic could be described as a warning. It could also be described as an error, but the compiler must produce an executable, and the executable must do what the standard mandates.