summaryrefslogtreecommitdiff
path: root/gcc/ada/sinput.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sinput.adb')
-rw-r--r--gcc/ada/sinput.adb17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index dac8dd809a8..70d44816f94 100644
--- a/gcc/ada/sinput.adb
+++ b/gcc/ada/sinput.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
@@ -331,11 +331,22 @@ package body Sinput is
while S < P loop
if Src (S) = HT then
C := (C - 1) / 8 * 8 + (8 + 1);
+ S := S + 1;
+
+ -- Deal with wide character case, but don't include brackets
+ -- notation in this circuit, since we know that this will
+ -- display unencoded (no one encodes brackets notation).
+
+ elsif Src (S) /= '[' and then Is_Start_Of_Wide_Char (Src, S) then
+ C := C + 1;
+ Skip_Wide (Src, S);
+
+ -- Normal (non-wide) character case or brackets sequence
+
else
C := C + 1;
+ S := S + 1;
end if;
-
- S := S + 1;
end loop;
return C;