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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 28 09:35:41 PDT 2018


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

--- Comment #12 from Guillaume Emont <guijemont at igalia.com> ---
(In reply to Alex Christensen from comment #9)
> Comment on attachment 348296 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=348296&action=review
> 
> I like this.
> 
> > Source/WTF/wtf/Compiler.h:454
> > +#define IGNORE_WARNING_GCC_OR_CLANG(warning) do { IGNORE_WARNING_IMPL(GCC, warning) } while (false)
> > +#define IGNORE_WARNING_GCC_OR_CLANG_END(warning) do { IGNORE_WARNING_END_IMPL(GCC, warning) } while (false)
> > +#define IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL(warning) IGNORE_WARNING_IMPL(GCC, warning)
> > +#define IGNORE_WARNING_GCC_OR_CLANG_TOP_LEVEL_END(warning) IGNORE_WARNING_END_IMPL(GCC, warning)
> 
> I think it would be much nicer if we just had two macros:
> IGNORE_WARNING_BEGIN
> IGNORE_WARNING_END
I'm not entirely sure this is the best, since the set of warnings are different between compilers, and we risk to add a warning on a given compiler if we try to ignore a warning that doesn't exist there. 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.

-- 
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/f62938ff/attachment.html>


More information about the webkit-unassigned mailing list