summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-28 10:44:05 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-28 10:44:05 +0000
commit863d101a582a4944d9a07301bb80b98760d3cc5c (patch)
tree3d7b4003dbce2a25cd1ed0d2a8170738781bc609 /gcc/cp
parentf1c90e1ffe3ee35de146896e0f68f83a4854ee7e (diff)
downloadgcc-863d101a582a4944d9a07301bb80b98760d3cc5c.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40117 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/pt.c22
2 files changed, 8 insertions, 21 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3dfe8d3c460..fc3fb94597b 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 630adc94820..331b307dc3d 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)