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
This commit is contained in:
parent
323c6a7479
commit
e5844e6d39
@ -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.
|
||||
|
22
gcc/cp/pt.c
22
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)
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user