[Webkit-unassigned] [Bug 188996] Add IGNORE_WARNING_.* macros

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 28 10:03:38 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=188996

--- Comment #13 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to Guillaume Emont from comment #12)
> Currently
> this would work, since clang provides __has_warning(), and gcc silently
> ignores warning types it does not know, but I'm not sure this would work, if
> for instance we were to extend that to support visual studio.

GCC does not ignore warnings that it does not recognize:

[1/16] Compiling C object 'src/src@@ephymain at sha/ephy-action-bar.c.o'.
../../../../Projects/epiphany/src/ephy-action-bar.c:32:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wasonteuhasoe"
                                ^~~~~~~~~~~~~~~~

So you need compiler guards somehow to avoid introducing new warnings (so it needs separate macros for GCC and Clang), and probably also compiler version guards for new warnings (which will just have to be done manually).

__has_warning() would be really nice to have in GCC. :(

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180828/a4164228/attachment.html>


More information about the webkit-unassigned mailing list