When compiling in pedantic mode, using the #warning directive emits not
only the warning itself but also
`` warning: #warning is a GCC extension``
That is true to form, of course, since the pedantic switch is on. But it
is desirable to switch off this particular pedantic warning. The
explicit #warning should remain visible, of course.
There seems to be no known way to switch off the above warning. On a
more general level, I think most people would appreciate ramping up the
strictness with -pedantic but still cherry picking what errors or
warnings to disable.
I am aware that C23 and C++23 will have #warning in the standard.
Consider this both a request for help and a feature request.