aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-01-17 07:13:39 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-01-17 07:13:39 +0000
commit5fdfba85be35635b2e37c62108dfa90acc36f74c (patch)
tree865655440fcb04d8df91e2725819310bf654cc76 /libstdc++-v3
parentc99a2d31378c6ad32f86dbeb14b5cbb47942fc2a (diff)
downloadgcc-5fdfba85be35635b2e37c62108dfa90acc36f74c.zip
gcc-5fdfba85be35635b2e37c62108dfa90acc36f74c.tar.gz
gcc-5fdfba85be35635b2e37c62108dfa90acc36f74c.tar.bz2
gen-num-limits.cc (INSTANTIATIONS): New macro.
* src/gen-num-limits.cc (INSTANTIATIONS): New macro. Use it do explicitly instantiate predicate<T> and value<T> for all the builtin Ts. From-SVN: r39086
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/src/gen-num-limits.cc25
2 files changed, 31 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6e5468b..4e28ed0 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-16 Mark Mitchell <mark@codesourcery.com>
+
+ * src/gen-num-limits.cc (INSTANTIATIONS): New macro.
+ Use it do explicitly instantiate predicate<T> and value<T> for
+ all the builtin Ts.
+
2001-01-16 Nathan Sidwell <nathan@codesourcery.com>
* libsupc++/exception_support.cc (__cp_pop_exception): Fix
diff --git a/libstdc++-v3/src/gen-num-limits.cc b/libstdc++-v3/src/gen-num-limits.cc
index 8106c90..aca1c84 100644
--- a/libstdc++-v3/src/gen-num-limits.cc
+++ b/libstdc++-v3/src/gen-num-limits.cc
@@ -770,3 +770,28 @@ int main()
// .__convert_long_double_d); }
}
+// G++ doesn't have support for automatic instantiation of static data
+// members on platforms that don't have weak symbols. On AIX, in
+// particular, static data members must be explicitly instantiated.
+// So, we explicitly instantiate some of the ones we need. To save
+// typing, we don't name the static data members explicitly; we
+// instead name their containing types.
+
+#define INSTANTIATIONS(TYPE) \
+ template struct predicate<TYPE>; \
+ template struct value<TYPE>
+
+INSTANTIATIONS (bool);
+INSTANTIATIONS (char);
+INSTANTIATIONS (signed char);
+INSTANTIATIONS (unsigned char);
+INSTANTIATIONS (short);
+INSTANTIATIONS (unsigned short);
+INSTANTIATIONS (int);
+INSTANTIATIONS (unsigned int);
+INSTANTIATIONS (long);
+INSTANTIATIONS (unsigned long);
+INSTANTIATIONS (float);
+INSTANTIATIONS (double);
+INSTANTIATIONS (long double);
+