summaryrefslogtreecommitdiff
path: root/xpcom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-03-02 18:19:24 +0000
committerMoonchild <moonchild@palemoon.org>2022-03-02 18:19:24 +0000
commit5790af6c8bbe8acd82cb0db4fc6f49dca301985a (patch)
treedf508244b46e7b6ecdffca4bcb539c26610a4e49 /xpcom
parent39e80ed9afe2e5bba65a2786c7eff7c3189d49e8 (diff)
downloadGRE-5790af6c8bbe8acd82cb0db4fc6f49dca301985a.tar.gz
Issue #15 - Part 1: remove a number of old GCC hacks.
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/base/nscore.h8
-rw-r--r--xpcom/glue/nsCOMPtr.h6
-rw-r--r--xpcom/string/nsTSubstring.h1
3 files changed, 2 insertions, 13 deletions
diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h
index c667a8ae3..6300099ef 100644
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -134,18 +134,10 @@
*
* where nsIFoo::typeFunc is any method declared as
* NS_IMETHOD typeFunc(nsISupports*);
- *
- * XXX this can be simplified to always use the non-typeof implementation
- * when http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11893 is fixed.
*/
-#ifdef __GNUC__
-#define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \
- typeof(&class::func) name
-#else
#define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \
ret (NS_STDCALL class::*name) args
-#endif
/**
* Deprecated declarations.
diff --git a/xpcom/glue/nsCOMPtr.h b/xpcom/glue/nsCOMPtr.h
index 7ab6a143c..3b1833c35 100644
--- a/xpcom/glue/nsCOMPtr.h
+++ b/xpcom/glue/nsCOMPtr.h
@@ -59,10 +59,8 @@
#ifdef __GNUC__
// Our use of nsCOMPtr_base::mRawPtr violates the C++ standard's aliasing
- // rules. Mark it with the may_alias attribute so that gcc 3.3 and higher
- // don't reorder instructions based on aliasing assumptions for
- // this variable. Fortunately, gcc versions < 3.3 do not do any
- // optimizations that break nsCOMPtr.
+ // rules. Mark it with the may_alias attribute so that gcc doesn't reorder
+ // instructions based on aliasing assumptions for this variable.
#define NS_MAY_ALIAS_PTR(t) t* __attribute__((__may_alias__))
#else
diff --git a/xpcom/string/nsTSubstring.h b/xpcom/string/nsTSubstring.h
index 8e3b41744..a1c126419 100644
--- a/xpcom/string/nsTSubstring.h
+++ b/xpcom/string/nsTSubstring.h
@@ -991,7 +991,6 @@ protected:
friend class nsTObsoleteAStringThunk_CharT;
friend class nsTSubstringTuple_CharT;
- // XXX GCC 3.4 needs this :-(
friend class nsTPromiseFlatString_CharT;
char_type* mData;