]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++config (__USE_MALLOC): Report case where the user improperly defined it on the...
authorLoren J. Rittle <ljrittle@acm.org>
Wed, 29 May 2002 01:07:35 +0000 (01:07 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Wed, 29 May 2002 01:07:35 +0000 (01:07 +0000)
libstdc++/6641
* include/bits/c++config (__USE_MALLOC): Report case where
the user improperly defined it on the command line.

From-SVN: r53979

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/c++config

index 70dabc82d654867a470ff5420d3fa852abe1ee34..c1d68ed0666240c72b78ea1b51b93222f87f79c5 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-28  Loren J. Rittle <ljrittle@acm.org>
+
+       libstdc++/6641
+       * include/bits/c++config (__USE_MALLOC): Report case where
+       the user improperly defined it on the command line.
+
 2002-05-27  Benjamin Kosnik  <bkoz@redhat.com>
 
        * src/misc-inst.cc: Define unnecessary algorithm
index a3522c674bc4b9f78247a80f82c5c1e00d16ca0e..33d7bc8479cd52fb5fc5084c7e937498cfd2fc89 100644 (file)
 // that threads are properly configured on your platform before
 // assigning blame to the STL container-memory allocator.  After doing
 // so, please report any possible issues to libstdc++@gcc.gnu.org .
-// Do not blindly #define __USE_MALLOC here or on the command line.
+// Do not define __USE_MALLOC on the command line.  Enforce it here:
+#ifdef __USE_MALLOC
+#error __USE_MALLOC should only be defined within \
+libstdc++-v3/include/bits/c++config before full recompilation of the library.
+#endif
+// Define __USE_MALLOC after this point in the file in order to aid debugging
+// or globally change allocation policy.  This breaks the ABI, thus
+// completely recompile the library.  A patch to better support
+// changing the global allocator policy would be probably be accepted.
 
 // The remainder of the prewritten config is mostly automatic; all the
 // user hooks are listed above.