Issue
I want to make the following warnings in GCC into errors, however, I failed to find any documentation on which switches control them, including the href="https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-show-option" rel="nofollow noreferrer">-fdiagnostics-show-option switch.
The warnings are:
deleteing void * is undefined
and
possible problem detected in invocation of delete operator:
'p' has incomplete type
I only want to make the specified warnings into errors, not all of them.
Solution
The [enabled by default]
part of the warnings (that you didn't show) indicates that there isn't any specific warning flag controlling them, so there isn't anything you can use to say -Wno-xxx
or -Werror=xxx
.
With GCC 4.9 you can use -Werror=delete-incomplete
to control the second one.
Answered By - Jonathan Wakely Answer Checked By - Gilberto Lyons (WPSolving Admin)