[Ada] Fix problem of infinite loop on bad wide character

Arnaud Charlet charlet@adacore.com
Fri Aug 1 08:04:00 GMT 2008


The spec of Error_Illegal_Wide_Character says that it bumps the scan
pointer, but that was not being done, resulting in infinite loops on
bad wide characters.

Tested on i686-pc-linux-gnu, committed on trunk

2008-08-01  Robert Dewar  <dewar@adacore.com>

	* scng.adb (Error_Illegal_Wide_Character): Bump scan pointer

-------------- next part --------------
Index: scng.adb
===================================================================
--- scng.adb	(revision 138468)
+++ scng.adb	(working copy)
@@ -350,6 +350,7 @@ package body Scng is
 
       procedure Error_Illegal_Wide_Character is
       begin
+         Scan_Ptr := Scan_Ptr + 1;
          Error_Msg ("illegal wide character", Wptr);
       end Error_Illegal_Wide_Character;
 


More information about the Gcc-patches mailing list