Hi,

I don't know if these are bugs or misunderstandings:

On page 114 of the PDF manual it says that the command line option "--warnings=error" or "-Werror" should force bison to treat warnings as errors. I interpret that to mean that, if a warning is generated, bison should exit with a non-zero (fail) return code - just as it does if a fatal problem prevents the parser from being generated. This does not work as I expect - the return code is always zero if the parser can be generated.

Also on page 114, the manual says "--warnings=none" or "-Wnone" should suppress all warnings. This does not work. Grammar warnings, if any, are generated regardless of this setting.

These situations can be reproduced using any grammar with a R/R conflict or an unexpected S/R conflict. I believe mismatched (too many or not enough expected) S/R warnings also should fail if "warnings=error" is selected.


I don't mind if the parser is generated for the "--warnings=error" case ... but the result code should indicate the condition. I've only ever seen '0' and '1' as result codes ... perhaps a new code value should be introduced to mean success but with warnings.

Hope this helps,
George Neuner

Reply via email to