diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-09-14 14:48:24 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-10-25 11:08:59 +0200 |
commit | a71c37a7241d8a73fe51712e5b4c7222afbaee8b (patch) | |
tree | 81d8ec880660a293ac5c2fe7fb284a5dfb6b4e27 /gcc | |
parent | 18232cbcfd2c4f95bf51b4fa9fb65f545c2a0569 (diff) | |
download | gcc-a71c37a7241d8a73fe51712e5b4c7222afbaee8b.zip gcc-a71c37a7241d8a73fe51712e5b4c7222afbaee8b.tar.gz gcc-a71c37a7241d8a73fe51712e5b4c7222afbaee8b.tar.bz2 |
ada: Fix wrong handling of wide wide characters in Append_Decoded_With_Brackets
This only shows up at link time when the name of a compilation unit contains
a wide wide character.
gcc/ada/ChangeLog:
* namet.adb (Append_Decoded_With_Brackets): Fix condition for the
cheap test at the beginning of the loop.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/namet.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/namet.adb b/gcc/ada/namet.adb index 72f6c20..2e3b9c0 100644 --- a/gcc/ada/namet.adb +++ b/gcc/ada/namet.adb @@ -474,7 +474,11 @@ package body Namet is P := 1; while P < Temp.Length loop - if Temp.Chars (P + 1) in 'A' .. 'Z' then + -- Cheap test for the common case of no encoding + + if Temp.Chars (P + 1) in 'A' .. 'Z' + and then Temp.Chars (P + 1) /= 'W' + then P := P + 1; -- Uhh encoding |