aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>1999-09-20 16:19:26 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>1999-09-20 16:19:26 +0000
commitebaacb57d2ed512efa68687b4a1c58bbbe536313 (patch)
tree7d9a54d8348ef39d4653815fb1ac874e2029a245 /gcc
parentbb457bd90107d2cae48e2f1a19077bd859c47b70 (diff)
downloadgcc-ebaacb57d2ed512efa68687b4a1c58bbbe536313.zip
gcc-ebaacb57d2ed512efa68687b4a1c58bbbe536313.tar.gz
gcc-ebaacb57d2ed512efa68687b4a1c58bbbe536313.tar.bz2
* parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
From-SVN: r29524
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/parse.y12
2 files changed, 7 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6b8af65..f26a659 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+1999-09-20 Nathan Sidwell <nathan@acm.org>
+
+ * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
+
1999-09-20 Nick Clifton <nickc@cygnus.com>
* decl2.c (lang_decode_option): Extend comment.
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index ae8849d..ce697d4 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -1474,15 +1474,9 @@ primary:
`const (3)' is equivalent to `const int (3)'. */
tree type;
- if ($3 == error_mark_node)
- {
- $$ = error_mark_node;
- break;
- }
-
- type = cp_build_qualified_type (integer_type_node,
- cp_type_qual_from_rid ($1));
- $$ = build_c_cast (type, build_compound_expr ($3));
+ type = hash_tree_cons (NULL_TREE, $1, NULL_TREE);
+ type = groktypename (build_decl_list (type, NULL_TREE));
+ $$ = build_functional_cast (type, $3);
}
| functional_cast
| DYNAMIC_CAST '<' type_id '>' '(' expr ')'