aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-imgwch.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2010-10-08 12:34:08 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-08 14:34:08 +0200
commit3786bbd19bb747859aac3bea0c1048b674e71727 (patch)
tree4b3146f56cf873301154bb78b8f6d4bc6b2ec0a2 /gcc/ada/s-imgwch.adb
parentbcae2eaac7fe1533f7ef107aa41f0ff67db39631 (diff)
downloadgcc-3786bbd19bb747859aac3bea0c1048b674e71727.zip
gcc-3786bbd19bb747859aac3bea0c1048b674e71727.tar.gz
gcc-3786bbd19bb747859aac3bea0c1048b674e71727.tar.bz2
sem_aggr.adb: Minor reformatting.
2010-10-08 Robert Dewar <dewar@adacore.com> * sem_aggr.adb: Minor reformatting. 2010-10-08 Robert Dewar <dewar@adacore.com> * exp_imgv.adb (Expand_Image_Attribute): Handle special calling sequence for soft hyphen for Character'Image case. * rtsfind.ads (Image_Character_05): New entry * s-imgcha.adb (Image_Character_05): New procedurew * s-imgcha.ads (Image_Character_05): New procedure * s-imgwch.adb (Image_Wide_Character): Deal with Ada 2005 soft hyphen case. * s-valcha.adb (Value_Character): Recognize SOFT_HYPHEN for 16#AD# * sem_attr.adb (Eval_Attribute, case Width): Handle soft_hyphen name properly. From-SVN: r165168
Diffstat (limited to 'gcc/ada/s-imgwch.adb')
-rw-r--r--gcc/ada/s-imgwch.adb20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ada/s-imgwch.adb b/gcc/ada/s-imgwch.adb
index 93ee55d..44cca39 100644
--- a/gcc/ada/s-imgwch.adb
+++ b/gcc/ada/s-imgwch.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, 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- --
@@ -61,6 +61,16 @@ package body System.Img_WChar is
P := 4;
+ -- Deal with annoying Ada 95 incompatibility with soft hyphen
+
+ elsif V = Wide_Character'Val (16#00AD#)
+ and then not Ada_2005
+ then
+ P := 3;
+ S (1) := ''';
+ S (2) := Character'Val (16#00AD#);
+ S (3) := ''';
+
-- Normal case, same as Wide_Wide_Character
else
@@ -83,10 +93,14 @@ package body System.Img_WChar is
Val : Unsigned_32 := Wide_Wide_Character'Pos (V);
begin
- -- If in range of standard Character, use Character routine
+ -- If in range of standard Character, use Character routine. Use the
+ -- Ada 2005 version, since either we are called directly in Ada 2005
+ -- mode for Wide_Wide_Character, or this is the Wide_Character case
+ -- which already took care of the Soft_Hyphen glitch.
if Val <= 16#FF# then
- Image_Character (Character'Val (Wide_Wide_Character'Pos (V)), S, P);
+ Image_Character_05
+ (Character'Val (Wide_Wide_Character'Pos (V)), S, P);
-- Otherwise value returned is Hex_hhhhhhhh