]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Reject illegal declarations in expression functions
authorSteve Baird <baird@adacore.com>
Tue, 31 Jan 2023 01:05:13 +0000 (17:05 -0800)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 22 May 2023 08:44:08 +0000 (10:44 +0200)
commit165b05717cfe9ed17a87b5430e5f9dd19aa8eb1a
tree6b9e4f73756daaa0f544d5693863ed3b6730b062
parente1f5cf0b14c460f04e878e8c52c90132f19c5e3f
ada: Reject illegal declarations in expression functions

gcc/ada/

* sem_ch4.adb (Analyze_Expression_With_Actions.Check_Action_Ok):
If Comes_From_Source (A) is False, then look at Original_Node (A)
instead of A. In particular, if an (illegal) expression function
is transformed into a "vanilla" function, we don't want to allow
it just because Comes_From_Source is now False.
gcc/ada/sem_ch4.adb