]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Incorrect error message on use of 'Result with wrong prefix
authorJavier Miranda <miranda@adacore.com>
Wed, 4 Mar 2026 13:32:00 +0000 (13:32 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 28 May 2026 08:52:51 +0000 (10:52 +0200)
gcc/ada/ChangeLog:

* sem_util.adb (Is_Access_To_Subprogram_Wrapper): Remove useless
call to Can_Have_Formals. Found by Dismukes.

gcc/ada/sem_util.adb

index 7d6e0fc7d8ac9892be5527a4c2b1a3cec236fa7c..486c31ee17103ff1919f20841b0fec693eee0d94 100644 (file)
@@ -12756,7 +12756,6 @@ package body Sem_Util is
 
    begin
       if not Is_Wrapper (E)
-        or else not Can_Have_Formals (E)
         or else No (Last_Formal (E))
       then
          return False;