libfirm / cparser

C99 parser and frontend for libfirm
http://pp.ipd.kit.edu/firm
GNU General Public License v2.0
336 stars 38 forks source link

implementation of issue148: X is a gnu extension should be a warning. #11

Closed Robbepop closed 7 years ago

Robbepop commented 8 years ago

Initial implementation of issue 148: http://pp.ipd.kit.edu/~firm/bugs/view.php?id=148 "Currently we produce an error for some gnu extensions when a non-gnu standard is selected. This is unnecessary a warning would be enough, people could still say -Werror=gnu-extension (name not decided yet) to turn it into an error if they want to."

Lines at approx 5919, 6899, 7653 and 7664 haven't been changed since I wasn't too sure about their correct implementation for the above issue.

UniQP commented 8 years ago

@MatzeB Do you have a good idea regarding line 5211ff?

Robbepop commented 8 years ago

It would be nice if someone with more codebase-experience could inspect the lines at approx 5919, 6899, 7653 and 7664.

MatzeB commented 8 years ago

Thanks for working on this! After looking at this, I believe that it is best to just put the gnu extension warnings under -Wpedantic instead of creating a new warning category. -Wpedantic is described as "Warn for cases where the c standard isn't stricly followed (but where we can easily continue)" which matches gnu extensions. This also makes the resolution for line 5211 trivial by removing the error case.