diff options
author | Ronan Desplanques <desplanques@adacore.com> | 2024-07-12 10:56:58 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-08-02 09:08:08 +0200 |
commit | eb43eb5c1a9b691b77782938f41de33506694a54 (patch) | |
tree | 1e4ac111346b5f1e27231e6970154c15f92d304b | |
parent | 342e3cdc8b29e5dcfb68159ce9f72b744519b3db (diff) | |
download | gcc-eb43eb5c1a9b691b77782938f41de33506694a54.zip gcc-eb43eb5c1a9b691b77782938f41de33506694a54.tar.gz gcc-eb43eb5c1a9b691b77782938f41de33506694a54.tar.bz2 |
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.
-rw-r--r-- | gcc/ada/scng.adb | 1 |
1 files changed, 1 insertions, 0 deletions
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; |