diff options
author | Robert Dewar <dewar@adacore.com> | 2007-12-13 11:27:58 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-12-13 11:27:58 +0100 |
commit | c80d48556afdb3226ee55ef42b8b3327b71c631f (patch) | |
tree | 507d79df94d7670b6e5e13cfbfac98aa4c16fd86 /gcc/ada/s-wchcnv.adb | |
parent | 1fdc61b5655590ecc6352866204174c093589df3 (diff) | |
download | gcc-c80d48556afdb3226ee55ef42b8b3327b71c631f.zip gcc-c80d48556afdb3226ee55ef42b8b3327b71c631f.tar.gz gcc-c80d48556afdb3226ee55ef42b8b3327b71c631f.tar.bz2 |
g-spchge.ads, [...]: New files.
2007-12-06 Robert Dewar <dewar@adacore.com>
* g-spchge.ads, g-spchge.adb, g-u3spch.adb, g-u3spch.ads,
g-wispch.adb, g-wispch.ads, g-zspche.adb, g-zspche.ads,
namet-sp.adb, namet-sp.ads: New files.
* g-speche.adb: Use generic routine in g-spchge
* s-wchcnv.ads, s-wchcnv.adb:
Minor code cleanup (make formal type consistent with spec)
* namet.adb: Update comments.
* par-endh.adb (Evaluate_End_Entry): Use new
Namet.Sp.Is_Bad_Spelling_Of function
* par-load.adb (Load): Use new Namet.Sp.Is_Bad_Spelling_Of function
* sem_aggr.adb (Resolve_Record_Aggregate): If a component of an
ancestor is an access type initialized with a box, set its type
explicitly, for use in subsequent expansion.
(Check_Misspelled_Component): Use new Namet.Sp.Is_Bad_Spelling_Of
function
From-SVN: r130843
Diffstat (limited to 'gcc/ada/s-wchcnv.adb')
-rw-r--r-- | gcc/ada/s-wchcnv.adb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/ada/s-wchcnv.adb b/gcc/ada/s-wchcnv.adb index b58290f..3e877aa 100644 --- a/gcc/ada/s-wchcnv.adb +++ b/gcc/ada/s-wchcnv.adb @@ -47,7 +47,7 @@ package body System.WCh_Cnv is function Char_Sequence_To_UTF_32 (C : Character; - EM : WC_Encoding_Method) return UTF_32_Code + EM : System.WCh_Con.WC_Encoding_Method) return UTF_32_Code is B1 : Unsigned_32; C1 : Character; @@ -94,7 +94,7 @@ package body System.WCh_Cnv is raise Constraint_Error; end if; - W := Shift_Left (W, 6) or (U and 2#00111111#); + W := Shift_Left (W, 6) or (U and 2#00111111#); end Get_UTF_Byte; -- Start of processing for Char_Sequence_To_Wide @@ -151,15 +151,8 @@ package body System.WCh_Cnv is -- 16#00_0080#-16#00_07FF#: 110xxxxx 10xxxxxx elsif (U and 2#11100000#) = 2#110_00000# then - W := Shift_Left (U and 2#00011111#, 6); - U := Unsigned_32 (Character'Pos (In_Char)); - - if (U and 2#11000000#) /= 2#10_000000# then - raise Constraint_Error; - end if; - - W := W or (U and 2#00111111#); - + W := U and 2#00011111#; + Get_UTF_Byte; return UTF_32_Code (W); -- 16#00_0800#-16#00_ffff#: 1110xxxx 10xxxxxx 10xxxxxx @@ -210,7 +203,6 @@ package body System.WCh_Cnv is end if; when WCEM_Brackets => - if C /= '[' then return Character'Pos (C); end if; |