Skip to content

Commit

Permalink
Bug 1426865 - Remove JS_BROKEN_GCC_ATTRIBUTE_WARNING. r=sfink a=RyanVM
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ptomato committed Nov 1, 2019
1 parent d9356e9 commit fb5ad38
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 57 deletions.
10 changes: 0 additions & 10 deletions js/public/GCAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,8 @@
#include "js/Utility.h"

struct JSFreeOp;

#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;
Expand Down
10 changes: 0 additions & 10 deletions js/public/ProfilingStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 1 addition & 11 deletions js/public/PropertyDescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,16 @@

#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
#include "js/Value.h" // JS::Value

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
Expand Down
17 changes: 0 additions & 17 deletions js/src/jstypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions js/src/vm/Stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fb5ad38

Please sign in to comment.