On Thu, Mar 5, 2020 at 1:40 PM Daniel Burgener <dburgener@xxxxxxxxxxxxxxxxxxx> wrote: > > When the lexer encounters an unexpected character in a policy source file, it prints a warning, discards the character and moves on. In some build environments, these characters could be a symptom of an earlier problem, such as unintended results of expansion of preprocessor macros, and the ability to have the compiler halt on such issues would be helpful for diagnosis. > > Signed-off-by: Daniel Burgener <Daniel.Burgener@xxxxxxxxxxxxx> I'm trying to remember why this particular case (unmatched character in the lexer) isn't already a fatal error. If there isn't a real reason for it, we could alternatively just switch it to use yyerror() in that case. Otherwise, your description suggests that you only want to make that particular case a fatal error; are you sure you want to treat all warnings as fatal errors?