http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50608

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-11-04 
21:49:52 UTC ---
Author: ebotcazou
Date: Fri Nov  4 21:49:49 2011
New Revision: 180988

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180988
Log:
2011-11-04  Eric Botcazou  <ebotca...@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.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/other/offsetof7.C
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/c-family/ChangeLog
    branches/gcc-4_6-branch/gcc/c-family/c-common.c
    branches/gcc-4_6-branch/gcc/c-family/c-common.h
    branches/gcc-4_6-branch/gcc/c-parser.c
    branches/gcc-4_6-branch/gcc/c-typeck.c
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/semantics.c
    branches/gcc-4_6-branch/gcc/cp/typeck.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog

Reply via email to