[Ada] Cleanup in error about unreachable code
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 30 May 2022 22:29:43 +0000 (00:29 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 5 Jul 2022 08:28:17 +0000 (08:28 +0000)
Cleanup only; behaviour is unaffected.

gcc/ada/

* sem_ch5.adb (Check_Unreachable_Code): Avoid explicit use of
Sloc; this should also help when we finally use Source_Span for
prettier error messages.

gcc/ada/sem_ch5.adb

index bb1e7b9..891c57a 100644 (file)
@@ -4468,8 +4468,7 @@ package body Sem_Ch5 is
                   end loop;
                end if;
 
-               Error_Msg
-                 ("??unreachable code!", Sloc (Error_Node), Error_Node);
+               Error_Msg_N ("??unreachable code!", Error_Node);
             end if;
 
          --  If the unconditional transfer of control instruction is the