linux - GCC how to force redefinition warning to error -
in gcc can pass option
-werror= to force particular warning error. not able find option need pass warning
redefined [enabled default] to error. option should pass if user defined macro redefined force error.
since
g++ -fdiagnostics-show-option -wunused-macros ./test.cpp doesn't come flag that directly controls emission of warning (diagnostic) can conclude there is, in fact, no such option.
you might inquire @ gcc-devel list or file request enhancement.
alternatively, @ preprocessor has more options , use explicitely.
Comments
Post a Comment