From eb43eb5c1a9b691b77782938f41de33506694a54 Mon Sep 17 00:00:00 2001 From: Ronan Desplanques Date: Fri, 12 Jul 2024 10:56:58 +0200 Subject: ada: Ensure variable is initialized before use This patch is motivated by a GNAT SAS report. gcc/ada/ * scng.adb (Slit): Initialize object in uncommon path. --- gcc/ada/scng.adb | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc') diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb index c9ccc4d..08ce2ab 100644 --- a/gcc/ada/scng.adb +++ b/gcc/ada/scng.adb @@ -1166,6 +1166,7 @@ package body Scng is when '\' | '"' | '{' | '}' => Code := Get_Char_Code (C); when others => + Code := Get_Char_Code ('?'); Error_Msg_S ("illegal escaped character"); end case; -- cgit v1.1