Remove floating point and complex type template constant parms.
authorNathan Sidwell <nathan@codesourcery.com>
Wed, 28 Feb 2001 10:44:05 +0000 (10:44 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 28 Feb 2001 10:44:05 +0000 (10:44 +0000)
cp:
Remove floating point and complex type template constant parms.
* pt.c (convert_nontype_argument): Remove REAL_TYPE and
COMPLEX_TYPE extensions.
(invalid_nontype_parm_type_p): Likewise.
testuite:
* g++.old-deja/g++.ext/realpt1.C: Remove.

From-SVN: r40117

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.ext/realpt1.C [deleted file]

index 3dfe8d3c460a09d7f0193a442067d12a84cbc36a..fc3fb94597b42aaf583f132493ee8be8d1d444f3 100644 (file)
@@ -1,3 +1,10 @@
+2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
+
+       Remove floating point and complex type template constant parms.
+       * pt.c (convert_nontype_argument): Remove REAL_TYPE and
+       COMPLEX_TYPE extensions.
+       (invalid_nontype_parm_type_p): Likewise.
+
 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
 
        * except.c (call_eh_info): Revert "match_function"'s type.
index 630adc94820dc1e6085684390fa34aa4a3b0a838..331b307dc3d22133b06f54baf3cb7d7bd8969834 100644 (file)
@@ -2945,10 +2945,7 @@ convert_nontype_argument (type, expr)
     }
   else if (INTEGRAL_TYPE_P (expr_type) 
           || TYPE_PTRMEM_P (expr_type) 
-          || TYPE_PTRMEMFUNC_P (expr_type)
-          /* The next two are g++ extensions.  */
-          || TREE_CODE (expr_type) == REAL_TYPE
-          || TREE_CODE (expr_type) == COMPLEX_TYPE)
+          || TYPE_PTRMEMFUNC_P (expr_type))
     {
       if (! TREE_CONSTANT (expr))
        {
@@ -2987,19 +2984,6 @@ convert_nontype_argument (type, expr)
       
       return expr;
        
-    case REAL_TYPE:
-    case COMPLEX_TYPE:
-      /* These are g++ extensions.  */
-      if (TREE_CODE (expr_type) != TREE_CODE (type))
-       return error_mark_node;
-
-      expr = digest_init (type, expr, (tree*) 0);
-      
-      if (TREE_CODE (expr) != REAL_CST)
-       goto non_constant;
-
-      return expr;
-
     case POINTER_TYPE:
       {
        tree type_pointed_to = TREE_TYPE (type);
@@ -10355,10 +10339,6 @@ invalid_nontype_parm_type_p (type, complain)
     return 0;
   else if (TYPE_PTRMEMFUNC_P (type))
     return 0;
-  else if (!pedantic && TREE_CODE (type) == REAL_TYPE)
-    return 0; /* GNU extension */
-  else if (!pedantic && TREE_CODE (type) == COMPLEX_TYPE)
-    return 0; /* GNU extension */
   else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM)
     return 0;
   else if (TREE_CODE (type) == TYPENAME_TYPE)
index 9a6eaf701a2c029c801307a7685268f13141fee9..82d82b3e6087fff89b178365260d344e07c10e4f 100644 (file)
@@ -1,3 +1,7 @@
+2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * g++.old-deja/g++.ext/realpt1.C: Remove.
+
 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
 
        * g++.old-deja/g++.abi/vtable3.h: Check vcall offsets too.
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/realpt1.C b/gcc/testsuite/g++.old-deja/g++.ext/realpt1.C
deleted file mode 100644 (file)
index 7e8ea91..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Build don't link:
-// Special g++ Options:
-// Origin: Mark Mitchell <mark@codesourcery.com>
-
-template <double d>
-struct S;
-
-template <double d, double e>
-void f (S<d>*, S<e>*, S<d + e>*);
-
-void g ()
-{
-  S<2.0>* s1;
-  S<3.7>* s2;
-  S<5.7>* s3;
-  
-  f (s1, s2, s3);
-}
-