diff options
author | Loren J. Rittle <ljrittle@acm.org> | 2002-05-15 22:32:25 +0000 |
---|---|---|
committer | Loren J. Rittle <ljrittle@gcc.gnu.org> | 2002-05-15 22:32:25 +0000 |
commit | 6c784d99594fe02b1653f6a12790e31c2ffba3e3 (patch) | |
tree | 1d2b051a387190dcf8cc06c104c264110562456c | |
parent | 033afd1106402a8f18e5acc21de1d85fd73d8969 (diff) | |
download | gcc-6c784d99594fe02b1653f6a12790e31c2ffba3e3.zip gcc-6c784d99594fe02b1653f6a12790e31c2ffba3e3.tar.gz gcc-6c784d99594fe02b1653f6a12790e31c2ffba3e3.tar.bz2 |
c++config (__USE_MALLOC): Report case where the user improperly defined it on the command line.
libstdc++/6641
* include/bits/c++config (__USE_MALLOC): Report case where
the user improperly defined it on the command line.
From-SVN: r53494
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 91082c7..d94791b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2002-05-15 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-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * testsuite/testsuite_hooks.h (__set_testsuite_memlimit): diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index b3e1916..3433f02 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -69,7 +69,15 @@ // 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. |