summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-29 22:12:07 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-29 22:12:07 +0000
commitd9c0ff18cc0e9a01f145c424bc46f87b0074696f (patch)
tree44f673d8bcaf90f9eff493f5269abb906249089a /gcc
parentfbac7a9ca59a4047ad881beb93d86e283fb952c9 (diff)
downloadgcc-d9c0ff18cc0e9a01f145c424bc46f87b0074696f.tar.gz
* c-parse.in (expr_no_commas, primary), c-typeck.c
(parser_build_binary_op): Use IS_EXPR_CODE_CLASS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46619 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-parse.in9
-rw-r--r--gcc/c-typeck.c9
3 files changed, 11 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5cd6c8db334..c03b10315ea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-29 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * c-parse.in (expr_no_commas, primary), c-typeck.c
+ (parser_build_binary_op): Use IS_EXPR_CODE_CLASS.
+
2001-10-29 David Edelsohn <edelsohn@gnu.org>
Undo assemble_name change in earlier patch.
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 8c1b26fff54..b3d9b2fb6cf 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -605,8 +605,7 @@ expr_no_commas:
{ char class;
$$ = build_modify_expr ($1, NOP_EXPR, $3);
class = TREE_CODE_CLASS (TREE_CODE ($$));
- if (class == 'e' || class == '1'
- || class == '2' || class == '<')
+ if (IS_EXPR_CODE_CLASS (class))
C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR);
}
| expr_no_commas ASSIGN expr_no_commas
@@ -614,8 +613,7 @@ expr_no_commas:
$$ = build_modify_expr ($1, $2, $3);
/* This inhibits warnings in truthvalue_conversion. */
class = TREE_CODE_CLASS (TREE_CODE ($$));
- if (class == 'e' || class == '1'
- || class == '2' || class == '<')
+ if (IS_EXPR_CODE_CLASS (class))
C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK);
}
;
@@ -663,8 +661,7 @@ primary:
}
| '(' expr ')'
{ char class = TREE_CODE_CLASS (TREE_CODE ($2));
- if (class == 'e' || class == '1'
- || class == '2' || class == '<')
+ if (IS_EXPR_CODE_CLASS (class))
C_SET_EXP_ORIGINAL_CODE ($2, ERROR_MARK);
$$ = $2; }
| '(' error ')'
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 881e7ffbc0d..41ca8ffe8a5 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -1752,11 +1752,9 @@ parser_build_binary_op (code, arg1, arg2)
enum tree_code code1 = ERROR_MARK;
enum tree_code code2 = ERROR_MARK;
- if (class1 == 'e' || class1 == '1'
- || class1 == '2' || class1 == '<')
+ if (IS_EXPR_CODE_CLASS (class1))
code1 = C_EXP_ORIGINAL_CODE (arg1);
- if (class2 == 'e' || class2 == '1'
- || class2 == '2' || class2 == '<')
+ if (IS_EXPR_CODE_CLASS (class2))
code2 = C_EXP_ORIGINAL_CODE (arg2);
/* Check for cases such as x+y<<z which users are likely
@@ -1826,8 +1824,7 @@ parser_build_binary_op (code, arg1, arg2)
/* Record the code that was specified in the source,
for the sake of warnings about confusing nesting. */
- if (class == 'e' || class == '1'
- || class == '2' || class == '<')
+ if (IS_EXPR_CODE_CLASS (class))
C_SET_EXP_ORIGINAL_CODE (result, code);
else
{