re PR c++/65775 (Late-specified return type bypasses return type checks (qualified...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 3 Jul 2017 18:10:52 +0000 (18:10 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 3 Jul 2017 18:10:52 +0000 (18:10 +0000)
commit17c18221012ac66ae53cd40b85d96320e3f8884e
tree3d72335ffc4e9f62cf1b92499864e7cb3b306c11
parent370d975d77562e4f38738cfb7bcb16afa9aeabfb
re PR c++/65775 (Late-specified return type bypasses return type checks (qualified, function, array))

/cp
2017-07-03  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/65775
* decl.c (grokdeclarator): Move checks on function return type after
the splice_late_return_type call; if declspecs->locations[ds_type_spec]
is UNKNOWN_LOCATION fall back to input_location.

/testsuite
2017-07-03  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/65775
* g++.dg/cpp0x/trailing14.C: New.

From-SVN: r249935
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/trailing14.C [new file with mode: 0644]