https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86093

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jun 20 20:40:33 2018
New Revision: 261820

URL: https://gcc.gnu.org/viewcvs?rev=261820&root=gcc&view=rev
Log:
        Backported from mainline
        2018-06-15  Jakub Jelinek  <ja...@redhat.com>

        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.

Added:
    branches/gcc-8-branch/gcc/testsuite/c-c++-common/pr86093.c
Modified:
    branches/gcc-8-branch/gcc/c/ChangeLog
    branches/gcc-8-branch/gcc/c/c-typeck.c
    branches/gcc-8-branch/gcc/testsuite/ChangeLog

Reply via email to