diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 21:46:07 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 21:46:07 +0000 |
commit | 7549df0d7fdace06856877633fbedddded3010e8 (patch) | |
tree | 15bbae4a0d50f8d41bd44c607cad67495a7c994c /gcc/c-parser.c | |
parent | 3546bf8dd55772566748690334e2cc26523054f3 (diff) | |
download | gcc-7549df0d7fdace06856877633fbedddded3010e8.tar.gz |
2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
PR c++/50608
* c-parser.c (c_parser_postfix_expression) <RID_OFFSETOF>: Adjust call
to fold_offsetof.
* c-typeck.c (build_unary_op) <ADDR_EXPR>: Call fold_offsetof_1.
c-family/
* c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
(fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
<INDIRECT_REF>: Return the argument.
<ARRAY_REF>: Remove special code for negative offset.
Call fold_build_pointer_plus instead of size_binop.
(fold_offsetof): Remove STOP_REF argument and adjust.
* c-common.h (fold_offsetof_1): Declare.
(fold_offsetof): Remove STOP_REF argument.
cp/
* semantics.c (finish_offsetof): Adjust call to fold_offsetof.
* typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index af6cc149efc..8db203ad6b3 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -6388,7 +6388,7 @@ c_parser_postfix_expression (c_parser *parser) c_parser_error (parser, "expected identifier"); c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); - expr.value = fold_offsetof (offsetof_ref, NULL_TREE); + expr.value = fold_offsetof (offsetof_ref); } break; case RID_CHOOSE_EXPR: |