]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] No error on missing enclosing parentheses in Expression Function
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 08:54:34 +0000 (08:54 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 08:54:34 +0000 (08:54 +0000)
commit0d4b381dc60610e115241f24ddeabb33e45501d4
treee43e18317e531a410047d427b06ecebe8f62b001
parent5af8e389b0e0123e4bd101bbe6a8ceb28aa21b7e
[Ada] No error on missing enclosing parentheses in Expression Function

This patch fixes an issue whereby an expression within an expression
function declaration or completion without proper parenthesization is
incorrectly accepted by the compiler.

2018-01-11  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
to make sure a given expression function is properly parenthesized.

gcc/testsuite/

* gnat.dg/expr_func4.adb: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256517 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/par-ch6.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/expr_func4.adb [new file with mode: 0644]