This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Building error with AIX 4.2
- To: andreasc at neuro dot informatik dot uni-kassel dot de
- Subject: Re: Building error with AIX 4.2
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 16 Jan 2001 23:20:30 -0800
- Cc: gcc-bugs at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <3A6411DB.E264ABBA@neuro.informatik.uni-kassel.de>
This patch should fix the problems with the AIX instantiations in
gen-num-limits.cc.
I rebuilt V3 with this patch on i686-pc-linux-gnu.
Let me know how it goes.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
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.
Index: src/gen-num-limits.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/gen-num-limits.cc,v
retrieving revision 1.5
diff -c -p -r1.5 gen-num-limits.cc
*** gen-num-limits.cc 2001/01/09 03:01:56 1.5
--- gen-num-limits.cc 2001/01/17 06:51:53
*************** int main()
*** 770,772 ****
--- 770,797 ----
// .__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);
+