diff options
author | Robert Dewar <dewar@adacore.com> | 2007-12-13 11:21:30 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-12-13 11:21:30 +0100 |
commit | 470cd9e99870bde530a3f6087efdc00d9b3f8f48 (patch) | |
tree | fe74bc1bf6eab08387b00192686ada41e98ef0ea /gcc/ada/par.adb | |
parent | b917101e1c2a5318471e217e04f280023cd48c6a (diff) | |
download | gcc-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/par.adb')
-rw-r--r-- | gcc/ada/par.adb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index 9b9208f..e750510 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -530,7 +530,10 @@ is ------------- package Ch2 is - function P_Pragma return Node_Id; + function P_Pragma (Skipping : Boolean := False) return Node_Id; + -- Scan out a pragma. If Skipping is True, then the caller is skipping + -- the pragma in the context of illegal placement (this is used to avoid + -- some junk cascaded messages). function P_Identifier (C : Id_Check := None) return Node_Id; -- Scans out an identifier. The parameter C determines the treatment @@ -965,7 +968,7 @@ is procedure T_When; procedure T_With; - -- Procedures have names of the form TF_xxx, where Tok_xxx is a token + -- Procedures having names of the form TF_xxx, where Tok_xxx is a token -- name check that the current token matches the required token, and -- if so, scan past it. If not, an error message is issued indicating -- that the required token is not present (xxx expected). @@ -987,6 +990,13 @@ is procedure TF_Semicolon; procedure TF_Then; procedure TF_Use; + + -- Procedures with names of the form U_xxx, where Tok_xxx is a token + -- name, are just like the corresponding T_xxx procedures except that + -- an error message, if given, is unconditional. + + procedure U_Left_Paren; + procedure U_Right_Paren; end Tchk; -------------- @@ -1085,6 +1095,10 @@ is -- conditions are met, an error message is issued, and the merge is -- carried out, modifying the Chars field of Prev. + function Next_Token_Is (Tok : Token_Type) return Boolean; + -- Looks at token after current one and returns True if the token type + -- matches Tok. The scan is unconditionally restored on return. + procedure No_Constraint; -- Called in a place where no constraint is allowed, but one might -- appear due to a common error (e.g. after the type mark in a procedure @@ -1242,7 +1256,7 @@ begin -- Give error if bad pragma - if Chars (P_Node) > Last_Configuration_Pragma_Name + if not Is_Configuration_Pragma_Name (Chars (P_Node)) and then Chars (P_Node) /= Name_Source_Reference then if Is_Pragma_Name (Chars (P_Node)) then |