1 2014-07-17 Thomas Quinot <quinot@adacore.com>
3 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
4 introduce a new list (cleanup actions) for each (transient) scope.
5 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
7 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
8 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
9 processing for Store_xxx_Actions_In_Scope.
10 (Build_Cleanup_Statements): Allow for a list of additional
11 cleanup statements to be passed by the caller.
12 (Expand_Cleanup_Actions): Take custom cleanup actions associated
13 with an N_Block_Statement into account.
14 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
15 reorganization (refactoring only, no behaviour change).
16 (Make_Transient_Block): Add assertion to ensure that the current
17 scope is indeed a block (namely, the entity for the transient
18 block being constructed syntactically, which has already been
19 established as a scope). If cleanup actions are present in the
20 transient scope, transfer them now to the transient block.
21 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
22 called function while it is still present as the name in a call
23 in the tree. This may not be the case later on if the call is
24 rewritten into a transient block.
25 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
26 inserted after calling a protected operation on a shared passive
27 protected must be performed in a block finalizer, not just
28 inserted in the tree, so that they are executed even in case of
29 a normal (RETURN) or abnormal (exception) transfer of control
30 outside of the current scope.
31 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
32 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
33 Scope_Stack_Entry reorganization.
35 2014-07-17 Thomas Quinot <quinot@adacore.com>
37 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
38 call for types that do not have an explicit attribute definition
39 clause for External_Tag, as their default tag may clash with an
40 explicit tag defined for some other type.
42 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
44 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
45 controlled function call with multiple actual parameters that
46 appears in Object.Operation form.
48 2014-07-17 Thomas Quinot <quinot@adacore.com>
50 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
52 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
53 External_Tag): No need to set entity flag.
54 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
55 Reimplement correctly in terms of Has_Rep_Item.
57 2014-07-17 Thomas Quinot <quinot@adacore.com>
59 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
60 Start examining the tree at the node passed to
61 Establish_Transient_Scope (not its parent).
62 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
63 The access type for the variable storing the reference to
64 the call must be declared and frozen prior to establishing a
66 * exp_ch9.adb: Minor reformatting.
68 2014-07-17 Pascal Obry <obry@adacore.com>
70 * s-os_lib.ads: Minor comment update.
72 2014-07-17 Tristan Gingold <gingold@adacore.com>
74 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
76 * socket.c: Remove #warning to avoid warning.
77 * expect.c: Indent some preprocessor directives to clarify
78 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
80 * env.c: Fix indentation. Port to PikeOS.
81 * gsocket.h: Port to PikeOS. Remove #warning.
82 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
83 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
84 of stubbed __gnat_setup_parent_communication.
85 * adaint.c: Port to PikeOS. Reindent some preprocessor
86 directives to clarify nested if. Fix indentation. Add missing
89 2014-07-17 Robert Dewar <dewar@adacore.com>
91 * sem_attr.adb: Minor reformatting.
93 2014-07-17 Robert Dewar <dewar@adacore.com>
95 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
97 2014-07-17 Ed Schonberg <schonberg@adacore.com>
99 * sem_case.adb (Check_Choice_Set): If the case expression is the
100 expression in a predicate, do not recheck coverage against itself,
101 to prevent spurious errors.
102 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
103 expression comes from an aspect specification, to prevent spurious
104 errors when expression is a case expression in a predicate.
106 2014-07-17 Pascal Obry <obry@adacore.com>
108 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
109 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
111 2014-07-17 Vincent Celier <celier@adacore.com>
113 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
114 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
115 the usage for an erroneous invocation of a gnat tool.
117 2014-07-16 Vincent Celier <celier@adacore.com>
119 * gnatls.adb: Get the target parameters only if -nostdinc was
122 2014-07-16 Ed Schonberg <schonberg@adacore.com>
124 * checks.adb (Insert_Valid_Check): If the expression is a packed
125 component of a modular type of the right size the data is always
126 valid. This os particularly useful if the component is part of
129 2014-07-16 Robert Dewar <dewar@adacore.com>
131 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
133 2014-07-16 Thomas Quinot <quinot@adacore.com>
135 * exp_ch7.ads: Minor documentation fix.
137 2014-07-16 Ed Schonberg <schonberg@adacore.com>
139 * sem_ch3.adb (Find_Type_Name): Diagnose properly
140 a private extension completion that is an interface definition
141 with an interface list.
143 2014-07-16 Arnaud Charlet <charlet@adacore.com>
145 * gnatls.adb (Gnatls): Code clean ups.
147 2014-07-16 Thomas Quinot <quinot@adacore.com>
149 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
150 * sem.adb (Analyze): Handle N_Compound_Statement.
151 * sprint.adb (Sprint_Node_Actual): Ditto.
152 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
153 procedure to handle N_Compound_Statement.
154 * exp_aggr.adb (Collect_Initialization_Statements):
155 Use a proper compound statement node, instead of a bogus
156 expression-with-actions with a NULL statement as its expression,
157 to wrap collected initialization statements.
158 * freeze.ads, freeze.adb
159 (Explode_Initialization_Compound_Statement): New public procedure,
160 lifted from Freeze_Entity.
161 (Freeze_Entity): When freezing
162 an object with captured initialization statements and without
163 delayed freezing, explode compount statement.
164 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
165 case that used to handle bogus EWAs with NULL statement as
167 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
168 delayed freezing and captured initialization statements, explode
171 2014-07-16 Gary Dismukes <dismukes@adacore.com>
173 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
175 2014-07-16 Doug Rupp <rupp@adacore.com>
177 * s-interr-hwint.adb: Casing error on parameter.
179 2014-07-16 Pascal Obry <obry@adacore.com>
181 * Makefile.rtl: Add g-rewdat.o dependencies in
182 GNATRTL_NONTASKING_OBJS.
184 2014-07-16 Ed Schonberg <schonberg@adacore.com>
186 * sem_case.adb: Code clean up.
188 2014-07-16 Vincent Celier <celier@adacore.com>
190 * make.adb: Do not read gnat.adc when gnatmake is invoked
193 2014-07-16 Pascal Obry <obry@adacore.com>
195 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
196 implementation of GNAT.Rewrite_Data.
198 2014-07-16 Vincent Celier <celier@adacore.com>
200 * gnatls.adb (Normalize): New function.
201 (Gnatls): Get the target parameters. On targets other than VMS,
202 normalize the path names in the source search path, the object search
203 path and the project search path.
205 2014-07-16 Ed Schonberg <schonberg@adacore.com>
207 * sem_case.adb: Avoid self-checking of case expressions in
210 2014-07-16 Robert Dewar <dewar@adacore.com>
212 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
215 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
217 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
219 2014-07-16 Ben Brosgol <brosgol@adacore.com>
221 * gnat_ugn.texi: Fix typo.
223 2014-07-16 Ed Schonberg <schonberg@adacore.com>
225 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
226 expression if it is the specification of a subtype predicate:
227 it will be expanded when the return statement is analyzed, or
228 when a static predicate is transformed into a static expression
229 for evaluation by the front-end.
230 * sem_ch13.adb (Get_RList): If the expression for a static
231 predicate is a case expression, extract the alternatives of the
232 branches with a True value to create the required statically
233 evaluable expression.
235 2014-07-16 Thomas Quinot <quinot@adacore.com>
237 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
238 expression, not the location of the aspect, for all generated
239 code, so that in particular the call to raise_assert_failure
240 gets the sloc of the associated condition.
242 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
243 Set an explicit End_Label on the handled sequence of statements
244 for the _Postconditions procedure so that the implicit return
245 statement does not erroneously get associated with code generated
246 for the last condition in postconditions.
248 2014-07-16 Thomas Quinot <quinot@adacore.com>
250 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
251 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
252 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
255 2014-07-16 Robert Dewar <dewar@adacore.com>
257 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
258 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
259 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
261 * par-ch4.adb (At_Start_Of_Attribute): New function
262 (P_Simple_Expression): Better msg for bad attribute prefix.
263 * scans.ads: Minor reformatting.
265 2014-07-16 Ed Schonberg <schonberg@adacore.com>
267 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
268 static constant, check that in belongs to the corresponding index
269 subtype, to produce the proer warning when expansion is disabled.
271 2014-07-16 Robert Dewar <dewar@adacore.com>
273 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
274 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
275 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
276 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
277 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
279 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
280 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
283 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
285 * exp_ch7.adb (Process_Declarations): Reinstate the check on
286 a hook object to ensure that the related transient declaration
288 * exp_util.adb (Is_Aliased): Do not consider expresison with
289 actions as a special context.
290 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
291 ensure that the related transient declaration is finalizable.
293 2014-07-16 Robert Dewar <dewar@adacore.com>
295 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
296 * snames.ads-tmpl: Add Allocation_Check to list of check names.
297 * types.ads: Add Allocation_Check to list of check names.
299 2014-07-16 Thomas Quinot <quinot@adacore.com>
301 * sem_util.adb (Enter_Name): replace bogus test for presence of
302 Corresponding_Remote_Type with correct test on Ekind.
303 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
304 of calls to Corresponding_ Remote_Type (documentation fix).
306 2014-07-16 Robert Dewar <dewar@adacore.com>
308 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
309 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
311 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
312 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
314 2014-07-16 Robert Dewar <dewar@adacore.com>
316 * gnat_ugn.texi: Document binder switch -Ra.
317 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
319 * opt.ads (List_Closure_All): New switch.
320 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
323 2014-07-16 Ben Brosgol <brosgol@adacore.com>
325 * gnat_rm.texi: Minor edits, to make case consistent in names
328 2014-07-16 Robert Dewar <dewar@adacore.com>
330 * gnat_rm.texi: Document erroneous mixing of thin pointers and
332 * gnat_ugn.texi: Add note on size of access types about thin
333 pointers and the use of attribute Unrestricted_Access.
335 2014-07-16 Ed Schonberg <schonberg@adacore.com>
337 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
338 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
339 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
340 machinery to detect tampering on bounded vectors.
342 2014-07-16 Robert Dewar <dewar@adacore.com>
344 * gnat_rm.texi: Document that leading/trailing asterisks are
345 now implied for the pattern match string for pragma Warnings
346 and Warning_As_Error.
347 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
348 (Analyze_Pragma, case Warning_As_Error): Call
349 Acquire_Warning_Match_String.
350 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
352 2014-07-16 Bob Duff <duff@adacore.com>
354 * gnat_ugn.texi: Document need for project file
355 for --incremental switch for gnat2xml.
357 2014-07-16 Robert Dewar <dewar@adacore.com>
359 * gnat_rm.texi: Fix example of non-packable components in packed
362 2014-07-16 Robert Dewar <dewar@adacore.com>
364 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
365 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
366 upper case in exception messages.
368 2014-07-16 Robert Dewar <dewar@adacore.com>
370 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
371 is renamed Has_Same_Storage.
372 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
373 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
376 2014-07-16 Robert Dewar <dewar@adacore.com>
378 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
379 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
381 2014-07-16 Robert Dewar <dewar@adacore.com>
383 * gnat_ugn.texi: Add note that integrated
384 preprocessing cannot be applied to configuration pragma files.
386 2014-07-16 Yannick Moy <moy@adacore.com>
388 * sem_attr.adb (Analyze_Attribute/cases Pred
389 and Succ): Always enable range check on fixed-point types if
390 not suppressed for the type.
392 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
394 * sem_util.adb (State_Has_Enabled_Property):
395 Account for an external property denoted by an others choice.
397 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
399 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
400 * exp_ch7.adb (Process_Declarations): There is no need to check
401 that a transient object being hooked is controlled as it would
402 not have been hooked in the first place.
403 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
404 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
405 (Is_Aliased): A renaming of a transient controlled object is
406 not considered aliasing when it occurs within an expression
408 (Requires_Cleanup_Actions): There is no need to
409 check that a transient object being hooked is controlled as it
410 would not have been hooked in the first place.
411 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
413 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
415 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
416 the outer level of routine Analyze_Aspect_Specifications. Ensure
417 that the corresponding pragmas of aspects Initial_Condition and
418 Initializes are inserted after pragma SPARK_Mode.
420 2014-07-16 Ed Schonberg <schonberg@adacore.com>
422 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
423 properly a choice list with more than one choice, where each
424 is an aggregate denoting a sequence of array indices for a
425 multidimentional array. For SPARK use.
427 2014-07-16 Vadim Godunko <godunko@adacore.com>
429 * a-coinho-shared.adb (Adjust): Create
430 copy of internal shared object and element when source container
433 (Query_Element): Likewise.
434 (Update_Element): Likewise.
435 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
436 to get reference for empty holder.
437 (Reference): Likewise.
439 2014-07-16 Thomas Quinot <quinot@adacore.com>
441 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
442 from Process_Transient_Oject.
443 * exp_ch4.ads: Ditto.
444 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
445 declaration as an action on the topmost enclosing expression,
446 not on a possibly conditional subexpreession.
448 2014-07-16 Vadim Godunko <godunko@adacore.com>
450 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
451 Fix parameter mode of Update_Element.
453 2014-07-16 Robert Dewar <dewar@adacore.com>
455 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
458 2014-07-16 Ed Schonberg <schonberg@adacore.com>
460 * a-cohase.ads: Type Iterator must be controlled, so that the
461 tampering bit is properly set through an iteration.
462 * a-cohase.adb: Add Finalize operation for type Iterator.
464 2014-07-16 Ed Schonberg <schonberg@adacore.com>
466 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
469 2014-07-16 Ed Schonberg <schonberg@adacore.com>
471 * a-coinho-shared.adb: Fix spurious accessibility check.
473 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
475 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
477 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
480 * gnat_rm.texi: Fix errors with makeinfo 5.1.
482 2014-06-14 Arnaud Charlet <charlet@adacore.com>
485 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
487 2014-06-13 Yannick Moy <moy@adacore.com>
489 * exp_attr.adb: Fix typo in comment.
490 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
491 checking in GNATprove_Mode.
493 2014-06-13 Ed Schonberg <schonberg@adacore.com>
495 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
497 2014-06-13 Robert Dewar <dewar@adacore.com>
499 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
502 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
504 * sem_prag.adb (Analyze_Pragma): Add local
505 variable Missing_Parentheses. Emit an error when a state
506 declaration with options appears without parentheses. Add a
507 guard to prevent a bogus error when a state declaration may be
508 interpreted as an option if a previous declaration with options
509 was not parenthesized.
511 2014-06-13 Robert Dewar <dewar@adacore.com>
513 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
514 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
515 * checks.ads (Alignment_Warnings_Record): New type.
516 (Alignment_Warnings): New table
517 (Validate_Alignment_Check_Warnings): New procedure.
518 * errout.adb (Delete_Warning_And_Continuations): New procedure
519 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
520 Warnings_Treated_As_Errors (Finalize): Minor reformatting
521 * errout.ads (Warning_Msg): New variable
522 (Delete_Warning_And_Continuations): New procedure
523 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
524 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
526 2014-06-13 Ed Schonberg <schonberg@adacore.com>
528 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
530 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
532 * errout.adb (SPARK_Msg_N): New routine.
533 (SPARK_Msg_NE): New routine.
534 * errout.ads Add a section on SPARK-related error routines.
535 (SPARK_Msg_N): New routine.
536 (SPARK_Msg_NE): New routine.
537 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
538 pragma Abstract_State is always inserted after SPARK_Mode.
539 (Insert_After_SPARK_Mode): New routine.
540 * sem_prag.adb (Analyze_Abstract_State,
541 Analyze_Constituent, Analyze_External_Property,
542 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
543 Analyze_Global_List, Analyze_Initialization_Item,
544 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
545 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
546 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
547 Analyze_Refined_Global_In_Decl_Part,
548 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
549 Check_Aspect_Specification_Order, Check_Constituent_Usage,
550 Check_Declaration_Order, Check_Dependency_Clause,
551 Check_Duplicate_Mode, Check_Duplicate_Option,
552 Check_Duplicate_Property, Check_External_Properties,
553 Check_External_Property, Check_Function_Return,
554 Check_Matching_Constituent, Check_Matching_State,
555 Check_Mode_Restriction_In_Enclosing_Context,
556 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
557 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
558 Has_Extra_Parentheses, Inconsistent_Mode_Error,
559 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
560 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
561 Report_Unrefined_States, Report_Unused_Constituents,
562 Report_Unused_States, Role_Error, Usage_Error):
563 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
564 to report semantic errors only when SPARK_Mode is on.
565 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
566 pragma Depends explicitly, this is now done by the analysis.
567 (Analyze_Global_In_Decl_List): Do not check the syntax of
568 pragma Global explicitly, this is now done by the analysis.
569 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
570 pragma Initializes explicitly, this is now done by the analysis.
571 (Analyze_Part_Of): Do not check the syntax of the encapsulating
572 state, this is now done by the analysis.
574 not check the syntax of a state declaration, this is now done
576 (Analyze_Refined_Depends_In_Decl_Part): Do not
577 check the syntax of pragma Refined_Depends explicitly, this is now
578 done by the analysis.
579 (Analyze_Refined_Global_In_Decl_Part): Do
580 not check the syntax of pragma Refined_Global explicitly, this is
581 now done by the analysis.
582 (Analyze_Refined_State_In_Decl_Part):
583 Do not check the syntax of pragma Refined_State explicitly, this
584 is now done by the analysis.
585 (Check_Dependence_List_Syntax): Removed.
586 (Check_Global_List_Syntax): Removed.
587 (Check_Initialization_List_Syntax): Removed.
588 (Check_Item_Syntax): Removed.
589 (Check_Missing_Part_Of): Do not consider items from an instance.
590 (Check_Refinement_List_Syntax): Removed.
591 (Check_State_Declaration_Syntax): Removed.
592 (Collect_Global_List): Do not raise Program_Error when the input is
594 (Process_Global_List): Do not raise Program_Error when the input
596 * sem_ch13.adb: Minor reformatting.
598 2014-06-13 Ed Schonberg <schonberg@adacore.com>
600 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
601 that is an interface definition with an interface list.
602 (Process_Full_View): Move error message on missmatched interfaces
603 between views to the declaration of full view, for clarity.
604 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
607 2014-06-13 Robert Dewar <dewar@adacore.com>
609 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
612 2014-06-13 Robert Dewar <dewar@adacore.com>
614 * makeutl.adb: Minor reformatting.
616 2014-06-13 Gail Schenker <schenker@adacore.com>
618 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
619 associated flag (d.z), no longer needed.
621 2014-06-13 Ed Schonberg <schonberg@adacore.com>
623 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
624 Export aspects, do not check whether a corresponding Convention
625 aspect has been specified. Convention is optional in Ada2012,
626 and defaults to Convention_Ada.
628 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
630 * checks.adb (Apply_Address_Clause_Check): Only issue the new
631 warning if the propagation warning is issued.
633 2014-06-13 Thomas Quinot <quinot@adacore.com>
635 * exp_ch4.adb: Minor reformatting.
637 2014-06-13 Robert Dewar <dewar@adacore.com>
639 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
640 Handle float range check case (Expand_N_Attribute_Reference,
641 case Succ): Handle float range check case.
642 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
645 2014-06-13 Vincent Celier <celier@adacore.com>
647 * makeutl.ads (Compute_Builder_Switches): Change name of
648 parameter Root_Environment to Env.
649 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
650 Env parameter of procedure Get_Or_Create_Configuration_File.
651 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
652 of new parameter Env.
653 * prj-conf.ads (Locate_Runtime): New parameter Env of type
654 Prj.Tree.Environment.
656 2014-06-13 Robert Dewar <dewar@adacore.com>
658 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
660 2014-06-13 Robert Dewar <dewar@adacore.com>
662 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
664 * sem_attr.adb: Minor code reformatting and simplification.
665 * checks.adb: Fix minor typo.
667 2014-06-13 Emmanuel Briot <briot@adacore.com>
669 * g-comlin.adb (Get_Argument): fix expansion
670 of command line arguments (e.g. "*.adb") when using a custom
671 parser. The parser was not passed to the recursive call, and
672 thus we were trying to do the expansion on the default command
675 2014-06-13 Thomas Quinot <quinot@adacore.com>
677 * exp_ch9.adb: Minor reformatting.
679 2014-06-13 Ed Schonberg <schonberg@adacore.com>
681 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
682 To determine whether the attribute should be expanded, examine
683 whether the enclosing postcondition pragma is to be checked,
684 rather than using the internal flag Assertions_Enabled.
686 2014-06-13 Ben Brosgol <brosgol@adacore.com>
688 * gnat_rm.texi: Minor fixes.
689 * gnat_ugn.texi: Added a missing "@itemize".
691 2014-06-13 Robert Dewar <dewar@adacore.com>
693 * debug.adb: Remove -gnatd.1 flag documentation.
694 * layout.adb (Layout_Type): Remove special handling of size
695 for anonymous access type.
696 * sem_ch3.adb (Replace_Type): Remove special handling of size
697 for anonymous access type.
699 2014-06-13 Robert Dewar <dewar@adacore.com>
701 * debug.adb: Document debug flag -gnatd.1.
702 * layout.adb (Layout_Type): Size change for anonymous access
703 types under -gnatd.1.
704 * sem_ch3.adb (Replace_Type): Size change for anonymous access
705 types under -gnatd.1.
707 2014-06-13 Robert Dewar <dewar@adacore.com>
709 * layout.adb (Layout_Type): Anonymous access types designating
710 unconstrained arrays are always thin pointers.
711 * sem_ch3.adb (Replace_Type): Anonymous access types designating
712 unconstrained arrays are always thin pointers.
714 2014-06-13 Ed Schonberg <schonberg@adacore.com>
716 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
717 to resolve the prefix of an attribute that is an entity name
718 and may be a parameterless call. Minor code reorganization.
720 2014-06-13 Robert Dewar <dewar@adacore.com>
722 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
724 * opt.ads (Compiler_Unit): New flag.
725 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
726 for null statement sequence (not allowed in compiler unit).
727 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
729 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
731 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
733 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
734 Check_Compiler_Unit (this construct is not allowed in compiler
736 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
737 Set Opt.Compiler_Unit.
739 2014-06-13 Geert Bosch <bosch@adacore.com>
741 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
742 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
743 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
745 2014-06-13 Robert Dewar <dewar@adacore.com>
747 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
749 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
751 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
752 types in SPARK as it is poorly placed and poorly formulated. The
753 check was flagging ALL volatile entities as illegal in SPARK.
754 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
755 types as illegal in SPARK.
757 2014-06-13 Robert Dewar <dewar@adacore.com>
759 * sem_cat.adb: Minor reformatting.
761 2014-06-13 Yannick Moy <moy@adacore.com>
763 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
765 2014-06-13 Arnaud Charlet <charlet@adacore.com>
767 * gnat_rm.texi: Add detail on SPARK_05 restriction.
769 2014-06-13 Bob Duff <duff@adacore.com>
771 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
772 Add assertions requiring the secondary stack to be initialized.
773 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
774 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
775 secondary stack is initialized before calling Init_Tasking_Soft_Links,
776 by adding pragmas Elaborate_Body.
778 2014-06-13 Thomas Quinot <quinot@adacore.com>
780 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
781 kludge disabling new legality check.
783 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
785 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
787 (Freeze_Type): Volatile types are now illegal in SPARK.
789 2014-06-13 Robert Dewar <dewar@adacore.com>
791 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
792 * gnat_rm.texi: Document aspect Thread_Local_Storage.
794 2014-06-13 Ed Schonberg <schonberg@adacore.com>
796 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
797 value is a temporary that renames an aggregate is legal in a
798 preelaborated unit. Illegalities, if any will be detected in
799 the aggregate components.
801 2014-06-13 Ed Schonberg <schonberg@adacore.com>
803 * einfo.ads: Minor reformatting an comment expansion.
805 2014-06-13 Robert Dewar <dewar@adacore.com>
807 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
809 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
811 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
812 * sem_warn.adb: Minor reformatting.
814 2014-06-13 Doug Rupp <rupp@adacore.com>
816 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
819 2014-06-13 Yannick Moy <moy@adacore.com>
821 * sem_warn.adb (Check_Unset_References): Take
822 case of Refined_Post into account in Within_Postcondition check.
824 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
826 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
829 2014-06-13 Yannick Moy <moy@adacore.com>
831 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
832 Aspect_Export): Consider that variables may be set outside the program.
834 2014-06-13 Robert Dewar <dewar@adacore.com>
836 * back_end.adb (Make_Id): New function.
837 (Make_SC): New function.
838 (Set_RND): New procedure.
839 * back_end.ads (Make_Id): New function.
840 (Make_SC): New function.
841 (Set_RND): New procedure.
842 * einfo.ads: Minor comment updates.
843 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
844 * gnat1drv.adb (Gnat1drv): New calling sequence for
845 Get_Target_Parameters.
846 (Gnat1drv): Move Atree.Initialize here from Frontend.
847 * targparm.adb (Get_Target_Parameters): New calling
848 sequence (Get_Target_Parameters): Handle pragma Restriction
850 * targparm.ads (Get_Target_Parameters): New calling sequence.
852 2014-06-13 Gary Dismukes <dismukes@adacore.com>
854 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
855 loop if the pragma does not come from source, so that an implicit
856 pragma Import only applies to the first declaration, avoiding
857 possible conflicts with earlier explicit and implicit declarations
858 due to multiple Provide_Shift_Operators pragmas.
859 (Set_Imported): Remove previous fix that bypassed pragma duplication
861 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
862 of Provide_Shift_Operators.
864 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
866 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
867 string pointer directly to set_decl_section_name.
869 2014-06-11 Robert Dewar <dewar@adacore.com>
871 * sem_ch13.adb: Minor reformatting.
873 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
875 * sem_prag.adb (Check_Clause_Syntax): Add new
876 local variable Outputs. Account for the case where multiple
877 output items appear as an aggregate.
879 2014-06-11 Robert Dewar <dewar@adacore.com>
881 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
884 2014-06-11 Ed Schonberg <schonberg@adacore.com>
886 * einfo.ads: Minor reformatting.
888 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
890 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
891 new variable First_Node. Update the position after all insertions have
892 taken place to First_Node.
894 2014-06-11 Robert Dewar <dewar@adacore.com>
896 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
897 * layout.adb (Layout_Type): Remove test of -gnatd.1.
899 2014-06-11 Robert Dewar <dewar@adacore.com>
901 * sem_ch13.adb: Minor reformatting.
903 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
905 * sem_prag.adb (Check_Clause_Syntax): Add new
906 local variable Outputs. Account for the case where multiple
907 output items appear as an aggregate.
909 2014-06-11 Robert Dewar <dewar@adacore.com>
911 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
914 2014-06-11 Ed Schonberg <schonberg@adacore.com>
916 * einfo.ads: Minor reformatting.
918 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
920 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
921 new variable First_Node. Update the position after all insertions have
922 taken place to First_Node.
924 2014-06-11 Robert Dewar <dewar@adacore.com>
926 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
927 * layout.adb (Layout_Type): Remove test of -gnatd.1.
929 2014-06-11 Thomas Quinot <quinot@adacore.com>
931 * freeze.ads: Minor reformatting.
932 * checks.adb (Determine_Range): Do not attempt to determine
933 the range of a deferred constant whose full view has not been
935 * sem_res.adb (Resolve): Remove undesirable guard against
936 resolving expressions from expression functions.
938 2014-06-11 Robert Dewar <dewar@adacore.com>
940 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
942 * layout.adb (Layout_Type): Make anonymous access types for
943 subprogram formal types and return types always thin. For now
944 only enabled if -gnatd.1 set.
946 2014-06-11 Ed Schonberg <schonberg@adacore.com>
948 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
949 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
950 subprogram must be a null procedure.
952 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
954 * sem_prag.adb (Analyze_Input_Item): Allow formal
955 parameters to appear as input_items in an initialization_list
956 of pragma Initializes. Encapsulation now applies to states and
957 variables only (as it should). Add RM references to key errors.
958 * sem_prag.adb (Set_Imported): Suppress errors
959 about preceding Imports when the pragma does not come from source,
960 which can happen through use of pragma Provide_Shift_Operators.
962 2014-06-11 Thomas Quinot <quinot@adacore.com>
964 * sem_ch3.adb: Minor reformatting.
965 * einfo.ads (Full_View): Minor comment update.
967 2014-06-11 Robert Dewar <dewar@adacore.com>
969 * einfo.adb (Is_Independent): New flag.
970 * einfo.ads (Is_Independent): New flag.
971 (Has_Independent_Components): Clean up and fix comments.
972 * sem_prag.adb (Fix_Error): Deal with changing argument
973 [of] to entity [for].
974 (Analyze_Pragma, case Independent): Set Is_Independent flag
975 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
976 in all components of specified record.
978 2014-06-11 Thomas Quinot <quinot@adacore.com>
980 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
981 Set proper Etype on bounds of dummy type created for analysis
984 2014-06-11 Robert Dewar <dewar@adacore.com>
986 * debug.adb: Minor comment fix (add missing section of dot
989 2014-06-11 Robert Dewar <dewar@adacore.com>
991 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
992 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
993 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
994 * errout.adb (Output_Messages): Avoid duplicate output for
995 library level instance.
996 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
997 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
998 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
999 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
1000 accomodate largest modulus value.
1001 * gnat_ugn.texi: Minor updates.
1003 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1005 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
1006 load body of generic package or its parent, if body is optional
1007 and the unit does not require a body.
1009 2014-06-11 Robert Dewar <dewar@adacore.com>
1011 * gnat_rm.texi: Document System.Unsigned_Types.
1012 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
1013 * s-unstyp.ads: Update comments (this is now user available unit).
1015 2014-06-11 Robert Dewar <dewar@adacore.com>
1017 * make.adb, sem_res.adb: Minor reformatting.
1019 2014-06-11 Thomas Quinot <quinot@adacore.com>
1021 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
1022 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
1023 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
1024 Preelaborate_05 to just Preelaborate in runtime units, and similarly
1025 change Pure_05 to just Pure.
1027 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1029 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
1030 analysis if error has been posted on subprogram body.
1032 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1034 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
1035 rule given in RM 13.1 (8/1) for operational attributes to stream
1036 attributes: the attribute must apply to a first subtype. Fixes
1037 missing errors in ACATS test bdd2004.
1039 2014-06-11 Robert Dewar <dewar@adacore.com>
1041 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
1042 record type if restriction No_Implicit_Conditionals is active.
1043 (Expand_N_Object_Declaration): Don't allow default initialization
1044 for variant record type if restriction No_Implicit_Condition is active.
1045 (Build_Variant_Record_Equality): Don't build for variant
1046 record type if restriction No_Implicit_Conditionals is active.
1047 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
1048 No_Implicit_Conditionals.
1049 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
1051 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
1053 * i-cstrin.ads: Update comments.
1055 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1057 * sem_res.adb (Resolve_Selected_Component): Handle properly a
1058 selected component whose prefix is overloaded, when none of the
1059 interpretations matches the expected type.
1061 2014-06-11 Bob Duff <duff@adacore.com>
1063 * make.adb (Wait_For_Available_Slot): Give a more
1064 informative error message; if the ALI file is not found, print
1065 the full path of what it's looking for.
1067 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
1069 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
1070 option to specify the result file encoding.
1072 2014-06-11 Robert Dewar <dewar@adacore.com>
1074 * errout.ads, sem_ch12.adb: Minor reformatting.
1075 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
1076 * lib-xref.adb: Minor reformatting.
1077 * restrict.adb: Minor code reorganization (put routines in
1080 2014-06-11 Yannick Moy <moy@adacore.com>
1082 * einfo.ads: Minor typo in comment
1084 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1086 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
1087 formal private types and private type extensions, to indicate
1088 variable in a generic unit whose uninitialized use suggest that
1089 actual type should be fully initialized.
1090 Needs_Initialized_Actual: removed, functionaity replaced by
1092 * lib-xref.adb (Generate_Reference): Generate a reference for
1093 variables of a formal type when the unit is not the main unit,
1094 to enable appropriate warnings in an instance.
1095 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
1096 of variable in a generic unit that suggests that actual type
1097 should be full initialized.
1098 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
1099 and do not emot warning, which now only appears in an instance.
1101 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
1103 * gnat_ugn.texi: Fix minor typo.
1105 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1107 * sem_ch3.adb Add with and use clause for Sem_Ch10.
1108 (Analyze_Declarations): Code reformatting. Analyze the contract
1109 of a subprogram body stub at the end of the declarative region.
1110 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
1111 now a variable. Do not process the body if its contract is not
1112 available. Account for subprogram body stubs when extracting
1113 the corresponding spec.
1114 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
1116 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
1118 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1119 Account for subprogram body stubs when extracting the
1121 (Analyze_Global_In_Decl_List):
1122 Account for subprogram body stubs when extracting the
1124 (Analyze_Refined_Depends_In_Decl_Part):
1125 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
1126 of the related body. Spec_Is now a variable. Account for
1127 subprogram body stubs when extracting the corresponding spec.
1128 (Analyze_Refined_Global_In_Decl_Part): Use
1129 Find_Related_Subprogram_Or_Body to retrieve the declaration
1130 of the related body. Spec_Is now a variable. Account for
1131 subprogram body stubs when extracting the corresponding spec.
1132 (Collect_Subprogram_Inputs_Output): Account for subprogram body
1133 stubs when extracting the corresponding spec.
1135 2014-06-11 Vincent Celier <celier@adacore.com>
1137 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
1140 2014-06-11 Robert Dewar <dewar@adacore.com>
1142 * debug.adb: Add debug flag -gnatd.q.
1143 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
1145 * styleg.adb (Check_Xtra_Parens): Message should be a style
1147 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
1148 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
1149 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
1150 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
1152 2014-06-11 Ben Brosgol <brosgol@adacore.com>
1154 * gnat_rm.texi: Revised chapter on Implementation Defined
1157 2014-06-11 Geert Bosch <bosch@adacore.com>
1159 * s-exctab.adb: avoid race conditions in exception registration.
1161 2014-06-11 Robert Dewar <dewar@adacore.com>
1163 * errout.adb (Warn_Insertion): New function.
1164 (Error_Msg): Use Warn_Insertion and Prescan_Message.
1165 (Error_Msg_Internal): Set Info field of error object.
1166 (Error_Msg_NEL): Use Prescan_Message.
1167 (Set_Msg_Text): Don't store info: at start of message.
1168 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
1169 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
1170 * errout.ads: Document new ?$? and >$> insertion sequences
1171 Document use of "(style)" and "info: "
1172 * erroutc.adb (dmsg): Print several missing fields
1173 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
1174 Deal with new tagging of info messages
1175 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
1176 Add field Info (Prescan_Message): New procedure, this procedure
1177 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
1178 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
1179 sem_elab.adb: Follow new rules for info message (info belongs
1180 only at the start of a message, and only in the first message,
1181 not in any of the continuations).
1182 * gnat_ugn.texi: Document full set of warning tags.
1184 2014-06-11 Gary Dismukes <dismukes@adacore.com>
1186 * sem_util.adb: Minor typo fix.
1188 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1190 * sem_warn.adb (Check_References): Do not emit spurious warnings
1191 on uninitialzed variable of a formal private type if variable
1194 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
1196 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
1197 set_decl_section_name accessor.
1199 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1201 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1202 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1203 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1205 2014-05-21 Robert Dewar <dewar@adacore.com>
1207 * layout.adb: Minor reformatting.
1208 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
1211 2014-05-21 Robert Dewar <dewar@adacore.com>
1213 * restrict.ads (Implementation_Restriction): Add entry for
1215 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
1216 Ada.[Wide_[Wide_]Text_IO.
1217 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
1218 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
1219 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
1220 Wide_Wide_Value if restriction No_Fixed_IO is set.
1221 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
1223 2014-05-21 Robert Dewar <dewar@adacore.com>
1225 * gnatcmd.adb: Minor error msg changes (no upper case letter
1227 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
1230 2014-05-21 Robert Dewar <dewar@adacore.com>
1232 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
1233 via generic formals.
1234 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
1237 2014-05-21 Thomas Quinot <quinot@adacore.com>
1239 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
1240 more accurately describe that this subprogram needs to come into
1241 play also in cases where no byte swapping is involved, because
1242 it also takes care of some required shifts (left-justification
1245 2014-05-21 Thomas Quinot <quinot@adacore.com>
1247 * freeze.adb (Check_Component_Storage_Order): Indicate whether
1248 a Scalar_Storage_Order attribute definition is present for the
1250 (Freeze_Record_Type): Suppress junk warnings
1251 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
1254 2014-05-21 Robert Dewar <dewar@adacore.com>
1256 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
1257 to Kill_Elaboration_Checks.
1259 2014-05-21 Gary Dismukes <dismukes@adacore.com>
1261 * layout.adb (Assoc_Add): Suppress the optimization of the (E
1262 - C1) + C2 case, when the expression type is unsigned and C1 <
1263 C2, to avoid creating a negative literal when folding.
1265 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1267 * freeze.adb (Freeze_Record_Type): Update the use of
1269 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
1271 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
1272 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
1273 of Is_SPARK_Volatile.
1274 (Analyze_Loop_Parameter_Specification):
1275 Update the use of Is_SPARK_Volatile.
1276 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
1277 formal parameter when its type is volatile.
1278 * sem_prag.adb (Analyze_Global_Item): Update the use of
1280 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
1281 determines whether an entity is a volatile source SPARK object.
1282 * sem_util.adb (Has_Enabled_Property): Accout for external
1283 properties being set on objects other than abstract states
1284 and variables. An example would be a formal parameter.
1285 (Is_SPARK_Volatile): New routine.
1286 (Is_SPARK_Volatile_Object):
1287 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
1288 when checking entities and/or types.
1289 * sem_util.ads (Is_SPARK_Volatile): New routine.
1291 2014-05-21 Robert Dewar <dewar@adacore.com>
1293 * sem_warn.adb: Minor fix to warning messages (use ?? instead
1296 2014-05-21 Vincent Celier <celier@adacore.com>
1298 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
1299 switch --version and --help.
1301 2014-05-21 Robert Dewar <dewar@adacore.com>
1303 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
1305 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1307 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
1308 iterator variable when the domain of iteration is a formal
1309 container and this is an element iterator.
1311 2014-05-21 Bob Duff <duff@adacore.com>
1313 * sem_ch12.adb: Minor reformatting.
1315 2014-05-21 Robert Dewar <dewar@adacore.com>
1317 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
1319 2014-05-21 Robert Dewar <dewar@adacore.com>
1321 * sem_elab.adb: Minor reformatting.
1322 * s-taprop.ads: Minor comment fix.
1323 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
1324 Kill_Elaboration_Checks.
1325 * errout.adb, erroutc.adb: Minor reformatting.
1327 2014-05-21 Thomas Quinot <quinot@adacore.com>
1329 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
1330 component. No byte swapping occurs, but this procedure also takes
1331 care of appropriately justifying the argument.
1333 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1335 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
1337 (Analyze_Subprogram_Body_Helper): Move the
1338 analysis of aspect specifications and the processing of the
1339 subprogram body contract after inlining has taken place.
1340 (Diagnose_Misplaced_Aspect_Specifications): Removed.
1342 2014-05-21 Javier Miranda <miranda@adacore.com>
1344 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
1346 2014-05-21 Robert Dewar <dewar@adacore.com>
1348 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
1349 continuations any more.
1351 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1353 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
1354 present in formal_Private_Definitions and on private extension
1355 declarations of a formal derived type. Set when the use of the
1356 formal type in a generic suggests that the actual should be a
1357 fully initialized type.
1358 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
1359 to indicate that an entity of a generic type has default
1360 initialization, and that the corresponing actual type in any
1361 subsequent instantiation should be fully initialized.
1362 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
1363 to emit a warning if the actual for a generic type on which
1364 Needs_Initialized_Actual is set is not a fully initialized type.
1366 2014-05-21 Robert Dewar <dewar@adacore.com>
1368 * sem_elab.adb, prj-dect.adb: Minor reformatting.
1370 2014-05-21 Robert Dewar <dewar@adacore.com>
1372 * erroutc.ads: Minor comment addition.
1374 2014-05-21 Robert Dewar <dewar@adacore.com>
1376 * errout.ads: Add documentation for use of >*> tag.
1377 * restrict.adb: Make sure we use >*> tag for restriction warnings.
1379 2014-05-21 Gary Dismukes <dismukes@adacore.com>
1381 * debug.adb: Add case of illegal overriding_indicator for a
1382 protected subprogram body to description of -gnatd.E switch.
1383 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
1384 for cases of giving overriding_indicators on protected subprogram
1385 bodies, but change this to a warning if -gnatd.E is enabled. No
1386 longer give a style warning about missing indicators on protected
1389 2014-05-21 Robert Dewar <dewar@adacore.com>
1391 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
1392 sem_elab.ads: Minor reformatting.
1393 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
1396 2014-05-21 Pascal Obry <obry@adacore.com>
1398 * prj-dect.adb: Allow package Install in aggregate project.
1400 2014-05-21 Robert Dewar <dewar@adacore.com>
1402 * sem_ch13.adb (Analyze_Aspect_Specifications):
1403 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
1404 * sem_prag.adb: Minor comment improvements.
1406 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1408 * sem_ch12.adb (Install_Body): When checking whether freezing of
1409 instantiation must be delayed, verify that the common enclosing
1410 subprogram to generic and instance is in fact an overloadable
1413 2014-05-21 Vincent Celier <celier@adacore.com>
1415 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
1416 mains with the same name and fail if there is more than one.
1417 * prj.ads, prj.adb (Find_All_Sources): New function
1419 2014-05-21 Robert Dewar <dewar@adacore.com>
1421 * sem_ch13.adb: Minor reformatting.
1422 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
1423 * sem_prag.adb: Minor error message improvement.
1425 2014-05-21 Yannick Moy <moy@adacore.com>
1427 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
1428 (Enclosing_Subprogram_Or_Package): Only return a library-level
1431 2014-05-21 Javier Miranda <miranda@adacore.com>
1433 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
1434 to the full view of the parent type when processing a derived type
1435 which is the full view of a private type not defined in a generic
1436 unit which is derived from a private type with discriminants
1437 whose full view is a non-tagged record type.
1439 2014-05-21 Javier Miranda <miranda@adacore.com>
1441 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
1442 Complete previous patch.
1444 2014-05-21 Thomas Quinot <quinot@adacore.com>
1447 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
1448 Provide a behaviour more consistent with underlying datagram
1449 socket: do not attempt to loop over Send_Socket/Receive_Socket
1450 iterating along the buffer.
1452 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1454 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
1455 or a tagged type is not labelled as volatile. Ensure that a
1456 non-volatile type has no volatile components.
1457 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
1458 Obj_Typ. Code reformatting. Ensure that a discriminated or
1459 tagged object is not labelled as volatile.
1460 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
1461 pragma Volatile applies to a full type declaration or an object
1462 declaration when SPARK mode is on.
1464 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
1466 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
1467 providing options needed for compiling the argument source for
1468 the situation when a project file can be used as a tool parameter.
1470 2014-05-21 Gary Dismukes <dismukes@adacore.com>
1472 * gnat_rm.texi: Minor typo fix.
1474 2014-05-21 Robert Dewar <dewar@adacore.com>
1476 * stand.adb (Tree_Read): Read missing entities.
1477 (Tree_Write): Write missing entities.
1479 2014-05-21 Ben Brosgol <brosgol@adacore.com>
1481 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
1482 section in gnatmetric chapter.
1484 2014-05-21 Robert Dewar <dewar@adacore.com>
1486 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
1487 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
1488 post-call copy write back (see detailed comment in code).
1489 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
1491 * tbuild.ads: Minor reformatting.
1493 2014-05-21 Robert Dewar <dewar@adacore.com>
1495 * stand.ads: Add warning about adding new entities and
1496 Tree_Read/Tree_Write.
1498 2014-05-21 Robert Dewar <dewar@adacore.com>
1500 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
1501 references to restricted entities within the units in which they
1504 2014-05-21 Robert Dewar <dewar@adacore.com>
1506 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
1507 simplify the needed test, and also deal with failure to catch
1508 situations with non-standard names.
1509 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
1510 (Source_File_Is_Subunit): Removed, no longer used.
1512 2014-05-21 Javier Miranda <miranda@adacore.com>
1515 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
1516 renaming of an access to interface object there is no need to
1517 generate extra code to reference the tag.
1519 2014-05-21 Robert Dewar <dewar@adacore.com>
1521 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
1522 Warnings (Off, string).
1524 2014-05-21 Robert Dewar <dewar@adacore.com>
1526 * osint.adb: Fix three error messages to say invalid instead
1528 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
1529 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
1530 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
1532 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1534 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
1535 sem_ch9.ads: Move discriminant manipulation routines for analysis of
1536 aspect specifications from sem_ch9 to sem_ch13, where they belong.
1538 2014-05-21 Robert Dewar <dewar@adacore.com>
1540 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
1541 Clearly document -gnatyg (GNAT style switches).
1542 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
1543 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
1544 available for VMS after all.
1545 * warnsw.adb: Reorganize to eliminate duplicated code
1546 (Restore_Warnings): Add a couple of missing entries
1547 (Save_Warnings): Add a couple of missing entries.
1548 * warnsw.ads: Add missing entries to Warning_Record (not clear
1549 what the impact is).
1551 2014-05-21 Robert Dewar <dewar@adacore.com>
1553 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
1555 * errout.ads: Document ?*? (restriction warning) insertion.
1556 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
1558 * erroutc.ads: Document use of * for restriction warning tag.
1559 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
1561 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1563 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
1564 make discriminants immediately visible when analyzing an aspect
1565 of a subtype declaration.
1566 (Uninstall_Discriminants): Do not apply to the entity in a
1567 subtype declaration.
1569 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1571 * sem_util.adb: Code clean up.
1573 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
1575 * gnat_ugn.texi: Document -Werror.
1577 2014-05-21 Bob Duff <duff@adacore.com>
1579 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
1580 This was returning False if the Object is a constant view. Fix
1581 it to return True in that case, because it might be a view of
1583 (Has_Discriminant_Dependent_Constraint): Fix latent
1584 bug; this function was crashing when passed a discriminant.
1586 2014-05-21 Robert Dewar <dewar@adacore.com>
1588 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
1589 * s-arit64.adb: Minor code reorganization.
1590 * sem_prag.adb: Minor comment fix (remove erroneous use of the
1593 2014-05-21 Robert Dewar <dewar@adacore.com>
1595 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
1596 computing new table size.
1598 2014-05-21 Robert Dewar <dewar@adacore.com>
1600 * einfo.ads: Minor reformatting.
1601 * ceinfo.adb: Deal with slight format change of einfo.ads.
1603 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1605 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
1606 implementation of the SPARK 2014 rule concerning private child
1609 2014-05-21 Vincent Celier <celier@adacore.com>
1611 * makeusg.adb: Add switch -d to usage.
1613 2014-05-21 Ed Schonberg <schonberg@adacore.com>
1615 * sem_util.adb (Find_Actual): If an actual that is the prefix
1616 of an enclosing prefixed call has been rewritten, use Nkind
1617 and Sloc to identify the corresponding formal, when handling
1618 deferred references.
1620 2014-05-21 Robert Dewar <dewar@adacore.com>
1622 * debug.adb: Document -gnatd.z switch.
1623 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
1625 2014-05-21 Robert Dewar <dewar@adacore.com>
1627 * einfo.ads (Can_Never_Be_Null): Minor comment update.
1628 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
1629 error message change.
1630 * s-arit64.adb ("abs"): New function. Use expression functions
1631 for the simple conversions and arithmetic.
1633 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1635 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
1636 set function_start_locus.
1638 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1640 * utils.c (gnat_write_global_declarations): Adjust the flags put on
1643 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1645 * gcc-interface/decl.c (change_qualified_type): New static function.
1646 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
1647 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
1648 <E_Array_Subtype>: Likewise.
1649 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
1650 (gnat_to_gnu_component_type): Likewise.
1651 (gnat_to_gnu_param): Likewise.
1653 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1655 * fe.h (Set_Present_Expr): Move around.
1656 (End_Location): New macro.
1657 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
1659 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1661 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
1662 lieu of more verbose construct.
1663 * gcc-interface/trans.c (Call_to_gnu): Likewise.
1664 (gnat_to_gnu): Likewise. Remove obsolete code.
1666 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
1668 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
1669 consider that regular packed arrays can never be superflat.
1671 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1673 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
1675 * gcc-interface/decl.c (annotate_value): Adjust.
1676 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
1677 (push_range_check_info): Likewise.
1678 (Loop_Statement_to_gnu): Likewise.
1679 (Subprogram_Body_to_gnu): Likewise.
1680 (Compilation_Unit_to_gnu): Likewise.
1681 (start_stmt_group): Likewise.
1682 * gcc-interface/utils.c (init_gnat_utils): Likewise.
1683 (gnat_pushlevel): Likewise.
1684 (maybe_pad_type): Likewise.
1686 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
1688 * seh_init.c: Fix copyright year.
1690 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1692 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
1693 are defined. Move include windows.h before system.h.
1694 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
1695 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
1697 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1699 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
1700 to the appropriate type.
1701 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1702 (pos_to_constructor): Likewise.
1704 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
1706 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
1708 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1709 Mike Stump <mikestump@comcast.net>
1710 Richard Sandiford <rdsandiford@googlemail.com>
1712 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
1713 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
1714 (annotate_value): Use wide-int interfaces.
1715 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
1717 2014-04-28 Richard Henderson <rth@redhat.com>
1719 * gcc-interface/Makefile.in: Support aarch64-linux.
1721 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
1723 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
1724 add 'Suffix' parameter and adjust comment.
1725 (Get_External_Name_With_Suffix): Delete.
1726 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
1727 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
1729 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
1730 Call Get_External_Name instead of Get_External_Name_With_Suffix.
1731 (Get_Secondary_DT_External_Name): Likewise.
1732 * exp_cg.adb (Write_Call_Info): Likewise.
1733 * exp_disp.adb (Export_DT): Likewise.
1734 (Import_DT): Likewise.
1735 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
1736 parameter with False default.
1737 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
1738 * types.h (Fat_Pointer): Rename into...
1739 (String_Pointer): ...this. Add comment on interfacing rules.
1740 * fe.h (Compiler_Abort): Adjust for above renaming.
1741 (Error_Msg_N): Likewise.
1742 (Error_Msg_NE): Likewise.
1743 (Get_External_Name): Likewise. Add third parameter.
1744 (Get_External_Name_With_Suffix): Delete.
1745 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
1746 (create_concat_name): Adjust call to Get_External_Name, remove call to
1747 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
1748 * gcc-interface/trans.c (post_error): Likewise.
1749 (post_error_ne): Likewise.
1750 * gcc-interface/misc.c (internal_error_function): Likewise.
1752 2014-04-28 Richard Biener <rguenther@suse.de>
1755 * gcc-interface/utils.c: Define flag_isoc11.
1757 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
1759 * gnatvsn.ads (Library_Version): Bump to 4.10.
1761 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
1764 2014-04-22 Richard Henderson <rth@redhat.com>
1766 * gcc-interface/Makefile.in: Support aarch64-linux.
1768 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
1770 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
1771 (Error_Msg_N): Likewise.
1772 (Error_Msg_NE): Likewise.
1773 (Get_External_Name_With_Suffix): Likewise.
1774 * types.h (Fat_Pointer): Delete.
1775 (String_Pointer): New type.
1776 (DECLARE_STRING_POINTER): New macro.
1777 * gcc-interface/decl.c (create_concat_name): Adjust.
1778 * gcc-interface/trans.c (post_error): Likewise.
1779 (post_error_ne): Likewise.
1780 * gcc-interface/misc.c (internal_error_function): Likewise.
1782 2014-04-22 Richard Henderson <rth@redhat.com>
1784 * gcc-interface/Makefile.in: Support aarch64-linux.
1786 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
1787 (__gnat_alternate_stack): Enable for all linux except ia64.
1789 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
1791 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
1792 (Error_Msg_N): Likewise.
1793 (Error_Msg_NE): Likewise.
1794 (Get_External_Name_With_Suffix): Likewise.
1795 * types.h (Fat_Pointer): Delete.
1796 (String_Pointer): New type.
1797 (DECLARE_STRING_POINTER): New macro.
1798 * gcc-interface/decl.c (create_concat_name): Adjust.
1799 * gcc-interface/trans.c (post_error): Likewise.
1800 (post_error_ne): Likewise.
1801 * gcc-interface/misc.c (internal_error_function): Likewise.
1803 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
1804 Pierre-Marie de Rodat <derodat@adacore.com>
1806 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
1807 scalar constant instead of a reference for renaming of scalar literal.
1808 Do not create a new object for constant renaming except for a function
1809 call. Make sure a VAR_DECL is created for the renaming pointer.
1810 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
1811 (fold_constant_decl_in_expr): New function.
1812 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
1813 For a constant renaming, try to fold a constant DECL in the result.
1814 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
1815 (Identifier_to_gnu): Reference the renamed object of constant renaming
1817 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
1818 invalidate constant renaming pointers.
1820 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
1822 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
1823 (build_vector_type_for_size): New function.
1824 (build_vector_type_for_array): Likewise.
1825 (unchecked_convert): Build an intermediate vector type to convert
1826 from a generic array type to a vector type.
1827 (handle_vector_size_attribute): Reimplement.
1828 (handle_vector_type_attribute): Likewise.
1830 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
1832 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
1833 Is_OK_Static_Expression in lieu of Is_Static_Expression to
1834 detect valid arguments.
1836 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
1838 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
1840 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
1842 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
1843 (components_to_record): Likewise.
1844 * gcc-interface/utils.c (make_aligning_type): Likewise.
1845 (maybe_pad_type): Likewise.
1846 (finish_record_type): Likewise.
1847 (rest_of_record_type_compilation): Likewise.
1849 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
1851 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
1852 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
1854 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
1855 hint for Loop_Optimize.
1856 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
1857 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
1858 with new Ivdep hint.
1859 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
1860 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
1861 with new Ivdep hint.
1862 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
1864 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
1865 Robert Dewar <dewar@adacore.com>
1867 * opt.ads (Suppress_Back_Annotation): Remove as unused.
1868 * fe.h (Back_Annotate_Rep_Info): Likewise.
1869 (Global_Discard_Names): Likewise.
1870 (List_Representation_Info): Declare.
1871 * types.h (Uint_Minus_1): Likewise.
1872 * repinfo.ads: Document back-annotation change.
1873 * gcc-interface/gigi.h (init_gnat_decl): Declare.
1874 (destroy_gnat_decl): Likewise.
1875 * gcc-interface/decl.c (annotate_value): Do not create the cache of
1876 annotated values here but...
1877 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
1879 (init_gnat_decl): ...here instead. New function.
1880 (destroy_gnat_decl): Likewise.
1881 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
1882 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
1884 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
1886 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
1887 offset for the field, if any.
1889 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
1890 Svante Signell <svante.signell@gmail.com>
1894 * s-osinte-x32.adb: New file.
1895 * s-linux.ads (Time): New section.
1896 * s-linux-alpha.ads (Time): Likewise.
1897 * s-linux-android.ads (Time: Likewise.
1898 * s-linux-hppa.ads (Time): Likewise.
1899 * s-linux-mipsel.ads (Time): Likewise.
1900 * s-linux-sparc.ads (Time): Likewise.
1901 * s-linux-x32.ads (Time): Likewise.
1902 * s-osprim-x32.ads (timespec): Adjust.
1904 (To_Timespec): Likewise.
1905 * s-osinte-linux.ads (Time): Define local subtypes for those defined
1907 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
1908 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
1909 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
1910 * s-osinte-solaris-posix.ads (timespec): Likewise.
1911 * s-osinte-posix.adb (To_Timespec): Likewise.
1912 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
1914 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
1917 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
1918 * s-linux-android.ads: New file.
1919 * s-intman-android.adb: Likewise.
1920 * s-osinte-android.ads: Adjust.
1921 * sigtramp-armdroid.c: Likewise.
1922 * sigtramp.h: Add Android support.
1924 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
1926 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
1928 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
1931 * system-linux-alpha.ads: Adjust for Ada 2005.
1932 * system-linux-mips.ads: Likewise.
1933 * system-linux-mips64el.ads: Likewise.
1934 * system-linux-mipsel.ads: Likewise.
1935 * system-linux-s390.ads: Likewise.
1936 * system-linux-s390x.ads: Likewise.
1937 * system-linux-sparc.ads: Likewise.
1938 * system-linux-sparcv9.ads: Likewise.
1939 * system-rtems.ads: Likewise.
1940 * system-vxworks-arm.ads: Likewise.
1942 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
1945 * gcc-interface/Makefile.in (target_cpu_default): Revert
1948 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
1951 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
1952 it to set the RM size. Use directly 'size' for the Esize.
1953 (Create_Back_End_Float_Types): Adjust call to above.
1954 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
1955 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
1956 (Write_Target_Dependent_Values): Adjust comment.
1957 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
1959 (Write_Target_Dependent_Values): Write the precision in lieu of size.
1960 (Initialization): Read the precision in lieu of size and compute the
1961 size from the precision and the alignment.
1962 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
1963 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
1964 types for vector modes, pass the size in addition to the precision.
1966 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
1968 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
1970 2014-03-07 Doug Rupp <rupp@adacore.com>
1973 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
1974 (Support_64_Bit_Divides): Removed, no longer used.
1975 (ZCX_By_Default): Enabled.
1977 2014-02-25 Doug Rupp <rupp@adacore.com>
1979 * gcc-interface/Makefile.in (arm-linux):
1980 (EH_MECHANISM): Use ARM unwinder (-arm)
1981 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
1983 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
1984 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
1985 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
1986 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
1987 Add dependencies for sigtramp-armvxw.o.
1989 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
1991 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
1993 2014-02-25 Robert Dewar <dewar@adacore.com>
1995 * rtsfind.adb (Is_RTE): Protect against entity with no scope
1996 field (previously this call blew up on the Standard entity).
1997 * sem_attr.adb (Analyze_Attribute, case Access): Remove
1998 test for No_Abort_Statements, this is now handled in
1999 Set_Entity_With_Checks.
2000 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
2001 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
2002 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
2003 Set_Entity_With_Checks.
2004 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
2005 Add checks for No_Abort_Statements.
2007 2014-02-25 Robert Dewar <dewar@adacore.com>
2009 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
2010 Check_Restriction is OK.
2012 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2014 * sem_ch3.adb (Process_Full_View): Better error message when
2015 the full view of a private type without discriminants is an
2017 * sem_ch7.adb (Uninstall_Declarations): Ditto.
2019 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2021 * sigtramp-armvxw.c: Also restore r0.
2023 2014-02-25 Robert Dewar <dewar@adacore.com>
2025 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
2026 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
2027 set unconditionally.
2028 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
2029 any more (Output_Msg_Text): Rewritten with new convention on
2030 output of warnings that are treated as errors.
2031 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
2033 * gnat_rm.texi: Updates to documentation on pragma
2035 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
2036 set Warning_Doc_Switch.
2037 * lib-writ.ads: Add documentation note on ALI file generation
2039 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
2041 * sem_attr.adb (Resolve_Attribute, case Access):
2042 Abort_Task'Access violates the No_Abort_Statements restriction.
2043 * sem_res.adb (Resolve_Call): Check restriction
2044 No_Abort_Statements for call to Abort_Task or a renaming of it.
2046 2014-02-25 Robert Dewar <dewar@adacore.com>
2048 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
2050 * lib.ads: Minor reformatting.
2051 * einfo.ads: Minor reformatting.
2053 2014-02-25 Doug Rupp <rupp@adacore.com>
2055 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
2056 use Short_Descriptor(S) as the argument passing mechanism.
2058 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2060 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
2062 2014-02-25 Robert Dewar <dewar@adacore.com>
2064 * atree.ads (Warnings_Treated_As_Errors): New variable.
2065 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
2066 error object (Initialize): Initialize Warnings_As_Errors_Count
2067 (Write_Error_Summary): Include count of warnings treated as errors.
2068 * erroutc.adb (Warning_Treated_As_Error): New function.
2069 (Matches): Function moved to outer level of package.
2070 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
2071 (Warning_Treated_As_Error): New function.
2072 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
2073 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
2074 * opt.ads (Config_Switches_Type): Add entry for
2075 Warnings_As_Errors_Count.
2076 (Warnings_As_Errors_Count): New variable.
2077 (Warnings_As_Errors): New array.
2078 * par-prag.adb: Add dummy entry for Warning_As_Error.
2079 * sem_prag.adb (Analyze_Pragma): Implement new pragma
2081 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
2083 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2085 * sigtramp.h: Fix minor inaccuracy.
2087 2014-02-25 Ben Brosgol <brosgol@adacore.com>
2089 * gnat_ugn.texi: Added description of kill command.
2091 2014-02-25 Robert Dewar <dewar@adacore.com>
2093 * gnat_rm.texi (Address_Clauses): Add a section discussing the
2094 problem of address clauses causing unexpected initialization,
2095 including the effect of Initialize_Scalars.
2097 2014-02-25 Robert Dewar <dewar@adacore.com>
2099 * errout.adb: Various changes for better msgs for anonmous access
2101 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
2103 (Buffer_Remove): Version with character argument.
2104 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
2105 of mismatching conventions for access-to-subprogram case.
2106 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
2107 access types in record.
2108 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
2109 types, including in records.
2111 2014-02-25 Doug Rupp <rupp@adacore.com>
2113 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
2114 enhancements and corrections.
2116 2014-02-25 Robert Dewar <dewar@adacore.com>
2118 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
2120 2014-02-25 Robert Dewar <dewar@adacore.com>
2122 * gnat_rm.texi: First set of documentation additions for
2123 predefined RM units.
2124 * checks.adb: Minor reformatting.
2125 * sem_elab.adb (Check_Task_Activation): Minor fix to error
2127 * sem_util.adb: Minor reformatting.
2129 2014-02-25 Arnaud Charlet <charlet@adacore.com>
2131 * usage.adb (Usage): Add help on -gnateC.
2132 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
2133 * opt.ads (Generate_CodePeer_Messages): New flag.
2134 * gnat_ugn.texi: Document new switch -gnateC.
2136 2014-02-25 Ben Brosgol <brosgol@adacore.com>
2138 * gnat_rm.texi: Corrected minor typos in Implementation Defined
2140 * opt.ads: Minor reformatting.
2142 2014-02-25 Robert Dewar <dewar@adacore.com>
2144 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
2145 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
2147 * opt.ads (Warn_Info_Messages): New flag.
2148 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
2150 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
2152 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
2153 * usage.adb: Add documentation of -gnatel/-gnateL Update
2154 documentation of -gnatwl/-gnatwL.
2155 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
2156 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
2158 2014-02-25 Robert Dewar <dewar@adacore.com>
2160 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
2161 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
2162 * interfac.ads: Minor code reorganization (add pragma
2163 Compiler_Unit_Warning).
2164 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
2165 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
2166 Has_Shift_Operator flag.
2167 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
2168 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
2169 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
2170 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
2171 Add entry for Name_Amount.
2172 * checks.adb (Selected_Range_Checks): When checking for a null
2173 range, make sure we use the base type, and not the subtype for
2174 deciding a range is null.
2175 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
2176 for suspicious loop bound which is outside the range of the
2178 * gnat_ugn.texi: Add documentation section "Determining the
2179 Chosen Elaboration Order"
2180 * sem_ch13.adb (UC_Entry): Add field Act_Unit
2181 (Validate_Unchecked_Conversion): Store Act_Unit
2182 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
2183 * treepr.adb: Minor reformatting.
2185 2014-02-25 Arnaud Charlet <charlet@adacore.com>
2187 * usage.adb: Minor: fix typo.
2189 2014-02-25 Robert Dewar <dewar@adacore.com>
2191 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
2192 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
2193 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
2194 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
2195 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
2196 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
2197 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
2198 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
2199 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
2200 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
2201 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
2202 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
2203 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
2204 Compiler_Unit_Warning, change Compiler_Unit everywhere to
2205 Compiler_Unit_Warning.
2207 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
2209 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
2210 in ASIS mode aggregates that are used as aspect definitions.
2212 2014-02-25 Robert Dewar <dewar@adacore.com>
2214 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
2217 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2219 * freeze.adb (Freeze_Entity): If the return type of a function
2220 is a limited view, and the non-limited view has not been seen yet,
2221 defer freezing to some later point.
2223 2014-02-25 Robert Dewar <dewar@adacore.com>
2225 * sem_ch3.adb: Minor reformatting.
2227 2014-02-25 Robert Dewar <dewar@adacore.com>
2229 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
2230 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
2231 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
2232 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
2233 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
2234 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
2235 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
2236 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
2237 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
2238 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
2239 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
2240 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
2241 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
2242 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
2243 snames.ads-tmpl: Change Compiler_Unit everywhere to
2244 Compiler_Unit_Warning.
2246 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2248 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
2249 (Collect_Body_Postconditions_In_Decls): New routine.
2250 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
2251 postcondition aspects or pragmas that appear on a subprogram
2253 (Collect_Spec_Preconditions): Factor out code. Handle
2254 precondition aspects or pragmas that appear on a subprogram
2256 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
2257 aspects that apply to a subprogram body stub is no longer delayed,
2258 the aspects are analyzed on the spot.
2259 (SPARK_Aspect_Error):
2260 Aspects that apply to a subprogram declaration cannot appear in
2262 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
2263 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
2264 is now a local variable. Code cleanup. Analysis related to
2265 the aspects of a subprogram body stub is now carried out by
2266 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
2267 and/or pragmas of a subprogram body stub to the proper body
2268 as this is no longer needed. Do not analyze the aspects of a
2269 subprogram stub when the corresponding source unit is missing.
2270 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
2272 (Analyze_Task_Body_Stub): Flag the illegal use of
2274 (Optional_Subunit): Add local variable Unum.
2275 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
2276 pragma when it applies to a subprogram body stub.
2277 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
2278 Depends and Global can now apply to a subprogram body stub as
2279 long as it acts as its own spec.
2280 (Analyze_Refined_Pragma):
2281 Code reformatting. Refinement pragmas cannot apply to a subunit.
2283 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2285 * einfo.ads Update the usage of flag
2286 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
2287 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
2288 now starts with the letter 'C'. This makes reading expanded
2290 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
2291 Iter_Loop. Signal that an Ada 2012 iterator loop requires
2292 secondary stack management when creating a transient scope for
2293 an element reference.
2294 * exp_util.adb (Process_Statements_For_Controlled_Objects):
2295 When wrapping the statements of a loop, pass the E_Loop entity
2296 to the wrapping machinery.
2297 (Wrap_Statements_In_Block): Add
2298 formal parameter Scop along with comment on usage. Add local
2299 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
2300 block as requiring secondary stack management when the block is
2301 created inside an Ada 2012 iterator loop. This ensures that any
2302 reference objects are reclaimed on each iteration of the loop.
2303 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
2304 tasked with the handling of container iterators as requiring
2305 secondary stack management. This ensures that iterators are
2306 reclaimed when the loop terminates or is exited in any fashion.
2307 * sem_util.adb (Add_Block_Identifier): New routine.
2308 (Find_Enclosing_Iterator_Loop): New routine.
2309 * sem_util.ads (Add_Block_Identifier): New routine.
2310 (Find_Enclosing_Iterator_Loop): New routine.
2312 2014-02-25 Robert Dewar <dewar@adacore.com>
2314 * sinfo.ads: Minor reformatting.
2316 2014-02-25 Tristan Gingold <gingold@adacore.com>
2318 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
2320 2014-02-25 Pascal Obry <obry@adacore.com>
2322 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
2324 2014-02-25 Tristan Gingold <gingold@adacore.com>
2326 * sem_ch10.adb: Minor comment fix.
2328 2014-02-25 Bob Duff <duff@adacore.com>
2330 * s-tasdeb.adb: Misc cleanup of this package,
2331 including printing addresses in hexadecimal.
2332 (Write): Fix minor bug when taking 'Address of an empty string.
2334 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2336 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
2337 public child unit when it does not refer to the abstract state
2338 of a public ancestor.
2340 2014-02-25 Yannick Moy <moy@adacore.com>
2342 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
2343 Validity_Checks in GNATprove and CodePeer modes.
2345 2014-02-25 Pascal Obry <obry@adacore.com>
2347 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
2348 Artifacts attribute.
2350 2014-02-25 Yannick Moy <moy@adacore.com>
2352 * sem_prag.adb: Minor reformatting to get consistent messages.
2354 2014-02-25 Robert Dewar <dewar@adacore.com>
2356 * checks.adb: Minor reformatting.
2357 * sinfo.ads (Do_Range_Check): Document that this flag is never
2358 passed to the back end.
2360 2014-02-25 Yannick Moy <moy@adacore.com>
2362 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
2363 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
2365 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2367 * sem_res.adb (Appears_In_Check): New routine.
2368 (Resolve_Entity_Name): Remove local variables Prev and
2369 Usage_OK. Par is now a constant. Remove the parent chain traversal
2370 as the placement of a volatile object with enabled property
2371 Async_Writers and/or Effective_Reads must appear immediately
2372 within a legal construct.
2374 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2376 * checks.adb (Apply_Selected_Range_Checks):
2377 Alphabetize local constants and variables. Add comments.
2378 Always insert a range check that requires runtime evaluation into
2381 2014-02-25 Robert Dewar <dewar@adacore.com>
2383 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
2385 2014-02-25 Bob Duff <duff@adacore.com>
2387 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
2388 iterations while waiting for independent tasks to terminate;
2389 if an independent task does not terminate, we do not want to
2390 hang here. In that case, the thread will be terminated when the
2392 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
2394 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2396 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
2397 used to perform pre-analysis of the expression for SPARK
2398 aspects that have a non-standard syntax, such as GLobal and
2399 Initializes. The procedure applies to the original expression
2400 in an aspect specification, prior to the analysis of the
2401 corresponding pragma, in order to provide semantic information
2402 for ASIS navigation purposes.
2403 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
2404 Call new subprogram.
2406 2014-02-25 Yannick Moy <moy@adacore.com>
2408 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
2410 2014-02-25 Doug Rupp <rupp@adacore.com>
2412 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
2413 (__gnat_adjust_context_for_raise): Bump the PC by 2.
2415 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2417 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
2418 misplaced IS, add a statement sequence to improper body only if
2419 one has not been parsed already.
2421 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2423 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
2424 mismatch when multidimensional array is updated with a single
2427 2014-02-25 Yannick Moy <moy@adacore.com>
2429 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
2430 sem_ch6.adb: Mark most references to SPARK RM in error messages
2433 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2435 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
2436 appears in a list of basic declarations, complete the tree with
2437 an empty statement list, to prevent cascaded errors and crashes
2438 if semantic analysis is attempted.
2440 2014-02-24 Thomas Quinot <quinot@adacore.com>
2442 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
2444 * erroutc.adb: Minor reformatting.
2446 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2448 * sem_prag.adb (Check_Clause_Syntax): Account
2449 for a solitary input item in a dependency list.
2451 2014-02-24 Yannick Moy <moy@adacore.com>
2453 * gnat1drv.adb (Adjust_Global_Switches): Do not
2454 use validity checks at all in GNATprove_Mode.
2456 2014-02-24 Robert Dewar <dewar@adacore.com>
2458 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
2459 atree.adb, atree.ads: Minor reformatting.
2461 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2463 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
2464 global and dependence refinement when SPARK_Mode is off.
2465 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
2466 state refinement when SPARK_Mode is off.
2467 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
2468 variable Decl. Insert the generated pragma for Refined_State
2469 after a potential pragma SPARK_Mode.
2470 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
2471 constant Deps. Remove local variable Expr. Check the syntax
2472 of pragma Depends when SPARK_Mode is off. Factor out the
2473 processing for extra parenthesis around individual clauses.
2474 (Analyze_Global_In_Decl_List): Items is now a constant. Check
2475 the syntax of pragma Global when SPARK_Mode is off.
2476 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
2477 Initializes when SPARK_Mode is off.
2478 (Analyze_Part_Of): Check
2479 the syntax of the encapsulating state when SPARK_Mode is off.
2480 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
2481 SPARK_Mode is off. Move the declaration order check with respect
2482 to pragma Initializes to the end of the processing. Do not verify
2483 the declaration order for pragma Initial_Condition when SPARK_Mode
2484 is off. Do not complain about a useless package refinement when
2486 (Analyze_Refined_Depends_In_Decl_Part): Refs
2487 is now a constant. Check the syntax of pragma Refined_Depends
2488 when SPARK_Mode is off.
2489 (Analyze_Refined_Global_In_Decl_Part):
2490 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
2491 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
2492 Refined_State when SPARK_Mode is off.
2493 (Check_Dependence_List_Syntax): New routine.
2494 (Check_Global_List_Syntax): New routine.
2495 (Check_Initialization_List_Syntax): New routine.
2496 (Check_Item_Syntax): New routine.
2497 (Check_State_Declaration_Syntax): New routine.
2498 (Check_Refinement_List_Syntax): New routine.
2499 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
2501 2014-02-24 Robert Dewar <dewar@adacore.com>
2503 * a-tags.adb, s-os_lib.adb: Minor reformatting.
2505 2014-02-24 Thomas Quinot <quinot@adacore.com>
2507 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
2508 strerror message, not just numeric errno value.
2510 2014-02-24 Doug Rupp <rupp@adacore.com>
2512 * raise-gcc.c (exception_class_eq): Make endian neutral.
2514 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2516 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
2517 flag, and reset Etype and Analyzed attributes unconditionally
2518 when copying a tree that may be partly analyzed.
2519 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
2520 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
2521 within a subprogram body and applies to it, remove it from the
2522 body before making a copy of it, to prevent spurious errors when
2523 analyzing the copied body.
2525 2014-02-24 Thomas Quinot <quinot@adacore.com>
2527 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
2528 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
2529 vxWorks.h has been included. Also ensure that file attributes
2530 related definitions are output even in cases where socket support
2532 * a-tags.adb: Code clean up.
2533 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
2534 instead of -I to add the main ada source directory to the header
2535 search path, in order to avoid conflict between our own "types.h"
2536 and VxWork's <types.h>.
2538 2014-02-24 Robert Dewar <dewar@adacore.com>
2540 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
2541 * debug.adb: Remove documentation of -gnatd.X, no longer used.
2542 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
2544 2014-02-24 Bob Duff <duff@adacore.com>
2546 * gnat_ugn.texi: Improve documentation of gnatpp.
2548 2014-02-24 Thomas Quinot <quinot@adacore.com>
2550 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
2551 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
2552 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
2553 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
2554 a chars_ptr, because on Windows this is a renaming of
2555 Socket_Error_Message.
2557 2014-02-24 Robert Dewar <dewar@adacore.com>
2559 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
2560 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
2561 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
2564 2014-02-24 Thomas Quinot <quinot@adacore.com>
2566 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
2567 that the source directory containing s-oscons-tmplt.c is on the
2568 include path, so that all internal header files are available.
2570 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2572 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
2573 domain of iteration is an attribute reference 'Old, this is an
2574 Ada 2012 iterator and the loop must be rewritten as such.
2576 2014-02-24 Thomas Quinot <quinot@adacore.com>
2578 * s-fileio.adb (Errno_Message): Remove, use shared version from
2580 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
2581 * g-stseme (Socket_Error_Message): Reimplement in terms of new
2583 * g-socthi.ads, g-socthi.adb: Change profile of
2584 Socket_Error_Message to return String to allow the above.
2585 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
2586 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
2587 * g-socthi-vxworks.ads: Update to account for the above profile
2589 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
2590 * s-crtl.ads (strncpy): New procedure.
2591 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
2592 Use import from s-crtl.
2593 * a-envvar.adb, osint.adb: Use imports of C runtime functions
2594 from s-crtl instead of re-importing locally.
2596 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2598 * sem_prag.adb (Analyze_Global_Item): Emit the
2599 variable related checks concerning volatile objects only when
2602 2014-02-24 Robert Dewar <dewar@adacore.com>
2604 * sem_ch5.adb (Analyze_Iterator_Specification): use
2605 Error_Msg_Ada_2012_Feature.
2607 2014-02-24 Jose Ruiz <ruiz@adacore.com>
2609 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
2610 No_Local_Timing_Events and No_Specific_Termination_Handlers
2611 must be set, according to the Ravenscar profile definition
2614 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2616 * sem_ch6.adb (Analyze_Expression_Function): If this is a
2617 completion, freeze return type and its designated type if needed.
2619 2014-02-24 Thomas Quinot <quinot@adacore.com>
2621 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2622 'Address): When moving initialization statements to a freeze
2623 entity, keep them under a single node (i.e. do not unwrap
2624 expressions with actions), and set the Initialization_Statements
2625 attribute again so that processing of a later pragma Import can
2628 2014-02-24 Claire Dross <dross@adacore.com>
2630 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
2631 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
2632 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
2633 Left/Right to First_To_Previous/Current_To_Last.
2635 2014-02-24 Thomas Quinot <quinot@adacore.com>
2637 * adaint.h (struct file_attributes): New component "error"
2638 (__gnat_error_attributes): Accessor for the above.
2639 * adaint.c (__gnat_error_attributes): New subprogram
2640 (__gnat_stat): Fix returned value (expect errno value)
2641 (__gnat_stat_to_attr): Add management of error component (set to
2642 stat errno value, except for missing files where it is set to 0,
2643 and exists is set to 0).
2644 * osint.ads (File_Attributes_Size): Update per change above,
2645 also clarify documentation.
2646 * s-filatt.ads: New file, binding to file attributes related
2648 * Makefile.rtl (s-filatt): New runtime unit.
2649 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
2650 to library function if not available on target).
2651 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
2652 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
2653 SIZEOF_struct_dirent_alloc): New constants.
2654 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
2655 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
2656 Perform appropriate error checking if stat fails (do not just
2657 ignore existing files if stat fails)
2658 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
2661 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2663 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
2664 the use of volatile objects as global items in a function to
2665 the variable related checks section.
2666 * sem_util.adb (Async_Readers_Enabled): Directly call
2667 Has_Enabled_Property.
2668 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
2669 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
2670 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
2671 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
2672 Update the comment on usage. State_Has_Enabled_Property how handles
2673 the original logic of the routine. Add processing for variables.
2674 (State_Has_Enabled_Property): New routine.
2675 (Variable_Has_Enabled_Property): New routine.
2677 2014-02-24 Robert Dewar <dewar@adacore.com>
2679 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
2681 * atree.ads, atree.adb (Node35): New function.
2682 (Set_Node35): New procedure.
2683 * debug.adb: Define new debug flag -gnatd.X.
2684 * einfo.ads, einfo.adb (Import_Pragma): New field.
2685 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
2686 really active yet, has to be activated with -gnatd.X.
2687 * sem_prag.adb (Set_Imported): Set new Import_Pragma
2688 field (Set_Imported): Don't set Is_Public (see
2689 Freeze.Wrap_Imported_Subprogram)
2690 * par-ch3.adb (P_Component_List): Handle unexpected null component.
2692 2014-02-24 Yannick Moy <moy@adacore.com>
2694 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
2695 * gnat_rm.texi: Correct documentation of attribute Update.
2697 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2699 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
2700 iterator in older versions of Ada.
2702 2014-02-24 Gary Dismukes <dismukes@adacore.com>
2704 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
2705 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
2707 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2709 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
2710 indexed_components that are instances of Ada 2012 container
2711 indexing operations. Analysis and resolution of such nodes
2712 is performed on the attribute, and the original source is
2713 preserved for ASIS operations. If expansion is enabled, the
2714 indexed component is replaced by the value of this attribute,
2715 which is in a call to an Indexing aspect, in most case wrapped
2716 in a dereference operation.
2717 * sem_ch4.adb (Analyze_Indexed_Component): Create
2718 Generalized_Indexing attribute when appropriate.
2719 (Analyze_Call): If prefix is not overloadable and has an indexing
2720 aspect, transform into an indexed component so it can be analyzed
2721 as a potential container indexing.
2722 (Analyze_Expression): If node is an indexed component with a
2723 Generalized_ Indexing, do not re-analyze.
2724 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
2725 of an indexed_component that has been transformed into a container
2727 (Resolve_Indexed_Component): Call the above when required.
2728 (Resolve): Do not insert an explicit dereference operation on
2729 an indexed_component whose type has an implicit dereference:
2730 the operation is inserted when resolving the related
2731 Generalized_Indexing.
2733 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
2735 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
2738 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2740 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
2742 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
2743 Merge the expected and available mode errors.
2744 (Report_Unused_Constituents): Remove leading spaces in error messages.
2745 (Report_Unused_States): Remove leading spaces in error messages.
2747 2014-02-24 Thomas Quinot <quinot@adacore.com>
2749 * par_sco.adb (Traverse_One): Refine categorization of statement
2752 2014-02-24 Robert Dewar <dewar@adacore.com>
2754 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
2755 Pure_05, Pure_12 and Preelaborate_05.
2756 * gnat_rm.texi: Update accordingly.
2757 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
2758 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
2759 Recognize one argument form of these pragmas only in GNAT mode
2762 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2764 * s-dimmks.ads: Replace symbol for temperature, previously the
2765 Greek letter Theta, by the ASCII @ sign.
2766 * s-diflio.ads: ditto.
2768 2014-02-24 Robert Dewar <dewar@adacore.com>
2770 * exp_ch4.adb: Minor code reorganization (use OR for boolean
2772 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
2774 2014-02-24 Ben Brosgol <brosgol@adacore.com>
2776 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
2777 so that references to gnatmem and ASIS tools do not appear in the FSF
2778 edition of the GNAT User's Guide.
2780 2014-02-24 Yannick Moy <moy@adacore.com>
2782 * freeze.adb (Freeze_Entity): Do not issue warning
2783 for pre/post being ignored on imported subprogram in GNATprove
2786 2014-02-24 Robert Dewar <dewar@adacore.com>
2788 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
2789 stand.ads, sem_eval.adb: Minor reformatting.
2791 2014-02-24 Yannick Moy <moy@adacore.com>
2793 * sem_prag.adb: Minor rewording in error message.
2795 2014-02-24 Johannes Kanig <kanig@adacore.com>
2797 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
2798 GNATprove_mode, gnat2why doesn't need nor use these types.
2800 2014-02-24 Gary Dismukes <dismukes@adacore.com>
2802 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
2803 target, in the case of signed integer exponentiation that uses a
2804 run-time routine, always select the Exp_* versions, since overflow
2805 checking is automatically done by AAMP arithmetic instructions.
2807 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2809 * sem_ch13.adb (Analyze_Aspect_Specifications):
2810 When the related context is a package instace, insert pragma
2811 Abstract_State after all internally-generated renamings related
2812 to the instance "header".
2814 2014-02-24 Ed Schonberg <schonberg@adacore.com>
2816 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
2818 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
2819 call to an abstract subprogram is legal if it appears in a
2820 pre/postcondition of another abstract operation.
2822 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
2824 * gnat_ugn.texi: Misc updates.
2826 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2828 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
2830 2014-02-24 Gary Dismukes <dismukes@adacore.com>
2832 * layout.adb (Layout_Variant_Record): Instantiate
2833 Generic_Check_Choices and call Check_Choices before calling
2834 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
2835 set to prevent generating incorrect discriminant-checking
2836 functions for 'others' variants (functions that unconditionally
2837 return True rather than accounting for the values covered by the
2839 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
2840 Formal_Derived_Matching.
2841 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
2842 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
2843 Formal_Derived_Matching formal to Subtypes_Statically_Match.
2844 (Subtypes_Statically_Match): Suppress the Object_Size matching
2845 test in the case where Formal_Derived_Matching is True.
2846 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
2847 True for Formal_Derived_Matching_Formal on the call to
2848 Subtypes_Statically_Compatible.
2850 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
2852 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
2854 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
2856 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
2857 Look through a conversion between original and packable version to get
2859 (build_component_ref): Rework comment and fix formatting.
2861 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
2863 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
2864 project-specific options.
2866 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2868 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
2869 not Constraint_Error.
2870 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
2871 * sem_ch5.adb: Code clean up.
2873 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
2875 * sem_prag.adb (Usage_Error): Remove local
2876 constant Typ. Remove the specialized diagnostics for unconstrained
2877 or tagged items as those are not part of the explicit input set
2878 of the related subprogram and should not be flagged.
2880 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2882 * sem_attr.adb: Add guard to preserve all errors.
2884 2014-02-20 Vincent Celier <celier@adacore.com>
2886 * switch-m.adb (Normalize_Compiler_Switches): Take into account
2887 switches that are recorded in ALI files: -gnateA, -gnateE,
2888 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
2890 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2892 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
2893 of an element iterator form over a formal container with an
2895 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
2896 to create declaration and loop statements for both forms of
2897 container iterators.
2898 (Expand_Formal_Container_Element_Iterator): New procedure
2899 to handle loops of the form "for E of C" when C is a formal
2901 (Expand_Formal_Container_Iterator): Code cleanup.
2903 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
2905 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
2906 (Analyze_Contract_Case): Remove the use of
2907 "may". Replace "aspect Contract_Cases" to avoid categorization
2908 of aspect vs pragma.
2909 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
2910 (Analyze_Global_Item): Remove
2911 the use of "formal", specify the subprogram. Split the
2912 error message about a state with visible refinement into
2913 two. Remove the use of "global" from "volatile global item".
2914 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
2916 (Analyze_Input_Output): Update the call to
2917 Check_Mode. Specify the duplicated item. Reword the error
2918 message concerning an input of a null output list. Use "\"
2919 for error message continuation.
2920 (Analyze_Part_Of): Remove
2921 the use of "may". Use "\" for error message continuation.
2922 (Analyze_Refined_Depends_In_Decl_Part): Update the error
2923 message concerning a useless refinement to match the format
2925 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
2926 concerning a useless refinement.
2927 (Analyze_Refinement_Clause): Use "\" for error message continuation.
2928 (Check_Constituent_Usage): Use "\" for error message continuation.
2929 (Check_Dependency_Clause): Use "\" for error message continuation.
2930 (Check_Matching_Constituent): Use "\" for error message continuation.
2931 (Check_Missing_Part_Of): Use "\" for error message continuation.
2932 (Check_Mode): Renamed to
2933 Check_Role. Update the comment on usage. Redo the error reporting
2935 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
2936 message continuation.
2937 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
2938 with comment on usage. Update all occurrences of Is_Input and Is_Output.
2939 (Inconsistent_Mode_Error): Use "\" for error message continuation.
2940 (Input_Match): Use "\" for error message continuation.
2941 (Role_Error): New routine.
2942 (Set_Convention_From_Pragma): Use "\" for error message continuation.
2943 (Usage_Error): Add local variable Error_Msg. Build specialized error
2944 message showcasing the offending item kind. Redo the diagnostics for
2945 unconstrained types.
2947 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2949 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
2950 to determine whether a type is a container type, rather than
2951 examining only its type declaration, so that subtypes and derived
2952 types are handled properly.
2954 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
2956 * gnat_ugn.texi: gnatmetric: add description of project-specific
2959 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2961 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
2962 all choices in an association for a record type have the same
2963 type, as is done for record aggregates.
2965 2014-02-20 Robert Dewar <dewar@adacore.com>
2967 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
2968 Unmodified rather than Warnings (Off). Make comments
2969 uniform in the four affected units.
2971 2014-02-20 Robert Dewar <dewar@adacore.com>
2973 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2974 Object_Size): For non-scalar types allow any value that is a
2976 * gnat_rm.texi: Document Object_Size for composites more clearly.
2978 2014-02-20 Yannick Moy <moy@adacore.com>
2980 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
2982 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2984 * stand.ads: Raise_Type: new predefined entity, used as the type
2985 of a Raise_Expression prior to resolution.
2986 * cstand.adb: Build entity for Raise_Type.
2987 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
2988 initial type of the node.
2989 * sem_type.adb (Covers): Raise_Type is compatible with all
2991 * sem_res.adb (Resolve): Remove special handling of Any_Type on
2992 Raise_Expression nodes.
2993 (Resolve_Raise_Expression): Signal ambiguity if the type of the
2994 context is still Raise_Type.
2996 2014-02-20 Robert Dewar <dewar@adacore.com>
2998 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
2999 mismatching predicates.
3000 * sem_ch6.adb (Check_Conformance): Give better messages on
3002 * sem_eval.adb (Predicates_Match): Move to spec.
3003 * sem_eval.ads (Predicates_Match): Moved here from body.
3005 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3007 * a-cbmutr.adb: Use default value in Insert_Child.
3009 2014-02-20 Vincent Celier <celier@adacore.com>
3011 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
3012 Stringt.Initialize in all project aware tools.
3014 2014-02-20 Doug Rupp <rupp@adacore.com>
3016 * gnat_ugn.texi: Document gnatbind -X option.
3017 * vms_data.ads: Minor warnings documentation reformatting.
3019 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3021 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
3022 procedure for a base type.
3024 2014-02-20 Robert Dewar <dewar@adacore.com>
3026 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
3027 expression with type info.
3028 * sem_ch13.adb: Minor reformatting.
3029 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
3030 False if predicates do not match on the two types.
3032 2014-02-20 Arnaud Charlet <charlet@adacore.com>
3034 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
3035 In Relaxed_RM_Semantics mode, allow any static integer value,
3036 for compatibility with other compilers.
3038 2014-02-20 Vincent Celier <celier@adacore.com>
3040 * errutil.adb (Initialize): Properly initialize entry in table
3041 Warnings when warnings are suppressed.
3043 2014-02-20 Robert Dewar <dewar@adacore.com>
3045 * s-os_lib.ads: Add warning about non-portability of Rename_File.
3046 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
3047 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
3048 * gnat_ugn.texi: Document no warnings on junk variable names.
3049 * layout.adb: Minor code reorganization (use Ekind_In).
3050 * stringt.adb: Move initialization of Null_String_Id to Initialize
3053 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3055 * sem_ch13.adb: Initialize optional Element_Id.
3057 2014-02-20 Robert Dewar <dewar@adacore.com>
3059 * s-os_lib.ads (Rename_File): Minor commment addition.
3061 2014-02-20 Thomas Quinot <quinot@adacore.com>
3063 * einfo.ads: Minor reformatting.
3065 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3067 * aspects.adb (Exchange_Aspects): New routine.
3068 * aspects.ads (Exchange_Aspects): New routine.
3069 * atree.adb (Rewrite): Do not check whether the save node has
3070 aspects as it never will, instead check the node about to be clobbered.
3071 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
3072 entities of generic packages.
3073 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
3074 pointer of an aspect specification list after rewriting takes place.
3075 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
3076 specifications of the generic template and the copy used for analysis.
3077 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
3078 the aspect specifications of the generic template and the
3079 copy used for analysis.
3080 (Analyze_Package_Instantiation): Propagate the aspect specifications
3081 from the generic template to the instantiation.
3082 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
3083 specifications from the generic template to the instantiation.
3084 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
3085 Abstract_State, Initializes and Initial_Condition when they
3086 apply to a package instantiation.
3088 2014-02-20 Robert Dewar <dewar@adacore.com>
3090 * stringt.adb: Add call to Initialize in package initialization.
3092 2014-02-20 Robert Dewar <dewar@adacore.com>
3094 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
3095 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
3096 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
3097 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
3100 2014-02-20 Bob Duff <duff@adacore.com>
3102 * s-os_lib.ads: Minor: Remove incorrect comment.
3104 2014-02-20 Robert Dewar <dewar@adacore.com>
3106 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
3108 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3110 * a-cborma.adb (Assign): When creating a node without a specified
3111 element, insert an uninitialized element in the map, because
3112 the instance may provide an element type with a default
3113 initialization, e.g a scalar with a Default_Value aspect.
3114 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
3115 (Insert): In the version without explicit element, provide an
3116 uninitialized element, as above.
3117 * a-cbdlli.adb (Append): In the version without explicit element,
3118 provide an uninitalized element, as above.
3119 (Allocate): Remove unused version.
3121 2014-02-20 Robert Dewar <dewar@adacore.com>
3123 * sem_elab.adb: Minor code reorganization (use Nkind_In).
3124 * stringt.adb: Remove temporary pragma Warnings (Off).
3125 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
3128 2014-02-20 Matthew Heaney <heaney@adacore.com>
3130 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
3133 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3135 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
3136 properly the cursor type for subsequent volatile testing in SPARK
3137 mode, when domain is a formal container with an Iterabe aspect.
3139 2014-02-20 Robert Dewar <dewar@adacore.com>
3141 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
3142 (Set_Specific_Warning_Off): Add Reason argument.
3143 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
3144 (Set_Specific_Warning_Off): Add Reason argument.
3145 * erroutc.adb (Warnings_Entry): Add Reason field
3146 (Specific_Warning_Entry): Add Reason field.
3147 (Warnings_Suppressed): return String_Id for Reason.
3148 (Warning_Specifically_Suppressed): return String_Id for Reason.
3149 * erroutc.ads (Warnings_Entry): Add Reason field.
3150 (Specific_Warning_Entry): Add Reason field.
3151 (Set_Specific_Warning_Off): Add Reason argument.
3152 (Set_Warnings_Mode_Off): Add Reason argument.
3153 (Warnings_Suppressed): return String_Id for Reason.
3154 (Warning_Specifically_Suppressed): return String_Id for Reason.
3155 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
3156 (Warning_Specifically_Suppressed): returns String_Id for Reason
3157 * gnat_rm.texi: Document that Warning parameter is string literal
3158 or a concatenation of string literals.
3159 * par-prag.adb: New handling for Reason argument.
3160 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
3161 for Reason argument.
3162 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
3163 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
3164 * stringt.adb: Set Null_String_Id.
3165 * stringt.ads (Null_String_Id): New constant.
3167 2014-02-20 Robert Dewar <dewar@adacore.com>
3169 * einfo.ads: Minor comment addition: Etype of package is
3171 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
3172 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
3173 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
3174 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
3175 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
3176 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3177 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
3178 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
3179 Replace all calls with calls to New_Occurrence_Of.
3181 2014-02-20 Robert Dewar <dewar@adacore.com>
3183 * par-util.adb (Ignore, case of right paren): Make this a
3186 2014-02-19 Robert Dewar <dewar@adacore.com>
3188 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
3189 * debug.adb: Remove -gnatd.X switch, no longer used.
3190 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
3193 2014-02-19 Bob Duff <duff@adacore.com>
3195 * g-socket.ads: Minor: Correct some comments.
3197 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3199 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
3201 2014-02-19 Arnaud Charlet <charlet@adacore.com>
3203 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
3204 an error on out of range priorities if Relaxed_RM_Semantics.
3205 * sem_prag.adb (Analyze_Pragma): Ditto.
3207 2014-02-19 Bob Duff <duff@adacore.com>
3209 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
3210 where F denotes the renaming of an enumeration literal, and
3211 issue a specialized error message.
3213 2014-02-19 Matthew Heaney <heaney@adacore.com>
3215 * a-chtgop.ads (Checked_Index): New operation.
3216 (Next): Changed mode of hash table.
3217 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
3218 (Generic_Read, Reserve_Capacity): Ditto.
3219 (Generic_Equal): Detect tampering.
3220 (Next): Changed mode of hash table, detect tampering.
3221 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
3223 (Find): Changed mode of hash table.
3224 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
3225 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
3227 (Find): Changed mode of hash table, check for tampering.
3228 (Generic_Replace_Element): Check for tampering.
3229 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
3230 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
3231 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
3233 (Find, Generic_Replace_Element): Check for tampering.
3234 * a-chtgbo.ads (Checked_Index): New operation.
3235 * a-chtgbo.adb (Checked_Index): New operation
3236 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
3237 (Generic_Read, Next): Ditto.
3238 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
3239 table (Difference, Intersection): Use variable view of
3240 source, detect tampering (Find, Is_Subset, Overlap): Use
3241 variable view of container (Symmetric_Difference, Union):
3242 Detect tampering (Vet): Use Checked_Index to detect tampering
3243 (Constant_Reference, Element, Find): Use variable view of
3245 (Update_Element_Preserving_Key): Detect tampering.
3246 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
3249 (Equivalent_Sets, Overlap): Use Node's Next component.
3250 (Vet): Use Checked_Index to detect tampering.
3251 (Constant_Reference, Element, Find): Use variable view of container.
3252 (Update_Element_Preserving_Key): Detect tampering.
3253 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
3254 Element, Find): Use variable view of container.
3255 (Reference): Rename hash table component.
3256 (Vet): Use Checked_Index to detect tampering.
3258 2014-02-19 Arnaud Charlet <charlet@adacore.com>
3260 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
3263 2014-02-19 Thomas Quinot <quinot@adacore.com>
3265 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
3266 against calls without Def_Id.
3268 2014-02-19 Claire Dross <dross@adacore.com>
3270 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3271 a-cofove.ads: Add global annotations to subprograms.
3273 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3275 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
3276 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
3277 Initial_Condition no longer requires the presence of pragma
3278 Initialized. Do not try to diagnose whether all variables mentioned in
3279 pragma Initializes also appear in Initial_Condition.
3280 (Collect_Variables): Removed.
3281 (Match_Variable): Removed.
3282 (Match_Variables): Removed.
3283 (Report_Unused_Variables): Removed.
3285 2014-02-19 Thomas Quinot <quinot@adacore.com>
3287 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
3289 2014-02-19 Robert Dewar <dewar@adacore.com>
3291 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
3294 2014-02-19 Vincent Celier <celier@adacore.com>
3296 * prj-part.adb (Parse_Single_Project): Use the fully resolved
3297 project path, with all symbolic links resolved, to check if the
3298 same project is imported with a different unresolved path.
3299 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
3300 changed to Resolved_Path to reflect that all symbolic links
3303 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3305 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
3306 from sem_ch13, for use elsewhere.
3307 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
3308 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
3309 cursor type on the loop variable when the iteration is over o
3312 2014-02-19 Vincent Celier <celier@adacore.com>
3314 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
3315 for an empty Target (Check_Target): Never fail when an empty
3316 target is declared in the configuration project.
3318 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3320 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
3321 the pragma comes fron a predicate aspect and the context is a
3322 record declaration within the scope that declares the type.
3324 2014-02-19 Robert Dewar <dewar@adacore.com>
3326 * gnat_rm.texi: Minor clarifications.
3327 * expander.adb, sem_aggr.adb: Add comments.
3329 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3331 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
3332 applies to a subprogram body, the name is the current scope,
3333 rather than being declared in the current scope.
3334 (Analyze_Pragma, case No_Return): Handle properly a No_Return
3335 aspect applied to a subprogram body.
3337 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3339 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
3340 of overloaded subprograms, and fix bug in handling of primitive
3343 2014-02-19 Pascal Obry <obry@adacore.com>
3345 * s-os_lib.adb: Minor reformatting.
3347 2014-02-19 Yannick Moy <moy@adacore.com>
3349 * expander.adb (Expand): Do nothing inside generics.
3350 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
3353 2014-02-19 Yannick Moy <moy@adacore.com>
3355 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
3357 2014-02-19 Robert Dewar <dewar@adacore.com>
3359 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
3360 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
3363 2014-02-19 Claire Dross <dross@adacore.com>
3365 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3366 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
3368 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3370 * sem_ch3.adb (Analyze_Declarations): Analyze
3371 a package contract at the end of the private declarations (if
3372 applicable), otherwise analyze it and the end of the visible
3375 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3377 * style.adb (Missing_Overriding): If subprogram is an
3378 instantiation, place warning on the instance node itself,
3379 without mention of the original generic. Do not emit message
3380 if explicit Ada version is older than the introduction of the
3381 overriding indicator.
3383 2014-02-19 Yannick Moy <moy@adacore.com>
3385 * gnat_rm.texi: Doc clarifications.
3387 2014-02-19 Yannick Moy <moy@adacore.com>
3389 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
3392 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3394 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
3395 specified First primitive, rather than by name.
3396 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
3397 and extend error checking for missing primitives and incorrect
3400 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3402 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
3403 errors when a Synchronization aspect on an overriding protected
3404 operation does not match the given aspect on the overridden
3405 operation of an ancestor interface.
3407 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3409 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
3410 (Check_Loop_Pragma_Placement): Update
3411 comment on usage. Remove local variables Orig_Stmt and
3412 Within_Same_Sequence. Check that the current Loop_Invariant or
3413 Loop_Variant pragma is grouped together with other such pragmas.
3414 (Is_Loop_Pragma): New routine.
3415 (Prev_In_Loop): Removed.
3417 2014-02-19 Robert Dewar <dewar@adacore.com>
3419 * par-ch6.adb (P_Return): For extended return, end column lines
3421 * par.adb: Minor documentation clarification.
3423 2014-02-19 Yannick Moy <moy@adacore.com>
3425 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
3426 that Loop_Invariant and Loop_Variant appear consecutively.
3427 * gnat_rm.texi Update documentation of Loop_Invariant and
3428 Loop_Variant pragmas.
3430 2014-02-19 Robert Dewar <dewar@adacore.com>
3432 * debug.adb: Document -gnatd.X.
3433 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
3435 (Check_Then_Column): Ditto.
3436 * styleg.adb (Check_Then): Allow THEN on line after IF.
3437 (Check_Then): Check THEN placement under control of -gnatd.X
3438 * styleg.ads (Check_Then): Now called even if THEN is not first
3440 * stylesw.ads (Style_Check_If_Then_Layout): Document new
3442 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
3444 2014-02-19 Robert Dewar <dewar@adacore.com>
3446 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
3447 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
3448 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
3449 vms_conv.adb: Fix bad layout of IF statements
3451 2014-02-19 Robert Dewar <dewar@adacore.com>
3453 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
3455 2014-02-19 Robert Dewar <dewar@adacore.com>
3457 * exp_util.adb: Update comments.
3459 2014-02-19 Doug Rupp <rupp@adacore.com>
3461 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
3462 * init.c (__gl_float_format): [VMS] New global.
3463 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
3464 representation in effect.
3466 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3468 * exp_ch6.adb Add with and use clause for Exp_Prag.
3469 (Expand_Contract_Cases): Relocated to Exp_Prag.
3470 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
3471 * exp_prag.adb Add with and use clauses for Checks and Validsw.
3472 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
3473 structure of the expanded code to showcase the evaluation of
3474 attribute 'Old prefixes. Add local variable Old_Evals. Expand
3475 any attribute 'Old references found within a consequence. Add
3476 circuitry to evaluate the prefixes of attribute 'Old that
3477 belong to a selected consequence.
3478 (Expand_Old_In_Consequence): New routine.
3479 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
3480 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
3481 potentially unevaluated prefix is always evaluated.
3483 2014-02-19 Robert Dewar <dewar@adacore.com>
3485 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
3486 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
3487 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
3488 handling for the case of Modify_Tree_For_C, this approach did
3490 * exp_util.adb (Matching_Standard_Type): New function
3491 (Side_Effect_Free): New top level functions (from
3492 Remove_Side_Effects).
3493 * exp_util.ads (Side_Effect_Free): New top level functions
3495 * sinfo.ads: Minor comment updates.
3497 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3499 * exp_ch6.adb (Expand_Simple_Function_Return): If return
3500 type is unconstrained and uses the secondary stack, mark the
3501 enclosing function accordingly, to ensure that the value is not
3502 prematurely removed.
3504 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3506 * par.adb Alphabetize the routines in Par.Sync.
3507 (Resync_Past_Malformed_Aspect): New routine.
3508 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
3509 variables. Code and comment reformatting. Detect missing
3510 parentheses on aspects [Refined_]Global and [Refined_]Depends
3511 with a non-null definition.
3512 * par-sync.adb: Alphabetize all routines in this separate unit.
3513 (Resync_Past_Malformed_Aspect): New routine.
3515 2014-02-19 Robert Dewar <dewar@adacore.com>
3517 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
3518 if Esize values do not match.
3520 2014-02-19 Yannick Moy <moy@adacore.com>
3522 * sinfo.ads: Minor comment update.
3524 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3526 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
3528 2014-02-19 Thomas Quinot <quinot@adacore.com>
3530 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
3531 that has the No_Ctrl_Actions flag is a suitable node to be
3532 wrapped if the assigned expression has no finalization actions.
3533 * sem_eval.adb (Eval_Entity_Name): For a compile time known
3534 boolean value, mark the corresponding condition SCO as constant.
3536 2014-02-19 Robert Dewar <dewar@adacore.com>
3538 * exp_util.adb: Minor reformatting.
3539 * exp_util.ads (Matching_Standard_Type): New function.
3540 * exp_ch7.adb: Minor reformatting.
3542 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3544 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
3545 to find declaration for Cursor, to handle properly the case of
3546 a discriminated iterable type.
3548 2014-02-19 Vincent Celier <celier@adacore.com>
3550 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
3551 imported library projects with the library ALI dirs, when setting
3553 * prj-env.ads (Ada_Objects_Path): Correct comments about
3554 argument Including_Libraries.
3556 2014-02-19 Gary Dismukes <dismukes@adacore.com>
3558 * gnat_rm.texi: Minor spelling fixes.
3560 2014-02-19 Doug Rupp <rupp@adacore.com>
3562 * init.c: Remove unneeded code.
3563 * fe.h (Float_Format): New macro
3564 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
3566 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3568 * sem_prag.adb (Check_Refined_Global_Item):
3569 A state or variable acts as a constituent only it is part of an
3570 encapsulating state and the state has visible refinement.
3572 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3574 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
3575 postcondition for a function when the expression does not mention
3576 'Result but the function has in-out parameters.
3578 2014-02-19 Robert Dewar <dewar@adacore.com>
3580 * gnat_rm.texi: Add documentation on Value_Size forcing biased
3583 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3585 * lib-xref.ads Remove the small table of letter and symbol usage as we
3588 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3590 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
3591 messages depending on the offending misplaced aspect specifications.
3592 (Diagnose_Misplaced_Aspect_Specifications): New routine.
3594 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3596 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
3597 for iterable aspect primitives.
3598 (Resolve_Iterable_Operation): Use expected signature of iterable
3599 aspect to resolve primitive when overloading is present.
3600 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
3601 (Check_Signature): Removed.
3603 2014-02-19 Yannick Moy <moy@adacore.com>
3605 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
3606 subunit in GNATprove_Mode.
3607 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
3609 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3611 * lib-xref.ads Alphabetize the contents of table
3612 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
3613 for E_Abstract_State. List all letters and symbols in use.
3614 * sem_prag.adb (Analyze_Abstract_State): Update all calls
3615 to Create_Abstract_State to reflect the new signature.
3616 (Create_Abstract_State): Change subprogram profile and update
3617 the comment on usage. Use the proper location of the state
3618 declaration when creating a new abstract state entity. Do not
3619 generate an external name, but simply reuse the name coming from
3620 the state declaration.
3622 2014-02-19 Robert Dewar <dewar@adacore.com>
3624 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
3625 declarations get properly inserted in Modify_Tree_For_C mode.
3626 * sinfo.ads: Minor comment addition.
3628 2014-02-19 Robert Dewar <dewar@adacore.com>
3630 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
3631 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
3633 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3635 * style.adb (Missing_Overriding): Warning does not apply in
3636 language versions prior to Ada 2005.
3637 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
3638 * sem_attr.adb: Add Attribute_Iterable where needed.
3639 * exp_attr.adb: ditto.
3640 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
3641 handle loops and quantified expressions over types that have an
3642 iterable aspect. Called from Expand_Iterator_Loop.
3643 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
3644 with Iterable aspect.
3645 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
3646 subprograms specified in the Iterable aspect have the proper
3647 signature involving container and cursor.
3648 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
3649 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
3650 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
3651 New procedure to retrieve one of the primitives First, Last,
3652 or Has_Element, from the value of the iterable aspect of a
3654 (Is_Container_Element): Predicate to recognize expressions
3655 that denote an element of one of the predefined containers,
3656 for possible optimization. This subprogram is not currently
3657 used, pending ARG discussions on the legality of the proposed
3658 optimization. Worth preserving for eventual use.
3659 (Is_Iterator): Recognize formal container types.
3660 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
3662 2014-02-19 Robert Dewar <dewar@adacore.com>
3664 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
3665 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
3666 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
3667 declarations from list of actions.
3668 * output.ads, output.adb (Delete_Last_Char): New procedure.
3669 * sinfo.ads: Document handling of Mod and expression with actions
3670 in Modify_Tree_For_C mode.
3672 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3674 * par-ch9.adb (P_Task): Add a null statement to produce a
3675 well-formed task body when due to a previous syntax error the
3676 statement list is empty.
3678 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3680 * sem_prag.adb (Check_Dependency_Clause): Account
3681 for the case where a state with a non-null refinement matches a
3682 null output list. Comment reformatting.
3683 (Inputs_Match): Copy a solitary input to avoid an assertion failure
3684 when trying to match the same input in multiple clauses.
3686 2014-02-19 Gary Dismukes <dismukes@adacore.com>
3688 * sem_attr.adb: Minor typo fix.
3690 2014-02-18 Robert Dewar <dewar@adacore.com>
3692 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
3693 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
3694 (Create_Standard): Create new unsigned types.
3695 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
3696 mode (Expand_N_Reference): Removed, problematic and not needed
3698 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
3700 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
3701 * expander.adb: Remove call to Expand_N_Reference (problematic,
3702 and not needed now).
3703 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
3704 * stand.adb: Read and write unsigned type entities.
3705 * stand.ads: Add new unsigned types.
3707 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
3709 * sem_ch4.adb (Analyze_Call): Do not mark a function call
3710 as being inside an assertion expression as the flag is now removed.
3711 (Check_Ghost_Subprogram_Call): Do not query the
3712 In_Assertion_Expression flag as it is now removed, instead use
3713 a predicate function.
3714 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
3715 In_Assertion_Expression flag as it is now removed, instead use
3716 a predicate function.
3717 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
3718 * sem_util.adb Add with and use clause for Sem_Prag.
3719 (In_Assertion_Expression_Pragma): New routine.
3720 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
3721 * sinfo.adb (In_Assertion_Expression): Removed.
3722 (Set_In_Assertion_Expression): Removed.
3723 * sinfo.ads Remove flag In_Assertion_Expression along with its
3725 (In_Assertion_Expression): Removed along with
3726 pragma Inline. (Set_In_Assertion_Expression): Removed along
3729 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
3731 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
3732 used together with '-r', '-rf' or '-rnb' options.
3734 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
3736 * sem_attr.adb (Analyze_Attribute): Comment
3737 and code reformatting. Use separate routines to check the
3738 legality of attribute 'Old in certain pragmas. Verify
3739 the use of 'Old, 'Result and locally declared entities
3740 within the prefix of 'Old.
3741 (Check_References_In_Prefix): New routine.
3742 (Check_Use_In_Contract_Cases): New routine.
3743 (Check_Use_In_Test_Case): New routine.
3745 2014-02-18 Vincent Celier <celier@adacore.com>
3747 * sem_aux.adb (Is_By_Reference_Type): For each components of
3748 a record type, check also if the component is volatile as it
3749 may have an aspect that makes it volatile. If it is, then the
3750 record type is a by reference type.
3752 2014-02-18 Robert Dewar <dewar@adacore.com>
3754 * exp_attr.adb: Minor reformatting.
3755 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
3756 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
3757 as another case where we don't generate N_Reference nodes for
3759 * expander.adb (Expand): Add call to Expand_N_Reference.
3761 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3763 * sem_prag.adb (Analyze_Refined_Pragma): Remove
3764 local variable Pack_Spec. Refinement pragmas may now apply to
3765 bodies of both visible and private subprograms.
3767 2014-02-06 Robert Dewar <dewar@adacore.com>
3769 * exp_attr.adb (Expand_Loop_Entry_Attribute):
3770 Minor change (Attr => N) (Expand_Pred_Succ): New name
3771 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
3772 Max): Expand into if expression if Modify_Tree_For_C mode.
3773 (Expand_N_Attribute_Reference, case Min): ditto
3774 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
3777 2014-02-06 Ed Schonberg <schonberg@adacore.com>
3779 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
3780 predicate check if this is an internal declaration with
3781 No_Initialization set, as for an expanded aggregate component.
3783 2014-02-06 Doug Rupp <rupp@adacore.com>
3785 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
3786 conditions with severity of "SUCCESS" or "INFORMATIONAL".
3788 2014-02-06 Yannick Moy <moy@adacore.com>
3790 * sem_prag.adb (Analyze_Pragma): Analyze pragma
3791 Debug rewritten node before rewriting it as a null statement in
3794 2014-02-06 Robert Dewar <dewar@adacore.com>
3796 * sem_attr.adb (Min_Max): New procedure.
3797 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
3800 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
3802 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
3805 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3807 * sem_prag.adb (Analyze_Abstract_State): Update
3808 all calls to Create_Abstract_State to pass the proper state
3810 (Create_Abstract_State): Add new formal parameter
3811 State_Decl along with comment on usage. Establish a link between
3812 the abstract state entity and the state declaration.
3814 2014-02-06 Robert Dewar <dewar@adacore.com>
3816 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
3817 comparison of unordered enumeration type.
3818 (Analyze_Attribute, case Max): Check for improper comparison of
3819 unordered enumeration type.
3820 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
3822 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
3823 Moved here from Sem_Res.
3825 2014-02-06 Robert Dewar <dewar@adacore.com>
3827 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
3830 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3832 * sem_ch6.adb (Process_Formals): Error message reformatting.
3834 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3836 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
3837 variable Spec. Do not inherit the null indicator from the
3838 subprogram body when generating the spec.
3840 2014-02-06 Robert Dewar <dewar@adacore.com>
3842 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
3845 2014-02-06 Ed Schonberg <schonberg@adacore.com>
3847 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
3848 when the function has a foreign convention, but not if only the
3849 limited return type has such a convention.
3851 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3853 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
3854 variable Spec. Comment reformatting. Use Copy_Separate_Tree
3855 rather than New_Copy_Tree when building the corresponding
3856 subprogram declaration.
3858 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3860 * sem_prag.adb (Analyze_Global_Item): Remove
3861 the mode-related checks on abstract states with enabled external
3863 (Property_Error): Removed.
3865 2014-02-06 Javier Miranda <miranda@adacore.com>
3867 * lib-xref.adb (Generate_Reference): When
3868 generating the reference to the first private entity take care
3869 of handling swapped entities.
3871 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
3873 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
3876 2014-02-06 Robert Dewar <dewar@adacore.com>
3878 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
3879 than the word size when operating in Modify_Tree_For_C mode.
3880 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
3882 2014-02-06 Robert Dewar <dewar@adacore.com>
3884 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
3885 compare is case insensitive.
3886 * gnat_rm.texi: Document that string compare for Warnings Off
3887 is now case insensitive.
3889 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
3891 * gnat_rm.texi: Small wording tweak.
3893 2014-02-06 Pascal Obry <obry@adacore.com>
3895 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
3896 and Included_Artifact_Patterns attribute definitions.
3898 2014-02-06 Yannick Moy <moy@adacore.com>
3900 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3901 SPARK_Mode pragma component for all subprograms, including stubs.
3903 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3905 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
3906 the configuration options of the enclosing context in a
3908 (Analyze_Subprogram_Body_Stub): Maintain the
3909 configuration options of the enclosing context in a stack-like
3912 2014-02-06 Robert Dewar <dewar@adacore.com>
3914 * debug.adb: -gnatd.u sets Modify_Tree_For C
3915 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
3916 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
3917 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
3918 * exp_intr.adb (Expand_Shift): Call expander so we do
3919 Modify_Tree_For_C expansions.
3920 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
3923 2014-02-06 Fedor Rybin <frybin@adacore.com>
3925 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
3926 after the phase 1 of the processing of each aggregated project
3927 to get access to project trees of aggregated projects.
3928 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
3929 If specified, On_New_Tree_Loaded is called after each aggregated
3930 project has been processed succesfully.
3931 (Process): new parameter On_New_Tree_Loaded.
3932 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
3933 callback added after processing of each aggregated project.
3934 (Recursive_Process): new parameter On_New_Tree_Loaded.
3935 (Process): new parameter On_New_Tree_Loaded.
3936 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
3937 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
3939 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
3942 2014-02-06 Bob Duff <duff@adacore.com>
3944 * gnat_ugn.texi: Implement --insert-blank-lines and
3945 --preserve-blank-lines switches.
3947 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
3949 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
3952 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
3954 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
3955 of the pragma on individual objects.
3957 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3959 * einfo.adb Node29 is now used as BIP_Initialization_Call.
3960 (BIP_Initialization_Call): New routine.
3961 (Set_BIP_Initialization_Call): New routine.
3962 (Write_Field29_Name): Add an entry for constants and variables.
3963 * einfo.ads Add new attribute BIP_Initialization_Call and update
3965 (BIP_Initialization_Call): New routine along with pragma Inline.
3966 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
3967 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3968 Add local declaration Res_Decl. Capture the build-in-place
3969 initialization call when the related object declaration has
3970 created a transient block.
3971 * exp_ch7.adb (Process_Transient_Objects): Add local variable
3972 Fin_Insrt. Recognize a scenario where an object declaration acts
3973 as a transient context and is initialized by a build-in-place
3976 2014-02-06 Pascal Obry <obry@adacore.com>
3978 * prj-util.adb (For_Interface_Sources): Fix handling of required
3979 bodies for aggregate libs.
3981 2014-02-06 Robert Dewar <dewar@adacore.com>
3983 * nlists.ads: Minor comment clarifications.
3985 2014-02-06 Robert Dewar <dewar@adacore.com>
3987 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
3989 * opt.ads (Modify_Tree_For_C): New flag.
3990 * output.ads, output.adb (Last_Char): New function.
3992 2014-02-06 Pascal Obry <obry@adacore.com>
3994 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
3995 share/gpr for cross-builds.
3997 2014-02-06 Robert Dewar <dewar@adacore.com>
3999 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
4000 Minor reformatting and code clean ups.
4002 2014-02-06 Pascal Obry <obry@adacore.com>
4004 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
4005 * prj.ads: Minor typo fix in comment.
4007 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4009 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
4010 local variable Expr. Flag clauses with extra parenthesis as this
4011 is not allowed by the syntax of the pragma. Code reformatting.
4013 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4015 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
4016 variables. Rename variabme Tnn to Temp. Do not create a temporary
4017 if assertions are disabled. Find enclosing routine _Postconditions
4018 and insert the temporary that captures the value of the prefix
4020 * exp_ch6.adb (Build_Postconditions_Procedure):
4021 Insert the generated _Postconditions routine
4022 before the first source declaration of the related
4024 (Insert_After_Last_Declaration): Removed.
4025 (Insert_Before_First_Source_Declaration): New routine.
4027 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4029 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
4030 Utility to determine whether current expansion is for the body
4031 of a predefined primitive operation.
4032 (Make_Predicate_Check): Use Within_Internal_Subpgram
4033 * checks.adb (Apply_Predicate_Check): Use
4034 Within_Internal_Subprogram
4035 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
4037 2014-02-06 Pascal Obry <obry@adacore.com>
4039 * prj.ads, prj-util.adb: Minor reformatting.
4041 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4043 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
4044 Take into account the Split_PPC flag to ensure that conjuncts
4045 in a composite postcondition aspect are tested in source order.
4047 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4049 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
4051 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
4052 illegal use of SPARK_Mode.
4053 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
4054 * sem_prag.adb (Analyze_Pragma): Code reformatting.
4055 * sem_util.adb Add with and use clause for Aspects.
4056 (Check_SPARK_Mode_In_Generic): New routine.
4057 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
4059 2014-02-06 Thomas Quinot <quinot@adacore.com>
4061 * a-calend.adb (Formatting_Operations.Split): Ensure that
4062 Time_Error is raised for invalid time values.
4064 2014-02-06 Arnaud Charlet <charlet@adacore.com>
4066 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
4069 2014-02-06 Robert Dewar <dewar@adacore.com>
4071 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
4072 * exp_ch3.adb (Build_Dcheck_Function): Set
4073 Is_Discriminant_Check_Function.
4075 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4077 * exp_ch7.adb (Is_Subprogram_Call): Inspect
4078 the original tree in certain cases where a construct has been
4079 factored out and replaced by a reference to a temporary.
4081 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4083 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
4084 parameters when propagating predicate function to full view.
4085 (Find_Type_Of_Object): Freeze base type of object type to catch
4086 premature use of discriminated private type without a full view.
4088 2014-02-06 Robert Dewar <dewar@adacore.com>
4090 * sprint.adb: Minor reformatting.
4092 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4094 * exp_ch4.adb (Process_Transient_Object): Add local variable
4095 Temp_Ins. When the transient object is initialized by an
4096 aggregate, the hook must capture the object after the last
4097 component assignment takes place.
4098 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
4099 routine Is_Subprogram_Call.
4100 (Is_Subprogram_Call): Inspect an
4101 aggregate that has been heavily expanded for subprogram calls.
4102 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
4103 and Temp_Ins. Remove the nested declare block and adjust the
4104 indentation. When the transient object is initialized by an
4105 aggregate, the hook must capture the object after the last
4106 component assignment takes place.
4108 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4110 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
4111 external states with enabled properties that do not match the
4113 (Property_Error): New routine.
4114 * sem_res.adb (Property_Error): New routine.
4115 (Resolve_Actuals): Detect illegal uses of external variables with
4116 enabled properties in procedure calls that do not match the mode of
4117 the corresponding formal parameter.
4119 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4121 * sem_util.adb (Has_Enabled_Property): Rename
4122 formal parameter Prop_Nam to Property. Update the comment on usage
4123 and all occurrences in the body. Add local variable Prop_Nam. When
4124 inspecting a property with an expression, the property name
4125 appears as the first choice of the component association.
4127 2014-02-04 Robert Dewar <dewar@adacore.com>
4129 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
4131 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4133 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
4134 for consistency with other messages.
4136 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4138 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
4139 iterator, indicate that the element is a constant if the container
4140 type does not have a variable indexing aspect.
4141 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
4142 marked as constant, do not reset its Ekind, to ensure that
4143 container elements in an element loop are not modified if the
4144 container (e.g. a hashed set) only has a constant indexing aspect.
4146 2014-02-04 Arnaud Charlet <charlet@adacore.com>
4148 * g-souinf.ads: Subprograms in this unit are actually not pure.
4149 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
4150 * einfo.ads (Is_Pure): Update doc to match implementation.
4152 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4154 * exp_ch13.adb: Minor spelling fix.
4156 2014-02-04 Robert Dewar <dewar@adacore.com>
4158 * opt.ads: Minor comment update.
4160 2014-02-04 Robert Dewar <dewar@adacore.com>
4162 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
4165 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4167 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
4168 on null expressions if component type is non-null, when the
4169 corresponding association covers an empty range of index values.
4171 2014-02-04 Robert Dewar <dewar@adacore.com>
4173 * sinfo.ads: Further comments on N_Expression_With_Actions node.
4175 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
4177 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
4178 variables Out_Items and Ref_Global. Remove local constant
4179 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
4180 and D8. Remove the useless collection of global items as this
4181 was a leftover from an earlier version of the routine. Move
4182 several routines out to avoid deep nesting and indentation.
4183 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
4184 parameter Do_Checks to Post_Errors. Update the comment on usage.
4185 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
4186 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
4187 to Post_Errors. Update the comment on usage. Account for the
4188 case where a self referential state may have a null input_list.
4189 (Is_Self_Referential): New routine.
4191 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4193 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
4194 entity renames an expression, as in the case of an object of
4195 an unconstrained type initialized by a function call, defer the
4196 rewriting of the expression to the expander.
4197 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
4198 'Alignment): If the entity renames an expression, introduce
4199 temporary to capture value, and rewrite original declaration to
4202 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4204 * g-comlin.adb: Minor typo fix.
4206 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4208 * freeze.adb (Freeze_All): Types derived from a formal
4209 access_to_classwide type do not have a finalization master.
4211 2014-02-04 Robert Dewar <dewar@adacore.com>
4213 * sprint.adb: Minor reformatting.
4215 2014-02-04 Robert Dewar <dewar@adacore.com>
4217 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
4218 cases where Actions is a null list.
4219 * sinfo.ads (N_Expression_With_Actions): Actions can be
4220 temporarily empty during semantic analysis, but must be non-empty
4221 in the final expanded tree.
4223 2014-01-31 Robert Dewar <dewar@adacore.com>
4225 * exp_ch9.adb: Minor reformatting.
4227 2014-01-31 Emmanuel Briot <briot@adacore.com>
4229 * g-comlin.adb (Set_Command_Line): Take the switches
4230 configuration from the Command_Line_Config.
4232 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4234 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
4237 2014-01-31 Vincent Celier <celier@adacore.com>
4239 * projects.texi: Add more documentation about others used as an
4240 index in indexed attributes.
4242 2014-01-31 Robert Dewar <dewar@adacore.com>
4244 * gnat_ugn.texi: Minor update.
4245 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
4246 * exp_util.adb: Minor reformatting.
4248 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4250 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
4251 depends on data that is not private to the protected object,
4252 and potentially modifiable in unsynchronized fashion.
4254 2014-01-31 Yannick Moy <moy@adacore.com>
4256 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
4259 2014-01-31 Robert Dewar <dewar@adacore.com>
4261 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
4262 for Unknown_Package.
4263 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
4265 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4267 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
4268 the logic that generates a runtime check to determine the
4269 controlled status of the object about to be allocated or
4270 deallocated. Class-wide types now always use a runtime check
4271 even if they appear as generic actuals.
4272 (Find_Object): Detect
4273 a special case that involves interface class-wide types because
4274 the object appears as a complex expression.
4276 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4278 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
4279 subprogram with an incomplete untagged formals on the list of
4280 private dependents, to verify that the type is properly completed
4281 in the private part.
4282 * sem_attr.adb: Code clean up.
4284 2014-01-31 Robert Dewar <dewar@adacore.com>
4286 * exp_ch6.adb: Minor reformatting.
4288 2014-01-31 Vincent Celier <celier@adacore.com>
4290 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
4291 when Pkg is unknown.
4293 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4295 * sem_res.adb (Resolve_Entity_Name): Comment
4296 reformatting. Allow volatile objects in various generated checks.
4298 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4300 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
4301 component association, set the etype of the identifier, for
4304 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4306 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
4307 declared in a package, not checks can apply to the subprogram.
4309 2014-01-31 Robert Dewar <dewar@adacore.com>
4311 * erroutc.adb (Validate_Specific_Warnings): Warnings are
4312 controlled -gnatw.W.
4313 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
4314 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
4316 2014-01-31 Arnaud Charlet <charlet@adacore.com>
4318 * exp_disp.adb: Update comments.
4320 2014-01-31 Yannick Moy <moy@adacore.com>
4322 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
4323 Save_Global_References): Guard access to expression in aspect.
4325 2014-01-31 Yannick Moy <moy@adacore.com>
4327 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
4328 Issue an error when the pragma is applied to a generic unit,
4329 a generic declaration, or inside a generic.
4331 2014-01-31 Yannick Moy <moy@adacore.com>
4333 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
4336 2014-01-31 Robert Dewar <dewar@adacore.com>
4338 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
4341 2014-01-31 Tristan Gingold <gingold@adacore.com>
4343 * exp_disp.adb: Add a historic note.
4345 2014-01-31 Robert Dewar <dewar@adacore.com>
4347 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
4348 Process_Deferred_References.
4350 2014-01-31 Yannick Moy <moy@adacore.com>
4352 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
4353 ineffective pragma Warnings(Off) in GNATprove_Mode.
4355 2014-01-31 Bob Duff <duff@adacore.com>
4357 * s-taskin.ads: Minor comment fix.
4358 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
4359 just direct dependents. If this is actually an abort, each task
4360 will take care of aborting its dependents, so all dependents will
4361 get aborted, as before. However, when this is called the second
4362 time from Vulnerable_Complete_Master "for convenience" (i.e. to
4363 kill off tasks waiting at terminate alternatives), aborting
4364 indirect dependents is wrong, because it causes some unrelated
4365 tasks to get aborted.
4367 2014-01-31 Robert Dewar <dewar@adacore.com>
4369 * sem_ch4.adb: Minor reformatting.
4371 2014-01-31 Robert Dewar <dewar@adacore.com>
4373 * exp_ch2.adb: New calling sequence for Is_LHS.
4374 * frontend.adb: Add call to Process_Deferred_References.
4375 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
4376 (Deferred_References): New table.
4377 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
4379 (Find_Expanded_Name): Ditto.
4380 * sem_res.adb: New calling sequence for Is_LHS.
4381 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
4382 * sem_warn.adb: Call Process_Deferred_References before issuing
4385 2014-01-31 Tristan Gingold <gingold@adacore.com>
4387 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
4388 use of System_Tasking_Protected_Objects_Single_Entry.
4389 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
4390 of Protected_Single_Entry_Call.
4391 (Expand_N_Timed_Entry_Call): Remove single_entry case.
4392 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
4394 (Make_Disp_Timed_Select_Body): Likewise.
4395 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
4396 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
4398 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
4399 (Wait_For_Completion_With_Timeout): Remove.
4400 (Protected_Single_Entry_Call): Remove Mode parameter
4401 (always Simple_Call).
4402 (Service_Entry): Remove Self_Id constant (not used anymore).
4403 (Timed_Protected_Single_Entry_Call): Remove.
4404 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
4405 (Protected_Single_Entry_Call): Remove Mode parameter.
4407 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4409 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
4410 * einfo.ads (Get_Pragma): Update the comment on special pragmas
4411 handled by this routine.
4412 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
4413 to the contract of the related subprogram body.
4414 * sem_util.adb (Add_Contract_Item): Handle the insertion of
4415 pragma Refined_Post into the contract of a subprogram body.
4416 * sinfo.ads Update the documentation of node N_Contract.
4417 * sem_res.adb (Resolve_Entity_Name): Add a guard
4418 to detect abstract states and variables only when checking the
4419 SPARK 2014 rules concerning volatile object placement.
4421 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4423 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
4424 null is compatible with any access type.
4426 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4428 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
4429 placement is not in a package.
4431 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4433 * sem_util.adb (Has_Enabled_Property): Compare the character field of
4436 2014-01-29 Robert Dewar <dewar@adacore.com>
4438 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
4439 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
4440 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
4442 2014-01-29 Robert Dewar <dewar@adacore.com>
4444 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
4445 * sem_warn.adb (Check_References): Suppress warnings if inside
4446 Initial_Condition pragma.
4448 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4450 * sem_prag.adb (Check_Missing_Part_Of): List all values of
4451 State_Space_Kind for readability reasons. Do not emit an error on
4452 a private item when the enclosing package lacks aspect/pragma
4453 Abstract_State. Do not emit an error on a private package
4454 instantiation when the corresponding generic template lacks
4456 (Has_Visible_State): New routine.
4457 * sem_util.adb (Find_Placement_In_State_Space): The visible
4458 declarations of any kind of child units in general act as proper
4461 2014-01-29 Robert Dewar <dewar@adacore.com>
4463 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
4464 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
4465 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
4466 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
4467 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
4468 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
4469 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
4470 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
4471 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
4472 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
4473 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
4474 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
4475 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
4476 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
4477 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
4478 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
4479 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
4480 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
4481 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
4482 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
4483 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
4484 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
4485 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
4486 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
4487 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
4488 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
4489 s-regpat.adb, s-secsta.adb, s-stalib.ads,
4490 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
4491 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
4492 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
4493 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
4494 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
4496 2014-01-29 Robert Dewar <dewar@adacore.com>
4498 * expander.adb: Minor reformatting.
4500 2014-01-29 Javier Miranda <miranda@adacore.com>
4502 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
4505 2014-01-29 Javier Miranda <miranda@adacore.com>
4507 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
4508 that checks if an interface types defines the predefined "="
4509 function because the compiler was erroneously not generating the
4510 predefined "=" primitive as soon as the name of some interface
4511 primitive is "=" (formals were not checked).
4513 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4515 * expander.adb (Expander): In GNATprove mode, do not process
4516 transient scopes: they are in general not created in this mode,
4517 and an attempt to examine them will lead to constraint errors when
4518 processing configuration pragmas that have analyzable expressions.
4520 2014-01-29 Vincent Celier <celier@adacore.com>
4522 * clean.adb (Gnatclean): Fail if main project is an aggregate
4523 project or if there is an aggregate library project in the
4525 * gnatcmd.adb: Fail if the main project is an aggregate project
4526 or if there is an aggegate library project in the project tree.
4527 * make.adb (Initialize): : Fail if main project is an aggregate
4528 project or if there is an aggregate library project in the
4530 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
4531 * prj-makr.adb (Initialize): Fail if the main project is an
4532 aggregate project or an aggregate library project.
4534 2014-01-29 Vincent Celier <celier@adacore.com>
4536 * prj-part.adb (Check_Import_Aggregate): New procedure
4537 to check if an imported project is an aggregate project.
4538 (Parse_Single_Project): Call Check_Import_Aggregate
4539 * projects.texi: Document that aggregate projects cannot be
4540 extended or imported.
4542 2014-01-29 Robert Dewar <dewar@adacore.com>
4544 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
4545 reformatting and code clean up.
4546 * gnat_ugn.texi: Add documentation section on Atomic Variables
4549 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4551 * einfo.adb Flag264 is now unused.
4552 (Has_Body_References): Removed.
4553 (Set_Has_Body_References): Removed.
4554 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
4555 * einfo.ads Update the comment on usage of attribute
4556 Body_References. Remove attribute Has_Body_References and its
4558 (Has_Body_References): Removed along with pragma Inline.
4559 (Set_Has_Body_References): Removed along with pragma Inline.
4560 * sem_prag.adb (Analyze_Global_Item): Move the call to
4561 Record_Possible_Body_Reference in the state related checks
4562 section. Add a comment intended function.
4563 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
4564 in the state related checks section. Add a comment intended function.
4565 (Analyze_Refinement_Clause): Cleanup the illegal body reference
4566 reporting. Add a comment on timing of error reporting.
4567 (Record_Possible_Body_Reference): Reimplement the routine.
4569 2014-01-29 Vincent Celier <celier@adacore.com>
4571 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
4572 unit-based languages.
4573 (Mains.Complete_Mains.Do_Complete): Use the source file project
4574 tree when calling Find_File_Add_Extension. Use the correct
4575 project name when reporting an error.
4577 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
4579 * aspects.adb Add an entry for aspect Part_Of in table
4581 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
4582 Aspect_Argument, Aspect_Names and Aspect_Delay.
4583 * atree.h Define Elist9.
4584 * atree.adb (Elist9): New routine.
4585 (Set_Elist9): New routine.
4586 * atree.ads (Elist9): New routine.
4587 (Set_Elist9): New routine.
4588 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
4589 the list of node usage. Remove Refined_State from the list of
4591 (Encapsulating_State): New routine.
4593 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
4594 (Refined_State): Removed.
4595 (Set_Encapsulating_State): New routine.
4596 (Set_Part_Of_Constituents): New routine.
4597 (Set_Refined_State): Removed.
4598 (Write_Field9_Name): Add an entry
4599 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
4600 Encapsulating_State. Remove the entry for Refined_State.
4601 * einfo.ads Add new attributes Encapsulating_State
4602 and Part_Of_Constituents alond with their usage in
4603 entities. Remove attribute Refined_State along with its
4605 (Encapsulating_State): New routine and
4606 pragma Inline. (Get_Pragma): Update the comment on usage.
4607 (Part_Of_Constituents): New routine and pragma Inline.
4608 (Refined_State): Removed along with pragma Inline.
4609 (Set_Encapsulating_State): New routine and pragma Inline.
4610 (Set_Part_Of_Constituents): New routine and pragma Inline.
4611 (Set_Refined_State): Removed along with pragma Inline.
4612 * par-prag.adb Pragma Part_Of does not need any special processing
4614 * sem_ch3.adb (Analyze_Declarations): Remove local variables
4615 Body_Id and Prag. Call separate routines to analyze the
4616 contract of a package [body].
4617 (Analyze_Object_Contract):
4618 Update the comment on usage. Remove local variables
4619 Items and Nam. Use Get_Pragma rather than traversing the
4620 classification list. Verify whether the lack of indicator
4621 Part_Of agrees with the placement of the variable in state space.
4622 (Analyze_Object_Declaration): Initialize the encapsulating state
4623 of a variable. (Requires_State_Refinement): Moved to sem_util.
4624 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
4625 (Analyze_Package_Contract): New routine.
4626 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
4627 (Analyze_Package_Contract): New routine.
4628 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
4629 state and Part_Of constituents.
4630 * sem_ch13.adb (Analyze_Aspect_Specifications):
4631 Add processing for aspect Part_Of. Update all
4632 calls to Decorate_Delayed_Aspect_And_Pragma.
4633 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
4634 not need any special processing at freeze time.
4635 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
4636 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
4637 update the associated comment.
4638 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
4639 (Analyze_Abstract_State): Add new global variable State_Id. Remove
4640 local constants Errors and Loc. Remove local variables Is_Null
4641 and State_Nam. Create the entity of the abstract state on the
4642 spot, before all remaining checks are performed. Verify that a
4643 missing Part_Of option agrees with the placement of the abstract
4644 state within the state space.
4645 (Analyze_Depends_In_Decl_Part):
4646 Add new global variables Constits_Seen and States_Seen. Check
4647 that a state and a corresponding constituent do not appear
4648 in pragma [Refined_]Depends.
4649 (Analyze_Global_In_Decl_Part):
4650 Add new global variables Constits_Seen and States_Seen. Check
4651 that a state and a corresponding constituent do not appear
4652 in pragma [Refined_]Global.
4653 (Analyze_Global_Item):
4654 Remove the now obsolete code that deals with Part_Of.
4655 Add the entity of the global item to the list of processed
4656 items. (Analyze_Initializes_In_Decl_Part): Add new global
4657 variables Constits_Seen and States_Seen. Check that a state
4658 and a corresponding constituent do not appear in pragma
4660 (Analyze_Initialization_Item): Add the entity
4661 of the initialization item to the list of processed items.
4662 (Analyze_Input_Item): Add the entity of the initialization
4663 item to the list of processed items.
4664 (Analyze_Input_Output):
4665 Remove the now obsolete code that deals with Part_Of. Add the
4666 entity of the input/output to the list of processed items.
4667 (Analyze_Part_Of): New routine.
4668 (Analyze_Part_Of_Option): Remove
4669 local constant Par_State. Add local constant Encaps and local
4670 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
4671 the option. Turn the related state into a Part_Of constituent
4672 if the option is legal.
4673 (Analyze_Pragma): Add processing
4675 (Analyze_Refined_State_In_Decl_Part):
4676 Remove global constants Pack_Body and Spec_Id. Remove
4677 global variables Abstr_States and Hidden_States. Add new
4678 global variables Available_States, Body_Id, Body_States and
4679 Spec_Id. Add new local constant Body_Decl. Reimplement the
4680 logic that extracts the states available for refinement from
4681 the related package and the body hidden states of the said
4683 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
4684 (Check_Applicable_Policy): Alphabetize body.
4685 (Check_Dependency_Clause): Replace Refined_State
4686 with Encapsulating_State.
4687 (Check_Matching_Constituent):
4688 Reimplement the logic that determines whether an item is a valid
4689 / invalid constituent of the current refined state. Return when
4690 a construct does not denote a valid abstract state. Extract the
4691 list of Part_Of constituents for further analysis. Check that all
4692 Part_Of constituents of a state have been used in its refinement.
4693 (Check_Matching_State): Update the comment on usage. Operate
4694 on the list of available states.
4695 (Check_Missing_Part_Of): New routine.
4696 (Check_Refined_Global_Item): Replace Refined_State
4697 with Encapsulating_State.
4698 (Check_State_And_Constituent_Use): New routine.
4699 (Create_Abstract_State): New routine.
4700 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
4701 (Is_Part_Of): Removed.
4702 (Collect_Body_States): New routine.
4703 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
4704 (Collect_Hidden_States): Removed.
4705 (Report_Unrefined_States): Change the profile of the procedure along
4706 with the comment on usage.
4707 (Report_Unused_Constituents): New routine.
4708 (Report_Unused_Hidden_States): Removed.
4709 (Report_Unused_States): New routine.
4710 * sem_prag.ads (Check_Missing_Part_Of): New routine.
4711 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
4712 appear in the classification pragmas of a package instantiation
4714 (Find_Placement_In_State_Space): New routine.
4715 (Is_Child): Removed.
4716 (Is_Child_Or_Sibling): Remove formal
4717 parameter Private_Child. Remove the private child checks.
4718 (Requires_State_Refinement): Moved from sem_ch3.
4719 * sem_util.ads Add new type State_Space_Kind along with
4720 comment on its usage and values.
4721 (Add_Contract_Item): Update the comment on usage.
4722 (Find_Body_Discriminal): Alphabetize spec.
4723 (Find_Placement_In_State_Space): New routine.
4724 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
4725 and update the comment on usage.
4726 (Requires_State_Refinement): Moved from sem_ch3.
4727 * sinfo.ads: Update the documentation of N_Contract.
4728 * snames.ads-tmpl The predefined name for Part_Of is now used
4729 to denote a pragma. Add Pragma_Id for Part_Of.
4731 2014-01-29 Emmanuel Briot <briot@adacore.com>
4733 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
4735 (Dump): New subprogram.
4737 2014-01-29 Tristan Gingold <gingold@adacore.com>
4739 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
4740 Expand_Entry_Declaration to factorize code.
4742 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4744 * checks.adb: minor clarification.
4745 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
4746 search for primitive operations to the entities that immediately
4747 follow the type declaration.
4749 2014-01-29 Tristan Gingold <gingold@adacore.com>
4751 * exp_ch9.adb (Build_Protected_Entry): Do not call
4752 Complete_Entry_Body anymore.
4753 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
4754 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
4756 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
4758 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
4759 string when the Name input bigger than allowed. Adapt the function
4762 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4764 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
4765 if expression is within a case_expression of if_expression.
4767 2014-01-29 Robert Dewar <dewar@adacore.com>
4769 * exp_ch9.adb, inline.ads: Minor reformatting.
4771 2014-01-29 Tristan Gingold <gingold@adacore.com>
4773 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
4775 2014-01-29 Yannick Moy <moy@adacore.com>
4777 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
4778 SPARK_Mode_Pragma components to be able to analyze generic
4780 * sem_ch12.adb (Analyze_Package_Instantiation,
4781 Inline_Instance_Body, Need_Subprogram_Instance_Body,
4782 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
4783 for future analysis of the instance.
4784 (Instantiate_Package_Body,
4785 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
4786 from instantiation to analyze the instance.
4788 2014-01-29 Robert Dewar <dewar@adacore.com>
4790 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
4793 2014-01-29 Yannick Moy <moy@adacore.com>
4795 * gnat_rm.texi: Update description of SPARK_Mode pragma.
4797 2014-01-29 Tristan Gingold <gingold@adacore.com>
4799 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
4801 2014-01-29 Thomas Quinot <quinot@adacore.com>
4803 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
4805 2014-01-29 Ed Schonberg <schonberg@adacore.com>
4807 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
4808 resulting string is an internal entity. and thus requires no
4809 initialization. This is relevant when Initialize_ Scalars is
4810 enabled, because the resultant spurious initialization may lead to
4811 secondary stack anomalies that produce a mangled name for a task.
4813 2014-01-29 Yannick Moy <moy@adacore.com>
4815 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
4816 not inherited from spec anymore. Check consistency
4817 rules after processing of declarations.
4818 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
4819 from spec anymore. Check consistency rules after processing of
4821 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
4823 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
4826 2014-01-27 Robert Dewar <dewar@adacore.com>
4828 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
4830 (Resolve_Range): Add type name/location to unordered msg.
4832 2014-01-27 Claire Dross <dross@adacore.com>
4834 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
4835 Capacity) is only called with Capacity >= Length (Source) and
4836 Capacity in Capacity_Range.
4837 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
4838 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
4839 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
4840 in the code is this is not the case.
4842 2014-01-27 Thomas Quinot <quinot@adacore.com>
4844 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
4845 selected component in an instance where the component of the
4846 actual is not visibile at instantiation.
4848 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4850 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
4851 has a dynamic predicate, generate freeze node for Actual_Subtype
4852 at once, because the declaration of the corresponding predicate
4853 function will make reference to it.
4855 2014-01-27 Tristan Gingold <gingold@adacore.com>
4857 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
4859 2014-01-27 Robert Dewar <dewar@adacore.com>
4861 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
4862 for 2**X optimization.
4864 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4866 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
4867 explicitly whether value is in range of Character, because the
4868 library is typically compiled with range checks disabled, and
4869 we cannot rely on the implicit check on the argument of 'Val.
4871 2014-01-27 Vincent Celier <celier@adacore.com>
4873 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
4874 not the Target to itself.
4876 2014-01-27 Robert Dewar <dewar@adacore.com>
4878 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
4879 changes to avoid incorrect use of unordered enum types.
4881 2014-01-27 Thomas Quinot <quinot@adacore.com>
4883 * sem_ch4.adb: Minor reformatting.
4885 2014-01-27 Robert Dewar <dewar@adacore.com>
4887 * scn.adb (Check_End_Of_Line): Removed.
4888 (Error_Long_Line): Removed.
4889 (Determine_License): Use versions of above routines from Scanner.
4890 * scng.adb (Check_End_Of_Line): Moved to spec.
4891 (Error_Long_Line): Removed, no longer used.
4892 * scng.ads (Check_End_Of_Line): Moved here from body.
4894 2014-01-27 Tristan Gingold <gingold@adacore.com>
4896 * exp_ch7.adb (Build_Cleanup_Statements): Call
4897 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
4899 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
4900 Remove Service_Name variable.
4901 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
4902 factorize code from the above subprograms.
4903 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
4905 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
4907 * einfo.adb (Has_Option): Reimplemented.
4908 * sem_prag.adb (Analyze_Refinement_Clause): Add global
4909 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
4910 External_Constit_Seen and State. Add local variables Body_Ref,
4911 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
4912 avoid a cumbersome while pool. Verify the legality of an external
4913 state and relevant properties.
4914 (Check_External_Property): New routine.
4915 (Check_Matching_State): Remove parameter profile
4916 and update comment on usage.
4917 (Collect_Constituent): Store the
4918 relevant external property of a constituent.
4919 * sem_util.adb (Async_Readers_Enabled): Update the call to
4920 Has_Enabled_Property.
4921 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
4922 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
4923 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
4924 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
4925 Update comment on usage. Reimplement the logic to recognize the various
4926 formats of properties.
4928 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4930 * par-ch5.adb: Minor reformatting.
4932 2014-01-27 Tristan Gingold <gingold@adacore.com>
4934 * s-tposen.ads: Harmonize style and comments.
4936 2014-01-27 Vincent Celier <celier@adacore.com>
4938 * projects.texi: Document that shared library projects, by
4939 default, cannot import projects that are not shared library
4942 2014-01-27 Robert Dewar <dewar@adacore.com>
4944 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
4947 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4949 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
4950 any other exception is raised.
4951 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
4952 still necessary to perform a conversion in order to remove overlong
4955 2014-01-27 Robert Dewar <dewar@adacore.com>
4957 * exp_smem.adb: Minor reformatting.
4959 2014-01-27 Thomas Quinot <quinot@adacore.com>
4961 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
4963 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4965 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
4966 nodes for operands to the original node for the call, to preserve
4967 Original_Node pointers within the resolved operands, given that
4968 they may have been rewritten as well. Previous approach copied
4969 the operands into a new tree and lost those pointers.
4971 2014-01-27 Claire Dross <dross@adacore.com>
4974 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
4976 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4978 * sem_util.adb (Check_Internal_Protected_Use): A call through
4979 an anonymous access parameter of the current protected function
4980 is not a potential modification of the current object.
4982 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4984 * a-cobove.adb (Reserve_Capacity): Procedure raises
4985 Capacity_Error, not Constraint_Error, when request cannot be
4988 2014-01-27 Vincent Celier <celier@adacore.com>
4990 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
4991 not the Target to itself.
4993 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4995 * exp_ch4.adb (Expand_Concatenate): If the target of the
4996 concatenation is a library-level entity, always use the off-line
4997 version of concatenation, regardless of optimization level. This
4998 is space-efficient, and prevents linking problems when some
4999 units are compiled with different optimization levels.
5001 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5003 * sem_ch5.adb: Code clean up.
5005 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5007 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
5008 when an array or container iterator includes a subtype indication,
5009 which is only legal in an element iterator.
5011 2014-01-27 Thomas Quinot <quinot@adacore.com>
5013 * exp_ch7.adb: Minor reformatting.
5015 2014-01-27 Robert Dewar <dewar@adacore.com>
5017 * opt.adb (SPARK_Mode): Default for library units is None rather
5019 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
5021 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
5023 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
5025 2014-01-27 Robert Dewar <dewar@adacore.com>
5027 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
5028 Suspicious_Labels table if we have identifier; followed by loop
5030 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
5031 * par.adb (Suspicious_Labels): New table.
5033 2014-01-27 Robert Dewar <dewar@adacore.com>
5035 * exp_aggr.adb (Check_Bounds): Reason is range check, not
5038 2014-01-27 Yannick Moy <moy@adacore.com>
5040 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
5042 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
5044 (Add_SPARK_Xrefs): Include references to constants.
5045 * spark_xrefs.ads Document new character 'c' for references to
5048 2014-01-27 Thomas Quinot <quinot@adacore.com>
5050 * exp_smem.adb (Add_Write_After): For a function call, insert write as
5051 an after action in a transient scope.
5053 2014-01-27 Thomas Quinot <quinot@adacore.com>
5055 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
5056 to a shared variable as an OUT formal in a call to an init proc,
5057 the 'Read call must be emitted after, not before, the call.
5059 2014-01-27 Robert Dewar <dewar@adacore.com>
5061 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
5063 2014-01-27 Robert Dewar <dewar@adacore.com>
5065 * a-wichha.adb (Character_Set_Version): Change to output proper
5068 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
5070 * einfo.adb (Is_Input_Only_State): Removed.
5071 (Is_Non_Volatile_State): Removed.
5072 (Is_Output_State): Removed.
5073 * einfo.ads (Is_Input_Only_State): Remove attribute and
5074 subprogram. Update related entity.
5075 (Is_Non_Volatile_State):
5076 Remove attribute and subprogram. Update related entity.
5077 (Is_Output_State): Removed attribute and subprogram. Update
5079 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
5081 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
5082 an object, not just variables.
5083 (Analyze_Object_Contract): New routine.
5084 (Analyze_Variable_Contract): Removed.
5085 (Process_Discriminants): Detect an illegal use of volatile
5086 discriminant in SPARK mode.
5087 * sem_ch5.adb (Analyze_Iterator_Specification):
5088 Detect an illegal use of volatile loop variable.
5089 (Analyze_Loop_Parameter_Specification): Detect an illegal use
5090 of volatile loop variable.
5091 * sem_ch6.adb (Process_Formals): Update the volatile object
5092 detection. Detect an illegal formal of mode IN OUT or OUT in
5093 SPARK mode. Enhance the error messages with references.
5094 * sem_ch12.adb (Instantiate_Object): Update the volatile object
5095 detection. Enhance the error messages with references.
5096 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
5097 messages with references.
5098 (Analyze_Contract_Case): Enhance the error messages with references.
5099 (Analyze_External_Property): Call Check_Duplicate_Property to process
5100 an external property.
5101 (Analyze_External_Property_In_Decl_Part): New routine.
5102 (Analyze_External_State_In_Decl_Part): Removed.
5103 (Analyze_Global_Item): Detect an illegal
5104 use of a volatile constant. Detect an illegal use
5105 of a variable with enabled Effective_Reads. Enhance
5106 the error messages with references. Remove obsolete
5107 checks concerning Input_Only and Output_Only states.
5108 (Analyze_Initialization_Item): Enhance the error messages
5110 (Analyze_Initializes_In_Decl_Part): Do not
5111 collect the states and variables when the initialization list
5113 (Analyze_Input_Item): Enhance the error messages with references.
5114 (Analyze_Input_Output): Enhance the error messages with references.
5115 (Analyze_Pragma): Enhance the error messages with references.
5116 (Analyze_Refinement_Clause): Code reformatting.
5117 (Analyze_Refined_Depends_In_Decl_Part):
5118 Rename global variable Global to Reg_Global and update all
5119 occurrences. Add local variables D7 and D8. Update the error
5120 messages with references. Update the call to Collect_Global_Items.
5121 (Analyze_Refined_Global_In_Decl_Part): Add local variables
5122 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
5123 the call to Collect_Global_Items. Account for a Proof_In state
5124 in null / useless refinement checks. Verify the coverage of
5126 (Check_Dependency_Clause): Remove local variable
5127 Out_Constits. Remove the retrieval and removal of constituents
5128 for an Output_Only state. Remove the reporting of unused
5129 Output_Only state constituents.
5130 (Check_Duplicate_Mode): Enhance
5131 the error message with a reference.
5132 (Check_Duplicate_Property): New routine.
5133 (Check_Duplicate_Option): Enhance the error message with a reference.
5134 (Check_External_Properties): Enhance the error message with a reference.
5135 (Check_Function_Return): Enhance the error message with a reference.
5136 (Check_In_Out_States): Update
5137 comment on usage. Add a specialized error message for Proof_In
5138 constituents. Enhance the error message with a reference.
5139 (Check_Input_States): Update comment on usage. Account for
5140 possible Proof_In constituents. Enhance the error message
5142 (Check_Matching_Constituent): Enhance the error message with a
5144 (Check_Matching_State): Enchance the error message with a reference.
5145 (Check_Mode): Add local variable From_Global. Update the call to
5146 Find_Mode. Emit more precise error messages concerning extra items
5147 (Check_Mode_Restriction_In_Enclosing_Context): Consider
5148 pragma Refined_Global. Enhance the error message with a
5150 (Check_Mode_Restriction_In_Function): Enhance the error message with
5152 (Check_Output_States): Update comment on usage. Add local variable
5153 Posted. Account for possible Proof_In constituents. Produce a detailed
5154 list of missing constituents.
5155 (Check_Proof_In_States): New routine.
5156 (Check_Refined_Global_Item): Handle Proof_In
5157 constituents. Enchance the error message with a reference.
5158 (Collect_Global_Items): Add formal parameters Proof_In_Items
5159 and Has_Proof_In_State. Update the comment on usage. Account
5161 (Create_Or_Modify_Clause): Enchance
5162 the error message with a reference.
5164 formal parameter From_Global. Update the comment on usage.
5165 Detect when the mode is governed by pragma [Refined_]Global.
5166 (Output_Constituents): Removed.
5167 (Report_Extra_Constituents):
5168 Report extra Proof_In constituents.
5169 (Report_Unused_Constituents): Removed.
5170 (Usage_Error): Code reformatting. Enhance the error
5171 messages with reference.
5172 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
5173 (Analyze_External_State_In_Decl_Part): Removed.
5174 * sem_res.adb (Resolve_Actuals): Update the volatile object
5175 detection. Enhance the error message with a reference.
5176 (Resolve_Entity_Name): Update the volatile object
5177 detection. Enhance the error message with a reference.
5178 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
5179 (Is_SPARK_Volatile_Object): New routine.
5180 (Has_Volatile_Component): New routine.
5181 * sem_util.ads (Is_Delegate): Alphabetized.
5182 (Is_SPARK_Volatile_Object): New routine.
5183 (Has_Volatile_Component): New routine.
5184 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
5186 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5188 * sem_attr.adb: Resolve fully prefix of 'Update.
5190 2014-01-27 Ben Brosgol <brosgol@adacore.com>
5192 * gnat_rm.texi: Minor clarifications.
5194 2014-01-27 Robert Dewar <dewar@adacore.com>
5196 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
5197 about call that is generated as part of an Initial_Condition
5199 * sem_prag.adb: Minor spelling correction.
5201 2014-01-27 Robert Dewar <dewar@adacore.com>
5203 * sem_prag.adb (Set_Convention_From_Pragma): Check that
5204 convention Ghost can only apply to functions.
5205 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
5207 2014-01-27 Robert Dewar <dewar@adacore.com>
5209 * gnat_ugn.texi: Add Short_Enums to documentation of
5212 2014-01-27 Robert Dewar <dewar@adacore.com>
5214 * sem_prag.adb (Analyze_Input_Item): Correct check for input
5215 item in same package.
5216 * sem_util.ads, sem_util.adb (Within_Scope): New function.
5218 2014-01-26 Arnaud Charlet <charlet@adacore.com>
5220 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
5221 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
5222 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
5223 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
5226 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
5228 * gcc-interface/Makefile.in: Fix oversight.
5230 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
5232 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
5233 conversion from a thin pointer with a shifted value.
5234 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
5235 read-only flag from the values onto the result.
5236 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
5238 2014-01-25 Tristan Gingold <gingold@adacore.com>
5240 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
5241 for E_Variable with a pragma Linker_Section.
5243 2014-01-25 Robert Dewar <dewar@adacore.com>
5245 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
5246 with Default_Value aspect is passed in by copy.
5248 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
5250 * set_targ.adb: Set Short_Enums.
5251 * gcc-interface/lang.opt (fshort-enums): New option.
5252 * gcc-interface/misc.c (gnat_handle_option): Handle it.
5253 (gnat_post_options): Do not modify the global settings.
5255 2014-01-24 Robert Dewar <dewar@adacore.com>
5257 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
5259 (Random_Decimal_Fixed): New generic function.
5260 * s-rannum.ads: Minor comment clarifications.
5262 2014-01-24 Robert Dewar <dewar@adacore.com>
5264 * back_end.adb: Remove Short_Enums handling (handled in
5265 Ttypes/Get_Targ now) Minor added comments.
5266 * freeze.adb: Change name Short_Enums_On_Target to
5268 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
5269 * opt.ads: Minor comment updates.
5270 * sem_ch13.adb: Change name Short_Enums_On_Target to
5272 * set_targ.adb: Set Short_Enums from gcc back end.
5273 * set_targ.ads (Short_Enums): New variable.
5274 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
5275 Ttypes/Get_Targ now).
5276 * ttypes.ads (Target_Short_Enums): New constant boolean switch
5278 2014-01-24 Pascal Obry <obry@adacore.com>
5280 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
5282 2014-01-24 Gary Dismukes <dismukes@adacore.com>
5284 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
5285 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
5288 2014-01-24 Robert Dewar <dewar@adacore.com>
5290 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
5292 2014-01-24 Vincent Celier <celier@adacore.com>
5294 * prj.adb (Add_Aggregated_Project): Do not add a project in
5295 the list if it is already there.
5297 2014-01-24 Yannick Moy <moy@adacore.com>
5299 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
5300 Correct the search for a subrogram declaration to which a pragma is
5303 2014-01-24 Bob Duff <duff@adacore.com>
5305 * gnat_ugn.texi: Document --decimal-grouping and
5306 --based-grouping switches in gnatpp.
5308 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5310 * sinfo.ads: Documentation update.
5312 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5314 * sem_ch3.adb (Constant_Redeclaration): New declaration is
5315 illegal if previous one has an initial expression that is an
5316 aggregate expanded into assignments.
5318 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5320 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
5321 code reorganization to remove spurious warning on a loop with
5322 an array element iterator that has a null range.
5324 2014-01-24 Vincent Celier <celier@adacore.com>
5326 * make.adb (Binding_Phase): When setting the Ada paths, use
5327 the library ALI dir, not the object dir in libraries.
5329 2014-01-24 Yannick Moy <moy@adacore.com>
5331 * sinfo.ads: Add documentation of check flag fields.
5333 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5335 * sem_res.adb (Resolve_Actuals): If an actual is a view
5336 conversion of a discriminated object, and the formal type is
5337 discriminated and constrained, apply a discriminant check to
5340 2014-01-24 Robert Dewar <dewar@adacore.com>
5342 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
5344 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5346 * sem_ch3.adb (Analyze_Declarations): At the end of an
5347 appropriate declarative part, call Freeze_All from the first
5348 declaration in the scope, not from the first unfrozen one. This
5349 is necessary to apply visibility checks to entities with delayed
5350 aspects. Otherwise, in the presence of instantiations and cleanups
5351 that they may generate, the delayed aspects may be analyzed too
5352 late and produce spurious visibility errors.
5353 * sem_attr.adb: Place etype on range.
5354 * sem_ch6.adb: Documentation expression functions.
5356 2014-01-24 Robert Dewar <dewar@adacore.com>
5358 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
5359 terminology in compiler).
5361 2014-01-24 Robert Dewar <dewar@adacore.com>
5363 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
5364 categories, now that Ada 95 supports raise expressions.
5366 2014-01-24 Robert Dewar <dewar@adacore.com>
5368 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
5369 Short_Enums_On_Target.
5370 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
5372 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
5374 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5376 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
5377 indication is given explicity, check that it matches the array
5378 component type or the container element type of the domain
5381 2014-01-24 Tristan Gingold <gingold@adacore.com>
5383 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
5384 * gcc-interface/misc.c (flag_short_enums): Declare.
5385 (gnat_post_options): Set it.
5387 2014-01-24 Vincent Celier <celier@adacore.com>
5389 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
5390 to cache the result when Including_Libraries is False.
5391 * prj-env.ads (Ada_Objects_Path): Update documentation
5392 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
5393 (Get_Object_Directory): Return the Library_Ali_Dir only when
5394 when Including_Libraries is True.
5395 * prj.ads (Get_Object_Directory): Fix and complete documentation
5396 (Project_Data): New component Ada_Objects_Path_No_Libs
5398 2014-01-24 Robert Dewar <dewar@adacore.com>
5400 * checks.adb (Expr_Known_Valid): Result of fpt operator never
5403 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
5405 * back_end.adb: Minor fix in comment.
5407 2014-01-24 Javier Miranda <miranda@adacore.com>
5409 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
5410 required to report the error in case of task types.
5412 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5414 * sem_attr.adb: Additional index checking.
5416 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5418 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
5419 expressions in each component association, and for records note
5420 the entity in each association choice, for subsequent resolution.
5421 (Resolve_Attribute, case 'Update): Complete resolution of
5422 expressions in each component association.
5424 2014-01-24 Robert Dewar <dewar@adacore.com>
5426 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
5427 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
5428 leading to wrong handling of SPARK_Mode for library units).
5430 2014-01-24 Robert Dewar <dewar@adacore.com>
5432 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
5433 on generic instances (do not consider them to be internally
5436 2014-01-24 Doug Rupp <rupp@adacore.com>
5438 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
5439 vice pthread_sigmask.
5441 2014-01-24 Vincent Celier <celier@adacore.com>
5443 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
5446 2014-01-24 Vincent Celier <celier@adacore.com>
5448 * prj-ext.adb (Add): Do not output anything when Silent is True,
5449 whatever the verbosity. When Source is From_External_Attribute,
5450 set the corresponding environment variable if it is not already set.
5451 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
5453 * prj-proc.adb (Process_Expression_For_Associative_Array):
5454 For attribute External, call Prj.Ext.Add with Silent set to
5455 True for the child environment, to avoid useless output in non
5458 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5460 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
5461 range given by a subtype indication, and force evaluation of
5462 the bounds, as for a simple range.
5463 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
5464 of bounds of slice for various kinds of discrete ranges.
5465 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
5466 Evaluate_Slice_Bounds.
5468 2014-01-24 Bob Duff <duff@adacore.com>
5470 * s-taskin.ads (Activator): Make this Atomic, because
5471 Activation_Is_Complete reads it, and that can be called
5472 from any task. Previously, this component was only
5473 modified by the activator before activation, and by
5474 Self after activation.
5475 * a-taside.ads, a-taside.adb (Environment_Task,
5476 Activation_Is_Complete): Implement these missing functions.
5478 2014-01-24 Doug Rupp <rupp@adacore.com>
5480 * init.c: Add a handler section for Android.
5482 2014-01-24 Arnaud Charlet <charlet@adacore.com>
5484 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
5486 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5488 * sem_ch4.adb (Operator_Check): If one operand is a
5489 Raise_Expression, set its type to that of the other operand.
5490 * sem_res.adb (Resolve_Raise_Expression): new procedure.
5491 (Resolve_Actuals): For an actual that is a Raise_Expression,
5492 set the type to that of the formal.
5493 * sem_type.adb (Find_Unique_Type): If one of the operands is a
5494 Raise_Expression, return type of the other operand.
5496 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5498 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
5499 component of the record has a type with a default aspect, and
5500 the corresponding aggregate component is initiaized with a box,
5501 use the default value in the rewritten aggregate.
5503 2014-01-24 Tristan Gingold <gingold@adacore.com>
5505 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
5506 s-interr-sigaction.adb,
5507 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
5508 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
5509 to the call to Install_Restricted_Handlers.
5511 2014-01-24 Emmanuel Briot <briot@adacore.com>
5513 * prj-nmsc.adb (Check_File): Add protection when the source is
5514 not fully initialized.
5516 2014-01-24 Ed Schonberg <schonberg@adacore.com>
5518 * sem_util.adb (Is_Post_State): In a postcondition, a selected
5519 component that denotes an implicit dereference is a reference
5520 to the post state of the subprogram.
5522 2014-01-24 Robert Dewar <dewar@adacore.com>
5524 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
5525 for generated subprograms.
5526 (Analyze_Subprogram_Specification): Ditto.
5528 2014-01-24 Vincent Celier <celier@adacore.com>
5530 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
5531 attributes in package Builder of aggregate and aggregate library
5533 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
5534 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
5535 Remove parameters. Change error message from "... externally
5536 build library ..." to "... externally built project ...".
5537 (Process_Naming_Scheme.Check): Do not do any check in aggregate
5538 project, as attribute Library_Dir and Library_Name have already
5539 been detected as forbidden.
5541 2014-01-24 Vincent Celier <celier@adacore.com>
5543 * prj-env.adb (Find_Project): If cached project path is not in
5544 project directory, look in current directory first and use cached
5545 project path only if project is not found in project directory.
5547 2014-01-24 Robert Dewar <dewar@adacore.com>
5549 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
5551 2014-01-24 Vincent Celier <celier@adacore.com>
5553 * projects.texi: Document that aggregate projects are only
5554 supported by gprbuild, but not by gnatmake. Document that the
5555 only attribute Switches in package Binder of aggregate projects
5556 will be ignored if its index is not others. Document that
5557 attribute Global_Config_File is allowed in package Binder of
5560 2014-01-24 Robert Dewar <dewar@adacore.com>
5562 * sem_prag.adb: Minor code reorganization.
5563 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
5565 2014-01-24 Pascal Obry <obry@adacore.com>
5567 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
5568 attribute definition.
5570 2014-01-24 Vincent Celier <celier@adacore.com>
5572 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
5573 in the Queue the same source (same path, same multi-source index)
5574 from the same project file, to avoid compiling several times
5577 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
5579 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
5580 (Has_Gigi_Rep_Item): Likewise.
5581 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
5582 Has_Gigi_Rep_Item for objects.
5583 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
5584 (prepend_one_attribute): ...this.
5585 (prepend_one_attribute_pragma): New function extracted from...
5586 (prepend_attributes): ...here. Swap the parameters for consistency.
5587 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
5589 <object>: Deal with a pragma Linker_Section on a constant
5590 or variable. <E_Function>: Deal with a pragma Linker_Section
5592 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
5594 2014-01-24 Vincent Celier <celier@adacore.com>
5596 * opt.ads: Minor comment update.
5598 2014-01-24 Robert Dewar <dewar@adacore.com>
5600 * sem_prag.adb (Analyze_Input_Output): Add missing error check
5602 * sem_util.adb (Is_Refined_State): Add defense against junk
5605 2014-01-24 Pascal Obry <obry@adacore.com>
5607 * projects.texi: Removes Build_Slaves attribute documentation.
5609 2014-01-23 Robert Dewar <dewar@adacore.com>
5611 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
5614 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5616 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
5617 applies to expressions that come from source.
5618 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
5620 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
5621 rule regarding potentially unevaluated expressions, to prefix
5624 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5626 * exp_util.adb (Make_Invqriant_Call): If type of expression is
5627 a private extension, get invariant from base type.
5629 2014-01-23 Robert Dewar <dewar@adacore.com>
5631 * sem_util.adb, sem_attr.adb: Minor reformatting.
5633 2014-01-23 Robert Dewar <dewar@adacore.com>
5635 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
5636 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
5637 * sem.adb (Semantics): Remove save/restore of
5638 SPARK_Mode[_Pragma]. Not needed since already done in
5639 Save/Restore_Opt_Config_Switches.
5641 2014-01-23 Robert Dewar <dewar@adacore.com>
5643 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
5644 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
5645 Linker_Section enhancements.
5647 2014-01-23 Tristan Gingold <gingold@adacore.com>
5649 * gnat_rm.texi: Minor editing.
5651 2014-01-23 Robert Dewar <dewar@adacore.com>
5653 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
5654 with'ed internal units.
5655 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
5657 2014-01-23 Javier Miranda <miranda@adacore.com>
5659 * lib-xref.adb (Generate_Reference): As part of processing the
5660 "end-of-spec" reference generate an extra reference to the first
5661 private entity of the package.
5662 * xr_tabls.adb (Add_Reference): No action needed for the extra
5663 'E' reference associated; similar to the processing of the
5666 2014-01-23 Bob Duff <duff@adacore.com>
5668 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
5670 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5672 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
5673 predicate to implement rule given in 6.1.1 (20/3).
5674 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
5675 'Old in a postcondition, if it is potentially unevaluated and
5676 it is not an entity name.
5678 2014-01-23 Bob Duff <duff@adacore.com>
5680 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
5682 2014-01-23 Robert Dewar <dewar@adacore.com>
5684 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
5687 2014-01-23 Bob Duff <duff@adacore.com>
5689 * g-dynhta.ads: Minor comment fix.
5691 2014-01-23 Yannick Moy <moy@adacore.com>
5693 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
5694 from spec on body only when not already inherited on spec. Set
5695 SPARK_Mode from context on body without previous spec. *
5696 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
5697 library-level entities. Correct retrieval of entity from
5698 declaration, for cases where the declaration is not a unit.
5699 * sem_ch12.adb (Instantiate_Object): Avoid
5700 calling Is_Volatile_Object on an empty node.
5702 2014-01-23 Robert Dewar <dewar@adacore.com>
5704 * gnatlink.adb (Gnatlink): Check for suspicious executable file
5707 2014-01-23 Robert Dewar <dewar@adacore.com>
5709 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
5710 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
5711 style errors in instances.
5712 * g-dynhta.ads (Static_HTable): Comment updates.
5714 2014-01-23 Vincent Celier <celier@adacore.com>
5716 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
5717 to find a configuration project file when Config_File_Name is
5718 No_Configuration_File.
5719 * prj-conf.ads (No_Configuration_File): New constant String.
5720 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
5721 with Config_File_Name set to No_Configuration_File, so that
5722 no existing configuration project file will be used, and the
5723 configuration project will be only created in memory when
5724 Add_Default_GNAT_Naming_Scheme is called.
5725 * projects.texi: Minor reformatting.
5727 2014-01-23 Vincent Celier <celier@adacore.com>
5729 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
5730 a config project file if On_Load_Config is not null.
5731 * prj-pars.adb: Minor comment changes.
5733 2014-01-23 Ed Schonberg <schonberg@adacore.com>
5735 * lib-xref.adb (Output_References): Output progenitors of
5736 synchronized tagged types, for source navigation.
5738 2014-01-23 Robert Dewar <dewar@adacore.com>
5740 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
5741 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
5742 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
5744 2014-01-23 Emmanuel Briot <briot@adacore.com>
5746 * prj-conf.adb (Get_Or_Create_Configuration_File): call
5747 On_Load_Config later.
5749 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
5751 * sem_ch3.adb (Analyze_Declarations): Do not
5752 generate the spec of the late primitive in ASIS mode. Add two
5753 comments to explain the special cases when the expansion is
5756 2014-01-23 Robert Dewar <dewar@adacore.com>
5758 * sem_util.adb (Note_Possible_Modification): Fix error of
5759 misbehaving for implicit dereference cases in -gnatc mode.
5761 2014-01-23 Emmanuel Briot <briot@adacore.com>
5763 * prj-pars.adb: Minor reformatting.
5765 2014-01-22 Ed Schonberg <schonberg@adacore.com>
5767 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
5768 body generated for an expression function within a protected body
5769 needs a set of renaming declarations if the expression function
5772 2014-01-22 Ed Schonberg <schonberg@adacore.com>
5774 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
5775 list interface progenitor of a tagged concurrent type, for better
5778 2014-01-22 Robert Dewar <dewar@adacore.com>
5780 * lib.adb (In_Extended_Main_Code_Unit): Return False for
5782 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
5783 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
5784 treatment of Slocs No_Location and Standard_Location.
5785 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
5786 check for entity with Standard_Location Sloc, rather than relying
5787 on Lib routines to do that.
5788 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
5789 that a call cannot occur before a later occuring body within
5792 2014-01-22 Thomas Quinot <quinot@adacore.com>
5794 * rtsfind.adb: Update comment.
5796 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
5798 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
5799 * sem_ch3.adb (Analyze_Declarations): Add local variable
5800 Body_Seen. Generate the spec of a late controlled
5801 primitive body that is about to freeze its related type.
5802 (Handle_Late_Controlled_Primitive): New routine.
5804 2014-01-22 Robert Dewar <dewar@adacore.com>
5806 * a-stream.adb: Minor reformatting.
5808 2014-01-22 Ed Schonberg <schonberg@adacore.com>
5810 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
5811 sub-procedure Declared_In_Actual to handle properly the visibility
5812 of actuals in actual packages, that are themselves actuals to a
5813 actual package of the current instance. This mimics properly the
5814 visibility of formals of formal packages declared with a box,
5815 within the corresponding generic unit.
5817 2014-01-22 Robert Dewar <dewar@adacore.com>
5819 * checks.adb: Do not assume that a volatile variable is valid.
5821 2014-01-22 Thomas Quinot <quinot@adacore.com>
5823 * g-catiio.ads (Image, Value): Clarify that these functions
5824 operate in the local time zone. Minor documentation update.
5826 2014-01-22 Thomas Quinot <quinot@adacore.com>
5828 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
5830 2014-01-22 Robert Dewar <dewar@adacore.com>
5832 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
5833 Moved to sem_aux.adb.
5835 2014-01-22 Robert Dewar <dewar@adacore.com>
5837 * vms_data.ads: Minor reformatting.
5839 2014-01-22 Robert Dewar <dewar@adacore.com>
5841 * debug.adb: Document messages affected by -gnatd.E including
5842 the new ones that relate to late definition of equality.
5843 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
5844 debug flag -gnatd.E is set, then generate warnings rather than
5846 (Check_Untagged_Equality): In earlier versions of Ada,
5847 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
5849 2014-01-22 Robert Dewar <dewar@adacore.com>
5851 * sem_prag.adb (Usage_Error): Output additional messages for
5852 unconstrained OUT parameters lacking an input dependency.
5854 2014-01-22 Robert Dewar <dewar@adacore.com>
5856 * sem_ch4.adb: Minor reformatting.
5858 2014-01-22 Robert Dewar <dewar@adacore.com>
5860 * restrict.ads: Minor reformatting.
5861 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
5862 forbids a call from within a subprogram to the same subprogram.
5864 2014-01-22 Thomas Quinot <quinot@adacore.com>
5866 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
5867 stream attributes for Stream_Element_Array.
5868 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
5869 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
5870 defined in the current scope.
5872 2014-01-22 Robert Dewar <dewar@adacore.com>
5874 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
5876 2014-01-22 Thomas Quinot <quinot@adacore.com>
5878 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
5880 2014-01-22 Thomas Quinot <quinot@adacore.com>
5882 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
5883 declaration initialized with a function call, whose type
5884 has variable size, need to remove side effects so that the
5885 initialization expression becomes a dereference of a temporary
5886 reference to the function result.
5888 2014-01-22 Yannick Moy <moy@adacore.com>
5890 * errout.adb (Initialize): Remove trick to add dummy entry
5892 * erroutc.adb (Set_Warnings_Mode_Off,
5893 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
5894 command line switch.
5895 * opt.ads (Warning_Mode): Document behavior
5896 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
5898 2014-01-22 Robert Dewar <dewar@adacore.com>
5900 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
5902 2014-01-22 Robert Dewar <dewar@adacore.com>
5904 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
5905 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
5906 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
5907 case Storage_Size): call Check_Pool_Size_Clash.
5909 2014-01-22 Robert Dewar <dewar@adacore.com>
5911 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
5912 sem_eval.ads: Minor reformatting.
5914 2014-01-22 Thomas Quinot <quinot@adacore.com>
5916 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
5917 Any_Composite to prevent cascaded errors.
5919 2014-01-22 Yannick Moy <moy@adacore.com>
5921 * errout.adb (Initialize): Do not insert special entry in Warnings
5922 table in GNATprove_Mode.
5923 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
5925 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
5928 2014-01-22 Robert Dewar <dewar@adacore.com>
5930 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
5933 2014-01-22 Robert Dewar <dewar@adacore.com>
5935 * snames.ads-tmpl: Update header.
5937 2014-01-22 Thomas Quinot <quinot@adacore.com>
5939 * exp_util.adb (Insert_Actions): When inserting actions on a
5940 short circuit operator that has already been analyzed, do not park
5941 actions in node; instead introduce an N_Expression_With_Actions
5942 and insert actions immediately.
5943 Add guard for unexpected case of climbing up through statement
5944 in Actions list of an N_Expression_With_Actions.
5945 * sem_elab.adb (Insert_Elab_Check): Remove complex
5946 specialized circuitry for the case where the context is already
5947 analyzed, as it is not needed and introduces irregularities in
5948 finalization. Instead rely on the above change to Insert_Actions
5949 to ensure that late insertion on short circuit operators works
5952 2014-01-22 Ed Schonberg <schonberg@adacore.com>
5954 * sem_ch4.adb (Operator_Check): Improve error message when an
5955 operand of concatenation is an access type.
5957 2014-01-22 Thomas Quinot <quinot@adacore.com>
5959 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
5962 2014-01-22 Ed Schonberg <schonberg@adacore.com>
5964 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
5965 of an expanded name in a proper body, whose prefix is a package
5966 in the context of the proper body, when there is a homonym of
5967 the package declared in the parent unit.
5969 2014-01-22 Robert Dewar <dewar@adacore.com>
5971 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
5972 msg if errors found.
5973 (Check_One_Unit): Same change.
5975 2014-01-22 Robert Dewar <dewar@adacore.com>
5977 * ug_words: Add missing/wrong entries for VMS warning switches.
5978 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
5980 2014-01-22 Jerome Guitton <guitton@adacore.com>
5982 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
5985 2014-01-22 Robert Dewar <dewar@adacore.com>
5987 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
5989 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
5991 * gcc-interface/Makefile.in: Minor fixes.
5993 2014-01-21 Robert Dewar <dewar@adacore.com>
5995 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
5996 * par-ch5.adb (P_Condition): New version with expression prescanned.
5997 * par.adb (P_Condition): New version with expression prescanned.
5999 2014-01-21 Robert Dewar <dewar@adacore.com>
6001 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
6002 if Address is not a private type.
6003 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6004 Ignore pragma if System.Address is not a private type.
6006 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6008 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
6009 uninitialized value.
6011 2014-01-21 Thomas Quinot <quinot@adacore.com>
6013 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
6015 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6017 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
6018 the value of Assertions_Enabled flag when compiling an instance of
6019 an internal unit. This facilitates the use of pre/postconditions
6020 in generic internal units, such as the new elementary function
6023 2014-01-21 Robert Dewar <dewar@adacore.com>
6025 * exp_aggr.adb: Minor reformatting.
6026 * sem_attr.adb: Minor reformatting.
6027 * sem_res.adb: Minor comment addition.
6028 * einfo.adb: Minor comment updates.
6029 * freeze.adb: Minor reformatting and code reorganization.
6031 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6033 * par-ch4.adb (P_If_Expression): Handle more gracefully an
6034 elsif clause that does not have an else part.
6036 2014-01-21 Robert Dewar <dewar@adacore.com>
6038 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
6039 * gcc-interface/Makefile.in: clean up target pairs.
6041 2014-01-21 Pascal Obry <obry@adacore.com>
6043 * projects.texi: Minor typo fix.
6045 2014-01-21 Thomas Quinot <quinot@adacore.com>
6047 * freeze.adb (Check_Component_Storage_Order): If a record type
6048 has an explicit Scalar_Storage_Order attribute definition clause,
6049 reject any component that itself is of a composite type and does
6052 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6054 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
6055 can be used to generate proper cross-reference information for
6056 the parent units of proper bodies.
6058 2014-01-21 Thomas Quinot <quinot@adacore.com>
6060 * exp_pakd.adb (Expand_Packed_Element_Set,
6061 Expand_Packed_Element_Reference): No byte swapping required in
6062 the front-end for the case of a reverse storage order array,
6063 as this is now handled uniformly in the back-end. However we
6064 still need to swap back an extracted element if it is itself a
6065 nested composite with reverse storage order.
6067 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6069 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
6070 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
6073 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6075 * gnat_ugn.texi: Minor updates.
6077 2014-01-21 Thomas Quinot <quinot@adacore.com>
6079 * exp_pakd.adb: Update comment, minor reformatting.
6081 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6083 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
6084 object check when SPARK_Mode is on.
6085 * sem_ch6.adb (Process_Formals): Trigger the volatile object
6086 check when SPARK_Mode is on.
6087 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
6088 check when SPARK_Mode is on.
6089 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
6090 corresponding pragma of aspect SPARK_Mode in the visible
6091 declarations of a package declaration.
6092 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
6093 check when SPARK_Mode is on.
6094 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
6095 check when SPARK_Mode is on.
6096 (Resolve_Entity_Name): Trigger
6097 the volatile object check when SPARK_Mode is on.
6099 2014-01-21 Robert Dewar <dewar@adacore.com>
6101 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
6102 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
6104 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6106 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
6107 object is declared, it is rewritten as a renaming of an dynamic
6108 expression that wraps the initial value. The renaming declaration
6109 is first given an internal name, to prevent collisions with the
6110 entity already declared, and then the name is modified to reflect
6111 the original one. the modification of the name must preserve
6112 the source location of the original, to prevent spurious errors
6113 when compiling with style checks if the declaration involves
6114 more than one entity.
6116 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6118 * aspects.adb Add entries for Async_Readers, Async_Writers,
6119 Effective_Reads and Effective_Writes in table Canonical_Aspect.
6120 * aspects.ads Add entries for Async_Readers, Async_Writers,
6121 Effective_Reads and Effective_Writes in tables Aspect_Id,
6122 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
6123 * atree.adb (Ekind_In): New version with 8 parameters.
6124 (Node34): New routine.
6125 (Set_Node34): New routine.
6126 * atree.ads (Ekind_In): New version with 8 parameters.
6127 (Node34): New routine.
6128 (Set_Node34): New routine.
6129 * einfo.adb Contract is now Node34.
6130 (Contract): Update the assertion and node usage.
6131 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
6132 Effective_Reads and Effective_Writes.
6133 (Set_Contract): Update the assertion and node usage.
6134 (Write_Field24_Name): Remove the output for a contract.
6135 (Write_Field34_Name): Add output for a contract.
6136 * einfo.ads Contract is now Node34. Update the comment on
6137 attribute usage and related node structures.
6138 (Get_Pragma): Update the comment on usage.
6139 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
6140 Effective_Reads and Effective_Writes do not require special
6141 processing by the parser.
6142 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
6143 (Analyze_Declarations): Analyze the contract of a variable at
6144 the end of the declarative region.
6145 (Analyze_Object_Declaration): Create a contract for a variable.
6146 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
6147 of classification pragmas.
6148 (Process_Formals): Detect an illegal
6149 use of a volatile object as a formal in a function.
6150 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
6151 a volatile object as an actual in generic instantiation.
6152 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
6153 Effective_Reads and Effective_Writes in table Sig_Flags.
6154 (Analyze_External_State_In_Decl_Part): New routine.
6155 (Analyze_Global_Item): Detect an illegal use of a volatile object
6156 as a global item of a function.
6157 (Analyze_Pragma): Reimplement
6158 pragma Abstract_State. Add support for pragmas Async_Readers,
6159 Async_Writers, Effective_Reads and Effective_Writes.
6160 (Check_External_Properties): New routine.
6161 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
6162 (Check_External_Properties): New routine.
6163 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
6164 volatile object as an actual in a call.
6165 (Resolve_Entity_Name):
6166 Add local variables Par, Prev and Usage_OK. Detect illegal
6167 contexts of volatile objects.
6168 * sem_util.adb (Add_Contract_Item): Add support for
6169 pragmas associated with the contract of a variable.
6170 (Async_Readers_Enabled): New routine.
6171 (Async_Writers_Enabled): New routine.
6172 (Effective_Reads_Enabled): New routine.
6173 (Effective_Writes_Enabled): New routine.
6174 (Has_Enabled_Property):
6176 (Is_Unchecked_Conversion_Instance): New routine.
6177 (Is_Volatile_Object): Add support for entities that may denote
6179 * sem_util.ads (Add_Contract_Item): Update the
6181 (Async_Readers_Enabled): New routine.
6182 (Async_Writers_Enabled): New routine.
6183 (Effective_Reads_Enabled): New routine.
6184 (Effective_Writes_Enabled): New routine.
6185 (Is_Unchecked_Conversion_Instance): New routine.
6186 * sinfo.ads Update the comment on the structure of N_Contract.
6187 * snames.ads-tmpl Add predefined names for Async_Readers,
6188 Async_Writers, Effective_Reads and Effective_Writes. Add
6189 pragma ids for Async_Readers, Async_Writers, Effective_Reads
6190 and Effective_Writes.
6192 2014-01-21 Robert Dewar <dewar@adacore.com>
6194 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
6195 * sem_eval.adb (Compile_Time_Known_Value): Remove special
6196 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
6197 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
6198 (Test_Foldable): Add CRT_Safe parameter
6199 * sem_eval.ads (Compile_Time_Known_Value): Remove special
6200 handling of CRT mode.
6201 (CRT_Safe_Compile_Time_Known_Value): New function.
6203 2014-01-21 Robert Dewar <dewar@adacore.com>
6205 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
6206 with pragma or aspect that applies to package spec or subprogram
6209 2014-01-21 Robert Dewar <dewar@adacore.com>
6211 * exp_aggr.adb: Minor reformatting.
6213 2014-01-21 Johannes Kanig <kanig@adacore.com>
6215 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
6217 2014-01-21 Bob Duff <duff@adacore.com>
6219 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
6221 2014-01-21 Steve Baird <baird@adacore.com>
6223 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
6225 2014-01-21 Vincent Celier <celier@adacore.com>
6227 * prj-part.adb (Parse_Single_Project): Accept to extend a project
6228 if it has only be imported by an project being extended. When a
6229 project that has only been imported by a project being extended
6230 is imported by another project that is not being extended,
6231 reset the previous indication, so that it will be an error if
6232 this project is extended later.
6233 * prj-tree.adb (Create_Project): Include component From_Extended
6234 in table Projects_HT
6235 * prj-tree.ads (Project_Name_And_Node): New Boolean component
6238 2014-01-21 Robert Dewar <dewar@adacore.com>
6240 * atree.ads, atree.adb: Add Node33 and Set_Node33.
6241 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
6242 New field (SPARK_Pragma_Inherited): New flag
6243 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
6245 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
6246 * opt.ads (SPARK_Mode_Pragma): New global variable.
6247 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
6248 * sem_ch3.adb: Use new SPARK_Mode data structures.
6249 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
6250 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
6251 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
6252 (Pop_Scope): Restore SPARK_Mode_Pragma.
6253 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
6254 new data structures.
6256 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6258 * back_end.adb: Undo previous change, not needed. Minor reformatting.
6260 2014-01-21 Thomas Quinot <quinot@adacore.com>
6262 * exp_ch5.adb: Fix comment.
6263 * switch-c.adb: Minor comment update.
6264 * exp_ch3.adb: Minor reformatting.
6266 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6268 * back_end.adb (Scan_Compiler_Arguments): Do not store object
6269 filename in gnatprove mode.
6271 2014-01-21 Thomas Quinot <quinot@adacore.com>
6273 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
6274 suppresses usage of primitive _assign for tagged types).
6275 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
6276 No_Ctrl_Actions for a tagged type that does not require
6277 finalization, as we want to disable usage of _assign (which
6278 may cause undesirable discriminant checks on an uninitialized,
6281 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6283 * sem_prag.adb: Reject invariant'class on completion.
6285 2014-01-21 Javier Miranda <miranda@adacore.com>
6287 * exp_ch3.adb (Build_Init_Procedure): For
6288 derivations of interfaces, do not move the the initialization
6289 of the _parent field since such assignment is not generated.
6291 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6293 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
6294 with the operator it renames if we are within an expression of
6295 a pre/postcondition, because the expression will be reanalyzed
6296 at a later point, and the analysis of the renaming may affect
6297 the visibility of the operator when in an instance.
6299 2014-01-21 Robert Dewar <dewar@adacore.com>
6301 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
6302 Add this flag to type conversion nodes and assignment nodes.
6303 * treepr.adb: Deal properly with Flag 1,2,3.
6304 * treeprs.adt: Minor comment update.
6306 2014-01-21 Robert Dewar <dewar@adacore.com>
6308 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
6310 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
6311 parameter, completely rewrite spec.
6313 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6315 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
6316 instance that is inlined, it may have been rewritten as a wrapper
6317 package. In that case the unit that must be made visible is the
6318 related instance of the package.
6320 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6322 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
6323 previous change in codepeer mode.
6325 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6327 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
6328 call to Abort_Undefer, as expected by the runtime.
6329 * s-tasren.adb (Local_Complete_Rendezvous): Replace
6330 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
6331 deferred at this point. Update comments.
6333 2014-01-21 Thomas Quinot <quinot@adacore.com>
6335 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
6337 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6339 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
6342 2014-01-21 Robert Dewar <dewar@adacore.com>
6344 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
6346 2014-01-21 Thomas Quinot <quinot@adacore.com>
6348 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
6349 this is value is used in Node_Id arithmetic operations.
6350 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
6351 instead of hard-coded unrolled code.
6353 2014-01-21 Yannick Moy <moy@adacore.com>
6355 * gnat1drv.adb: Minor code cleanup, removing useless code.
6357 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6359 * opt.ads (SPARK_Switches_File_Name): New.
6360 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
6361 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
6362 * gnat_ugn.texi: Document -gnates.
6364 2014-01-21 Yannick Moy <moy@adacore.com>
6366 * errout.adb (Special_Msg_Delete): Update comment. Remove
6367 special case for GNATprove which should not ignore mismatch
6368 in sizes for representation clauses.
6369 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
6370 which should not ignore pragma Pack.
6372 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6374 * sem_ch4.adb: Code clean up.
6376 2014-01-21 Steve Baird <baird@adacore.com>
6378 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
6380 2014-01-21 Robert Dewar <dewar@adacore.com>
6382 * gcc-interface/gigi.h: Get Flags array address.
6383 * gcc-interface/trans.c: Acquire Flags array address.
6384 * atree.adb: Add support for Flags array and Flag0,1,2,3.
6385 * atree.ads: Add support for Flags array and Flag0,1,2,3.
6386 * atree.h: Add support for Flags array and Flag0,1,2,3.
6387 * back_end.adb: Pass Flags array address to gigi.
6389 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6391 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
6392 reference to generated body so that legality checks on stream
6393 attributes are properly applied. If type is tagged and already
6394 frozen, insert generated body at the point of the renaming
6397 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6399 * sem_ch12.adb: Code clean up.
6400 * sem_ch8.adb: Minor reformatting
6402 2014-01-20 Robert Dewar <dewar@adacore.com>
6404 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
6405 converting warnings on inevitable exceptions to errors.
6406 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
6407 converting warnings on inevitable exceptions to errors.
6408 * opt.adb (SPARK_Mode_Config): Handled like other config flags
6409 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
6410 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
6411 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
6412 New flag (Config_Switches_Type): Add SPARK_Mode field
6413 * sem.adb: Minor code reorganization (remove unnecessary with)
6414 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
6415 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
6416 converting warnings on inevitable exceptions to errors.
6417 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
6418 converting warnings on inevitable exceptions to errors.
6419 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
6420 converting warnings on inevitable exceptions to errors.
6421 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
6422 converting warnings on inevitable exceptions to errors.
6423 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
6425 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
6427 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
6429 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
6430 converting warnings on inevitable exceptions to errors.
6431 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
6432 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
6433 of Get_SPARK_Mode_Id
6434 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
6435 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
6436 converting warnings on inevitable exceptions to errors.
6437 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
6438 converting warnings on inevitable exceptions to errors.
6439 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
6442 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6444 * sem_ch13.adb: Add semantic information to rewritten type
6447 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6449 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
6450 are of a type with unknown discriminants, convert both to the
6451 underlying view of the type, so that the proper constraint check
6452 can be applied to the right-hand side.
6454 2014-01-20 Robert Dewar <dewar@adacore.com>
6456 * atree.adb (Copy_Node): Fix failure to copy last component
6457 (Exchange_Entities): Fix failure to exchange last entity
6459 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6461 * sem_ch12.adb: Code clean up.
6463 2014-01-20 Robert Dewar <dewar@adacore.com>
6465 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
6467 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6469 * sem_ch4.adb (Analyze_Quantified_Expression): If after
6470 pre-analysis the loop parameter specification has been
6471 rewritten as a iterator specification, propagate the change to
6472 the quantified expression, for ASIS navigtion needs.
6474 2014-01-20 Vincent Celier <celier@adacore.com>
6476 * par-ch10.adb: Minor error message change: escape [ and ].
6478 2014-01-20 Robert Dewar <dewar@adacore.com>
6480 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
6481 * errout.adb: Implement [ and ] insertion characters.
6482 * errout.ads: Document new [ and ] insertion characters.
6483 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
6484 addition of ??? comment.
6485 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
6486 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
6487 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
6488 Make warnings on exceptions into errors in GNATprove mode.
6489 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
6492 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6494 * sem_ch13.adb: Code clean up.
6496 2014-01-20 Robert Dewar <dewar@adacore.com>
6498 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
6500 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
6501 error in GNATprove mode.
6503 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6505 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
6506 reference 'Old takes no parameters, and thus can appear as a
6509 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6511 * exp_aggr.adb: Fix minor typos.
6513 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6515 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
6516 instance the attribute is legal, and its value is determined
6517 statically if the type has no discriminants. This choice is
6518 more useful than rechecking the legality rule in the instance,
6519 is consistent with older usage, and is also consistent with all
6522 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6524 * sem_cat.adb (Validate_Static_Object_Name): Change error into
6525 warning in Relaxed_Semantic_Mode.
6527 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6529 * sem_attr.adb: Code and comments cleanup.
6531 2014-01-20 Yannick Moy <moy@adacore.com>
6533 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
6534 * errout.adb (Compilation_Errors): Remove special handling in
6536 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
6537 removed debug flags.
6538 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
6539 Global, Initial_Condition, Initializes and Refined_State pragmas and
6541 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
6542 SPARK_Strict_Mode): Remove global flags.
6543 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
6544 always performed now, on packages declaring a null state.
6545 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
6546 at providing pedantic mode for bounds of integer types.
6547 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
6548 "some" quantified expression now issued under control of -gnatw.t,
6549 like the other warning on unused bound variable.
6550 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
6552 (Analyze_Pragma): Remove tests for SPARK 2014
6553 pragmas, not officially allowed by GNAT.
6555 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6557 * sem_prag.adb (Analyze_Pragma): Ensure that
6558 the sole argument of pragmas Abstract_State, Contract_Cases,
6559 Depends, Global and Initializes in in aggregate form.
6560 (Analyze_Refined_Pragma): Ensure that the sole argument of
6561 pragmas Refined_Depends, Refined_Global and Refined_State is in
6563 (Ensure_Aggregate_Form): New routine.
6565 2014-01-20 Doug Rupp <rupp@adacore.com>
6567 * sem_attr.adb (Analyze_Attribute): case
6568 Attribute_Constrained => treat all prefixes as legal for Declib
6571 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6573 * sem_prag.adb (Check_Mode): Reimplement the routine.
6574 (Find_Mode): New routine.
6576 2014-01-20 Robert Dewar <dewar@adacore.com>
6578 * sem_ch4.adb (Operator_Check): Handle additional
6579 Allow_Integer_Address cases.
6581 2014-01-20 Robert Dewar <dewar@adacore.com>
6583 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
6584 allowed if address is non-private, no longer true.
6585 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6586 Remove check for address being private, causes difficulty when
6587 pragma used in gnat.adc file and is not needed, since we guard
6588 this in Address_Integer_Convert_OK.
6589 * exp_ch7.adb: Minor reformatting.
6590 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
6592 2014-01-20 Robert Dewar <dewar@adacore.com>
6594 * checks.adb (Apply_Range_Check): Remove gnatprove special
6595 casing of exponentiation.
6596 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
6597 operand for integer case to check range against Natural.
6599 2014-01-20 Robert Dewar <dewar@adacore.com>
6601 * s-tataat.adb: Minor reformatting.
6603 2014-01-20 Robert Dewar <dewar@adacore.com>
6605 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
6606 entities, and also fix documentation to remove mention of visible
6607 integer type, since this is not what the implementation does.
6608 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
6609 entities, and also fix documentation to remove mention of visible
6610 integer type, since this is not what the implementation does.
6611 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
6613 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
6614 case for parameter type check.
6615 * sem_res.adb (Resolve): Use new function
6616 Address_Integer_Convert_OK.
6617 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
6618 reformatting throughout.
6619 * sem_util.adb (Address_Integer_Convert_OK): New function.
6620 * sem_util.ads: Minor reformatting (put specs in alpha order)
6621 (Address_Integer_Convert_OK): New function.
6623 2014-01-20 Thomas Quinot <quinot@adacore.com>
6625 * exp_ch7.adb (Wrap_Transient_Expression):
6626 Insertion extra conditional expression only if
6627 Opt.Suppress_Control_Flow_Optimizations is set.
6629 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6631 * s-tataat.adb (Initialize_Attributes): Abort might already be
6632 deferred in Create_Task.
6634 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6636 * checks.adb (Apply_Scalar_Range_Check): Flag
6637 the exponent as requiring a range check when the expression is
6640 2014-01-20 Fedor Rybin <frybin@adacore.com>
6642 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
6644 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6646 * sem_util.adb (Default_Initialization): New routine.
6647 * sem_util.ads: Add new type Default_Initialization_Kind.
6648 (Default_Initialization): New routine.
6650 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6652 * sem_prag.adb (Check_Mode): Correct all error
6653 message logic dealing with in/in out parameters that may appear
6654 as inputs or have a self reference.
6656 2014-01-20 Robert Dewar <dewar@adacore.com>
6658 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
6659 * sem_res.adb (Resolve): Fix error causing infinite loop for
6660 integer used as address. Allow addresses as integers.
6662 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6664 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
6666 2014-01-20 Bob Duff <duff@adacore.com>
6668 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
6669 error when "use all" is not followed by "type".
6671 2014-01-20 Bob Duff <duff@adacore.com>
6673 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
6676 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6678 * checks.adb (Apply_Address_Clause_Check): If there is an
6679 alignment check on the expression in an address clause, and there
6680 is no local exception propagation, add an additional explanatory
6681 message to clarify the cause of previous warning.
6683 2014-01-20 Robert Dewar <dewar@adacore.com>
6685 * exp_ch7.adb: Minor reformatting.
6686 * opt.ads: Minor comment updates.
6687 * sem.adb: Minor name change Is_Main_Unit =>
6688 Is_Main_Unit_Or_Main_Unit_Spec.
6689 * sem_ch6.adb: Minor reformatting and code reorganization.
6691 2014-01-20 Bob Duff <duff@adacore.com>
6693 * gnat_ugn.texi: Update gnatpp switches.
6695 2014-01-20 Thomas Quinot <quinot@adacore.com>
6697 * exp_ch9.adb: Minor comment edit.
6699 2014-01-20 Robert Dewar <dewar@adacore.com>
6701 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
6702 only if System.Address is a private type.
6703 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
6704 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6705 Allowed only if type System.Address is private, since otherwise
6707 * sem_res.adb: Fix failure to properly Analyze unchecked
6708 conversions that were introduced by Allow_Integer_Address.
6709 * switch-c.adb: Remove -gnates switch.
6710 * usage.adb: Remove -gnates switch.
6711 * gnat_ugn.texi: Remove documentation of -gnates flag.
6713 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6715 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
6716 resolve expression to perform proper name capture.
6718 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6720 * sem.adb (Semantics): When saving/restoring configuration
6721 switches, the spec of a pre- defined unit that is the main unit
6722 must be treated as a predefined unit as well.
6724 2014-01-20 Thomas Quinot <quinot@adacore.com>
6726 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
6727 expression, insert an extra conditional expression when saving
6728 the value of the expression, for the benefit of control flow
6729 graph based coverage analysis.
6730 * exp_ch3.adb: Minor reformatting.
6732 2014-01-20 Robert Dewar <dewar@adacore.com>
6734 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
6735 * gnat_rm.texi: Document pragma Allow_Integer_Address.
6736 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
6737 * opt.ads: New flag Allow_Integer_Address.
6738 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
6739 * sem_ch5.adb: Minor reformatting.
6740 * sem_prag.adb: Implement pragma Allow_Integer_Address.
6741 * sem_res.adb (Resolve): Allow integer address value if
6743 * sem_util.adb: Minor reformatting.
6744 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
6745 * switch-c.adb: Recognize flag -gnates.
6746 * usage.adb: Document flag -gnates.
6748 2014-01-20 Thomas Quinot <quinot@adacore.com>
6750 * s-tadeca.adb: Fix minor typos in comment.
6752 2014-01-20 Pascal Obry <obry@adacore.com>
6754 * s-win32.ads (FreeLibrary): New import.
6756 2014-01-20 Robert Dewar <dewar@adacore.com>
6758 * sem_res.adb, sem_cat.adb: Minor reformatting.
6759 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
6760 assigning to OUT parameters for the current subprogram scope.
6761 * exp_ch4.adb: Minor reformatting.
6763 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6765 * exp_ch4.adb (Process_Transient_Object,
6766 Find_Enclosing_Contexts): If the top-level if-expression that
6767 generated the transient object is an actual in a call, the proper
6768 Hook_Context is a construct enclosing the call.
6769 * einfo.ads: Indicate that Related_Expression is used to link a
6770 loop variable to the container expression over which the loop
6772 (Analyze_Iterator_Specification): Set the Related_Expression of
6773 the loop variable in a container element iterator.
6774 (Note_Possible_Modification): If the variable is the loop
6775 variable in a container element iterator, indicate that the
6776 enclosing container is also modified.
6778 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6780 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
6782 2014-01-20 Robert Dewar <dewar@adacore.com>
6784 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
6785 Minor reformatting and code clean up.
6787 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6789 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
6790 of objects of private type if Relaxed_RM_Semantics.
6792 2014-01-20 Claire Dross <dross@adacore.com>
6794 * a-cofove.ads (Vector): Capacity discriminant
6795 should be in range of the index.
6797 2014-01-20 Thomas Quinot <quinot@adacore.com>
6799 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
6800 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
6801 possible difference between epoch of Ada.Calendar clock and Ada
6802 real-time/tasking clock.
6803 * s-taprop-posix.adb: Minor comment fix.
6805 2014-01-20 Doug Rupp <rupp@adacore.com>
6807 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
6809 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6811 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
6812 checks on the prefix of attribute 'Old.
6813 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
6814 generation of validity checks on a range that belongs to the
6815 iteration scheme of a quantified expression.
6816 * sem_ch5.adb (One_Bound): Suppress the generation of validity
6817 checks on a bound that belongs to the iteration scheme of a
6818 quantified expression, generate the check in all other cases.
6820 2014-01-20 Bob Duff <duff@adacore.com>
6822 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
6824 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6826 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
6827 interpretations that do not come from other predefined units,
6828 to prevent spurious ambiguities in the presence of user-defined
6829 operators in the context of (an instance of) a predefined unit.
6831 2014-01-20 Robert Dewar <dewar@adacore.com>
6833 * gnat_rm.texi: Document that Loop_Variant is included in
6834 Statement_Assertions.
6835 * sem_prag.adb (Check_Kind): Add Loop_Variant to
6836 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
6837 to Statement_Assertions.
6839 2014-01-20 Doug Rupp <rupp@adacore.com>
6841 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
6842 for errno ENOENT from RTP on NFS mounted file system.
6844 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6846 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
6847 examine code that does not come from source. The check does not
6848 apply to code generated for constraint checks, and such code may
6849 generate spurious error messages when compiled with expansion
6850 disabled (as in a generic unit) because side effects may not
6852 2) Make error messages more explicit: indicate the component
6853 of the construct whose value is indeterminate because of a
6854 call to a function with in-out parameter in another component,
6855 when there is no mandated order of execution between the two
6856 components (actuals, aggregate components, alternatives).
6858 2014-01-20 Robert Dewar <dewar@adacore.com>
6860 * gnat_rm.texi: Minor cleanup.
6862 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6864 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
6865 can now apply to a refined postcondition.
6866 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
6867 variable Result_Seen. Add variables Case_Prag, Post_Prag,
6868 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
6869 whether postconditions and/or constract-cases mention attribute
6870 'Result and introduce a post-state when applied to functions.
6871 (Check_Result_And_Post_State): Removed.
6872 * sem_prag.adb (Analyze_Pragma): Add local variable
6873 Result_Seen. Verify that the expression of pragma Refined_Post
6874 mentions attribute 'Result and introduces a post-state.
6875 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
6877 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6879 * exp_ch7.adb (Is_Subprogram_Call): New routine.
6880 (Process_Transient_Objects): Make variable Must_Hook global with
6881 respect to all locally declared subprograms. Search the context
6882 for at least one subprogram call.
6883 (Requires_Hooking): Removed.
6885 2014-01-20 Claire Dross <dross@adacore.com>
6887 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
6888 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
6889 External_Axiomatization);
6891 2014-01-20 Robert Dewar <dewar@adacore.com>
6893 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
6894 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
6895 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
6896 Allow Loop_Entry to be used in these pragmas if they appear in
6897 an appropriate context.
6898 (Placement_Error): Specialize error
6899 message for pragma Assert[_And_Cut] or pragma Assume containing
6900 Loop_Entry attribute.
6901 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
6902 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
6905 2014-01-20 Robert Dewar <dewar@adacore.com>
6907 * gnat1drv.adb: Minor comment update.
6909 2014-01-20 Tristan Gingold <gingold@adacore.com>
6911 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
6912 variables, comment out unused code.
6913 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
6914 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
6915 * s-excmac-arm.ads: New file.
6917 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6919 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
6920 Drange and Index_Typ. Remove the circuitry which creates a
6921 range check to compare the index type of the array against the
6923 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
6924 the circuitry which creates a range check to handle a
6925 discrete_range denoted by a subtype indication.
6927 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
6929 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
6930 nodes to get the original sloc range.
6932 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6934 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
6935 entity of a [library level] package.
6937 2014-01-20 Tristan Gingold <gingold@adacore.com>
6939 * raise-gcc.c (exception_class_eq): New function.
6940 (is_handled_by): Use it to compare exception classes.
6941 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
6942 be called to return URC_CONTINUE_UNWIND.
6943 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
6944 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
6946 2014-01-20 Robert Dewar <dewar@adacore.com>
6948 * opt.ads: Minor comment update.
6950 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6952 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
6953 constants to the "Local variables" area. Add new constant D. Add
6954 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
6955 to Pref_Typ and update all occurrences. Add circuitry to extract
6956 the discrete_range and the index type and build a range check.
6958 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6960 * gnat1drv.adb (Adjust_Global_Switches): Enable
6961 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
6964 2014-01-20 Thomas Quinot <quinot@adacore.com>
6966 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
6968 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6970 * sem_ch13.adb (Analyze_Aspect_Specifications):
6971 When aspect SPARK_Mode appears on a package body, insert the
6972 generated pragma at the top of the body declarations.
6974 2014-01-20 Robert Dewar <dewar@adacore.com>
6976 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
6977 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
6978 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
6979 sem_ch8.adb, exp_dist.adb: Minor reformatting.
6981 2014-01-20 Yannick Moy <moy@adacore.com>
6983 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
6986 2014-01-20 Pascal Obry <obry@adacore.com>
6988 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
6990 * g-arrspl.adb: Adapt all routine to this new implementation.
6991 (Set): Copy the Slice_Set definition before reusing it.
6993 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6995 * sem_prag.adb (Process_Import_Or_Interface): In
6996 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
6997 (Analyze_Pragma): Ditto for pragma Export.
6998 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
7001 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7003 * einfo.ads: E_Abstract_State is now part of the entities that
7004 can be overloaded. Update type Overloadable_Kind to reflect the
7005 inclusion of abstract states.
7006 * sem_ch6.adb (New_Overloaded_Entity): A function can now
7007 overload an abstract state.
7008 * sem_prag.adb (Analyze_Constituent): Handle the overloading
7009 of states by functions. Use Entity_Of to obtain the entity of
7010 a constituent. (Analyze_Global_Item): Handle the overloading of
7011 states by functions.
7012 (Analyze_Initialization_Item): Handle the
7013 overloading of states by functions. Use Entity_Of to obtain the
7015 (Analyze_Input_Item): Handle the overloading
7016 of states by functions. Use Entity_Of to obtain the entity of an item.
7017 (Analyze_Input_Output): Handle the overloading of states by functions.
7018 (Analyze_Refinement_Clause): Handle the overloading
7019 of states by functions. Use Entity_Of to obtain the entity of an item.
7020 (Appears_In): Use Entity_Of to obtain the entity of an element.
7021 (Check_Usage): Use Entity_Of to obtain the entity of
7022 an item. Add a guard to prevent a crash due to a previous error.
7023 (Resolve_State): New routine.
7025 2014-01-20 Yannick Moy <moy@adacore.com>
7027 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
7028 opt.ads: Minor comments updates.
7030 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7032 * einfo.adb (Non_Limited_View): Applies to abstract states.
7033 (Set_From_Limited_With): Applies to abstract states.
7034 (Set_Non_Limited_View): Applies to abstract states.
7035 (Write_Field17): Output the non-limited view of an abstract state.
7036 * einfo.ads: Update the comment on usage and occurrences in
7037 nodes for attributes From_Limited_With and Non_Limited_View.
7038 * sem_aux.adb (Available_View): This routine can now handle
7040 * sem_aux.ads (Available_View): This routine can now handle
7041 abstract states. Update the comment on usage.
7042 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
7043 of states and variables.
7044 (In_Pragmas_Depends_Or_Global): New routine.
7045 * sem_ch10.adb (Build_Limited_Views): Implement
7046 abstract (limited) views of variables and states.
7047 (Build_Shadow_Entity): This routine is now a procedure. Add
7048 formal parameter Shadow. Update the comment on usage. Add
7049 context-specific decoration for states and variables.
7050 (Decorate_State): New routine. (Decorate_Variable): New routine.
7051 (Find_And_Process_States): New routine.
7052 (Process_Declarations): Renamed to Process_Declarations_And_States.
7053 (Process_Declarations_And_States): Add formal parameters
7054 Pack and Create_Abstract_Views. Update the comment on usage.
7055 (Process_States): New routine.
7056 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
7057 views of states and variables. Match the abstract view of a state
7058 against its corresponding non-abstract view.
7059 (Is_Matching_Input):
7060 Handle abstract views of states and variables. Match the abstract
7061 view of a state against its corresponding non-abstract view.
7062 (Process_Global_Item): Handle abstract views of states and
7065 2014-01-20 Bob Duff <duff@adacore.com>
7067 * sem_ch10.adb (Expand_With_Clause): Don't
7068 recurse on the prefix if the current with-ed name refers to a
7069 package that renames its own parent, eg "package P.Q renames P;".
7071 2014-01-20 Yannick Moy <moy@adacore.com>
7073 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
7074 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
7075 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
7076 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
7077 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
7080 2014-01-20 Yannick Moy <moy@adacore.com>
7082 * sinfo.ads Update documentation of GNATprove mode.
7084 2014-01-20 Yannick Moy <moy@adacore.com>
7086 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
7087 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
7088 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
7089 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
7091 * sem_ch13.adb: Remove blank.
7092 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
7093 subprograms by alias for renamings, not for inherited primitive
7095 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
7097 (Remove_Side_Effects): Apply the removal in
7098 GNATprove mode, for the full analysis of expressions.
7099 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
7101 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
7102 save/restore actions for Expander_Active flag in GNATprove mode,
7103 similar to what is done in ASIS mode.
7104 * frontend.adb (Frontend): Generic bodies are instantiated in
7106 * gnat1drv.adb (Adjust_Global_Switches): Set operating
7107 mode to Check_Semantics in GNATprove mode, although a light
7108 expansion is still performed.
7109 (Gnat1drv): Set Back_End_Mode to
7110 Declarations_Only in GNATprove mode, and later on special case
7111 the GNATprove mode to continue analysis anyway.
7112 * lib-writ.adb (Write_ALI): Always generate ALI files in
7114 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
7116 (SPARK_Mode): Renamed as GNATprove_Mode.
7117 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
7118 tree in GNATprove_Mode.
7119 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
7120 body in GNATprove mode.
7121 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
7123 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
7124 Make sure side effects are removed in GNATprove mode.
7126 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7128 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
7129 for aliased objects with an unconstrained nominal subtype.
7130 * gcc-interface/trans.c (Call_to_gnu): Likewise.
7131 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
7132 <case N_Op_Minus>: Remove useless code.
7133 (Exception_Handler_to_gnu_zcx): Minor tweaks.
7135 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7137 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
7138 Tidy up. For a subtype with discriminants and variant part, if a
7139 variant is statically selected and the fields all have a constant
7140 position, put them in order of increasing position. Likewise if
7141 no variant part but representation clause is present.
7142 * gcc-interface/utils.c (make_packable_type): Robustify.
7143 (maybe_pad_type): Use local variable and tidy up condition. If no
7144 alignment is specified, use the original one.
7145 (create_type_stub_decl): Minor tweak.
7146 (convert) <case VECTOR_CST>: Fix typo.
7147 <case CONSTRUCTOR>: Deal with padding types around the same type.
7148 Do not punt on missing fields.
7149 (unchecked_convert): Call finish_record_type to lay out the special
7150 record types made for conversions from/to problematic integer types.
7151 Bump the alignment of CONSTRUCTORs before converting them to a more
7154 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7156 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
7157 obsolete code for type_annotate_only mode, simplify code and slightly
7158 improve wording of comments.
7160 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
7163 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
7164 as intermediate type.
7165 (UI_To_gnu): Likewise.
7167 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
7169 * gnatvsn.ads (Current_Year): Bump to 2014.
7171 2014-01-02 Tobias Burnus <burnus@net-b.de>
7173 * gnat_ugn.texi: Bump @copying's copyright year.
7175 Copyright (C) 2014 Free Software Foundation, Inc.
7177 Copying and distribution of this file, with or without modification,
7178 are permitted in any medium without royalty provided the copyright
7179 notice and this notice are preserved.