问题
According to the GCC documentation -Wundef emits a warning when an undefined identifier is used in a #if directive and -Werror= displays the specified warning as error
But they are not working together in MinGW 4.4.1. Although -Wundef works and -Werror (to display all warnings as error) work.
Is this a known issue? Any workarounds available?
回答1:
Looks like there's a problem with MinGW 4.4.1 Worked like a charm in 4.6.2
来源:https://stackoverflow.com/questions/13953707/wundef-and-werror-undef-arent-working-together-in-mingw-4-4-1