diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-02-28 10:44:05 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-02-28 10:44:05 +0000 |
commit | e5844e6d3984a967559f02386556127d12c8746f (patch) | |
tree | 3d7b4003dbce2a25cd1ed0d2a8170738781bc609 | |
parent | 323c6a747943b8f3b29e02fde96edfa61d1851f5 (diff) | |
download | gcc-e5844e6d3984a967559f02386556127d12c8746f.zip gcc-e5844e6d3984a967559f02386556127d12c8746f.tar.gz gcc-e5844e6d3984a967559f02386556127d12c8746f.tar.bz2 |
Remove floating point and complex type template constant parms.
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
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/pt.c | 22 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ext/realpt1.C | 19 |
4 files changed, 12 insertions, 40 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3dfe8d3..fc3fb94 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 630adc9..331b307 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9a6eaf7..82d82b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 7e8ea91..0000000 --- a/gcc/testsuite/g++.old-deja/g++.ext/realpt1.C +++ /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); -} - |