diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-08 12:34:08 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-08 12:34:08 +0000 |
commit | 4b30b6a13dc9d8eca4977e0acd65b9048ccb5700 (patch) | |
tree | 4b3146f56cf873301154bb78b8f6d4bc6b2ec0a2 /gcc/ada/s-imgwch.adb | |
parent | 3577dcbbd22d33548ae7cb18896c6e6555fb39a6 (diff) | |
download | gcc-4b30b6a13dc9d8eca4977e0acd65b9048ccb5700.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-imgwch.adb')
-rw-r--r-- | gcc/ada/s-imgwch.adb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ada/s-imgwch.adb b/gcc/ada/s-imgwch.adb index 93ee55d99d2..44cca399624 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 |