r236483 - in /trunk/gcc: cp/ChangeLog cp/parser...
dmalcolm@gcc.gnu.org
dmalcolm@gcc.gnu.org
Thu May 19 18:10:00 GMT 2016
Author: dmalcolm
Date: Thu May 19 18:10:30 2016
New Revision: 236483
URL: https://gcc.gnu.org/viewcvs?rev=236483&root=gcc&view=rev
Log:
PR c++/71184: Fix NULL dereference in cp_parser_operator
The source-range handling for the array form of operator
new/delete erroneously assumed that the "]" was present,
leading to a dereference of NULL when it's absent.
Fix it thusly.
gcc/cp/ChangeLog:
PR c++/71184
* parser.c (cp_parser_operator): For array new/delete, check that
cp_parser_require returned a non-NULL token before dereferencing
it.
gcc/testsuite/ChangeLog:
PR c++/71184
* g++.dg/pr71184.C: New test case.
Added:
trunk/gcc/testsuite/g++.dg/pr71184.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list