From here: http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
For version 4.6 or later, you can save the state of the user diagnostic flags. You can insert this around a line that triggers a false warning:
#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
To achieve the desired behavior, you should use "-Wall" instead of "-Wdeprecated-declarations" (and not "-wall") - pay attention to "W").
source share