aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-wchstw.ads
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2007-12-13 11:21:30 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2007-12-13 11:21:30 +0100
commit470cd9e99870bde530a3f6087efdc00d9b3f8f48 (patch)
treefe74bc1bf6eab08387b00192686ada41e98ef0ea /gcc/ada/s-wchstw.ads
parentb917101e1c2a5318471e217e04f280023cd48c6a (diff)
downloadgcc-470cd9e99870bde530a3f6087efdc00d9b3f8f48.zip
gcc-470cd9e99870bde530a3f6087efdc00d9b3f8f48.tar.gz
gcc-470cd9e99870bde530a3f6087efdc00d9b3f8f48.tar.bz2
a-ngcoty.adb: New pragma Fast_Math
2007-12-06 Robert Dewar <dewar@adacore.com> Ed Schonberg <schonberg@adacore.com> * a-ngcoty.adb: New pragma Fast_Math * opt.adb: New pragma Fast_Math * par-prag.adb: Add Implemented_By_Entry to the list of pragmas which do not require any special processing. (Favor_Top_Level): New pragma. New pragma Fast_Math * exp_attr.adb: Move Wide_[Wide_]Image routines to Exp_Imgv (Expand_N_Attribute_Reference, Displace_Allocator_Pointer, Expand_Allocator_Expression): Take into account VM_Target (Expand_Attribute, case 'Identity): Handle properly the case where the prefix is a task interface. New pragma Fast_Math * par.adb (Next_Token_Is): New function (P_Pragma): Add Skipping parameter (U_Left_Paren): New procedure (U_Right_Paren): New procedure New pragma Fast_Math * par-ch10.adb (P_Subunit): Unconditional msg for missing ) after subunit New pragma Fast_Math * sem_prag.adb: Add significance value to table Sig_Flag for pragma Implemented_By_Entry. (Analyze_Pragma): Add case for Ada 2005 pragma Implemented_By_Entry. (Set_Inline_Flags): Do not try to link pragma Inline onto chain of rep items, since it can apply to more than one overloadable entity. Set new flag Has_Pragma_Inline_Always for Inline_Always case. (Analyze_Pragma, case Complex_Representation): Improve error message. (Analyze_Pragma, case Assert): When assertions are disabled build the rewritten code with Sloc of expression rather than pragma, so new warning about failing is not deleted. (Analyze_Pragma): Allow pragma Preelaborable_Initialization to apply to protected types and update error message to reflect that. Test whether the protected type is allowed for the pragma (an error is issued if the type has any entries, or components that do not have preelaborable initialization). New pragma Fast_Math (Analyze_Pragma, case No_Return): Handle generic instance * snames.h, snames.ads, snames.adb: Add new predefined name for interface primitive _Disp_Requeue. New pragma Fast_Math * a-tags.ads, a-tags.adb: New calling sequence for String_To_Wide_[Wide_]String (Secondary_Tag): New subprogram. * exp_imgv.ads, exp_imgv.adb: Move Wide_[Wide_]Image routines here from Exp_Attr New calling sequence for String_To_Wide_[Wide_]String (Expand_Image_Attribute): Major rewrite. New calling sequence avoids the use of the secondary stack for image routines. * a-except-2005.adb, s-wchstw.ads, s-wchstw.adb, s-wwdenu.adb: New calling sequence for String_To_Wide_[Wide_]String * par-ch3.adb (P_Declarative_Items): Recognize use of Overriding in Ada 95 mode (P_Unknown_Discriminant_Part_Opt): Handle missing parens gracefully Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List * par-ch6.adb (P_Subprogram): Recognize use of Overriding in Ada 95 mode (P_Formal_Part): Use Skipping parameter in P_Pragma call to improve error recovery * par-util.adb (Next_Token_Is): New function (Signal_Bad_Attribute): Use new Namet.Is_Bad_Spelling_Of function * par-ch2.adb (Skip_Pragma_Semicolon): Do not resynchronize to semicolon if missing (P_Pragma): Implement new Skipping parameter Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List Fix location of flag for unrecognized pragma message * par-tchk.adb (U_Left_Paren): New procedure (U_Right_Paren): New procedure From-SVN: r130818
Diffstat (limited to 'gcc/ada/s-wchstw.ads')
-rw-r--r--gcc/ada/s-wchstw.ads38
1 files changed, 22 insertions, 16 deletions
diff --git a/gcc/ada/s-wchstw.ads b/gcc/ada/s-wchstw.ads
index b965e2f..7bd3529 100644
--- a/gcc/ada/s-wchstw.ads
+++ b/gcc/ada/s-wchstw.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2007, 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- --
@@ -32,33 +32,39 @@
------------------------------------------------------------------------------
-- This package contains the routine used to convert strings to wide (wide)
--- strings for use by wide (wide) character attributes (value, image etc.)
+-- strings for use by wide (wide) image attribute.
with System.WCh_Con;
package System.WCh_StW is
pragma Pure;
- function String_To_Wide_String
+ procedure String_To_Wide_String
(S : String;
- EM : System.WCh_Con.WC_Encoding_Method) return Wide_String;
+ R : out Wide_String;
+ L : out Natural;
+ EM : System.WCh_Con.WC_Encoding_Method);
-- This routine simply takes its argument and converts it to wide string
- -- format. In the context of the Wide_Image attribute, the argument is
- -- the corresponding 'Image attribute. Any wide character escape sequences
- -- in the string are converted to the corresponding wide character value.
- -- No syntax checks are made, it is assumed that any such sequences are
- -- validly formed (this must be assured by the caller), and results from
- -- the fact that Wide_Image is only used on strings that have been built
- -- by the compiler, such as images of enumeration literals. If the method
- -- for encoding is a shift-in, shift-out convention, then it is assumed
- -- that normal (non-wide character) mode holds at the start and end of
- -- the argument string. EM indicates the wide character encoding method.
+ -- format, storing the result in R (1 .. L), with L being set appropriately
+ -- on return. The caller guarantees that R is long enough to accomodate the
+ -- result. This is used in the context of the Wide_Image attribute, where
+ -- the argument is the corresponding 'Image attribute. Any wide character
+ -- escape sequences in the string are converted to the corresponding wide
+ -- character value. No syntax checks are made, it is assumed that any such
+ -- sequences are validly formed (this must be assured by the caller), and
+ -- results from the fact that Wide_Image is only used on strings that have
+ -- been built by the compiler, such as images of enumeration literals. If
+ -- the method for encoding is a shift-in, shift-out convention, then it is
+ -- assumed that normal (non-wide character) mode holds at the start and end
+ -- of the argument string. EM indicates the wide character encoding method.
-- Note: in the WCEM_Brackets case, the brackets escape sequence is used
-- only for codes greater than 16#FF#.
- function String_To_Wide_Wide_String
+ procedure String_To_Wide_Wide_String
(S : String;
- EM : System.WCh_Con.WC_Encoding_Method) return Wide_Wide_String;
+ R : out Wide_Wide_String;
+ L : out Natural;
+ EM : System.WCh_Con.WC_Encoding_Method);
-- Same function with Wide_Wide_String output
end System.WCh_StW;