This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, This patch fixes the Ada front-end for the pointer plus changes (I don't want to be blamed for not testing Ada :) ). The changes are the following: 1) change PLUS_EXPR (and MINUS_EXPR) in places where POINTER_PLUS_EXPR need to be used instead. 2) Add support to build_binary_op for POINTER_PLUS_EXPR's semantics of having two different types for its operands. 3) Treat POINTER_PLUS_EXPR like PLUS_EXPR in known_alignment Committed to the branch after a bootstrap/test on i686-linux-gnu with no Ada regressions compared to the trunk (there is an ICE but that is also on the trunk and unrelated to my branch). Thanks, Andrew Pinski ChangeLog: * trans.c (Attribute_to_gnu): When subtracting an offset from a pointer, use POINTER_PLUS_EXPR with NEGATE_EXPR instead of MINUS_EXPR. (gnat_to_gnu): Likewise. * utils.c (convert): When converting between thin pointers, use POINTER_PLUS_EXPR and sizetype for the offset. * utils2.c (known_alignment): POINTER_PLUS_EXPR have the same semantics as PLUS_EXPR for alignment. (build_binary_op): Add support for the semantics of POINTER_PLUS_EXPR's operands. When adding an offset to a pointer, use POINTER_PLUS_EXPR.
Attachment:
fixada.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |