Bug 1426865 - Remove JS_BROKEN_GCC_ATTRIBUTE_WARNING. r=sfink

This macro makes any forward declarations unnecessarily verbose, and the
build system uses Clang by default anyway, except in the hazard analysis
which already specified -Wno-attributes.

Depends on D49097

Differential Revision: https://phabricator.services.mozilla.com/D49098

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Philip Chimento 2019-10-27 22:34:11 +00:00
parent f5f79e326f
commit fd8bc56c8d
5 changed files with 1 additions and 56 deletions

View File

@ -19,17 +19,8 @@
#include "js/UniquePtr.h"
#include "js/Utility.h"
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wattributes"
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
class JS_PUBLIC_API JSTracer;
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic pop
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
namespace js {
namespace gc {
class GCRuntime;

View File

@ -16,17 +16,7 @@
#include "js/TypeDecls.h"
#include "js/Utility.h"
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wattributes"
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
class JS_PUBLIC_API JSTracer;
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic pop
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
class ProfilingStack;
// This file defines the classes ProfilingStack and ProfilingStackFrame.

View File

@ -12,7 +12,7 @@
#include <stdint.h> // uint8_t
#include "jstypes.h" // JS_BROKEN_GCC_ATTRIBUTE_WARNING, JS_PUBLIC_API
#include "jstypes.h" // JS_PUBLIC_API
#include "js/Class.h" // JS{Getter,Setter}Op
#include "js/RootingAPI.h" // JS::Handle, js::{,Mutable}WrappedPtrOperations
@ -20,18 +20,8 @@
struct JSContext;
class JSObject;
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wattributes"
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
class JS_PUBLIC_API JSTracer;
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic pop
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
/* Property attributes, set in JSPropertySpec and passed to API functions.
*
* The data structure in which some of these values are stored only uses a

View File

@ -64,23 +64,6 @@
# define JS_NO_FASTCALL
#endif
// gcc is buggy and warns on our attempts to JS_PUBLIC_API our
// forward-declarations or explicit template instantiations. See
// <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50044>. Add a way to detect
// that so we can locally disable that warning.
//
// This version-check is written such that the version-number mentioned below
// must be bumped every time a new gcc that *doesn't* fix this bug is released.
// (The gcc release that *fixes* this bug will trigger no warning, and we'll
// naturally stop bumping this number.) If you ever trigger this warning with
// the latest stable gcc, you have rs=jwalden to bump it to the next gcc minor
// or major version as needed, e.g. (8, 2, 0) to (8, 3, 0).
#if MOZ_IS_GCC
# if !MOZ_GCC_VERSION_AT_LEAST(8, 2, 0)
# define JS_BROKEN_GCC_ATTRIBUTE_WARNING
# endif
#endif
/***********************************************************************
** MACROS: JS_BEGIN_MACRO
** JS_END_MACRO

View File

@ -32,16 +32,7 @@
namespace JS {
namespace dbg {
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wattributes"
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
class JS_PUBLIC_API AutoEntryMonitor;
#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
# pragma GCC diagnostic pop
#endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING
} // namespace dbg
} // namespace JS