summaryrefslogtreecommitdiff
path: root/gcc/ada/s-imgwch.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 17:19:19 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 17:19:19 +0000
commitd016e0b5c7d0f728f669665428cd8120f6620b59 (patch)
treec29a9485008dc37a0ce489ce23a01cd8ba7dbd48 /gcc/ada/s-imgwch.adb
parent81f0d4b13c712877d3d87823587a3be610cf98e7 (diff)
downloadgcc-d016e0b5c7d0f728f669665428cd8120f6620b59.tar.gz
2005-12-05 Robert Dewar <dewar@adacore.com>
* exp_imgv.adb (Expand_Image_Attribute): Generate extra boolean parameter in call to Image_Wide_Character. * s-imgwch.ads, s-imgwch.adb (Image_Wide_Character): Add boolean parameter Ada_2005 to deal with annoying FFFE/FFFF inconsistency. (Image_Wide_Character): Add boolean parameter Ada_2005 to deal with annoying FFFE/FFFF inconsistency. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108293 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-imgwch.adb')
-rw-r--r--gcc/ada/s-imgwch.adb17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/s-imgwch.adb b/gcc/ada/s-imgwch.adb
index dc524da531e..a408ef62828 100644
--- a/gcc/ada/s-imgwch.adb
+++ b/gcc/ada/s-imgwch.adb
@@ -42,9 +42,24 @@ package body System.Img_WChar is
--------------------------
function Image_Wide_Character
- (V : Wide_Character) return String
+ (V : Wide_Character;
+ Ada_2005 : Boolean) return String
is
begin
+ -- Annoying Ada 95 incompatibility with FFFE/FFFF
+
+ if V >= Wide_Character'Val (16#FFFE#)
+ and then not Ada_2005
+ then
+ if V = Wide_Character'Val (16#FFFE#) then
+ return "FFFE";
+ else
+ return "FFFF";
+ end if;
+ end if;
+
+ -- Normal case, same as Wide_Wide_Character
+
return
Image_Wide_Wide_Character
(Wide_Wide_Character'Val (Wide_Character'Pos (V)));