This is the mail archive of the
mailing list for the GCC project.
Re: [arm] Tweak C++ guard variables
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, libstdc++ at gcc dot gnu dot org, Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 25 Jun 2004 00:05:50 -0700
- Subject: Re: [arm] Tweak C++ guard variables
- Organization: CodeSourcery, LLC
- References: <firstname.lastname@example.org>
Paul Brook wrote:
The patch below changes guard variables for static one-time construction in
line with the arm c++ eabi.I think they should only be used when the EABI is enabled so that ARM
GNU/Linux (for example) doesn't see an ABI change.
It consists of two changes:
- The guard variable is a (32-bit) int, not long long.
- It sets/tests the least significant bit, rather than the first byte.
Technically the g++ and libstdc++ changes are independent because the compiler
doesn't use the helper function, but it makes sense to keep them in sync.
I've enabled the changes unconditionally (on arm targets). I'm not sure if
this is desirable, or if they should only be enables when an eabi based abi
These two functions need comments:
+static treeYes, we should, but this is probably OK for now.
+ return integer_type_node;
+ return TRUE;
RCS file: /var/cvsroot/gcc-cvs/gcc/libstdc++-v3/libsupc++/cxxabi.h,v
retrieving revision 1.16
diff -u -p -r1.16 cxxabi.h
--- libstdc++-v3/libsupc++/cxxabi.h 22 May 2004 21:07:28 -0000 1.16
+++ libstdc++-v3/libsupc++/cxxabi.h 24 Jun 2004 14:32:52 -0000
@@ -44,6 +44,11 @@
+/* ??? We should probably define this in the compiler. */
OK with those changes.