aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2020-06-04 15:56:57 -0400
committerJason Merrill <jason@redhat.com>2020-06-05 13:54:54 -0400
commit5094c4400a8687dcf44f5993aee3a88e98519f3b (patch)
treee55070d15ade1137ed75162bab35f98e04a91825 /gcc/c/c-decl.c
parent640e05e02b567fa5ccf4c207e6fc6c3e9a93b17c (diff)
downloadgcc-5094c4400a8687dcf44f5993aee3a88e98519f3b.zip
gcc-5094c4400a8687dcf44f5993aee3a88e98519f3b.tar.gz
gcc-5094c4400a8687dcf44f5993aee3a88e98519f3b.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/c/c-decl.c')
0 files changed, 0 insertions, 0 deletions