This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: templated cmath function instantiation


On Mon, Jun 25, 2001 at 10:30:28PM +0200, Gabriel Dos Reis wrote:
> Phil Edwards <pedwards@disaster.jaj.com> writes:
> 
> | Of course, if anyone tries to use 'c' or 'c_shadow' right now, bigger
> | problems will immediately arise and prevent building long before
> | src/cmath.cc, so the patch is safe as it stands.
> 
> Totally agreed.  Please check it on both branch and mainline.

Done.  (Side note:  when using 'cvs diff' is -N incompatible with -u3p?
Or is it just me?)

Kurt, is it convenient for you to test this somehow?  If it works for you,
I'll close the PR in GNATS.  If you cannot test it, I'll change the PR to
either 'feedback' or 'suspended' and wait for 3.0.1.


Phil


2001-06-25  Phil Edwards  <pme@sources.redhat.com>
            Kurt Garloff <garloff@suse.de>

	PR libstdc++/3377
	* src/cmath.cc:  New [version of an old] file; instantiate
	__cmath_power to start with.
	* src/Makefile.am (sources):  Add cmath.cc (and alphabetize).
	* Makefile.in:  Regenerate.
	* libio/Makefile.in:  Regenerate.
	* libmath/Makefile.in:  Regenerate.
	* libsupc++/Makefile.in:  Regenerate.
	* src/Makefile.in:  Regenerate.
	* testsuite/Makefile.in:  Regenerate.


Index: cmath.cc
===================================================================
RCS file: cmath.cc
diff -N cmath.cc
0a1,48
> // Explicit instantiation file for -*- C++ -*- math library.
> 
> // Copyright (C) 2001 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library.  This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
> 
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> // GNU General Public License for more details.
> 
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING.  If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
> 
> // As a special exception, you may use this file as part of a free software
> // library without restriction.  Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License.  This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
> 
> 
> // These are explicit instantiations of the behind-the-scenes internal
> // helper functions used in the math routines of libstdc++.
> 
> 
> #include <bits/std_cmath.h>
> 
> namespace std
> {
>     // This function is only declared/used in the cheaders=c_std case.
>     template float
>       __cmath_power<float>(float, unsigned int);
>     template double
>       __cmath_power<double>(double, unsigned int);
>     template long double
>       __cmath_power<long double>(long double, unsigned int);
>   
> } // namespace std
> 
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.87
diff -u -3 -p -r1.87 Makefile.am
--- Makefile.am	2001/06/08 03:53:32	1.87
+++ Makefile.am	2001/06/25 20:44:56
@@ -165,13 +165,11 @@ build_headers = \
 	bits/ctype_base.h bits/ctype_noninline.h bits/ctype_inline.h 
 
 sources = \
-	limitsMEMBERS.cc \
-	stdexcept.cc functexcept.cc bitset.cc \
-	globals.cc \
-	basic_file.cc ios.cc complex_io.cc strstream.cc \
-	c++locale.cc locale.cc localename.cc codecvt.cc \
-	locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc \
-	string-inst.cc wstring-inst.cc 
+	basic_file.cc bitset.cc c++locale.cc cmath.cc codecvt.cc \
+	complex_io.cc functexcept.cc globals.cc ios.cc limitsMEMBERS.cc \
+	locale.cc locale-inst.cc localename.cc misc-inst.cc stdexcept.cc \
+	stl-inst.cc string-inst.cc strstream.cc valarray-inst.cc \
+	wstring-inst.cc
 
 
 VPATH = $(top_srcdir):$(top_srcdir)/src:$(GLIBCPP_INCLUDE_DIR):$(GLIBCPP_INCLUDE_DIR)/std:$(C_INCLUDE_DIR)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]