Lex Fridman <lexfridman@xxxxxxxxx> writes: > What I've tried is to put one of the following in foo.cpp: > #pragma GCC diagnostic ignored -Wunused > #pragma GCC diagnostic warning -Wunused > #pragma GCC diagnostic ignored "-Wunused" > #pragma GCC diagnostic warning "-Wunused" The last two are the right syntax. > Do I need to have a later version of gcc than 4.1.3 for it to work? GCC > simply says warning: ignoring #pragma GCC diagnostic Yes, the feature is only available in gcc 4.2 and later. Ian