PR c/86093
commit0245ae7169594da92f3e07997f6a6ccdadd6847e
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Jun 2018 20:53:54 +0000 (15 20:53 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Jun 2018 20:53:54 +0000 (15 20:53 +0000)
tree931ee4adff13dafe3bfa8dd9c958ae91481cc4c2
parent852e7df70a206715ad328ceb4c0f2282906c24d0
PR c/86093
* c-typeck.c (pointer_diff): Cast both pointers to unqualified types
before doing POINTER_DIFF_EXPR.

* c-c++-common/pr86093.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261663 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr86093.c [new file with mode: 0644]