[Webkit-unassigned] [Bug 188598] [JSC] Remove gcc warnings on mips and armv7

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 16 08:05:24 PDT 2018


Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
                 CC|                            |mcatanzaro at igalia.com

--- Comment #5 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 347180
  --> https://bugs.webkit.org/attachment.cgi?id=347180

View in context: https://bugs.webkit.org/attachment.cgi?id=347180&action=review

I'm not qualified to review the uses of this macro, but here are my thoughts on the macro itself:

> Source/JavaScriptCore/runtime/JSBigInt.cpp:1318
> +// offsetOfData() makes sure that its return value is aligned to the size of
> +// Digit, so even though we cast to char* for pointer arithmetics, the cast to
> +// Digit* is properly aligned, though the compiler doesn't know about it,
> +// therefore we disable this warning.

This should be aligned four spaces to the right.

> Source/WTF/wtf/Compiler.h:400
> +#define IGNORE_WARNING(warning) do {\
> +    _Pragma("GCC diagnostic push") \
> +    _Pragma(_WEBKIT_IGNORE_WARNING_STRINGIFY(GCC diagnostic ignored warning)) \
> +    } while (false)
> +
> +#define IGNORE_WARNING_END do {\
> +    _Pragma("GCC diagnostic pop") \
> +    } while (false)
> +#endif

Wow, very nice. You should use this to reduce all the manual use of #pragma GCC diagnostic and #pragma clang diagnostic throughout the project.

Unfortunately, I think you are going to need two separate definitions here for Clang and GCC, IGNORE_WARNING_GCC and IGNORE_WARNING_CLANG, or you'll just wind up introducing new warnings about unknown pragmas when the wrong compiler is used. At least I'm pretty sure GCC complains if it doesn't recognize the warning, and it definitely complains if it sees #pragma clang.

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

More information about the webkit-unassigned mailing list