PR c++/86993
commit91e06df2c8b2d18e451049f298d125a1a1caaf97
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Aug 2018 18:36:23 +0000 (27 18:36 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Aug 2018 18:36:23 +0000 (27 18:36 +0000)
treefb626b754e6fe9c953cc0a29d697d46263f2b18d
parent77a7e949ac207f93f7150745a76663542f778dec
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263891 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/pr86993.C [new file with mode: 0644]