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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Aug 27 18:36:23 2018
New Revision: 263891

URL: https://gcc.gnu.org/viewcvs?rev=263891&root=gcc&view=rev
Log:
        PR c++/86993
        * cp-tree.h (cxx_readonly_error): Add location_t argument.
        * typeck2.c (cxx_readonly_error): Add LOC argument, pass it to
        ERROR_FOR_ASSIGNMENT macro and readonly_error.  Add LOC argument
        to ERROR_FOR_ASSIGNMENT macro, use error_at instead of error and
        pass LOC to it.  Formatting fixes.
        * typeck.c (cp_build_unary_op): Pass location to cxx_readonly_error.
        (cp_build_modify_expr): Pass loc to cxx_readonly_error.
        * semantics.c (finish_asm_stmt): Pass input_location to
        cxx_readonly_error.

        * g++.dg/diagnostic/pr86993.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/diagnostic/pr86993.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/semantics.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/cp/typeck2.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to