diff options
author | Jason Merrill <jason@redhat.com> | 2020-06-04 15:56:57 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:10:38 -0300 |
commit | 335efe1ffe3810ac30d452b73bca9c1984fe5624 (patch) | |
tree | c94aee6d49d22887ff30c5080067edbd2171421f /gcc/fortran/trans-common.c | |
parent | 86f289a6f1c65090a14b4e694a7ff024d9455a91 (diff) | |
download | gcc-335efe1ffe3810ac30d452b73bca9c1984fe5624.zip gcc-335efe1ffe3810ac30d452b73bca9c1984fe5624.tar.gz gcc-335efe1ffe3810ac30d452b73bca9c1984fe5624.tar.bz2 |
c++: Fix pretty-print of pointer minus integer.
For whatever reason, GCC internally represents a pointer minus an integer as
a pointer plus a very large unsigned integer. But exposing that to users is
unsightly, and it's easy enough to show the real value.
gcc/cp/ChangeLog:
* error.c (dump_binary_op): Handle negative operand to
POINTER_PLUS_EXPR.
gcc/c-family/ChangeLog:
* c-pretty-print.c (pp_c_additive_expression): Handle negative
operand to POINTER_PLUS_EXPR.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/constexpr-ptrsub2.C: New test.
Diffstat (limited to 'gcc/fortran/trans-common.c')
0 files changed, 0 insertions, 0 deletions