This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3, C++] RFC: PATCH to add decimal floating point typeinfos to libsupc++


On 11/11/2009 06:37 PM, Paolo Carlini wrote:
Hi, Jason
Because I don't know about such things.  :)
I'll try that instead of the baseline change.
Ok ;) Anyway, what I'm suggesting is the standard way of dealing with
such things. In general, baseline changes are *very* uncommon, it should
be set in stone, representing the 3.4.0 ABI, to which we are only adding.

OK, this look good to you?
commit ce8a5d679faa604703b3d7455887a2d5af60e946
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Nov 10 18:11:45 2009 -0500

    	PR c++/39131
    	* rtti.c (emit_support_tinfos): Add DFP types.
    	* config/abi/pre/gnu.ver: Add DFP types.
    	* testsuite/util/testsuite_abi.cc (check_version): Add CXXABI_1.3.4.

diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 3fb6d11..e96abcb 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1448,6 +1448,7 @@ emit_support_tinfos (void)
     &long_integer_type_node, &long_unsigned_type_node,
     &long_long_integer_type_node, &long_long_unsigned_type_node,
     &float_type_node, &double_type_node, &long_double_type_node,
+    &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
     0
   };
   int ix;
diff --git a/gcc/testsuite/g++.dg/dfp/typeid1.C b/gcc/testsuite/g++.dg/dfp/typeid1.C
new file mode 100644
index 0000000..cdc33a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/dfp/typeid1.C
@@ -0,0 +1,8 @@
+// PR c++/39131
+// { dg-do link }
+
+#include <typeinfo>
+
+const std::type_info &r = typeid(0.dd);
+
+int main() { }
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 2337a5a..b0001ca 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1198,3 +1198,15 @@ CXXABI_1.3.3 {
     _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE;
 
 } CXXABI_1.3.2;
+
+CXXABI_1.3.4 {
+
+    # typeinfo for decimal floating point types
+    _ZTID[fde];
+    _ZTIPD[fde];
+    _ZTIPKD[fde];
+    _ZTID[fde];
+    _ZTIPD[fde];
+    _ZTIPKD[fde];
+
+} CXXABI_1.3.3;
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc
index 562568a..2c9f930 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.cc
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc
@@ -193,6 +193,7 @@ check_version(symbol& test, bool added)
       known_versions.push_back("CXXABI_1.3.1");
       known_versions.push_back("CXXABI_1.3.2");
       known_versions.push_back("CXXABI_1.3.3");
+      known_versions.push_back("CXXABI_1.3.4");
       known_versions.push_back("CXXABI_LDBL_1.3");
     }
   compat_list::iterator begin = known_versions.begin();
commit becd27968b370257d57603061a5a848c03bbae7d
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Nov 11 18:41:37 2009 -0500

    	* testsuite/Makefile.am: Remove use of baseline_file.
    	* testsuite/Makefile.in: Likewise.

diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index c817607..a2f4fa4 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -70,7 +70,7 @@ site.exp: Makefile
 extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
 
 baseline_symbols:
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test ! -f $${output}; then \
 	    echo "Baseline file doesn't exist."; \
 	    echo "Try 'make new-abi-baseline' to create it."; \
@@ -79,7 +79,7 @@ baseline_symbols:
 
 new-abi-baseline:
 	-@$(mkinstalldirs) ${baseline_dir}
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test -f $${output}; then \
 	    output=$${output}.new; \
 	    t=`echo $${output} | sed 's=.*config/abi/=='`; \
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index cae3d6c..bf767cd 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -527,7 +527,7 @@ site.exp: Makefile
 	@mv site.tmp site.exp
 
 baseline_symbols:
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test ! -f $${output}; then \
 	    echo "Baseline file doesn't exist."; \
 	    echo "Try 'make new-abi-baseline' to create it."; \
@@ -536,7 +536,7 @@ baseline_symbols:
 
 new-abi-baseline:
 	-@$(mkinstalldirs) ${baseline_dir}
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test -f $${output}; then \
 	    output=$${output}.new; \
 	    t=`echo $${output} | sed 's=.*config/abi/=='`; \


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