Declaring Clang’s -fno-caret-diagnostics only for a specific type of #pragma
<p>I rely on Clang’s <code>#pragma message</code> to remember TODO notices. For example,</p>

<pre><code>int
main(void)
{
#pragma message "TODO: do something"
}
</code></pre>

<p>which gives this output for <code>clang -o todo todo.c</code>:</p>

<pre><code>todo.c:4:9: warning: TODO: do something [-W#pragma-messages]
#pragma message "TODO: do something"
        ^
1 warning generated.
</code></pre>

<p>This, however, is redundant. I know I can use the <code>-fno-caret-diagnostics</code> flag with Clang to avoid having the <code>#pragma</code> line in the compiler’s output, but this also disables the caret diagnostics for other warnings and errors, which I would want to avoid.</p>

<p>Is there a way of declaring <code>-fno-caret-diagnostics</code> only for this kind of <code>#pragma</code>?</p>