
7 Feb
2010
7 Feb
'10
7:22 a.m.
Am Sonntag 07 Februar 2010 13:06:14 schrieb Serge D. Mechveliani:
I am sorry, indeed, ghc-6.12.1 warns of Unrecognised pragma on {-# "foo" #-}. I have just missed this warning.
The next question is: why it is a warning and not an error break?
Because it might be a valid pragma for some other implementation, so erroring on unrecognised pragmas is not a good option. It would be nice if there was a commandline switch -ferror-unrecognised-pragmas (similarly for other warnings, -ferror-incomplete-patterns, ...), but if your code is otherwise clean enough, something like -Wall -Werror -fno-warn-type-defaults -fno-warn-simple-patterns is convenient, too.