jplevyak / dparser

A Scannerless GLR parser/parser generater.
https://github.com/jplevyak/dparser
BSD 3-Clause "New" or "Revised" License
105 stars 14 forks source link

Add "-Wextra -pedantic -std=c11" to the list of flags #5

Open ckaran opened 8 years ago

ckaran commented 8 years ago

I've been trying to track down why I keep having issues with code building and passing sometimes, and then failing completely when I haven't modified the code. I finally added -Wextra -pedantic -std=c11 to the list of flags to see what is going on. It turned up a LOT of comparisons between signed and unsigned objects, and it turned up a lot of missing field initializers within the generated code. I suspect that some of the code is accessing uninitialized memory and sometimes works by accident, and sometimes fails, depending on what was in that memory location. Can you please look into this? I don't have time to go through all the warnings right now. I'll push my clang-format branch as it is, which should pass the tests at least most of the time, but cleaning up all the warnings is going to take a LONG time.