scng.adb (Scan_Identifier): Handle case of identifier starting with wide character...
authorRobert Dewar <dewar@adacore.com>
Tue, 8 Apr 2008 06:54:43 +0000 (08:54 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 8 Apr 2008 06:54:43 +0000 (08:54 +0200)
2008-04-08  Robert Dewar  <dewar@adacore.com>

* scng.adb (Scan_Identifier): Handle case of identifier starting with
wide character using UTF-8 encoding.

From-SVN: r134047

gcc/ada/scng.adb

index 8322a249f8110ad7704bfbba06c4a7f5d1574b12..f7f68e634db6c5eb5b8c37be829d4caadac16cd6 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2007, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -2189,8 +2189,10 @@ package body Scng is
          --  is active, so if we find an ESC character we know that we have a
          --  wide character.
 
-         if Identifier_Char (Source (Scan_Ptr)) then
-
+         if Identifier_Char (Source (Scan_Ptr))
+           or else (Source (Scan_Ptr) in Upper_Half_Character
+                     and then Upper_Half_Encoding)
+         then
             --  Case of underline
 
             if Source (Scan_Ptr) = '_' then