Apply_Compile_Time_Constraint_Error
(N => Expr,
Msg =>
- "(Ada 2005) null not allowed in null-excluding "
+ "(Ada 2005) NULL not allowed in null-excluding "
& "components??",
Reason => CE_Null_Not_Allowed);
Apply_Compile_Time_Constraint_Error
(N => Expr,
Msg =>
- "(Ada 2005) null not allowed in null-excluding "
+ "(Ada 2005) NULL not allowed in null-excluding "
& "objects??",
Reason => CE_Null_Not_Allowed);
Apply_Compile_Time_Constraint_Error
(N => Expr,
Msg =>
- "(Ada 2005) null not allowed in null-excluding "
+ "(Ada 2005) NULL not allowed in null-excluding "
& "formals??",
Reason => CE_Null_Not_Allowed);
if Warning_Needed then
Error_Msg_N
- ("Objects of the type cannot be initialized statically "
+ ("objects of the type cannot be initialized statically "
& "by default??", Parent (E));
end if;
end if;
else
- Error_Msg_N ("Object cannot be initialized statically??", E);
+ Error_Msg_N ("object cannot be initialized statically??", E);
end if;
end if;
end Initialization_Warning;
Has_Rep_Pragma (E, Name_Atomic_Components)
then
Error_Msg_N
- ("stand alone atomic constant must be " &
+ ("standalone atomic constant must be " &
"imported (RM C.6(13))", E);
elsif Has_Rep_Pragma (E, Name_Volatile)
Has_Rep_Pragma (E, Name_Volatile_Components)
then
Error_Msg_N
- ("stand alone volatile constant must be " &
+ ("standalone volatile constant must be " &
"imported (RM C.6(13))", E);
end if;
end if;
else
Error_Msg_File_1 := Fname;
Error_Msg_Unit_1 := Uname_Actual;
- Error_Msg ("File{ does not contain unit$", Load_Msg_Sloc);
+ Error_Msg ("file{ does not contain unit$", Load_Msg_Sloc);
end if;
Write_Dependency_Chain;
Scan; -- past OTHERS
if Token /= Tok_Arrow then
- Error_Msg_BC ("expect arrow after others");
+ Error_Msg_BC ("expect `='>` after OTHERS");
else
Scan; -- past arrow
end if;
if Token /= Tok_Box then
- Error_Msg_BC ("expect Box after arrow");
+ Error_Msg_BC ("expect `'<'>` after `='>`");
else
Scan; -- past box
end if;
if Unknown_Dis then
Error_Msg
- ("Full type declaration cannot have unknown discriminants",
+ ("full type declaration cannot have unknown discriminants",
Discr_Sloc);
end if;
end if;
-- otherwise things are really messed up, so resynchronize.
if Token = Tok_Record then
- Error_Msg_SC ("anonymous record definitions are not permitted");
+ Error_Msg_SC ("anonymous record definition not permitted");
Discard_Junk_Node (P_Record_Definition);
return Error;
Set_Defining_Identifier (Decl_Node, Idents (Ident));
if Token = Tok_Constant then
- Error_Msg_SC ("constant components are not permitted");
+ Error_Msg_SC ("constant component not permitted");
Scan;
end if;
Set_Null_Exclusion_Present (CompDef_Node, Not_Null_Present);
if Token = Tok_Array then
- Error_Msg_SC ("anonymous arrays not allowed as components");
+ Error_Msg_SC ("anonymous array not allowed as component");
raise Error_Resync;
end if;
if Token = Tok_All then
if Ada_Version < Ada_2005 then
Error_Msg_SP
- ("ALL is not permitted for anonymous access types");
+ ("ALL not permitted for anonymous access type");
end if;
Scan; -- past ALL
elsif Kind = N_Assignment_Statement then
Error_Msg
("assignment statement not allowed in package spec",
- Sloc (Decl));
+ Sloc (Decl));
end if;
Next (Decl);
Attr_Node := New_Node (N_Attribute_Reference, Token_Ptr);
Set_Attribute_Name (Attr_Node, Attr_Name);
if Attr_Name /= Name_Reduce then
- Error_Msg ("reduce attribute expected", Prev_Token_Ptr);
+ Error_Msg ("Reduce attribute expected", Prev_Token_Ptr);
end if;
Set_Prefix (Attr_Node, S);
elsif Token = Tok_With then
Error_Msg_SC ("WITH must be preceded by single expression in " &
- "extension aggregate");
+ "extension aggregate");
raise Error_Resync;
-- Range attribute can only appear as part of a discrete choice list
Resync_Past_Semicolon;
elsif Token in Token_Class_Declk then
- Error_Msg_SC ("this declaration not allowed in protected body");
+ Error_Msg_SC ("declaration not allowed in protected body");
Resync_Past_Semicolon;
else
while Present (Choice) loop
Analyze_And_Resolve (Choice, Key_Type);
if not Is_Static_Expression (Choice) then
- Error_Msg_N ("Choice must be static", Choice);
+ Error_Msg_N ("choice must be static", Choice);
end if;
Next (Choice);
if Present (Component_Associations (N)) then
if Present (Expressions (N)) then
- Error_Msg_N ("Container aggregate cannot be "
+ Error_Msg_N ("container aggregate cannot be "
& "both positional and named", N);
return;
end if;
while Present (Choice) loop
if Nkind (Choice) = N_Others_Choice then
Error_Msg_N
- ("others not allowed in delta aggregate", Choice);
+ ("OTHERS not allowed in delta aggregate", Choice);
elsif Nkind (Choice) = N_Subtype_Indication then
Resolve_Discrete_Subtype_Indication
if Nkind (Choice) = N_Others_Choice then
Error_Msg_N
- ("others not allowed in delta aggregate", Choice);
+ ("OTHERS not allowed in delta aggregate", Choice);
elsif Is_Entity_Name (Choice)
and then Is_Type (Entity (Choice))
("OTHERS must represent at least one component", Selectr);
elsif Others_Box = 1 and then Warn_On_Redundant_Constructs then
- Error_Msg_N ("others choice is redundant?", Box_Node);
+ Error_Msg_N ("OTHERS choice is redundant?", Box_Node);
Error_Msg_N
("\previous choices cover all components?", Box_Node);
end if;
-- because the association may be a null array range.
Error_Msg_N
- ("(Ada 2005) null not allowed in null-excluding component??", Expr);
+ ("(Ada 2005) NULL not allowed in null-excluding component??", Expr);
Error_Msg_N
("\Constraint_Error will be raised at run time??", Expr);
Check_E0;
if not Is_Object_Reference (P) then
- Error_Attr_P ("prefix for % attribute must be object");
+ Error_Attr_P ("prefix of % attribute must be object");
-- What about the access object cases ???
null;
else
Error_Attr
- ("Attribute % must apply to entry of current task", N);
+ ("attribute % must apply to entry of current task", N);
end if;
end if;
| E_Entry_Family
| E_Loop
then
- Error_Attr ("Attribute % cannot appear in inner unit", N);
+ Error_Attr ("attribute % cannot appear in inner unit", N);
elsif Ekind (Scope (Ent)) = E_Protected_Type
and then not Has_Completion (Scope (Ent))
null;
else
Error_Msg_NE
- ("cannot apply reduce to object of type$", N, Typ);
+ ("cannot apply Reduce to object of type$", N, Typ);
end if;
elsif Present (Expressions (Stream))
N_Iterated_Component_Association
then
Error_Msg_N
- ("Prefix of reduce must be an iterated component", N);
+ ("prefix of Reduce must be an iterated component", N);
end if;
Analyze (E1);
then
Error_Attr_P
("% attribute can only be applied to objects " &
- "of class - wide type");
+ "of class-wide type");
end if;
-- The prefix cannot be an incomplete type. However, references to
if Nkind (Expr) = N_Others_Choice then
Error_Attr
- ("others choice not allowed in attribute %", Expr);
+ ("OTHERS choice not allowed in attribute %", Expr);
-- Otherwise analyze and resolve all indexes
if Nkind (Index) = N_Others_Choice then
Error_Attr
- ("others choice not allowed in attribute %", Index);
+ ("OTHERS choice not allowed in attribute %", Index);
-- The index denotes a range of elements
elsif Nkind (Comp) = N_Others_Choice then
Error_Attr
- ("others choice not allowed in attribute %", Comp);
+ ("OTHERS choice not allowed in attribute %", Comp);
-- The name of a record component cannot appear in any
-- other form.
and then not Private_Present (P)
and then not Is_Remote_Call_Interface (E)
then
- Error_Msg_N ("public child of rci unit must also be rci unit", N);
+ Error_Msg_N
+ ("public child of 'R'C'I unit must also be 'R'C'I unit", N);
end if;
end if;
end Validate_Categorization_Dependency;
if Comes_From_Source (E) then
if Is_Limited_Type (E) then
Error_Msg_N
- ("limited type not allowed in rci unit", Parent (E));
+ ("limited type not allowed in 'R'C'I unit", Parent (E));
Explain_Limited_Type (E, Parent (E));
elsif Ekind (E) in E_Generic_Function
| E_Generic_Package
| E_Generic_Procedure
then
- Error_Msg_N ("generic declaration not allowed in rci unit",
+ Error_Msg_N ("generic declaration not allowed in 'R'C'I unit",
Parent (E));
elsif (Ekind (E) = E_Function or else Ekind (E) = E_Procedure)
and then Has_Pragma_Inline (E)
then
Error_Msg_N
- ("inlined subprogram not allowed in rci unit", Parent (E));
+ ("inlined subprogram not allowed in 'R'C'I unit", Parent (E));
-- Inner packages that are renamings need not be checked. Generic
-- RCI packages are subject to the checks, but entities that come
null;
when N_Subprogram_Declaration =>
- Error_Msg_N ("subprograms not allowed in limited with_clauses", N);
+ Error_Msg_N
+ ("subprogram not allowed in `LIMITED WITH` clause", N);
return;
when N_Generic_Package_Declaration
| N_Generic_Subprogram_Declaration
=>
- Error_Msg_N ("generics not allowed in limited with_clauses", N);
+ Error_Msg_N ("generic not allowed in `LIMITED WITH` clause", N);
return;
when N_Generic_Instantiation =>
Error_Msg_N
- ("generic instantiations not allowed in limited with_clauses",
+ ("generic instantiation not allowed in `LIMITED WITH` clause",
N);
return;
when N_Generic_Renaming_Declaration =>
Error_Msg_N
- ("generic renamings not allowed in limited with_clauses", N);
+ ("generic renaming not allowed in `LIMITED WITH` clause", N);
return;
when N_Subprogram_Renaming_Declaration =>
Error_Msg_N
- ("renamed subprograms not allowed in limited with_clauses", N);
+ ("renamed subprogram not allowed in `LIMITED WITH` clause", N);
return;
when N_Package_Renaming_Declaration =>
Error_Msg_N
- ("renamed packages not allowed in limited with_clauses", N);
+ ("renamed package not allowed in `LIMITED WITH` clause", N);
return;
when others =>
Others_Choice := Actual;
if Present (Next (Actual)) then
- Error_Msg_N ("others must be last association", Actual);
+ Error_Msg_N ("OTHERS must be last association", Actual);
end if;
-- This subprogram is used both for formal packages and for
and then Comes_From_Source (I_Node)
then
Error_Msg_N
- ("others association not allowed in an instance",
+ ("OTHERS association not allowed in an instance",
Actual);
end if;
elsif Ekind (A_Gen_T) = E_General_Access_Type
and then Ekind (Base_Type (Act_T)) /= E_General_Access_Type
then
- Error_Msg_N -- CODEFIX
+ Error_Msg_N
("actual must be general access type!", Actual);
Error_Msg_NE -- CODEFIX
- ("add ALL to }!", Actual, Act_T);
+ ("\add ALL to }!", Actual, Act_T);
Abandon_Instantiation (Actual);
end if;
end if;
else
Error_Msg_Name_1 := Chars (Act_T);
Error_Msg_NE
- ("Actual% must implement interface&",
+ ("actual% must implement interface&",
Actual, Etype (Iface));
end if;
Error_Msg_N
("incompatible interfacing aspects given for &", E);
Error_Msg_Sloc := Sloc (Expo);
- Error_Msg_N ("\aspect `Export` #", E);
+ Error_Msg_N ("\aspect Export #", E);
Error_Msg_Sloc := Sloc (Imp);
- Error_Msg_N ("\aspect `Import` #", E);
+ Error_Msg_N ("\aspect Import #", E);
end if;
-- A variable is most likely modified from the outside. Take
if A_Id = Aspect_External_Name then
if No (Expo) and then No (Imp) then
Error_Msg_N
- ("aspect `External_Name` requires aspect `Import` or "
- & "`Export`", Aspect);
+ ("aspect External_Name requires aspect Import or "
+ & "Export", Aspect);
end if;
-- Otherwise ensure that aspect Link_Name applies to aspect
pragma Assert (A_Id = Aspect_Link_Name);
if No (Expo) and then No (Imp) then
Error_Msg_N
- ("aspect `Link_Name` requires aspect `Import` or "
- & "`Export`", Aspect);
+ ("aspect Link_Name requires aspect Import or Export",
+ Aspect);
end if;
end if;
end Analyze_Aspect_External_Link_Name;
for Asp in Pre_Post_Aspects loop
if Has_Aspect (E, Asp) then
Error_Msg_N
- ("this aspect not allowed for static expression "
- & "functions", Find_Aspect (E, Asp));
+ ("this aspect is not allowed for a static "
+ & "expression function",
+ Find_Aspect (E, Asp));
return;
end if;
elsif Within_Protected_Type (E) then
Error_Msg_N
- ("aspect% not applicable to protected operations", Id);
+ ("aspect% not applicable to protected operation", Id);
return;
else
else
Error_Msg_N
- ("main subprogram CPU is out of range", Expr);
+ ("main subprogram 'C'P'U is out of range", Expr);
end if;
-- For the Priority aspect
elsif A_Id = Aspect_Default_Value
and then not Is_Scalar_Type (E)
then
- Error_Msg_N ("aspect% can only be applied to scalar type",
- Id);
+ Error_Msg_N
+ ("aspect% can only be applied to scalar type", Id);
goto Continue;
elsif A_Id = Aspect_Default_Component_Value then
if not Is_Array_Type (E) then
- Error_Msg_N ("aspect% can only be applied to array " &
- "type", Id);
+ Error_Msg_N
+ ("aspect% can only be applied to array type", Id);
goto Continue;
elsif not Is_Scalar_Type (Component_Type (E)) then
if Nkind (Parent (N)) = N_Compilation_Unit then
Error_Msg_Name_1 := Nam;
- Error_Msg_N ("incorrect placement of aspect `%`", E);
+ Error_Msg_N ("incorrect placement of aspect %", E);
goto Continue;
end if;
then
Error_Msg_Name_1 := Nam;
Error_Msg_NE
- ("wrong syntax for aspect `%` for &", Id, E);
+ ("wrong syntax for aspect % for &", Id, E);
goto Continue;
end if;
then
Error_Msg_Name_1 := Nam;
Error_Msg_NE
- ("wrong syntax for aspect `%` for &", Id, E);
+ ("wrong syntax for aspect % for &", Id, E);
goto Continue;
end if;
-- come from an aspect specification.
if not Is_Task_Type (U_Ent) then
- Error_Msg_N ("CPU can only be defined for task", Nam);
+ Error_Msg_N ("'C'P'U can only be defined for task", Nam);
elsif Duplicate_Clause then
null;
else
Error_Msg_NE
- ("Default Iterator must be a primitive of&", Func, U_Ent);
+ ("Default_Iterator must be a primitive of&", Func, U_Ent);
end if;
end Default_Iterator;
| N_Implicit_Label_Declaration
then
Error_Msg_N
- ("this declaration not allowed in machine code subprogram",
+ ("this declaration is not allowed in machine code subprogram",
DeclO);
end if;
end if;
if Nkind (Choice) = N_Others_Choice then
- Error_Msg_N ("others choice not allowed here", Choice);
+ Error_Msg_N ("OTHERS choice not allowed here", Choice);
Err := True;
elsif Nkind (Choice) = N_Range then
or else Etype (Expression (Expr)) /= Typ
then
Error_Msg_N
- ("expression must denaote subtype", Expression (Expr));
+ ("expression must denote subtype", Expression (Expr));
return False_Range;
end if;
("NOT modifier not allowed for Stable_Properties aspect"
& " of a type", PF_Arg);
else
- Error_Msg_N ("Mixed use of NOT modifiers", PF_Arg);
+ Error_Msg_N ("mixed use of NOT modifiers", PF_Arg);
end if;
end Modifier_Error;
if Nkind (PF_Name) not in
N_Identifier | N_Operator_Symbol | N_Selected_Component
then
- Error_Msg_N ("Bad property function name", PF_Name);
+ Error_Msg_N ("bad property function name", PF_Name);
end if;
end Check_Property_Function_Arg;
if Is_Aspect_Of_Type then
if not Is_Tagged_Type (E) then
Error_Msg_N
- ("Stable_Properties'Class aspect cannot be specified for "
+ ("Stable_Properties''Class aspect cannot be specified for "
& "an untagged type", N);
end if;
else
if not Is_Dispatching_Operation (E) then
Error_Msg_N
- ("Stable_Properties'Class aspect cannot be specified for "
+ ("Stable_Properties''Class aspect cannot be specified for "
& "a subprogram that is not a primitive subprogram "
& "of a tagged type", N);
end if;
or else Null_Record_Present (N)
or else not Present (Expressions (N))
then
- Error_Msg_N ("Bad Stable_Properties aspect specification", N);
+ Error_Msg_N ("bad Stable_Properties aspect specification", N);
return;
end if;
-- First or Last (Container) => Cursor
if Etype (Ent) /= Cursor then
- Error_Msg_N ("primitive for First must yield a curosr", N);
+ Error_Msg_N ("primitive for First must yield a cursor", N);
end if;
elsif Nam = Name_Next then
if All_Present (N)
and then Ada_Version >= Ada_2005
then
- Error_Msg_N ("ALL is not permitted for anonymous access types", N);
+ Error_Msg_N ("ALL not permitted for anonymous access types", N);
end if;
-- Ada 2005 (AI-254): In case of anonymous access to subprograms call
if Nkind (Def) in N_Has_Etype then
if Etype (Def) = T_Name then
Error_Msg_N
- ("type& cannot be used before end of its declaration", Def);
+ ("type& cannot be used before the end of its declaration",
+ Def);
end if;
-- If this is not a subtype, then this is an access_definition
then
Error_Msg_N
("deferred constant must be declared in visible part",
- Parent (Prev));
+ Parent (Prev));
end if;
if Is_Access_Type (T)
end if;
if Aliased_Present (A) then
- Error_Msg_N ("aliased not allowed in declare_expression", A);
+ Error_Msg_N ("ALIASED not allowed in declare_expression", A);
end if;
if Constant_Present (A)
if Etype (N) = Any_Type then
Error_Msg_N
- ("type incompatible with that of `THEN` expression",
+ ("type incompatible with that of THEN expression",
Else_Expr);
return;
end if;
Error_Msg_N ("\use qualified expression instead", N);
elsif Nkind (Expr) = N_Allocator then
- Error_Msg_N ("argument of conversion cannot be an allocator", N);
+ Error_Msg_N ("argument of conversion cannot be allocator", N);
Error_Msg_N ("\use qualified expression instead", N);
elsif Nkind (Expr) = N_String_Literal then
if Ada_Version = Ada_83 then
Resolve (Expr, Typ);
else
- Error_Msg_N ("argument of conversion cannot be character literal",
- N);
+ Error_Msg_N
+ ("argument of conversion cannot be character literal", N);
Error_Msg_N ("\use qualified expression instead", N);
end if;
| Name_Unchecked_Access
| Name_Unrestricted_Access
then
- Error_Msg_N ("argument of conversion cannot be access", N);
+ Error_Msg_N
+ ("argument of conversion cannot be access attribute", N);
Error_Msg_N ("\use qualified expression instead", N);
end if;
or else Is_Protected_Component (Ent)
then
Error_Msg_N
- ("protected function cannot modify protected object", N);
+ ("protected function cannot modify its protected object",
+ N);
return;
end if;
end;
and then Convention (S) = Convention_Protected
then
Error_Msg_N
- ("protected function cannot modify protected object",
+ ("protected function cannot modify its protected " &
+ "object",
Lhs);
end if;
if Is_Protected_Part_Of_Constituent (Lhs) and then Within_Function then
Error_Msg_N
- ("protected function cannot modify protected object", Lhs);
+ ("protected function cannot modify its protected object", Lhs);
end if;
-- Resolution may have updated the subtype, in case the left-hand side
Apply_Compile_Time_Constraint_Error
(N => Rhs,
Msg =>
- "(Ada 2005) null not allowed in null-excluding objects??",
+ "(Ada 2005) NULL not allowed in null-excluding objects??",
Reason => CE_Null_Not_Allowed);
-- We still mark this as a possible modification, that's necessary
-- Can it really happen (extended return???)
Error_Msg_N
- ("aliased only allowed for limited return objects "
+ ("ALIASED only allowed for limited return objects "
& "in Ada 2012??", N);
elsif not Is_Limited_View (R_Type) then
Error_Msg_N
- ("aliased only allowed for limited return objects", N);
+ ("ALIASED only allowed for limited return objects", N);
end if;
end if;
Error_Msg_Sloc :=
Text_Ptr'Max (Sloc (Entity (E1)), Sloc (Entity (E2)));
Error_Msg_NE
- ("Meaning of& differs because of declaration#", E1, E2);
+ ("meaning of& differs because of declaration#", E1, E2);
end if;
return Result;
elsif Warn_On_Obsolescent_Feature and then False then
Error_Msg_N
- ("applying 'Class to an untagged incomplete type"
+ ("applying ''Class to an untagged incomplete type"
& " is an obsolescent feature (RM J.11)?r?", N);
end if;
end if;
if Kind /= E_Block and then Kind /= E_Loop
and then not Is_Entry (Task_Nam)
then
- Error_Msg_N ("enclosing body of accept must be a task", N);
+ Error_Msg_N ("enclosing body of ACCEPT must be a task", N);
return;
end if;
end loop;
if Ekind (Etype (Task_Nam)) /= E_Task_Type then
- Error_Msg_N ("invalid context for accept statement", N);
+ Error_Msg_N ("invalid context for ACCEPT statement", N);
return;
end if;
end loop;
if Entry_Nam = Any_Id then
- Error_Msg_N ("no entry declaration matches accept statement", N);
+ Error_Msg_N ("no entry declaration matches ACCEPT statement", N);
return;
else
Set_Entity (Nam, Entry_Nam);
if Entry_Nam = Scope_Stack.Table (J).Entity then
Error_Msg_N
- ("duplicate accept statement for same entry (RM 9.5.2 (15))", N);
+ ("duplicate ACCEPT statement for same entry (RM 9.5.2 (15))", N);
-- Do not continue analysis of accept statement, to prevent
-- cascaded errors.
when N_Asynchronous_Select =>
Error_Msg_N
- ("accept statements are not allowed within an "
- & "asynchronous select inner to the enclosing task body",
+ ("ACCEPT statement not allowed within an "
+ & "asynchronous SELECT inner to the enclosing task body",
N);
exit;
if Entity (EDN1) = Ent then
Error_Msg_Sloc := Sloc (Stm1);
Error_Msg_N
- ("accept duplicates one on line#??", Stm);
+ ("ACCEPT duplicates one on line#??", Stm);
exit;
end if;
end if;
Check_Potentially_Blocking_Operation (N);
if Terminate_Present and Delay_Present then
- Error_Msg_N ("at most one of terminate or delay alternative", N);
+ Error_Msg_N ("at most one of TERMINATE or DELAY alternative", N);
elsif not Accept_Present then
Error_Msg_N
- ("select must contain at least one accept alternative", N);
+ ("SELECT must contain at least one ACCEPT alternative", N);
end if;
if Present (Else_Statements (N)) then
if Terminate_Present or Delay_Present then
- Error_Msg_N ("else part not allowed with other alternatives", N);
+ Error_Msg_N ("ELSE part not allowed with other alternatives", N);
end if;
Analyze_Statements (Else_Statements (N));
if Nkind (Case_Guard) = N_Others_Choice then
if Others_Seen then
Error_Msg_N
- ("only one others choice allowed in contract cases",
+ ("only one OTHERS choice allowed in contract cases",
Case_Guard);
else
Others_Seen := True;
elsif Others_Seen then
Error_Msg_N
- ("others must be the last choice in contract cases", N);
+ ("OTHERS must be the last choice in contract cases", N);
end if;
-- Preanalyze the case guard and consequence
Error_Pragma ("at least one parameter required for pragma%");
elsif Ekind (Formal) /= E_Out_Parameter then
- Error_Pragma ("first parameter must have mode out for pragma%");
+ Error_Pragma ("first parameter must have mode OUT for pragma%");
else
Set_Is_Valued_Procedure (Ent);
if Nkind (Prop) = N_Others_Choice then
if Others_Seen then
SPARK_Msg_N
- ("only one others choice allowed in option External",
+ ("only one OTHERS choice allowed in option External",
Prop);
else
Others_Seen := True;
elsif Others_Seen then
SPARK_Msg_N
- ("others must be the last property in option External",
+ ("OTHERS must be the last property in option External",
Prop);
-- The only remaining legal options are the four predefined
if From_Aspect_Specification (Prag) then
Error_Msg_N
- ("aspect % cannot apply to a stand alone expression function",
+ ("aspect % cannot apply to a standalone expression function",
Prag);
else
Error_Msg_N
- ("pragma % cannot apply to a stand alone expression function",
+ ("pragma % cannot apply to a standalone expression function",
Prag);
end if;
end Expression_Function_Error;
elsif Ada_Version >= Ada_2005 then
Apply_Compile_Time_Constraint_Error
(N => A,
- Msg => "(Ada 2005) null not allowed in "
+ Msg => "(Ada 2005) NULL not allowed in "
& "null-excluding formal??",
Reason => CE_Null_Not_Allowed);
end if;
if Nkind (Parent (N)) in N_Subprogram_Call then
Error_Msg_N
- ("null is not allowed as argument for an access parameter", N);
+ ("NULL is not allowed as argument for an access parameter", N);
-- Standard message for all other cases (are there any?)
else
Error_Msg_N
- ("null cannot be of an anonymous access type", N);
+ ("NULL cannot be of an anonymous access type", N);
end if;
end if;
else
Insert_Action
(Compile_Time_Constraint_Error (N,
- "(Ada 2005) null not allowed in null-excluding objects??"),
+ "(Ada 2005) NULL not allowed in null-excluding objects??"),
Make_Raise_Constraint_Error (Loc,
Reason => CE_Access_Check_Failed));
end if;
elsif Typ = Universal_Integer or else Typ = Any_Modular then
if Parent_Is_Boolean then
Error_Msg_N
- ("operand of not must be enclosed in parentheses",
+ ("operand of NOT must be enclosed in parentheses",
Right_Opnd (N));
else
Error_Msg_N
then
if Cursor /= Any_Type then
Error_Msg_N
- ("Operation First for iterable type must be unique", Aspect);
+ ("operation First for iterable type must be unique", Aspect);
return Any_Type;
else
Cursor := Etype (Func);
and then Covers
(Designated_Type (Expec_Type), Designated_Type (Found_Type))
then
- Error_Msg_N -- CODEFIX
+ Error_Msg_N
("result must be general access type!", Expr);
Error_Msg_NE -- CODEFIX
- ("add ALL to }!", Expr, Expec_Type);
+ ("\add ALL to }!", Expr, Expec_Type);
-- Another special check, if the expected type is an integer type,
-- but the expression is of type System.Address, and the parent is
pragma Unreferenced (Version);
begin
Put_Line
- ("creation of symbol files are not supported on this platform");
+ ("creation of symbol files is not supported on this platform");
Success := False;
end Initialize;
end Test;
procedure Test_Instance1 is new Test (T => Rec_Type); -- { dg-error "actual must implement all interfaces of formal \"T\"" }
- procedure Test_Instance1 is new Test (T => Rec_Type1); -- { dg-error "Actual \"Rec_Type1\" must implement interface \"TI2\"" }
+ procedure Test_Instance1 is new Test (T => Rec_Type1); -- { dg-error "actual \"Rec_Type1\" must implement interface \"TI2\"" }
procedure Test_Instance2 is new Test (T => Rec_Type2);
procedure Test_Instance12 is new Test (T => Rec_Type12);
begin
declare
- pragma Warnings (Off, "*null not allowed in null-excluding objects");
+ pragma Warnings (Off, "*""null"" not allowed in null-excluding objects");
package Inst_2 is new GPack (null);
- pragma Warnings (On, "*null not allowed in null-excluding objects");
+ pragma Warnings (On, "*""null"" not allowed in null-excluding objects");
begin
null;
end;
protected body Prot_Obj is
function Prot_Func return Integer is
begin
- Comp := Comp + 1; -- { dg-error "protected function cannot modify protected object" }
- Part_Of_Constit := Part_Of_Constit + 1; -- { dg-error "protected function cannot modify protected object" }
+ Comp := Comp + 1; -- { dg-error "protected function cannot modify its protected object" }
+ Part_Of_Constit := Part_Of_Constit + 1; -- { dg-error "protected function cannot modify its protected object" }
return Comp + Part_Of_Constit;
end Prot_Func;