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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 27 11:43:27 PDT 2018


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

            Bug ID: 188996
           Summary: Add IGNORE_WARNING_.* macros
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: guijemont at igalia.com

While working on #188598, I realized that we repeat a lot some boilerplate code to ignore warnings, and it is not always done in the safest way (to avoid creating other warnings on other compilers for instance). Typically, we see things like:

  #if COMPILER(CLANG) && defined(__has_warning)
  #pragma clang diagnostic push
  #if __has_warning("-Wfoo-bar")
  #pragma clang diagnostic ignored "-Wfoo-bar"
  #endif
  #endif

  // Code that triggers the warning.

  #if COMPILER(CLANG) && defined(__has_warning)
  #pragma clang diagnostic pop
  #endif

And we also see variants that don't check for the compiler type, or don't do the check with __has_warning(), or that ignore the warning on GCC instead of clang, or that ignores it on both compilers.

I propose to replace this boilerplate with macros that always do the checks that we want (compiler being used, and check __has_warning() if it's available).

-- 
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/20180827/a97e4cda/attachment-0001.html>


More information about the webkit-unassigned mailing list