[COMMITTED,02/31] ada: Follow-up fix to previous change for Text_Ptr

Message ID 20240521073035.314024-2-poulhies@adacore.com
State Committed
Commit b22c01db9a8cbc4030af4353a7b4d01be2c6123f
Headers
Series [COMMITTED,01/31] ada: Add new Mingw task priority mapping |

Commit Message

Marc Poulhiès May 21, 2024, 7:30 a.m. UTC
  From: Eric Botcazou <ebotcazou@adacore.com>

The variable would be saved and restored while still uninitialized.

gcc/ada/

	* err_vars.ads (Error_Msg_Sloc): Initialize to No_Location.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/err_vars.ads | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/ada/err_vars.ads b/gcc/ada/err_vars.ads
index 113dd936db6..838217b95f4 100644
--- a/gcc/ada/err_vars.ads
+++ b/gcc/ada/err_vars.ads
@@ -107,7 +107,7 @@  package Err_Vars is
 
    --  WARNING: There is a matching C declaration of these variables in fe.h
 
-   Error_Msg_Sloc : Source_Ptr;
+   Error_Msg_Sloc : Source_Ptr := No_Location;
    --  Source location for # insertion character in message
 
    Error_Msg_Name_1 : Name_Id;