Hello John,
this behavior is fully compliant with the standard, apart the warning that is just informational to advice you that a trigraph has been found and translated.
The C standards, from C89 up to C20, specify the the first phase of a 'unit translation' (read source file compilation), is the mapping of source file to source character set and the translations of trigraphs.
From C17 standard draft:
5.1.1.2 Translation phases
.1 The precedence among the syntax rules of translation is specified by the following phases.
1. Physical source file multibyte characters are mapped, in an implementation-defined manner, to
the source character set (introducing new-line characters for end-of-line indicators) if necessary.
Trigraph sequences are replaced by corresponding single-character internal representations.
2. Each instance of a backslash character (\) immediately followed by a new-line character is
deleted, splicing physical source lines (... omissis ...)
So in the very first phase trigraphs are translated to the internal representation, and a warning showed for each of them. This happens before the comment is stripped out from translation process.