On 13 October 2014 16:59, Eric Blake <ebl...@redhat.com> wrote: > -isystem is a heavy hammer, affecting the entire compilation. Better > might be just marking the ONE header as being a system header (silence > various warnings caused by just that header, while still letting the > rest of the compilation warn). If the header comes from third-party > sources, this is probably the best approach. It is done by adding: > > #if __GNUC__ >= 3 > #pragma GCC system_header > #endif > > to the header that would otherwise trigger warnings.
If we're going to modify the header then we might as well just disable the specific warning that's being triggered. The only benefit of -isystem is you can do it in the makefile and leave the source file untouched. -- PMM