This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r249461 - in /trunk/gcc: cp/ChangeLog cp/parser...
- From: dmalcolm at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 21 Jun 2017 16:11:36 -0000
- Subject: r249461 - in /trunk/gcc: cp/ChangeLog cp/parser...
Author: dmalcolm
Date: Wed Jun 21 16:11:36 2017
New Revision: 249461
URL: https://gcc.gnu.org/viewcvs?rev=249461&root=gcc&view=rev
Log:
C++: Add fix-it hints for -Wold-style-cast
gcc/cp/ChangeLog:
* parser.c (get_cast_suggestion): New function.
(maybe_add_cast_fixit): New function.
(cp_parser_cast_expression): Capture the location of the closing
parenthesis. Call maybe_add_cast_fixit when emitting warnings
about old-style casts.
gcc/testsuite/ChangeLog:
* g++.dg/other/old-style-cast-fixits.C: New test case.
Added:
trunk/gcc/testsuite/g++.dg/other/old-style-cast-fixits.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog