1 2014-07-18 Robert Dewar <dewar@adacore.com>
3 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5 2014-07-18 Pascal Obry <obry@adacore.com>
7 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
8 * a-witeio.adb (Put): On platforms where there is translation
9 done by the OS output the raw text.
10 (New_Line): Use Put above to properly handle the LM wide characters.
12 2014-07-18 Thomas Quinot <quinot@adacore.com>
14 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
17 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
19 * opt.ads (Suppress_Back_Annotation): Remove as unused.
20 * fe.h (Back_Annotate_Rep_Info): Likewise.
21 (Global_Discard_Names): Likewise.
23 2014-07-18 Robert Dewar <dewar@adacore.com>
25 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
28 2014-07-18 Vincent Celier <celier@adacore.com>
30 * s-osinte-vms.ads: Fix style errors.
32 2014-07-18 Thomas Quinot <quinot@adacore.com>
34 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
35 NAME_MAX and PATH_MAX.
37 2014-07-18 Bob Duff <duff@adacore.com>
39 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
40 Build_Record_Or_Elementary_Output_Procedure): For Input and
41 Output attributes, do not read/write the discriminants if they
42 have default values; that will be done by Read/Write.
44 2014-07-18 Robert Dewar <dewar@adacore.com>
46 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
47 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
48 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
49 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
50 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
52 2014-07-18 Robert Dewar <dewar@adacore.com>
54 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
56 2014-07-18 Vincent Celier <celier@adacore.com>
58 * lib-writ.ads: Update documentation about the D lines.
60 2014-07-18 Ed Schonberg <schonberg@adacore.com>
62 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
63 as a parameter, rather than its Chars field, in order to locate
64 freeze node of type. If the predicate or invariant has references
65 to types other than the one to which the contract applies, these
66 types must be frozen, and the corresponding predicate functions
67 created, before that freeze node.
69 2014-07-18 Robert Dewar <dewar@adacore.com>
71 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
72 * par_sco.adb: Minor reformatting.
74 2014-07-18 Gary Dismukes <dismukes@adacore.com>
76 * exp_ch4.adb (Real_Range_Check): Turn off
77 the Do_Range_Check flag on the conversion's current Expression
78 argument rather than on the originally captured Operand node,
79 as Expression may reflect a rewriting (as in conversions to a
82 2014-07-18 Vincent Celier <celier@adacore.com>
84 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
86 * ali.ads (Sdep_Record): New component Unit_Name.
87 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
88 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
89 dependent unit is in a project and the source file name is not
92 2014-07-18 Bob Duff <duff@adacore.com>
94 * s-addima.ads: Minor: add comment.
96 2014-07-18 Thomas Quinot <quinot@adacore.com>
98 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
99 of nesting rules for composites with different SSOs.
101 2014-07-18 Thomas Quinot <quinot@adacore.com>
103 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
104 a proper logical operator.
105 (Has_Decision): An If_Expression indicates the presence of a decision
106 although it is not a logical operator.
108 2014-07-18 Robert Dewar <dewar@adacore.com>
110 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
111 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
113 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
115 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
116 on the null statement.
118 2014-07-18 Thomas Quinot <quinot@adacore.com>
120 * adaint.c: Minor comment rewording.
121 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
122 use of errno in this file is thread safe.
124 2014-07-18 Arnaud Charlet <charlet@adacore.com>
126 * gnat_ugn.texi: Doc clarification.
127 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
128 * sem_ch13.ads: Minor comment update.
130 2014-07-18 Robert Dewar <dewar@adacore.com>
132 * repinfo.ads: Minor comment fix.
134 2014-07-18 Robert Dewar <dewar@adacore.com>
136 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
137 * sem_prag.adb: Add dummy implementation of
138 Default_Scalar_Storage_Order.
139 * snames.ads-tmpl: Add dummy entry for
140 Default_Scalar_Storage_Order pragma.
142 2014-07-18 Robert Dewar <dewar@adacore.com>
144 * opt.adb (Tree_Read): Read Address_Is_Private,
145 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
146 (Tree_Write): Corresponding writes
147 * opt.ads: Minor comment reformatting and fixes.
148 * tree_io.ads: Increment ASIS_Version_Number.
150 2014-07-18 Robert Dewar <dewar@adacore.com>
152 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
155 2014-07-18 Robert Dewar <dewar@adacore.com>
157 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
159 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
161 * sem_ch13.adb (Kill_Rep_Clause): New procedure
162 (Analyze_Attribute_Definition_Clause): Use
163 Kill_Rep_Clause. This is just a cleanup, no functional effect.
164 (Analyze_Enumeration_Representation_Clause):
165 Use Kill_Rep_Clause. This means that enum rep
166 clauses are now properly removed from -gnatct trees.
167 (Analyze_Record_Representation_Clause): Same change.
168 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
170 2014-07-18 Pascal Obry <obry@adacore.com>
172 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
173 OS_Time from time parts.
174 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
176 2014-07-18 Ed Schonberg <schonberg@adacore.com>
178 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
179 indexing over containers that are derived types: check whether
180 signature of found operation has the correct first parameter
181 before retrieving directly a primitive operation.
183 2014-07-18 Ed Schonberg <schonberg@adacore.com>
185 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
186 Do_Range_Check flag on dynamic bounds of a range used in a
187 component association in the argument of Update.
189 2014-07-18 Thomas Quinot <quinot@adacore.com>
191 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
192 accesses to errno(3) to be thread safe.
194 2014-07-18 Vincent Celier <celier@adacore.com>
196 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
197 limited imported project that is an extending project, return
198 a project being extended if it has the expected name.
200 2014-07-18 Pascal Obry <obry@adacore.com>
202 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
203 routine to set the last modification time stamp for the given file.
204 * gnatchop.adb (File_Time_Stamp): Removed.
206 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
208 2014-07-18 Ed Schonberg <schonberg@adacore.com>
210 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
211 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
212 Moved here, so it can be shared with the resolution of 'Update,
213 whose argument shares some features with aggregates.
214 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
215 Aggregate_Constraint_Checks with the expression of each
216 association, so that the Do_Range_Check flag is set when needed.
218 2014-07-18 Ed Schonberg <schonberg@adacore.com>
220 * sem_ch4.adb (Try_Container_Indexing): If the container
221 type is a derived type, the value of the inherited aspect is
222 the Reference operation declared for the parent type. However,
223 Reference is also a primitive operation of the new type, and
224 the inherited operation has a different signature. We retrieve
225 the right one from the list of primitive operations of the
228 2014-07-18 Vincent Celier <celier@adacore.com>
230 * debug.adb: Update comment.
232 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
234 * exp_util.adb (Needs_Finalization): There is no reason why a
235 C type should not benefit from finalization actions.
237 2014-07-18 Thomas Quinot <quinot@adacore.com>
239 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
240 (FILENAME_MAX): Remove unneeded definition.
242 2014-07-18 Robert Dewar <dewar@adacore.com>
244 * exp_attr.adb, debug.adb: Update comments.
246 2014-07-18 Vincent Celier <celier@adacore.com>
248 * par-ch4.adb (Simple_Expression): Add missing style check
249 for binary adding operators.
250 (Term): Add missing style check for multiplying operators.
252 2014-07-18 Robert Dewar <dewar@adacore.com>
254 * impunit.adb: Minor comment correction.
255 * widechar.adb, s-wchcon.ads: Minor comment corrections.
257 2014-07-18 Robert Dewar <dewar@adacore.com>
259 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
260 for Build_Static_Predicate (Build_Predicate_Functions):
261 Don't try to build discrete predicate for real type.
262 (Build_Predicate_Functions): Report attempt to use
263 Static_Predicate function on real type as unimplemented.
264 * sem_util.adb (Check_Expression_Against_Static_Predicate):
265 Add guard to prevent blow up on predicate for real type.
267 2014-07-18 Ed Schonberg <schonberg@adacore.com>
269 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
270 properly static predicate on enumeration types and modular types
273 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
275 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
276 the corresponding source file index.
277 * get_scos.ads (Get_SCOs): Add a default value for it.
278 * par_sco.adb (SCO_Record): Fill the corresponding value.
281 2014-07-18 Vincent Celier <celier@adacore.com>
283 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
284 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
286 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
288 2014-07-18 Thomas Quinot <quinot@adacore.com>
290 * g-sercom.ads (Set): document possible data loss.
292 2014-07-18 Ed Schonberg <schonberg@adacore.com>
294 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
295 Output, Read, Write): If the restriction No_Streams is active,
296 replace each occurrence of a stream attribute by an explicit
299 2014-07-18 Robert Dewar <dewar@adacore.com>
301 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
304 2014-07-18 Robert Dewar <dewar@adacore.com>
306 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
308 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
309 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
310 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
311 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
313 2014-07-18 Robert Dewar <dewar@adacore.com>
315 * bcheck.adb (Check_Consistent_Restrictions):
316 Remove obsolete code checking for violation of
317 No_Standard_Allocators_After_Elaboration (main program)
318 * bindgen.adb (Gen_Adainit): Handle
319 No_Standard_Allocators_After_Elaboration
320 (Gen_Output_File_Ada): ditto.
321 * exp_ch4.adb (Expand_N_Allocator): Handle
322 No_Standard_Allocators_After_Elaboration.
323 * Makefile.rtl: Add entry for s-elaall
324 * rtsfind.ads: Add entry for Check_Standard_Allocator.
325 * s-elaall.ads, s-elaall.adb: New files.
326 * sem_ch4.adb (Analyze_Allocator): Handle
327 No_Standard_Allocators_After_Elaboration.
329 2014-07-18 Robert Dewar <dewar@adacore.com>
331 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
332 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
333 Remove AB parameter from ali files and all uses.
334 Remove Allocator_In_Body and all uses.
336 2014-07-18 Robert Dewar <dewar@adacore.com>
338 * g-expect-vms.adb: Add comment.
340 2014-07-18 Thomas Quinot <quinot@adacore.com>
342 * par_sco.adb (Is_Logical_Operation): return True for
345 2014-07-18 Ed Schonberg <schonberg@adacore.com>
347 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
348 analysis and resolution of each choice in the associations within
349 the argument of Update, because they may be variable names.
351 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
353 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
354 actions before the generated if statement.
356 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
358 * gnat_ugn.texi Enhance the documentation of
359 switches -gnateA and -gnateV.
361 2014-07-18 Ed Schonberg <schonberg@adacore.com>
363 * sem_util.adb (Build_Default_Subtype): Add missing condition
364 so that code matches description: use the full view of the base
365 only if the base is private and the subtype is not.
367 2014-07-17 Gary Dismukes <dismukes@adacore.com>
369 * exp_disp.adb: Minor reformatting.
370 * exp_disp.adb: Minor code reorganization.
372 2014-07-17 Thomas Quinot <quinot@adacore.com>
374 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
375 require an explicit SSO attribute definition clause on a composite type
376 just because one of its components has one.
378 2014-07-17 Robert Dewar <dewar@adacore.com>
380 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
381 attribute out of existence if the enclosing pragma is ignored.
382 * sem_util.adb: Minor reformatting.
384 2014-07-17 Ed Schonberg <schonberg@adacore.com>
386 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
387 array aggregate expanded into assignments when it appears as a
388 local declaration in an inlined body.
390 2014-07-17 Doug Rupp <rupp@adacore.com>
392 * init.c [__ANDROID__]: Modify for ZCX.
393 * exp_aggr.adb: Minor reformatting
394 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
396 2014-07-17 Robert Dewar <dewar@adacore.com>
398 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
399 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
400 scng.adb: Remove incorrect usage "allow to" and "allows to".
402 2014-07-17 Robert Dewar <dewar@adacore.com>
404 * exp_dist.adb: Minor reformatting.
406 2014-07-17 Bob Duff <duff@adacore.com>
408 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
410 2014-07-17 Robert Dewar <dewar@adacore.com>
412 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
413 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
415 2014-07-17 Thomas Quinot <quinot@adacore.com>
417 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
418 non-bit-packed array, propagate Reverse_Storage_Order to the
421 2014-07-17 Javier Miranda <miranda@adacore.com>
423 * exp_disp.adb: Fix comment.
424 * exp_pakd.adb: Minor reformatting.
426 2014-07-17 Robert Dewar <dewar@adacore.com>
428 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
429 entity if none exists (Gen_Elab_Calls): Complain if clash with
430 No_Multiple_Elaboration.
431 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
432 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
434 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
435 * sem_ch4.adb: Minor comment updates.
437 2014-07-17 Ed Schonberg <schonberg@adacore.com>
439 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
440 of function call for later use when shared passive objects
443 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
445 * par-ch13.adb (Get_Aspect_Specifications):
446 Catch a case where the argument of SPARK aspect Refined_State
447 is not properly parenthesized.
449 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
451 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
452 the lifetime of a reference to an Ada 2012 container element.
453 (Is_Element_Reference): New routine.
455 2014-07-17 Robert Dewar <dewar@adacore.com>
457 * ali.ads: Minor comment fix.
458 * lib-writ.adb: Minor reformatting.
460 2014-07-17 Ed Schonberg <schonberg@adacore.com>
462 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
463 in ASIS mode, load another subunit only if it a subunit of the
464 current one, not a sibling that has been reached through the
465 analysis of an ancestor. This allows the construction of the
466 ASIS tree for the subunit even when sibling subunits have errors.
468 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
470 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
471 prevents the analysis of various contracts when the associated
472 construct is erroneous.
473 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
474 SPARK_Pragma of an illegal or a partially decorated construct.
476 2014-07-17 Robert Dewar <dewar@adacore.com>
478 * s-imguns.ads: Minor reformatting.
480 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
482 * exp_ch7.adb (Build_Finalization_Master): Move all local
483 variables to the proper code section. When looking for an existing
484 finalization master, inspect the ultimate ancestor type of the
486 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
488 2014-07-17 Robert Dewar <dewar@adacore.com>
490 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
491 * gnat_rm.texi: Document Entity argument for pragma Annotate and
493 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
495 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
496 Entity argument at end.
497 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
499 2014-07-17 Tristan Gingold <gingold@adacore.com>
501 * s-imguns.ads: Fix minor typo.
503 2014-07-17 Thomas Quinot <quinot@adacore.com>
505 * sprint.adb: Minor reformatting.
507 2014-07-17 Robert Dewar <dewar@adacore.com>
509 * sprint.adb (Write_Itype): Print proper header for string
512 2014-07-17 Steve Baird <baird@adacore.com>
514 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
516 2014-07-17 Vincent Celier <celier@adacore.com>
518 * gnatbind.adb: Change in message "try ... for more information".
520 2014-07-17 Robert Dewar <dewar@adacore.com>
522 * sprint.adb: Code clean up.
524 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
526 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
527 the relevant code section. Add new local constant Obj_Id. When
528 a limited controlled object is initialized by a function call,
529 the build-in-place object access function call acts as the last
530 initialization statement.
531 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
532 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
533 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
535 2014-07-17 Ed Schonberg <schonberg@adacore.com>
537 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
538 propagate intrinsic flag to renamed entity, to allow e.g. renaming
539 of Unchecked_Conversion.
540 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
541 if the declaration has errors.
543 2014-07-17 Ed Schonberg <schonberg@adacore.com>
545 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
546 container is busy before checking whether capacity allows for
547 a further insertion. Insertion in a busy container that is full
548 raises Program_Error rather than Capacity_Error. Previous to that
549 patch which exception was raised varied among container types.
551 2014-07-17 Robert Dewar <dewar@adacore.com>
553 * g-comlin.ads, g-comlin.adb: Minor clean up.
555 2014-07-17 Bob Duff <duff@adacore.com>
557 * gnat_ugn.texi: Update gnatpp doc.
559 2014-07-17 Robert Dewar <dewar@adacore.com>
561 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
562 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
563 could do this by actually expanding a real generic.
564 * a-tags.ads: Add comments about performance.
565 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
566 Print Etype of defining identifier, rather than the object
567 definition. More information.
569 2014-07-17 Thomas Quinot <quinot@adacore.com>
571 * exp_dist.adb: Minor documentation clarification.
573 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
575 * exp_util.adb (Is_Aliased): Revert previous change.
577 2014-07-17 Vincent Celier <celier@adacore.com>
579 * g-comlin.adb (Try_Help): New procedure.
580 (Getopt): Use new procedure Try_Help.
581 * g-comlin.ads (Try_Help): New procedure.
583 2014-07-17 Bob Duff <duff@adacore.com>
585 * gnat_ugn.texi: Minor update.
587 2014-07-17 Robert Dewar <dewar@adacore.com>
589 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
590 * sinfo.ads: Document restriction on aggregates (must expand to
591 assignments if one or more assignments needs expansion, e.g. for
593 * sem_ch13.adb: All warning messages regarding bit order should
595 * gnat_ugn.texi: Minor correction of missing @ on @code
597 2014-07-17 Robert Dewar <dewar@adacore.com>
599 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
600 * s-rident.ads (Partition_Boolean_Restrictions): Add
601 No_Long_Long_Integer.
602 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
603 Long_Integer'Size if restriction No_Long_Long_Integer is active.
604 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
605 as the implicit base type for a signed integer type declaration
606 if restriction No_Long_Long_Integer is active.
607 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
608 No_Long_Long_Integer.
610 2014-07-17 Robert Dewar <dewar@adacore.com>
612 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
613 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
614 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
615 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
616 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
618 2014-07-17 Robert Dewar <dewar@adacore.com>
620 * debug.adb: Remove -gnatdQ.
621 * exp_disp.adb: Remove -gnatdQ.
622 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
623 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
624 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
625 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
626 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
627 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
629 2014-07-17 Robert Dewar <dewar@adacore.com>
631 * back_end.adb: Minor reformatting and comment additions.
632 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
634 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
635 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
636 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
637 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
638 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
639 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
641 2014-07-17 Robert Dewar <dewar@adacore.com>
643 * gnat_rm.texi: Minor comment updates.
645 2014-07-17 Ed Schonberg <schonberg@adacore.com>
647 * sem_util.adb (Make_Explicit_Dereference): If the expression
648 being dereferenced is a generalized indexing, reset the overloaded
649 flag on the generalized indexing call, consistent with the
650 resetting of the flag on the original indexed component.
652 2014-07-17 Robert Dewar <dewar@adacore.com>
654 * gnat_ugn.texi: Document advise not to mix -gnatV? and
657 2014-07-17 Robert Dewar <dewar@adacore.com>
659 * checks.adb (Insert_Valid_Check): Don't insist on a name
660 for the prefix when we make calls to Force_Evaluation and
661 Duplicate_Subexpr_No_Checks.
662 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
663 (Remove_Side_Effects): Handle all volatile references right
664 (Side_Effect_Free): Volatile reference is never side effect free
665 * sinfo.ads (N_Attribute_Reference): Add comments explaining
666 that in the tree, the prefix can be a general expression.
668 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
670 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
671 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
672 * sem_ch7.adb (Analyze_Package_Body_Contract,
673 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
675 2014-07-17 Robert Dewar <dewar@adacore.com>
677 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
678 Store_After_Actions_In_Scope.
680 2014-07-17 Robert Dewar <dewar@adacore.com>
682 * sem_aux.ads: Minor comment addition.
684 2014-07-17 Ed Schonberg <schonberg@adacore.com>
686 * sem_res.adb (Make_Call_Into_Operator): If the call is already
687 a rewriting of an operator node, there are no actuals to be
688 propagated from original node to rewritten node when in ASIS mode.
690 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
692 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
693 Analyze_Subprogram_Contract): Add new local variable Mode. Save
694 and restore the SPARK mode of the related construct in a
696 * sem_ch7.adb (Analyze_Package_Body_Contract,
697 Analyze_Package_Contract): Add new local variable Mode. Save and
698 restore the SPARK mode of the related construct in a stack-like fashion.
699 * sem_util.adb Remove with and use clause for Opt.
700 (Restore_SPARK_Mode): New routine.
701 (Save_SPARK_Mode_And_Set): New routine.
702 * sem_util.ads Add with and use clause for Opt.
703 (Restore_SPARK_Mode): New routine.
704 (Save_SPARK_Mode_And_Set): New routine.
706 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
708 * exp_util.adb (Is_Aliased): Transient objects
709 within an expression with actions cannot be considered aliased.
711 2014-07-17 Thomas Quinot <quinot@adacore.com>
713 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
714 introduce a new list (cleanup actions) for each (transient) scope.
715 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
717 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
718 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
719 processing for Store_xxx_Actions_In_Scope.
720 (Build_Cleanup_Statements): Allow for a list of additional
721 cleanup statements to be passed by the caller.
722 (Expand_Cleanup_Actions): Take custom cleanup actions associated
723 with an N_Block_Statement into account.
724 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
725 reorganization (refactoring only, no behaviour change).
726 (Make_Transient_Block): Add assertion to ensure that the current
727 scope is indeed a block (namely, the entity for the transient
728 block being constructed syntactically, which has already been
729 established as a scope). If cleanup actions are present in the
730 transient scope, transfer them now to the transient block.
731 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
732 called function while it is still present as the name in a call
733 in the tree. This may not be the case later on if the call is
734 rewritten into a transient block.
735 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
736 inserted after calling a protected operation on a shared passive
737 protected must be performed in a block finalizer, not just
738 inserted in the tree, so that they are executed even in case of
739 a normal (RETURN) or abnormal (exception) transfer of control
740 outside of the current scope.
741 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
742 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
743 Scope_Stack_Entry reorganization.
745 2014-07-17 Thomas Quinot <quinot@adacore.com>
747 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
748 call for types that do not have an explicit attribute definition
749 clause for External_Tag, as their default tag may clash with an
750 explicit tag defined for some other type.
752 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
754 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
755 controlled function call with multiple actual parameters that
756 appears in Object.Operation form.
758 2014-07-17 Thomas Quinot <quinot@adacore.com>
760 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
762 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
763 External_Tag): No need to set entity flag.
764 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
765 Reimplement correctly in terms of Has_Rep_Item.
767 2014-07-17 Thomas Quinot <quinot@adacore.com>
769 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
770 Start examining the tree at the node passed to
771 Establish_Transient_Scope (not its parent).
772 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
773 The access type for the variable storing the reference to
774 the call must be declared and frozen prior to establishing a
776 * exp_ch9.adb: Minor reformatting.
778 2014-07-17 Pascal Obry <obry@adacore.com>
780 * s-os_lib.ads: Minor comment update.
782 2014-07-17 Tristan Gingold <gingold@adacore.com>
784 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
786 * socket.c: Remove #warning to avoid warning.
787 * expect.c: Indent some preprocessor directives to clarify
788 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
790 * env.c: Fix indentation. Port to PikeOS.
791 * gsocket.h: Port to PikeOS. Remove #warning.
792 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
793 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
794 of stubbed __gnat_setup_parent_communication.
795 * adaint.c: Port to PikeOS. Reindent some preprocessor
796 directives to clarify nested if. Fix indentation. Add missing
799 2014-07-17 Robert Dewar <dewar@adacore.com>
801 * sem_attr.adb: Minor reformatting.
803 2014-07-17 Robert Dewar <dewar@adacore.com>
805 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
807 2014-07-17 Ed Schonberg <schonberg@adacore.com>
809 * sem_case.adb (Check_Choice_Set): If the case expression is the
810 expression in a predicate, do not recheck coverage against itself,
811 to prevent spurious errors.
812 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
813 expression comes from an aspect specification, to prevent spurious
814 errors when expression is a case expression in a predicate.
816 2014-07-17 Pascal Obry <obry@adacore.com>
818 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
819 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
821 2014-07-17 Vincent Celier <celier@adacore.com>
823 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
824 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
825 the usage for an erroneous invocation of a gnat tool.
827 2014-07-16 Vincent Celier <celier@adacore.com>
829 * gnatls.adb: Get the target parameters only if -nostdinc was
832 2014-07-16 Ed Schonberg <schonberg@adacore.com>
834 * checks.adb (Insert_Valid_Check): If the expression is a packed
835 component of a modular type of the right size the data is always
836 valid. This os particularly useful if the component is part of
839 2014-07-16 Robert Dewar <dewar@adacore.com>
841 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
843 2014-07-16 Thomas Quinot <quinot@adacore.com>
845 * exp_ch7.ads: Minor documentation fix.
847 2014-07-16 Ed Schonberg <schonberg@adacore.com>
849 * sem_ch3.adb (Find_Type_Name): Diagnose properly
850 a private extension completion that is an interface definition
851 with an interface list.
853 2014-07-16 Arnaud Charlet <charlet@adacore.com>
855 * gnatls.adb (Gnatls): Code clean ups.
857 2014-07-16 Thomas Quinot <quinot@adacore.com>
859 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
860 * sem.adb (Analyze): Handle N_Compound_Statement.
861 * sprint.adb (Sprint_Node_Actual): Ditto.
862 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
863 procedure to handle N_Compound_Statement.
864 * exp_aggr.adb (Collect_Initialization_Statements):
865 Use a proper compound statement node, instead of a bogus
866 expression-with-actions with a NULL statement as its expression,
867 to wrap collected initialization statements.
868 * freeze.ads, freeze.adb
869 (Explode_Initialization_Compound_Statement): New public procedure,
870 lifted from Freeze_Entity.
871 (Freeze_Entity): When freezing
872 an object with captured initialization statements and without
873 delayed freezing, explode compount statement.
874 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
875 case that used to handle bogus EWAs with NULL statement as
877 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
878 delayed freezing and captured initialization statements, explode
881 2014-07-16 Gary Dismukes <dismukes@adacore.com>
883 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
885 2014-07-16 Doug Rupp <rupp@adacore.com>
887 * s-interr-hwint.adb: Casing error on parameter.
889 2014-07-16 Pascal Obry <obry@adacore.com>
891 * Makefile.rtl: Add g-rewdat.o dependencies in
892 GNATRTL_NONTASKING_OBJS.
894 2014-07-16 Ed Schonberg <schonberg@adacore.com>
896 * sem_case.adb: Code clean up.
898 2014-07-16 Vincent Celier <celier@adacore.com>
900 * make.adb: Do not read gnat.adc when gnatmake is invoked
903 2014-07-16 Pascal Obry <obry@adacore.com>
905 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
906 implementation of GNAT.Rewrite_Data.
908 2014-07-16 Vincent Celier <celier@adacore.com>
910 * gnatls.adb (Normalize): New function.
911 (Gnatls): Get the target parameters. On targets other than VMS,
912 normalize the path names in the source search path, the object search
913 path and the project search path.
915 2014-07-16 Ed Schonberg <schonberg@adacore.com>
917 * sem_case.adb: Avoid self-checking of case expressions in
920 2014-07-16 Robert Dewar <dewar@adacore.com>
922 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
925 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
927 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
929 2014-07-16 Ben Brosgol <brosgol@adacore.com>
931 * gnat_ugn.texi: Fix typo.
933 2014-07-16 Ed Schonberg <schonberg@adacore.com>
935 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
936 expression if it is the specification of a subtype predicate:
937 it will be expanded when the return statement is analyzed, or
938 when a static predicate is transformed into a static expression
939 for evaluation by the front-end.
940 * sem_ch13.adb (Get_RList): If the expression for a static
941 predicate is a case expression, extract the alternatives of the
942 branches with a True value to create the required statically
943 evaluable expression.
945 2014-07-16 Thomas Quinot <quinot@adacore.com>
947 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
948 expression, not the location of the aspect, for all generated
949 code, so that in particular the call to raise_assert_failure
950 gets the sloc of the associated condition.
952 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
953 Set an explicit End_Label on the handled sequence of statements
954 for the _Postconditions procedure so that the implicit return
955 statement does not erroneously get associated with code generated
956 for the last condition in postconditions.
958 2014-07-16 Thomas Quinot <quinot@adacore.com>
960 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
961 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
962 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
965 2014-07-16 Robert Dewar <dewar@adacore.com>
967 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
968 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
969 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
971 * par-ch4.adb (At_Start_Of_Attribute): New function
972 (P_Simple_Expression): Better msg for bad attribute prefix.
973 * scans.ads: Minor reformatting.
975 2014-07-16 Ed Schonberg <schonberg@adacore.com>
977 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
978 static constant, check that in belongs to the corresponding index
979 subtype, to produce the proer warning when expansion is disabled.
981 2014-07-16 Robert Dewar <dewar@adacore.com>
983 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
984 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
985 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
986 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
987 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
989 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
990 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
993 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
995 * exp_ch7.adb (Process_Declarations): Reinstate the check on
996 a hook object to ensure that the related transient declaration
998 * exp_util.adb (Is_Aliased): Do not consider expresison with
999 actions as a special context.
1000 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
1001 ensure that the related transient declaration is finalizable.
1003 2014-07-16 Robert Dewar <dewar@adacore.com>
1005 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
1006 * snames.ads-tmpl: Add Allocation_Check to list of check names.
1007 * types.ads: Add Allocation_Check to list of check names.
1009 2014-07-16 Thomas Quinot <quinot@adacore.com>
1011 * sem_util.adb (Enter_Name): replace bogus test for presence of
1012 Corresponding_Remote_Type with correct test on Ekind.
1013 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
1014 of calls to Corresponding_ Remote_Type (documentation fix).
1016 2014-07-16 Robert Dewar <dewar@adacore.com>
1018 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
1019 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
1021 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
1022 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
1024 2014-07-16 Robert Dewar <dewar@adacore.com>
1026 * gnat_ugn.texi: Document binder switch -Ra.
1027 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
1029 * opt.ads (List_Closure_All): New switch.
1030 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
1033 2014-07-16 Ben Brosgol <brosgol@adacore.com>
1035 * gnat_rm.texi: Minor edits, to make case consistent in names
1036 of types and fields.
1038 2014-07-16 Robert Dewar <dewar@adacore.com>
1040 * gnat_rm.texi: Document erroneous mixing of thin pointers and
1042 * gnat_ugn.texi: Add note on size of access types about thin
1043 pointers and the use of attribute Unrestricted_Access.
1045 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1047 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
1048 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
1049 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
1050 machinery to detect tampering on bounded vectors.
1052 2014-07-16 Robert Dewar <dewar@adacore.com>
1054 * gnat_rm.texi: Document that leading/trailing asterisks are
1055 now implied for the pattern match string for pragma Warnings
1056 and Warning_As_Error.
1057 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
1058 (Analyze_Pragma, case Warning_As_Error): Call
1059 Acquire_Warning_Match_String.
1060 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
1062 2014-07-16 Bob Duff <duff@adacore.com>
1064 * gnat_ugn.texi: Document need for project file
1065 for --incremental switch for gnat2xml.
1067 2014-07-16 Robert Dewar <dewar@adacore.com>
1069 * gnat_rm.texi: Fix example of non-packable components in packed
1072 2014-07-16 Robert Dewar <dewar@adacore.com>
1074 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
1075 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
1076 upper case in exception messages.
1078 2014-07-16 Robert Dewar <dewar@adacore.com>
1080 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
1081 is renamed Has_Same_Storage.
1082 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
1083 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
1086 2014-07-16 Robert Dewar <dewar@adacore.com>
1088 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
1089 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
1091 2014-07-16 Robert Dewar <dewar@adacore.com>
1093 * gnat_ugn.texi: Add note that integrated
1094 preprocessing cannot be applied to configuration pragma files.
1096 2014-07-16 Yannick Moy <moy@adacore.com>
1098 * sem_attr.adb (Analyze_Attribute/cases Pred
1099 and Succ): Always enable range check on fixed-point types if
1100 not suppressed for the type.
1102 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1104 * sem_util.adb (State_Has_Enabled_Property):
1105 Account for an external property denoted by an others choice.
1107 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1109 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
1110 * exp_ch7.adb (Process_Declarations): There is no need to check
1111 that a transient object being hooked is controlled as it would
1112 not have been hooked in the first place.
1113 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
1114 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
1115 (Is_Aliased): A renaming of a transient controlled object is
1116 not considered aliasing when it occurs within an expression
1118 (Requires_Cleanup_Actions): There is no need to
1119 check that a transient object being hooked is controlled as it
1120 would not have been hooked in the first place.
1121 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
1123 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1125 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
1126 the outer level of routine Analyze_Aspect_Specifications. Ensure
1127 that the corresponding pragmas of aspects Initial_Condition and
1128 Initializes are inserted after pragma SPARK_Mode.
1130 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1132 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
1133 properly a choice list with more than one choice, where each
1134 is an aggregate denoting a sequence of array indices for a
1135 multidimentional array. For SPARK use.
1137 2014-07-16 Vadim Godunko <godunko@adacore.com>
1139 * a-coinho-shared.adb (Adjust): Create
1140 copy of internal shared object and element when source container
1143 (Query_Element): Likewise.
1144 (Update_Element): Likewise.
1145 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
1146 to get reference for empty holder.
1147 (Reference): Likewise.
1149 2014-07-16 Thomas Quinot <quinot@adacore.com>
1151 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
1152 from Process_Transient_Oject.
1153 * exp_ch4.ads: Ditto.
1154 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
1155 declaration as an action on the topmost enclosing expression,
1156 not on a possibly conditional subexpreession.
1158 2014-07-16 Vadim Godunko <godunko@adacore.com>
1160 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
1161 Fix parameter mode of Update_Element.
1163 2014-07-16 Robert Dewar <dewar@adacore.com>
1165 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
1168 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1170 * a-cohase.ads: Type Iterator must be controlled, so that the
1171 tampering bit is properly set through an iteration.
1172 * a-cohase.adb: Add Finalize operation for type Iterator.
1174 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1176 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
1179 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1181 * a-coinho-shared.adb: Fix spurious accessibility check.
1183 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1185 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
1187 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1190 * gnat_rm.texi: Fix errors with makeinfo 5.1.
1192 2014-06-14 Arnaud Charlet <charlet@adacore.com>
1195 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
1197 2014-06-13 Yannick Moy <moy@adacore.com>
1199 * exp_attr.adb: Fix typo in comment.
1200 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
1201 checking in GNATprove_Mode.
1203 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1205 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
1207 2014-06-13 Robert Dewar <dewar@adacore.com>
1209 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
1212 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1214 * sem_prag.adb (Analyze_Pragma): Add local
1215 variable Missing_Parentheses. Emit an error when a state
1216 declaration with options appears without parentheses. Add a
1217 guard to prevent a bogus error when a state declaration may be
1218 interpreted as an option if a previous declaration with options
1219 was not parenthesized.
1221 2014-06-13 Robert Dewar <dewar@adacore.com>
1223 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
1224 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
1225 * checks.ads (Alignment_Warnings_Record): New type.
1226 (Alignment_Warnings): New table
1227 (Validate_Alignment_Check_Warnings): New procedure.
1228 * errout.adb (Delete_Warning_And_Continuations): New procedure
1229 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
1230 Warnings_Treated_As_Errors (Finalize): Minor reformatting
1231 * errout.ads (Warning_Msg): New variable
1232 (Delete_Warning_And_Continuations): New procedure
1233 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
1234 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
1236 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1238 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
1240 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1242 * errout.adb (SPARK_Msg_N): New routine.
1243 (SPARK_Msg_NE): New routine.
1244 * errout.ads Add a section on SPARK-related error routines.
1245 (SPARK_Msg_N): New routine.
1246 (SPARK_Msg_NE): New routine.
1247 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
1248 pragma Abstract_State is always inserted after SPARK_Mode.
1249 (Insert_After_SPARK_Mode): New routine.
1250 * sem_prag.adb (Analyze_Abstract_State,
1251 Analyze_Constituent, Analyze_External_Property,
1252 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
1253 Analyze_Global_List, Analyze_Initialization_Item,
1254 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
1255 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
1256 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
1257 Analyze_Refined_Global_In_Decl_Part,
1258 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
1259 Check_Aspect_Specification_Order, Check_Constituent_Usage,
1260 Check_Declaration_Order, Check_Dependency_Clause,
1261 Check_Duplicate_Mode, Check_Duplicate_Option,
1262 Check_Duplicate_Property, Check_External_Properties,
1263 Check_External_Property, Check_Function_Return,
1264 Check_Matching_Constituent, Check_Matching_State,
1265 Check_Mode_Restriction_In_Enclosing_Context,
1266 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
1267 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
1268 Has_Extra_Parentheses, Inconsistent_Mode_Error,
1269 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
1270 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
1271 Report_Unrefined_States, Report_Unused_Constituents,
1272 Report_Unused_States, Role_Error, Usage_Error):
1273 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
1274 to report semantic errors only when SPARK_Mode is on.
1275 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
1276 pragma Depends explicitly, this is now done by the analysis.
1277 (Analyze_Global_In_Decl_List): Do not check the syntax of
1278 pragma Global explicitly, this is now done by the analysis.
1279 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
1280 pragma Initializes explicitly, this is now done by the analysis.
1281 (Analyze_Part_Of): Do not check the syntax of the encapsulating
1282 state, this is now done by the analysis.
1283 (Analyze_Pragma): Do
1284 not check the syntax of a state declaration, this is now done
1286 (Analyze_Refined_Depends_In_Decl_Part): Do not
1287 check the syntax of pragma Refined_Depends explicitly, this is now
1288 done by the analysis.
1289 (Analyze_Refined_Global_In_Decl_Part): Do
1290 not check the syntax of pragma Refined_Global explicitly, this is
1291 now done by the analysis.
1292 (Analyze_Refined_State_In_Decl_Part):
1293 Do not check the syntax of pragma Refined_State explicitly, this
1294 is now done by the analysis.
1295 (Check_Dependence_List_Syntax): Removed.
1296 (Check_Global_List_Syntax): Removed.
1297 (Check_Initialization_List_Syntax): Removed.
1298 (Check_Item_Syntax): Removed.
1299 (Check_Missing_Part_Of): Do not consider items from an instance.
1300 (Check_Refinement_List_Syntax): Removed.
1301 (Check_State_Declaration_Syntax): Removed.
1302 (Collect_Global_List): Do not raise Program_Error when the input is
1304 (Process_Global_List): Do not raise Program_Error when the input
1306 * sem_ch13.adb: Minor reformatting.
1308 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1310 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
1311 that is an interface definition with an interface list.
1312 (Process_Full_View): Move error message on missmatched interfaces
1313 between views to the declaration of full view, for clarity.
1314 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
1317 2014-06-13 Robert Dewar <dewar@adacore.com>
1319 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
1322 2014-06-13 Robert Dewar <dewar@adacore.com>
1324 * makeutl.adb: Minor reformatting.
1326 2014-06-13 Gail Schenker <schenker@adacore.com>
1328 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
1329 associated flag (d.z), no longer needed.
1331 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1333 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
1334 Export aspects, do not check whether a corresponding Convention
1335 aspect has been specified. Convention is optional in Ada2012,
1336 and defaults to Convention_Ada.
1338 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
1340 * checks.adb (Apply_Address_Clause_Check): Only issue the new
1341 warning if the propagation warning is issued.
1343 2014-06-13 Thomas Quinot <quinot@adacore.com>
1345 * exp_ch4.adb: Minor reformatting.
1347 2014-06-13 Robert Dewar <dewar@adacore.com>
1349 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
1350 Handle float range check case (Expand_N_Attribute_Reference,
1351 case Succ): Handle float range check case.
1352 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
1355 2014-06-13 Vincent Celier <celier@adacore.com>
1357 * makeutl.ads (Compute_Builder_Switches): Change name of
1358 parameter Root_Environment to Env.
1359 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
1360 Env parameter of procedure Get_Or_Create_Configuration_File.
1361 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
1362 of new parameter Env.
1363 * prj-conf.ads (Locate_Runtime): New parameter Env of type
1364 Prj.Tree.Environment.
1366 2014-06-13 Robert Dewar <dewar@adacore.com>
1368 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
1370 2014-06-13 Robert Dewar <dewar@adacore.com>
1372 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
1374 * sem_attr.adb: Minor code reformatting and simplification.
1375 * checks.adb: Fix minor typo.
1377 2014-06-13 Emmanuel Briot <briot@adacore.com>
1379 * g-comlin.adb (Get_Argument): fix expansion
1380 of command line arguments (e.g. "*.adb") when using a custom
1381 parser. The parser was not passed to the recursive call, and
1382 thus we were trying to do the expansion on the default command
1385 2014-06-13 Thomas Quinot <quinot@adacore.com>
1387 * exp_ch9.adb: Minor reformatting.
1389 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1391 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
1392 To determine whether the attribute should be expanded, examine
1393 whether the enclosing postcondition pragma is to be checked,
1394 rather than using the internal flag Assertions_Enabled.
1396 2014-06-13 Ben Brosgol <brosgol@adacore.com>
1398 * gnat_rm.texi: Minor fixes.
1399 * gnat_ugn.texi: Added a missing "@itemize".
1401 2014-06-13 Robert Dewar <dewar@adacore.com>
1403 * debug.adb: Remove -gnatd.1 flag documentation.
1404 * layout.adb (Layout_Type): Remove special handling of size
1405 for anonymous access type.
1406 * sem_ch3.adb (Replace_Type): Remove special handling of size
1407 for anonymous access type.
1409 2014-06-13 Robert Dewar <dewar@adacore.com>
1411 * debug.adb: Document debug flag -gnatd.1.
1412 * layout.adb (Layout_Type): Size change for anonymous access
1413 types under -gnatd.1.
1414 * sem_ch3.adb (Replace_Type): Size change for anonymous access
1415 types under -gnatd.1.
1417 2014-06-13 Robert Dewar <dewar@adacore.com>
1419 * layout.adb (Layout_Type): Anonymous access types designating
1420 unconstrained arrays are always thin pointers.
1421 * sem_ch3.adb (Replace_Type): Anonymous access types designating
1422 unconstrained arrays are always thin pointers.
1424 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1426 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
1427 to resolve the prefix of an attribute that is an entity name
1428 and may be a parameterless call. Minor code reorganization.
1430 2014-06-13 Robert Dewar <dewar@adacore.com>
1432 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
1434 * opt.ads (Compiler_Unit): New flag.
1435 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
1436 for null statement sequence (not allowed in compiler unit).
1437 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
1439 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
1441 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
1442 Check_Compiler_Unit.
1443 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
1444 Check_Compiler_Unit (this construct is not allowed in compiler
1446 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
1447 Set Opt.Compiler_Unit.
1449 2014-06-13 Geert Bosch <bosch@adacore.com>
1451 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
1452 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
1453 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
1455 2014-06-13 Robert Dewar <dewar@adacore.com>
1457 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
1459 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1461 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
1462 types in SPARK as it is poorly placed and poorly formulated. The
1463 check was flagging ALL volatile entities as illegal in SPARK.
1464 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
1465 types as illegal in SPARK.
1467 2014-06-13 Robert Dewar <dewar@adacore.com>
1469 * sem_cat.adb: Minor reformatting.
1471 2014-06-13 Yannick Moy <moy@adacore.com>
1473 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
1475 2014-06-13 Arnaud Charlet <charlet@adacore.com>
1477 * gnat_rm.texi: Add detail on SPARK_05 restriction.
1479 2014-06-13 Bob Duff <duff@adacore.com>
1481 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
1482 Add assertions requiring the secondary stack to be initialized.
1483 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
1484 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
1485 secondary stack is initialized before calling Init_Tasking_Soft_Links,
1486 by adding pragmas Elaborate_Body.
1488 2014-06-13 Thomas Quinot <quinot@adacore.com>
1490 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
1491 kludge disabling new legality check.
1493 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1495 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
1497 (Freeze_Type): Volatile types are now illegal in SPARK.
1499 2014-06-13 Robert Dewar <dewar@adacore.com>
1501 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
1502 * gnat_rm.texi: Document aspect Thread_Local_Storage.
1504 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1506 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
1507 value is a temporary that renames an aggregate is legal in a
1508 preelaborated unit. Illegalities, if any will be detected in
1509 the aggregate components.
1511 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1513 * einfo.ads: Minor reformatting an comment expansion.
1515 2014-06-13 Robert Dewar <dewar@adacore.com>
1517 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
1519 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
1521 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
1522 * sem_warn.adb: Minor reformatting.
1524 2014-06-13 Doug Rupp <rupp@adacore.com>
1526 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
1529 2014-06-13 Yannick Moy <moy@adacore.com>
1531 * sem_warn.adb (Check_Unset_References): Take
1532 case of Refined_Post into account in Within_Postcondition check.
1534 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1536 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
1539 2014-06-13 Yannick Moy <moy@adacore.com>
1541 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
1542 Aspect_Export): Consider that variables may be set outside the program.
1544 2014-06-13 Robert Dewar <dewar@adacore.com>
1546 * back_end.adb (Make_Id): New function.
1547 (Make_SC): New function.
1548 (Set_RND): New procedure.
1549 * back_end.ads (Make_Id): New function.
1550 (Make_SC): New function.
1551 (Set_RND): New procedure.
1552 * einfo.ads: Minor comment updates.
1553 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
1554 * gnat1drv.adb (Gnat1drv): New calling sequence for
1555 Get_Target_Parameters.
1556 (Gnat1drv): Move Atree.Initialize here from Frontend.
1557 * targparm.adb (Get_Target_Parameters): New calling
1558 sequence (Get_Target_Parameters): Handle pragma Restriction
1560 * targparm.ads (Get_Target_Parameters): New calling sequence.
1562 2014-06-13 Gary Dismukes <dismukes@adacore.com>
1564 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
1565 loop if the pragma does not come from source, so that an implicit
1566 pragma Import only applies to the first declaration, avoiding
1567 possible conflicts with earlier explicit and implicit declarations
1568 due to multiple Provide_Shift_Operators pragmas.
1569 (Set_Imported): Remove previous fix that bypassed pragma duplication
1571 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
1572 of Provide_Shift_Operators.
1574 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
1576 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
1577 string pointer directly to set_decl_section_name.
1579 2014-06-11 Robert Dewar <dewar@adacore.com>
1581 * sem_ch13.adb: Minor reformatting.
1583 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1585 * sem_prag.adb (Check_Clause_Syntax): Add new
1586 local variable Outputs. Account for the case where multiple
1587 output items appear as an aggregate.
1589 2014-06-11 Robert Dewar <dewar@adacore.com>
1591 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1594 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1596 * einfo.ads: Minor reformatting.
1598 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1600 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1601 new variable First_Node. Update the position after all insertions have
1602 taken place to First_Node.
1604 2014-06-11 Robert Dewar <dewar@adacore.com>
1606 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1607 * layout.adb (Layout_Type): Remove test of -gnatd.1.
1609 2014-06-11 Robert Dewar <dewar@adacore.com>
1611 * sem_ch13.adb: Minor reformatting.
1613 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1615 * sem_prag.adb (Check_Clause_Syntax): Add new
1616 local variable Outputs. Account for the case where multiple
1617 output items appear as an aggregate.
1619 2014-06-11 Robert Dewar <dewar@adacore.com>
1621 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1624 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1626 * einfo.ads: Minor reformatting.
1628 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1630 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1631 new variable First_Node. Update the position after all insertions have
1632 taken place to First_Node.
1634 2014-06-11 Robert Dewar <dewar@adacore.com>
1636 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1637 * layout.adb (Layout_Type): Remove test of -gnatd.1.
1639 2014-06-11 Thomas Quinot <quinot@adacore.com>
1641 * freeze.ads: Minor reformatting.
1642 * checks.adb (Determine_Range): Do not attempt to determine
1643 the range of a deferred constant whose full view has not been
1645 * sem_res.adb (Resolve): Remove undesirable guard against
1646 resolving expressions from expression functions.
1648 2014-06-11 Robert Dewar <dewar@adacore.com>
1650 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
1652 * layout.adb (Layout_Type): Make anonymous access types for
1653 subprogram formal types and return types always thin. For now
1654 only enabled if -gnatd.1 set.
1656 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1658 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
1659 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
1660 subprogram must be a null procedure.
1662 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1664 * sem_prag.adb (Analyze_Input_Item): Allow formal
1665 parameters to appear as input_items in an initialization_list
1666 of pragma Initializes. Encapsulation now applies to states and
1667 variables only (as it should). Add RM references to key errors.
1668 * sem_prag.adb (Set_Imported): Suppress errors
1669 about preceding Imports when the pragma does not come from source,
1670 which can happen through use of pragma Provide_Shift_Operators.
1672 2014-06-11 Thomas Quinot <quinot@adacore.com>
1674 * sem_ch3.adb: Minor reformatting.
1675 * einfo.ads (Full_View): Minor comment update.
1677 2014-06-11 Robert Dewar <dewar@adacore.com>
1679 * einfo.adb (Is_Independent): New flag.
1680 * einfo.ads (Is_Independent): New flag.
1681 (Has_Independent_Components): Clean up and fix comments.
1682 * sem_prag.adb (Fix_Error): Deal with changing argument
1683 [of] to entity [for].
1684 (Analyze_Pragma, case Independent): Set Is_Independent flag
1685 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
1686 in all components of specified record.
1688 2014-06-11 Thomas Quinot <quinot@adacore.com>
1690 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
1691 Set proper Etype on bounds of dummy type created for analysis
1694 2014-06-11 Robert Dewar <dewar@adacore.com>
1696 * debug.adb: Minor comment fix (add missing section of dot
1699 2014-06-11 Robert Dewar <dewar@adacore.com>
1701 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
1702 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
1703 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
1704 * errout.adb (Output_Messages): Avoid duplicate output for
1705 library level instance.
1706 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
1707 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
1708 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
1709 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
1710 accomodate largest modulus value.
1711 * gnat_ugn.texi: Minor updates.
1713 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1715 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
1716 load body of generic package or its parent, if body is optional
1717 and the unit does not require a body.
1719 2014-06-11 Robert Dewar <dewar@adacore.com>
1721 * gnat_rm.texi: Document System.Unsigned_Types.
1722 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
1723 * s-unstyp.ads: Update comments (this is now user available unit).
1725 2014-06-11 Robert Dewar <dewar@adacore.com>
1727 * make.adb, sem_res.adb: Minor reformatting.
1729 2014-06-11 Thomas Quinot <quinot@adacore.com>
1731 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
1732 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
1733 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
1734 Preelaborate_05 to just Preelaborate in runtime units, and similarly
1735 change Pure_05 to just Pure.
1737 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1739 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
1740 analysis if error has been posted on subprogram body.
1742 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1744 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
1745 rule given in RM 13.1 (8/1) for operational attributes to stream
1746 attributes: the attribute must apply to a first subtype. Fixes
1747 missing errors in ACATS test bdd2004.
1749 2014-06-11 Robert Dewar <dewar@adacore.com>
1751 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
1752 record type if restriction No_Implicit_Conditionals is active.
1753 (Expand_N_Object_Declaration): Don't allow default initialization
1754 for variant record type if restriction No_Implicit_Condition is active.
1755 (Build_Variant_Record_Equality): Don't build for variant
1756 record type if restriction No_Implicit_Conditionals is active.
1757 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
1758 No_Implicit_Conditionals.
1759 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
1761 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
1763 * i-cstrin.ads: Update comments.
1765 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1767 * sem_res.adb (Resolve_Selected_Component): Handle properly a
1768 selected component whose prefix is overloaded, when none of the
1769 interpretations matches the expected type.
1771 2014-06-11 Bob Duff <duff@adacore.com>
1773 * make.adb (Wait_For_Available_Slot): Give a more
1774 informative error message; if the ALI file is not found, print
1775 the full path of what it's looking for.
1777 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
1779 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
1780 option to specify the result file encoding.
1782 2014-06-11 Robert Dewar <dewar@adacore.com>
1784 * errout.ads, sem_ch12.adb: Minor reformatting.
1785 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
1786 * lib-xref.adb: Minor reformatting.
1787 * restrict.adb: Minor code reorganization (put routines in
1790 2014-06-11 Yannick Moy <moy@adacore.com>
1792 * einfo.ads: Minor typo in comment
1794 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1796 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
1797 formal private types and private type extensions, to indicate
1798 variable in a generic unit whose uninitialized use suggest that
1799 actual type should be fully initialized.
1800 Needs_Initialized_Actual: removed, functionaity replaced by
1802 * lib-xref.adb (Generate_Reference): Generate a reference for
1803 variables of a formal type when the unit is not the main unit,
1804 to enable appropriate warnings in an instance.
1805 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
1806 of variable in a generic unit that suggests that actual type
1807 should be full initialized.
1808 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
1809 and do not emot warning, which now only appears in an instance.
1811 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
1813 * gnat_ugn.texi: Fix minor typo.
1815 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1817 * sem_ch3.adb Add with and use clause for Sem_Ch10.
1818 (Analyze_Declarations): Code reformatting. Analyze the contract
1819 of a subprogram body stub at the end of the declarative region.
1820 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
1821 now a variable. Do not process the body if its contract is not
1822 available. Account for subprogram body stubs when extracting
1823 the corresponding spec.
1824 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
1826 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
1828 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1829 Account for subprogram body stubs when extracting the
1831 (Analyze_Global_In_Decl_List):
1832 Account for subprogram body stubs when extracting the
1834 (Analyze_Refined_Depends_In_Decl_Part):
1835 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
1836 of the related body. Spec_Is now a variable. Account for
1837 subprogram body stubs when extracting the corresponding spec.
1838 (Analyze_Refined_Global_In_Decl_Part): Use
1839 Find_Related_Subprogram_Or_Body to retrieve the declaration
1840 of the related body. Spec_Is now a variable. Account for
1841 subprogram body stubs when extracting the corresponding spec.
1842 (Collect_Subprogram_Inputs_Output): Account for subprogram body
1843 stubs when extracting the corresponding spec.
1845 2014-06-11 Vincent Celier <celier@adacore.com>
1847 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
1850 2014-06-11 Robert Dewar <dewar@adacore.com>
1852 * debug.adb: Add debug flag -gnatd.q.
1853 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
1855 * styleg.adb (Check_Xtra_Parens): Message should be a style
1857 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
1858 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
1859 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
1860 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
1862 2014-06-11 Ben Brosgol <brosgol@adacore.com>
1864 * gnat_rm.texi: Revised chapter on Implementation Defined
1867 2014-06-11 Geert Bosch <bosch@adacore.com>
1869 * s-exctab.adb: avoid race conditions in exception registration.
1871 2014-06-11 Robert Dewar <dewar@adacore.com>
1873 * errout.adb (Warn_Insertion): New function.
1874 (Error_Msg): Use Warn_Insertion and Prescan_Message.
1875 (Error_Msg_Internal): Set Info field of error object.
1876 (Error_Msg_NEL): Use Prescan_Message.
1877 (Set_Msg_Text): Don't store info: at start of message.
1878 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
1879 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
1880 * errout.ads: Document new ?$? and >$> insertion sequences
1881 Document use of "(style)" and "info: "
1882 * erroutc.adb (dmsg): Print several missing fields
1883 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
1884 Deal with new tagging of info messages
1885 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
1886 Add field Info (Prescan_Message): New procedure, this procedure
1887 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
1888 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
1889 sem_elab.adb: Follow new rules for info message (info belongs
1890 only at the start of a message, and only in the first message,
1891 not in any of the continuations).
1892 * gnat_ugn.texi: Document full set of warning tags.
1894 2014-06-11 Gary Dismukes <dismukes@adacore.com>
1896 * sem_util.adb: Minor typo fix.
1898 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1900 * sem_warn.adb (Check_References): Do not emit spurious warnings
1901 on uninitialzed variable of a formal private type if variable
1904 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
1906 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
1907 set_decl_section_name accessor.
1909 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1911 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1912 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1913 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1915 2014-05-21 Robert Dewar <dewar@adacore.com>
1917 * layout.adb: Minor reformatting.
1918 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
1921 2014-05-21 Robert Dewar <dewar@adacore.com>
1923 * restrict.ads (Implementation_Restriction): Add entry for
1925 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
1926 Ada.[Wide_[Wide_]Text_IO.
1927 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
1928 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
1929 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
1930 Wide_Wide_Value if restriction No_Fixed_IO is set.
1931 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
1933 2014-05-21 Robert Dewar <dewar@adacore.com>
1935 * gnatcmd.adb: Minor error msg changes (no upper case letter
1937 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
1940 2014-05-21 Robert Dewar <dewar@adacore.com>
1942 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
1943 via generic formals.
1944 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
1947 2014-05-21 Thomas Quinot <quinot@adacore.com>
1949 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
1950 more accurately describe that this subprogram needs to come into
1951 play also in cases where no byte swapping is involved, because
1952 it also takes care of some required shifts (left-justification
1955 2014-05-21 Thomas Quinot <quinot@adacore.com>
1957 * freeze.adb (Check_Component_Storage_Order): Indicate whether
1958 a Scalar_Storage_Order attribute definition is present for the
1960 (Freeze_Record_Type): Suppress junk warnings
1961 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
1964 2014-05-21 Robert Dewar <dewar@adacore.com>
1966 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
1967 to Kill_Elaboration_Checks.
1969 2014-05-21 Gary Dismukes <dismukes@adacore.com>
1971 * layout.adb (Assoc_Add): Suppress the optimization of the (E
1972 - C1) + C2 case, when the expression type is unsigned and C1 <
1973 C2, to avoid creating a negative literal when folding.
1975 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1977 * freeze.adb (Freeze_Record_Type): Update the use of
1979 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
1981 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
1982 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
1983 of Is_SPARK_Volatile.
1984 (Analyze_Loop_Parameter_Specification):
1985 Update the use of Is_SPARK_Volatile.
1986 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
1987 formal parameter when its type is volatile.
1988 * sem_prag.adb (Analyze_Global_Item): Update the use of
1990 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
1991 determines whether an entity is a volatile source SPARK object.
1992 * sem_util.adb (Has_Enabled_Property): Accout for external
1993 properties being set on objects other than abstract states
1994 and variables. An example would be a formal parameter.
1995 (Is_SPARK_Volatile): New routine.
1996 (Is_SPARK_Volatile_Object):
1997 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
1998 when checking entities and/or types.
1999 * sem_util.ads (Is_SPARK_Volatile): New routine.
2001 2014-05-21 Robert Dewar <dewar@adacore.com>
2003 * sem_warn.adb: Minor fix to warning messages (use ?? instead
2006 2014-05-21 Vincent Celier <celier@adacore.com>
2008 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
2009 switch --version and --help.
2011 2014-05-21 Robert Dewar <dewar@adacore.com>
2013 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
2015 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2017 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
2018 iterator variable when the domain of iteration is a formal
2019 container and this is an element iterator.
2021 2014-05-21 Bob Duff <duff@adacore.com>
2023 * sem_ch12.adb: Minor reformatting.
2025 2014-05-21 Robert Dewar <dewar@adacore.com>
2027 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
2029 2014-05-21 Robert Dewar <dewar@adacore.com>
2031 * sem_elab.adb: Minor reformatting.
2032 * s-taprop.ads: Minor comment fix.
2033 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
2034 Kill_Elaboration_Checks.
2035 * errout.adb, erroutc.adb: Minor reformatting.
2037 2014-05-21 Thomas Quinot <quinot@adacore.com>
2039 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
2040 component. No byte swapping occurs, but this procedure also takes
2041 care of appropriately justifying the argument.
2043 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2045 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
2047 (Analyze_Subprogram_Body_Helper): Move the
2048 analysis of aspect specifications and the processing of the
2049 subprogram body contract after inlining has taken place.
2050 (Diagnose_Misplaced_Aspect_Specifications): Removed.
2052 2014-05-21 Javier Miranda <miranda@adacore.com>
2054 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
2056 2014-05-21 Robert Dewar <dewar@adacore.com>
2058 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
2059 continuations any more.
2061 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2063 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
2064 present in formal_Private_Definitions and on private extension
2065 declarations of a formal derived type. Set when the use of the
2066 formal type in a generic suggests that the actual should be a
2067 fully initialized type.
2068 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
2069 to indicate that an entity of a generic type has default
2070 initialization, and that the corresponing actual type in any
2071 subsequent instantiation should be fully initialized.
2072 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
2073 to emit a warning if the actual for a generic type on which
2074 Needs_Initialized_Actual is set is not a fully initialized type.
2076 2014-05-21 Robert Dewar <dewar@adacore.com>
2078 * sem_elab.adb, prj-dect.adb: Minor reformatting.
2080 2014-05-21 Robert Dewar <dewar@adacore.com>
2082 * erroutc.ads: Minor comment addition.
2084 2014-05-21 Robert Dewar <dewar@adacore.com>
2086 * errout.ads: Add documentation for use of >*> tag.
2087 * restrict.adb: Make sure we use >*> tag for restriction warnings.
2089 2014-05-21 Gary Dismukes <dismukes@adacore.com>
2091 * debug.adb: Add case of illegal overriding_indicator for a
2092 protected subprogram body to description of -gnatd.E switch.
2093 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
2094 for cases of giving overriding_indicators on protected subprogram
2095 bodies, but change this to a warning if -gnatd.E is enabled. No
2096 longer give a style warning about missing indicators on protected
2099 2014-05-21 Robert Dewar <dewar@adacore.com>
2101 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
2102 sem_elab.ads: Minor reformatting.
2103 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
2106 2014-05-21 Pascal Obry <obry@adacore.com>
2108 * prj-dect.adb: Allow package Install in aggregate project.
2110 2014-05-21 Robert Dewar <dewar@adacore.com>
2112 * sem_ch13.adb (Analyze_Aspect_Specifications):
2113 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
2114 * sem_prag.adb: Minor comment improvements.
2116 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2118 * sem_ch12.adb (Install_Body): When checking whether freezing of
2119 instantiation must be delayed, verify that the common enclosing
2120 subprogram to generic and instance is in fact an overloadable
2123 2014-05-21 Vincent Celier <celier@adacore.com>
2125 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
2126 mains with the same name and fail if there is more than one.
2127 * prj.ads, prj.adb (Find_All_Sources): New function
2129 2014-05-21 Robert Dewar <dewar@adacore.com>
2131 * sem_ch13.adb: Minor reformatting.
2132 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
2133 * sem_prag.adb: Minor error message improvement.
2135 2014-05-21 Yannick Moy <moy@adacore.com>
2137 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
2138 (Enclosing_Subprogram_Or_Package): Only return a library-level
2141 2014-05-21 Javier Miranda <miranda@adacore.com>
2143 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
2144 to the full view of the parent type when processing a derived type
2145 which is the full view of a private type not defined in a generic
2146 unit which is derived from a private type with discriminants
2147 whose full view is a non-tagged record type.
2149 2014-05-21 Javier Miranda <miranda@adacore.com>
2151 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
2152 Complete previous patch.
2154 2014-05-21 Thomas Quinot <quinot@adacore.com>
2157 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
2158 Provide a behaviour more consistent with underlying datagram
2159 socket: do not attempt to loop over Send_Socket/Receive_Socket
2160 iterating along the buffer.
2162 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2164 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
2165 or a tagged type is not labelled as volatile. Ensure that a
2166 non-volatile type has no volatile components.
2167 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
2168 Obj_Typ. Code reformatting. Ensure that a discriminated or
2169 tagged object is not labelled as volatile.
2170 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
2171 pragma Volatile applies to a full type declaration or an object
2172 declaration when SPARK mode is on.
2174 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
2176 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
2177 providing options needed for compiling the argument source for
2178 the situation when a project file can be used as a tool parameter.
2180 2014-05-21 Gary Dismukes <dismukes@adacore.com>
2182 * gnat_rm.texi: Minor typo fix.
2184 2014-05-21 Robert Dewar <dewar@adacore.com>
2186 * stand.adb (Tree_Read): Read missing entities.
2187 (Tree_Write): Write missing entities.
2189 2014-05-21 Ben Brosgol <brosgol@adacore.com>
2191 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
2192 section in gnatmetric chapter.
2194 2014-05-21 Robert Dewar <dewar@adacore.com>
2196 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
2197 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
2198 post-call copy write back (see detailed comment in code).
2199 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
2201 * tbuild.ads: Minor reformatting.
2203 2014-05-21 Robert Dewar <dewar@adacore.com>
2205 * stand.ads: Add warning about adding new entities and
2206 Tree_Read/Tree_Write.
2208 2014-05-21 Robert Dewar <dewar@adacore.com>
2210 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
2211 references to restricted entities within the units in which they
2214 2014-05-21 Robert Dewar <dewar@adacore.com>
2216 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
2217 simplify the needed test, and also deal with failure to catch
2218 situations with non-standard names.
2219 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
2220 (Source_File_Is_Subunit): Removed, no longer used.
2222 2014-05-21 Javier Miranda <miranda@adacore.com>
2225 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
2226 renaming of an access to interface object there is no need to
2227 generate extra code to reference the tag.
2229 2014-05-21 Robert Dewar <dewar@adacore.com>
2231 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
2232 Warnings (Off, string).
2234 2014-05-21 Robert Dewar <dewar@adacore.com>
2236 * osint.adb: Fix three error messages to say invalid instead
2238 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
2239 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
2240 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
2242 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2244 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
2245 sem_ch9.ads: Move discriminant manipulation routines for analysis of
2246 aspect specifications from sem_ch9 to sem_ch13, where they belong.
2248 2014-05-21 Robert Dewar <dewar@adacore.com>
2250 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
2251 Clearly document -gnatyg (GNAT style switches).
2252 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
2253 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
2254 available for VMS after all.
2255 * warnsw.adb: Reorganize to eliminate duplicated code
2256 (Restore_Warnings): Add a couple of missing entries
2257 (Save_Warnings): Add a couple of missing entries.
2258 * warnsw.ads: Add missing entries to Warning_Record (not clear
2259 what the impact is).
2261 2014-05-21 Robert Dewar <dewar@adacore.com>
2263 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
2265 * errout.ads: Document ?*? (restriction warning) insertion.
2266 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
2268 * erroutc.ads: Document use of * for restriction warning tag.
2269 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
2271 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2273 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
2274 make discriminants immediately visible when analyzing an aspect
2275 of a subtype declaration.
2276 (Uninstall_Discriminants): Do not apply to the entity in a
2277 subtype declaration.
2279 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2281 * sem_util.adb: Code clean up.
2283 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
2285 * gnat_ugn.texi: Document -Werror.
2287 2014-05-21 Bob Duff <duff@adacore.com>
2289 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
2290 This was returning False if the Object is a constant view. Fix
2291 it to return True in that case, because it might be a view of
2293 (Has_Discriminant_Dependent_Constraint): Fix latent
2294 bug; this function was crashing when passed a discriminant.
2296 2014-05-21 Robert Dewar <dewar@adacore.com>
2298 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
2299 * s-arit64.adb: Minor code reorganization.
2300 * sem_prag.adb: Minor comment fix (remove erroneous use of the
2303 2014-05-21 Robert Dewar <dewar@adacore.com>
2305 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
2306 computing new table size.
2308 2014-05-21 Robert Dewar <dewar@adacore.com>
2310 * einfo.ads: Minor reformatting.
2311 * ceinfo.adb: Deal with slight format change of einfo.ads.
2313 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2315 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
2316 implementation of the SPARK 2014 rule concerning private child
2319 2014-05-21 Vincent Celier <celier@adacore.com>
2321 * makeusg.adb: Add switch -d to usage.
2323 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2325 * sem_util.adb (Find_Actual): If an actual that is the prefix
2326 of an enclosing prefixed call has been rewritten, use Nkind
2327 and Sloc to identify the corresponding formal, when handling
2328 deferred references.
2330 2014-05-21 Robert Dewar <dewar@adacore.com>
2332 * debug.adb: Document -gnatd.z switch.
2333 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
2335 2014-05-21 Robert Dewar <dewar@adacore.com>
2337 * einfo.ads (Can_Never_Be_Null): Minor comment update.
2338 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
2339 error message change.
2340 * s-arit64.adb ("abs"): New function. Use expression functions
2341 for the simple conversions and arithmetic.
2343 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2345 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
2346 set function_start_locus.
2348 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2350 * utils.c (gnat_write_global_declarations): Adjust the flags put on
2353 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2355 * gcc-interface/decl.c (change_qualified_type): New static function.
2356 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
2357 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
2358 <E_Array_Subtype>: Likewise.
2359 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
2360 (gnat_to_gnu_component_type): Likewise.
2361 (gnat_to_gnu_param): Likewise.
2363 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2365 * fe.h (Set_Present_Expr): Move around.
2366 (End_Location): New macro.
2367 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
2369 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2371 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
2372 lieu of more verbose construct.
2373 * gcc-interface/trans.c (Call_to_gnu): Likewise.
2374 (gnat_to_gnu): Likewise. Remove obsolete code.
2376 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2378 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
2379 consider that regular packed arrays can never be superflat.
2381 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2383 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
2385 * gcc-interface/decl.c (annotate_value): Adjust.
2386 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
2387 (push_range_check_info): Likewise.
2388 (Loop_Statement_to_gnu): Likewise.
2389 (Subprogram_Body_to_gnu): Likewise.
2390 (Compilation_Unit_to_gnu): Likewise.
2391 (start_stmt_group): Likewise.
2392 * gcc-interface/utils.c (init_gnat_utils): Likewise.
2393 (gnat_pushlevel): Likewise.
2394 (maybe_pad_type): Likewise.
2396 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
2398 * seh_init.c: Fix copyright year.
2400 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2402 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
2403 are defined. Move include windows.h before system.h.
2404 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
2405 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
2407 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2409 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
2410 to the appropriate type.
2411 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
2412 (pos_to_constructor): Likewise.
2414 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
2416 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
2418 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2419 Mike Stump <mikestump@comcast.net>
2420 Richard Sandiford <rdsandiford@googlemail.com>
2422 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
2423 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
2424 (annotate_value): Use wide-int interfaces.
2425 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
2427 2014-04-28 Richard Henderson <rth@redhat.com>
2429 * gcc-interface/Makefile.in: Support aarch64-linux.
2431 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
2433 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
2434 add 'Suffix' parameter and adjust comment.
2435 (Get_External_Name_With_Suffix): Delete.
2436 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
2437 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
2439 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
2440 Call Get_External_Name instead of Get_External_Name_With_Suffix.
2441 (Get_Secondary_DT_External_Name): Likewise.
2442 * exp_cg.adb (Write_Call_Info): Likewise.
2443 * exp_disp.adb (Export_DT): Likewise.
2444 (Import_DT): Likewise.
2445 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
2446 parameter with False default.
2447 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
2448 * types.h (Fat_Pointer): Rename into...
2449 (String_Pointer): ...this. Add comment on interfacing rules.
2450 * fe.h (Compiler_Abort): Adjust for above renaming.
2451 (Error_Msg_N): Likewise.
2452 (Error_Msg_NE): Likewise.
2453 (Get_External_Name): Likewise. Add third parameter.
2454 (Get_External_Name_With_Suffix): Delete.
2455 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
2456 (create_concat_name): Adjust call to Get_External_Name, remove call to
2457 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
2458 * gcc-interface/trans.c (post_error): Likewise.
2459 (post_error_ne): Likewise.
2460 * gcc-interface/misc.c (internal_error_function): Likewise.
2462 2014-04-28 Richard Biener <rguenther@suse.de>
2465 * gcc-interface/utils.c: Define flag_isoc11.
2467 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
2469 * gnatvsn.ads (Library_Version): Bump to 4.10.
2471 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
2474 2014-04-22 Richard Henderson <rth@redhat.com>
2476 * gcc-interface/Makefile.in: Support aarch64-linux.
2478 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
2480 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2481 (Error_Msg_N): Likewise.
2482 (Error_Msg_NE): Likewise.
2483 (Get_External_Name_With_Suffix): Likewise.
2484 * types.h (Fat_Pointer): Delete.
2485 (String_Pointer): New type.
2486 (DECLARE_STRING_POINTER): New macro.
2487 * gcc-interface/decl.c (create_concat_name): Adjust.
2488 * gcc-interface/trans.c (post_error): Likewise.
2489 (post_error_ne): Likewise.
2490 * gcc-interface/misc.c (internal_error_function): Likewise.
2492 2014-04-22 Richard Henderson <rth@redhat.com>
2494 * gcc-interface/Makefile.in: Support aarch64-linux.
2496 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
2497 (__gnat_alternate_stack): Enable for all linux except ia64.
2499 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
2501 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2502 (Error_Msg_N): Likewise.
2503 (Error_Msg_NE): Likewise.
2504 (Get_External_Name_With_Suffix): Likewise.
2505 * types.h (Fat_Pointer): Delete.
2506 (String_Pointer): New type.
2507 (DECLARE_STRING_POINTER): New macro.
2508 * gcc-interface/decl.c (create_concat_name): Adjust.
2509 * gcc-interface/trans.c (post_error): Likewise.
2510 (post_error_ne): Likewise.
2511 * gcc-interface/misc.c (internal_error_function): Likewise.
2513 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2514 Pierre-Marie de Rodat <derodat@adacore.com>
2516 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
2517 scalar constant instead of a reference for renaming of scalar literal.
2518 Do not create a new object for constant renaming except for a function
2519 call. Make sure a VAR_DECL is created for the renaming pointer.
2520 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
2521 (fold_constant_decl_in_expr): New function.
2522 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
2523 For a constant renaming, try to fold a constant DECL in the result.
2524 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
2525 (Identifier_to_gnu): Reference the renamed object of constant renaming
2527 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
2528 invalidate constant renaming pointers.
2530 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2532 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
2533 (build_vector_type_for_size): New function.
2534 (build_vector_type_for_array): Likewise.
2535 (unchecked_convert): Build an intermediate vector type to convert
2536 from a generic array type to a vector type.
2537 (handle_vector_size_attribute): Reimplement.
2538 (handle_vector_type_attribute): Likewise.
2540 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2542 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
2543 Is_OK_Static_Expression in lieu of Is_Static_Expression to
2544 detect valid arguments.
2546 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2548 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
2550 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2552 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
2553 (components_to_record): Likewise.
2554 * gcc-interface/utils.c (make_aligning_type): Likewise.
2555 (maybe_pad_type): Likewise.
2556 (finish_record_type): Likewise.
2557 (rest_of_record_type_compilation): Likewise.
2559 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2561 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
2562 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
2564 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
2565 hint for Loop_Optimize.
2566 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
2567 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2568 with new Ivdep hint.
2569 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
2570 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2571 with new Ivdep hint.
2572 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
2574 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2575 Robert Dewar <dewar@adacore.com>
2577 * opt.ads (Suppress_Back_Annotation): Remove as unused.
2578 * fe.h (Back_Annotate_Rep_Info): Likewise.
2579 (Global_Discard_Names): Likewise.
2580 (List_Representation_Info): Declare.
2581 * types.h (Uint_Minus_1): Likewise.
2582 * repinfo.ads: Document back-annotation change.
2583 * gcc-interface/gigi.h (init_gnat_decl): Declare.
2584 (destroy_gnat_decl): Likewise.
2585 * gcc-interface/decl.c (annotate_value): Do not create the cache of
2586 annotated values here but...
2587 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
2589 (init_gnat_decl): ...here instead. New function.
2590 (destroy_gnat_decl): Likewise.
2591 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
2592 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
2594 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2596 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
2597 offset for the field, if any.
2599 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
2600 Svante Signell <svante.signell@gmail.com>
2604 * s-osinte-x32.adb: New file.
2605 * s-linux.ads (Time): New section.
2606 * s-linux-alpha.ads (Time): Likewise.
2607 * s-linux-android.ads (Time: Likewise.
2608 * s-linux-hppa.ads (Time): Likewise.
2609 * s-linux-mipsel.ads (Time): Likewise.
2610 * s-linux-sparc.ads (Time): Likewise.
2611 * s-linux-x32.ads (Time): Likewise.
2612 * s-osprim-x32.ads (timespec): Adjust.
2614 (To_Timespec): Likewise.
2615 * s-osinte-linux.ads (Time): Define local subtypes for those defined
2617 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
2618 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
2619 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
2620 * s-osinte-solaris-posix.ads (timespec): Likewise.
2621 * s-osinte-posix.adb (To_Timespec): Likewise.
2622 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
2624 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
2627 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
2628 * s-linux-android.ads: New file.
2629 * s-intman-android.adb: Likewise.
2630 * s-osinte-android.ads: Adjust.
2631 * sigtramp-armdroid.c: Likewise.
2632 * sigtramp.h: Add Android support.
2634 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
2636 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
2638 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
2641 * system-linux-alpha.ads: Adjust for Ada 2005.
2642 * system-linux-mips.ads: Likewise.
2643 * system-linux-mips64el.ads: Likewise.
2644 * system-linux-mipsel.ads: Likewise.
2645 * system-linux-s390.ads: Likewise.
2646 * system-linux-s390x.ads: Likewise.
2647 * system-linux-sparc.ads: Likewise.
2648 * system-linux-sparcv9.ads: Likewise.
2649 * system-rtems.ads: Likewise.
2650 * system-vxworks-arm.ads: Likewise.
2652 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
2655 * gcc-interface/Makefile.in (target_cpu_default): Revert
2658 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
2661 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
2662 it to set the RM size. Use directly 'size' for the Esize.
2663 (Create_Back_End_Float_Types): Adjust call to above.
2664 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
2665 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
2666 (Write_Target_Dependent_Values): Adjust comment.
2667 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
2669 (Write_Target_Dependent_Values): Write the precision in lieu of size.
2670 (Initialization): Read the precision in lieu of size and compute the
2671 size from the precision and the alignment.
2672 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
2673 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
2674 types for vector modes, pass the size in addition to the precision.
2676 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
2678 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
2680 2014-03-07 Doug Rupp <rupp@adacore.com>
2683 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
2684 (Support_64_Bit_Divides): Removed, no longer used.
2685 (ZCX_By_Default): Enabled.
2687 2014-02-25 Doug Rupp <rupp@adacore.com>
2689 * gcc-interface/Makefile.in (arm-linux):
2690 (EH_MECHANISM): Use ARM unwinder (-arm)
2691 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
2693 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
2694 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
2695 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
2696 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
2697 Add dependencies for sigtramp-armvxw.o.
2699 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2701 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
2703 2014-02-25 Robert Dewar <dewar@adacore.com>
2705 * rtsfind.adb (Is_RTE): Protect against entity with no scope
2706 field (previously this call blew up on the Standard entity).
2707 * sem_attr.adb (Analyze_Attribute, case Access): Remove
2708 test for No_Abort_Statements, this is now handled in
2709 Set_Entity_With_Checks.
2710 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
2711 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
2712 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
2713 Set_Entity_With_Checks.
2714 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
2715 Add checks for No_Abort_Statements.
2717 2014-02-25 Robert Dewar <dewar@adacore.com>
2719 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
2720 Check_Restriction is OK.
2722 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2724 * sem_ch3.adb (Process_Full_View): Better error message when
2725 the full view of a private type without discriminants is an
2727 * sem_ch7.adb (Uninstall_Declarations): Ditto.
2729 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2731 * sigtramp-armvxw.c: Also restore r0.
2733 2014-02-25 Robert Dewar <dewar@adacore.com>
2735 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
2736 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
2737 set unconditionally.
2738 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
2739 any more (Output_Msg_Text): Rewritten with new convention on
2740 output of warnings that are treated as errors.
2741 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
2743 * gnat_rm.texi: Updates to documentation on pragma
2745 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
2746 set Warning_Doc_Switch.
2747 * lib-writ.ads: Add documentation note on ALI file generation
2749 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
2751 * sem_attr.adb (Resolve_Attribute, case Access):
2752 Abort_Task'Access violates the No_Abort_Statements restriction.
2753 * sem_res.adb (Resolve_Call): Check restriction
2754 No_Abort_Statements for call to Abort_Task or a renaming of it.
2756 2014-02-25 Robert Dewar <dewar@adacore.com>
2758 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
2760 * lib.ads: Minor reformatting.
2761 * einfo.ads: Minor reformatting.
2763 2014-02-25 Doug Rupp <rupp@adacore.com>
2765 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
2766 use Short_Descriptor(S) as the argument passing mechanism.
2768 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2770 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
2772 2014-02-25 Robert Dewar <dewar@adacore.com>
2774 * atree.ads (Warnings_Treated_As_Errors): New variable.
2775 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
2776 error object (Initialize): Initialize Warnings_As_Errors_Count
2777 (Write_Error_Summary): Include count of warnings treated as errors.
2778 * erroutc.adb (Warning_Treated_As_Error): New function.
2779 (Matches): Function moved to outer level of package.
2780 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
2781 (Warning_Treated_As_Error): New function.
2782 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
2783 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
2784 * opt.ads (Config_Switches_Type): Add entry for
2785 Warnings_As_Errors_Count.
2786 (Warnings_As_Errors_Count): New variable.
2787 (Warnings_As_Errors): New array.
2788 * par-prag.adb: Add dummy entry for Warning_As_Error.
2789 * sem_prag.adb (Analyze_Pragma): Implement new pragma
2791 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
2793 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2795 * sigtramp.h: Fix minor inaccuracy.
2797 2014-02-25 Ben Brosgol <brosgol@adacore.com>
2799 * gnat_ugn.texi: Added description of kill command.
2801 2014-02-25 Robert Dewar <dewar@adacore.com>
2803 * gnat_rm.texi (Address_Clauses): Add a section discussing the
2804 problem of address clauses causing unexpected initialization,
2805 including the effect of Initialize_Scalars.
2807 2014-02-25 Robert Dewar <dewar@adacore.com>
2809 * errout.adb: Various changes for better msgs for anonmous access
2811 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
2813 (Buffer_Remove): Version with character argument.
2814 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
2815 of mismatching conventions for access-to-subprogram case.
2816 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
2817 access types in record.
2818 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
2819 types, including in records.
2821 2014-02-25 Doug Rupp <rupp@adacore.com>
2823 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
2824 enhancements and corrections.
2826 2014-02-25 Robert Dewar <dewar@adacore.com>
2828 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
2830 2014-02-25 Robert Dewar <dewar@adacore.com>
2832 * gnat_rm.texi: First set of documentation additions for
2833 predefined RM units.
2834 * checks.adb: Minor reformatting.
2835 * sem_elab.adb (Check_Task_Activation): Minor fix to error
2837 * sem_util.adb: Minor reformatting.
2839 2014-02-25 Arnaud Charlet <charlet@adacore.com>
2841 * usage.adb (Usage): Add help on -gnateC.
2842 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
2843 * opt.ads (Generate_CodePeer_Messages): New flag.
2844 * gnat_ugn.texi: Document new switch -gnateC.
2846 2014-02-25 Ben Brosgol <brosgol@adacore.com>
2848 * gnat_rm.texi: Corrected minor typos in Implementation Defined
2850 * opt.ads: Minor reformatting.
2852 2014-02-25 Robert Dewar <dewar@adacore.com>
2854 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
2855 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
2857 * opt.ads (Warn_Info_Messages): New flag.
2858 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
2860 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
2862 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
2863 * usage.adb: Add documentation of -gnatel/-gnateL Update
2864 documentation of -gnatwl/-gnatwL.
2865 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
2866 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
2868 2014-02-25 Robert Dewar <dewar@adacore.com>
2870 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
2871 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
2872 * interfac.ads: Minor code reorganization (add pragma
2873 Compiler_Unit_Warning).
2874 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
2875 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
2876 Has_Shift_Operator flag.
2877 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
2878 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
2879 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
2880 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
2881 Add entry for Name_Amount.
2882 * checks.adb (Selected_Range_Checks): When checking for a null
2883 range, make sure we use the base type, and not the subtype for
2884 deciding a range is null.
2885 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
2886 for suspicious loop bound which is outside the range of the
2888 * gnat_ugn.texi: Add documentation section "Determining the
2889 Chosen Elaboration Order"
2890 * sem_ch13.adb (UC_Entry): Add field Act_Unit
2891 (Validate_Unchecked_Conversion): Store Act_Unit
2892 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
2893 * treepr.adb: Minor reformatting.
2895 2014-02-25 Arnaud Charlet <charlet@adacore.com>
2897 * usage.adb: Minor: fix typo.
2899 2014-02-25 Robert Dewar <dewar@adacore.com>
2901 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
2902 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
2903 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
2904 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
2905 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
2906 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
2907 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
2908 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
2909 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
2910 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
2911 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
2912 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
2913 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
2914 Compiler_Unit_Warning, change Compiler_Unit everywhere to
2915 Compiler_Unit_Warning.
2917 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
2919 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
2920 in ASIS mode aggregates that are used as aspect definitions.
2922 2014-02-25 Robert Dewar <dewar@adacore.com>
2924 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
2927 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2929 * freeze.adb (Freeze_Entity): If the return type of a function
2930 is a limited view, and the non-limited view has not been seen yet,
2931 defer freezing to some later point.
2933 2014-02-25 Robert Dewar <dewar@adacore.com>
2935 * sem_ch3.adb: Minor reformatting.
2937 2014-02-25 Robert Dewar <dewar@adacore.com>
2939 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
2940 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
2941 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
2942 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
2943 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
2944 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
2945 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
2946 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
2947 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
2948 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
2949 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
2950 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
2951 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
2952 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
2953 snames.ads-tmpl: Change Compiler_Unit everywhere to
2954 Compiler_Unit_Warning.
2956 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2958 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
2959 (Collect_Body_Postconditions_In_Decls): New routine.
2960 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
2961 postcondition aspects or pragmas that appear on a subprogram
2963 (Collect_Spec_Preconditions): Factor out code. Handle
2964 precondition aspects or pragmas that appear on a subprogram
2966 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
2967 aspects that apply to a subprogram body stub is no longer delayed,
2968 the aspects are analyzed on the spot.
2969 (SPARK_Aspect_Error):
2970 Aspects that apply to a subprogram declaration cannot appear in
2972 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
2973 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
2974 is now a local variable. Code cleanup. Analysis related to
2975 the aspects of a subprogram body stub is now carried out by
2976 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
2977 and/or pragmas of a subprogram body stub to the proper body
2978 as this is no longer needed. Do not analyze the aspects of a
2979 subprogram stub when the corresponding source unit is missing.
2980 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
2982 (Analyze_Task_Body_Stub): Flag the illegal use of
2984 (Optional_Subunit): Add local variable Unum.
2985 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
2986 pragma when it applies to a subprogram body stub.
2987 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
2988 Depends and Global can now apply to a subprogram body stub as
2989 long as it acts as its own spec.
2990 (Analyze_Refined_Pragma):
2991 Code reformatting. Refinement pragmas cannot apply to a subunit.
2993 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
2995 * einfo.ads Update the usage of flag
2996 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
2997 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
2998 now starts with the letter 'C'. This makes reading expanded
3000 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
3001 Iter_Loop. Signal that an Ada 2012 iterator loop requires
3002 secondary stack management when creating a transient scope for
3003 an element reference.
3004 * exp_util.adb (Process_Statements_For_Controlled_Objects):
3005 When wrapping the statements of a loop, pass the E_Loop entity
3006 to the wrapping machinery.
3007 (Wrap_Statements_In_Block): Add
3008 formal parameter Scop along with comment on usage. Add local
3009 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
3010 block as requiring secondary stack management when the block is
3011 created inside an Ada 2012 iterator loop. This ensures that any
3012 reference objects are reclaimed on each iteration of the loop.
3013 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
3014 tasked with the handling of container iterators as requiring
3015 secondary stack management. This ensures that iterators are
3016 reclaimed when the loop terminates or is exited in any fashion.
3017 * sem_util.adb (Add_Block_Identifier): New routine.
3018 (Find_Enclosing_Iterator_Loop): New routine.
3019 * sem_util.ads (Add_Block_Identifier): New routine.
3020 (Find_Enclosing_Iterator_Loop): New routine.
3022 2014-02-25 Robert Dewar <dewar@adacore.com>
3024 * sinfo.ads: Minor reformatting.
3026 2014-02-25 Tristan Gingold <gingold@adacore.com>
3028 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
3030 2014-02-25 Pascal Obry <obry@adacore.com>
3032 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
3034 2014-02-25 Tristan Gingold <gingold@adacore.com>
3036 * sem_ch10.adb: Minor comment fix.
3038 2014-02-25 Bob Duff <duff@adacore.com>
3040 * s-tasdeb.adb: Misc cleanup of this package,
3041 including printing addresses in hexadecimal.
3042 (Write): Fix minor bug when taking 'Address of an empty string.
3044 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3046 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
3047 public child unit when it does not refer to the abstract state
3048 of a public ancestor.
3050 2014-02-25 Yannick Moy <moy@adacore.com>
3052 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
3053 Validity_Checks in GNATprove and CodePeer modes.
3055 2014-02-25 Pascal Obry <obry@adacore.com>
3057 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
3058 Artifacts attribute.
3060 2014-02-25 Yannick Moy <moy@adacore.com>
3062 * sem_prag.adb: Minor reformatting to get consistent messages.
3064 2014-02-25 Robert Dewar <dewar@adacore.com>
3066 * checks.adb: Minor reformatting.
3067 * sinfo.ads (Do_Range_Check): Document that this flag is never
3068 passed to the back end.
3070 2014-02-25 Yannick Moy <moy@adacore.com>
3072 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
3073 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
3075 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3077 * sem_res.adb (Appears_In_Check): New routine.
3078 (Resolve_Entity_Name): Remove local variables Prev and
3079 Usage_OK. Par is now a constant. Remove the parent chain traversal
3080 as the placement of a volatile object with enabled property
3081 Async_Writers and/or Effective_Reads must appear immediately
3082 within a legal construct.
3084 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3086 * checks.adb (Apply_Selected_Range_Checks):
3087 Alphabetize local constants and variables. Add comments.
3088 Always insert a range check that requires runtime evaluation into
3091 2014-02-25 Robert Dewar <dewar@adacore.com>
3093 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
3095 2014-02-25 Bob Duff <duff@adacore.com>
3097 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
3098 iterations while waiting for independent tasks to terminate;
3099 if an independent task does not terminate, we do not want to
3100 hang here. In that case, the thread will be terminated when the
3102 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
3104 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3106 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
3107 used to perform pre-analysis of the expression for SPARK
3108 aspects that have a non-standard syntax, such as GLobal and
3109 Initializes. The procedure applies to the original expression
3110 in an aspect specification, prior to the analysis of the
3111 corresponding pragma, in order to provide semantic information
3112 for ASIS navigation purposes.
3113 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
3114 Call new subprogram.
3116 2014-02-25 Yannick Moy <moy@adacore.com>
3118 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
3120 2014-02-25 Doug Rupp <rupp@adacore.com>
3122 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
3123 (__gnat_adjust_context_for_raise): Bump the PC by 2.
3125 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3127 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
3128 misplaced IS, add a statement sequence to improper body only if
3129 one has not been parsed already.
3131 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3133 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
3134 mismatch when multidimensional array is updated with a single
3137 2014-02-25 Yannick Moy <moy@adacore.com>
3139 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
3140 sem_ch6.adb: Mark most references to SPARK RM in error messages
3143 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3145 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
3146 appears in a list of basic declarations, complete the tree with
3147 an empty statement list, to prevent cascaded errors and crashes
3148 if semantic analysis is attempted.
3150 2014-02-24 Thomas Quinot <quinot@adacore.com>
3152 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
3154 * erroutc.adb: Minor reformatting.
3156 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3158 * sem_prag.adb (Check_Clause_Syntax): Account
3159 for a solitary input item in a dependency list.
3161 2014-02-24 Yannick Moy <moy@adacore.com>
3163 * gnat1drv.adb (Adjust_Global_Switches): Do not
3164 use validity checks at all in GNATprove_Mode.
3166 2014-02-24 Robert Dewar <dewar@adacore.com>
3168 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
3169 atree.adb, atree.ads: Minor reformatting.
3171 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3173 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
3174 global and dependence refinement when SPARK_Mode is off.
3175 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
3176 state refinement when SPARK_Mode is off.
3177 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
3178 variable Decl. Insert the generated pragma for Refined_State
3179 after a potential pragma SPARK_Mode.
3180 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
3181 constant Deps. Remove local variable Expr. Check the syntax
3182 of pragma Depends when SPARK_Mode is off. Factor out the
3183 processing for extra parenthesis around individual clauses.
3184 (Analyze_Global_In_Decl_List): Items is now a constant. Check
3185 the syntax of pragma Global when SPARK_Mode is off.
3186 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
3187 Initializes when SPARK_Mode is off.
3188 (Analyze_Part_Of): Check
3189 the syntax of the encapsulating state when SPARK_Mode is off.
3190 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
3191 SPARK_Mode is off. Move the declaration order check with respect
3192 to pragma Initializes to the end of the processing. Do not verify
3193 the declaration order for pragma Initial_Condition when SPARK_Mode
3194 is off. Do not complain about a useless package refinement when
3196 (Analyze_Refined_Depends_In_Decl_Part): Refs
3197 is now a constant. Check the syntax of pragma Refined_Depends
3198 when SPARK_Mode is off.
3199 (Analyze_Refined_Global_In_Decl_Part):
3200 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
3201 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
3202 Refined_State when SPARK_Mode is off.
3203 (Check_Dependence_List_Syntax): New routine.
3204 (Check_Global_List_Syntax): New routine.
3205 (Check_Initialization_List_Syntax): New routine.
3206 (Check_Item_Syntax): New routine.
3207 (Check_State_Declaration_Syntax): New routine.
3208 (Check_Refinement_List_Syntax): New routine.
3209 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
3211 2014-02-24 Robert Dewar <dewar@adacore.com>
3213 * a-tags.adb, s-os_lib.adb: Minor reformatting.
3215 2014-02-24 Thomas Quinot <quinot@adacore.com>
3217 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
3218 strerror message, not just numeric errno value.
3220 2014-02-24 Doug Rupp <rupp@adacore.com>
3222 * raise-gcc.c (exception_class_eq): Make endian neutral.
3224 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3226 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
3227 flag, and reset Etype and Analyzed attributes unconditionally
3228 when copying a tree that may be partly analyzed.
3229 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
3230 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
3231 within a subprogram body and applies to it, remove it from the
3232 body before making a copy of it, to prevent spurious errors when
3233 analyzing the copied body.
3235 2014-02-24 Thomas Quinot <quinot@adacore.com>
3237 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
3238 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
3239 vxWorks.h has been included. Also ensure that file attributes
3240 related definitions are output even in cases where socket support
3242 * a-tags.adb: Code clean up.
3243 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
3244 instead of -I to add the main ada source directory to the header
3245 search path, in order to avoid conflict between our own "types.h"
3246 and VxWork's <types.h>.
3248 2014-02-24 Robert Dewar <dewar@adacore.com>
3250 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
3251 * debug.adb: Remove documentation of -gnatd.X, no longer used.
3252 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
3254 2014-02-24 Bob Duff <duff@adacore.com>
3256 * gnat_ugn.texi: Improve documentation of gnatpp.
3258 2014-02-24 Thomas Quinot <quinot@adacore.com>
3260 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
3261 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
3262 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
3263 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
3264 a chars_ptr, because on Windows this is a renaming of
3265 Socket_Error_Message.
3267 2014-02-24 Robert Dewar <dewar@adacore.com>
3269 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
3270 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
3271 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
3274 2014-02-24 Thomas Quinot <quinot@adacore.com>
3276 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
3277 that the source directory containing s-oscons-tmplt.c is on the
3278 include path, so that all internal header files are available.
3280 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3282 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
3283 domain of iteration is an attribute reference 'Old, this is an
3284 Ada 2012 iterator and the loop must be rewritten as such.
3286 2014-02-24 Thomas Quinot <quinot@adacore.com>
3288 * s-fileio.adb (Errno_Message): Remove, use shared version from
3290 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
3291 * g-stseme (Socket_Error_Message): Reimplement in terms of new
3293 * g-socthi.ads, g-socthi.adb: Change profile of
3294 Socket_Error_Message to return String to allow the above.
3295 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
3296 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
3297 * g-socthi-vxworks.ads: Update to account for the above profile
3299 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
3300 * s-crtl.ads (strncpy): New procedure.
3301 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
3302 Use import from s-crtl.
3303 * a-envvar.adb, osint.adb: Use imports of C runtime functions
3304 from s-crtl instead of re-importing locally.
3306 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3308 * sem_prag.adb (Analyze_Global_Item): Emit the
3309 variable related checks concerning volatile objects only when
3312 2014-02-24 Robert Dewar <dewar@adacore.com>
3314 * sem_ch5.adb (Analyze_Iterator_Specification): use
3315 Error_Msg_Ada_2012_Feature.
3317 2014-02-24 Jose Ruiz <ruiz@adacore.com>
3319 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
3320 No_Local_Timing_Events and No_Specific_Termination_Handlers
3321 must be set, according to the Ravenscar profile definition
3324 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3326 * sem_ch6.adb (Analyze_Expression_Function): If this is a
3327 completion, freeze return type and its designated type if needed.
3329 2014-02-24 Thomas Quinot <quinot@adacore.com>
3331 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3332 'Address): When moving initialization statements to a freeze
3333 entity, keep them under a single node (i.e. do not unwrap
3334 expressions with actions), and set the Initialization_Statements
3335 attribute again so that processing of a later pragma Import can
3338 2014-02-24 Claire Dross <dross@adacore.com>
3340 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
3341 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
3342 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
3343 Left/Right to First_To_Previous/Current_To_Last.
3345 2014-02-24 Thomas Quinot <quinot@adacore.com>
3347 * adaint.h (struct file_attributes): New component "error"
3348 (__gnat_error_attributes): Accessor for the above.
3349 * adaint.c (__gnat_error_attributes): New subprogram
3350 (__gnat_stat): Fix returned value (expect errno value)
3351 (__gnat_stat_to_attr): Add management of error component (set to
3352 stat errno value, except for missing files where it is set to 0,
3353 and exists is set to 0).
3354 * osint.ads (File_Attributes_Size): Update per change above,
3355 also clarify documentation.
3356 * s-filatt.ads: New file, binding to file attributes related
3358 * Makefile.rtl (s-filatt): New runtime unit.
3359 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
3360 to library function if not available on target).
3361 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
3362 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
3363 SIZEOF_struct_dirent_alloc): New constants.
3364 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
3365 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
3366 Perform appropriate error checking if stat fails (do not just
3367 ignore existing files if stat fails)
3368 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
3371 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3373 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
3374 the use of volatile objects as global items in a function to
3375 the variable related checks section.
3376 * sem_util.adb (Async_Readers_Enabled): Directly call
3377 Has_Enabled_Property.
3378 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
3379 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
3380 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
3381 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
3382 Update the comment on usage. State_Has_Enabled_Property how handles
3383 the original logic of the routine. Add processing for variables.
3384 (State_Has_Enabled_Property): New routine.
3385 (Variable_Has_Enabled_Property): New routine.
3387 2014-02-24 Robert Dewar <dewar@adacore.com>
3389 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
3391 * atree.ads, atree.adb (Node35): New function.
3392 (Set_Node35): New procedure.
3393 * debug.adb: Define new debug flag -gnatd.X.
3394 * einfo.ads, einfo.adb (Import_Pragma): New field.
3395 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
3396 really active yet, has to be activated with -gnatd.X.
3397 * sem_prag.adb (Set_Imported): Set new Import_Pragma
3398 field (Set_Imported): Don't set Is_Public (see
3399 Freeze.Wrap_Imported_Subprogram)
3400 * par-ch3.adb (P_Component_List): Handle unexpected null component.
3402 2014-02-24 Yannick Moy <moy@adacore.com>
3404 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
3405 * gnat_rm.texi: Correct documentation of attribute Update.
3407 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3409 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
3410 iterator in older versions of Ada.
3412 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3414 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
3415 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
3417 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3419 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
3420 indexed_components that are instances of Ada 2012 container
3421 indexing operations. Analysis and resolution of such nodes
3422 is performed on the attribute, and the original source is
3423 preserved for ASIS operations. If expansion is enabled, the
3424 indexed component is replaced by the value of this attribute,
3425 which is in a call to an Indexing aspect, in most case wrapped
3426 in a dereference operation.
3427 * sem_ch4.adb (Analyze_Indexed_Component): Create
3428 Generalized_Indexing attribute when appropriate.
3429 (Analyze_Call): If prefix is not overloadable and has an indexing
3430 aspect, transform into an indexed component so it can be analyzed
3431 as a potential container indexing.
3432 (Analyze_Expression): If node is an indexed component with a
3433 Generalized_ Indexing, do not re-analyze.
3434 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
3435 of an indexed_component that has been transformed into a container
3437 (Resolve_Indexed_Component): Call the above when required.
3438 (Resolve): Do not insert an explicit dereference operation on
3439 an indexed_component whose type has an implicit dereference:
3440 the operation is inserted when resolving the related
3441 Generalized_Indexing.
3443 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
3445 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
3448 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3450 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
3452 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
3453 Merge the expected and available mode errors.
3454 (Report_Unused_Constituents): Remove leading spaces in error messages.
3455 (Report_Unused_States): Remove leading spaces in error messages.
3457 2014-02-24 Thomas Quinot <quinot@adacore.com>
3459 * par_sco.adb (Traverse_One): Refine categorization of statement
3462 2014-02-24 Robert Dewar <dewar@adacore.com>
3464 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
3465 Pure_05, Pure_12 and Preelaborate_05.
3466 * gnat_rm.texi: Update accordingly.
3467 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
3468 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
3469 Recognize one argument form of these pragmas only in GNAT mode
3472 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3474 * s-dimmks.ads: Replace symbol for temperature, previously the
3475 Greek letter Theta, by the ASCII @ sign.
3476 * s-diflio.ads: ditto.
3478 2014-02-24 Robert Dewar <dewar@adacore.com>
3480 * exp_ch4.adb: Minor code reorganization (use OR for boolean
3482 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
3484 2014-02-24 Ben Brosgol <brosgol@adacore.com>
3486 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
3487 so that references to gnatmem and ASIS tools do not appear in the FSF
3488 edition of the GNAT User's Guide.
3490 2014-02-24 Yannick Moy <moy@adacore.com>
3492 * freeze.adb (Freeze_Entity): Do not issue warning
3493 for pre/post being ignored on imported subprogram in GNATprove
3496 2014-02-24 Robert Dewar <dewar@adacore.com>
3498 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
3499 stand.ads, sem_eval.adb: Minor reformatting.
3501 2014-02-24 Yannick Moy <moy@adacore.com>
3503 * sem_prag.adb: Minor rewording in error message.
3505 2014-02-24 Johannes Kanig <kanig@adacore.com>
3507 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
3508 GNATprove_mode, gnat2why doesn't need nor use these types.
3510 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3512 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
3513 target, in the case of signed integer exponentiation that uses a
3514 run-time routine, always select the Exp_* versions, since overflow
3515 checking is automatically done by AAMP arithmetic instructions.
3517 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3519 * sem_ch13.adb (Analyze_Aspect_Specifications):
3520 When the related context is a package instace, insert pragma
3521 Abstract_State after all internally-generated renamings related
3522 to the instance "header".
3524 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3526 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
3528 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
3529 call to an abstract subprogram is legal if it appears in a
3530 pre/postcondition of another abstract operation.
3532 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
3534 * gnat_ugn.texi: Misc updates.
3536 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3538 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
3540 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3542 * layout.adb (Layout_Variant_Record): Instantiate
3543 Generic_Check_Choices and call Check_Choices before calling
3544 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
3545 set to prevent generating incorrect discriminant-checking
3546 functions for 'others' variants (functions that unconditionally
3547 return True rather than accounting for the values covered by the
3549 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
3550 Formal_Derived_Matching.
3551 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
3552 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
3553 Formal_Derived_Matching formal to Subtypes_Statically_Match.
3554 (Subtypes_Statically_Match): Suppress the Object_Size matching
3555 test in the case where Formal_Derived_Matching is True.
3556 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
3557 True for Formal_Derived_Matching_Formal on the call to
3558 Subtypes_Statically_Compatible.
3560 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
3562 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
3564 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
3566 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
3567 Look through a conversion between original and packable version to get
3569 (build_component_ref): Rework comment and fix formatting.
3571 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
3573 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
3574 project-specific options.
3576 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3578 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
3579 not Constraint_Error.
3580 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
3581 * sem_ch5.adb: Code clean up.
3583 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3585 * sem_prag.adb (Usage_Error): Remove local
3586 constant Typ. Remove the specialized diagnostics for unconstrained
3587 or tagged items as those are not part of the explicit input set
3588 of the related subprogram and should not be flagged.
3590 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3592 * sem_attr.adb: Add guard to preserve all errors.
3594 2014-02-20 Vincent Celier <celier@adacore.com>
3596 * switch-m.adb (Normalize_Compiler_Switches): Take into account
3597 switches that are recorded in ALI files: -gnateA, -gnateE,
3598 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
3600 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3602 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
3603 of an element iterator form over a formal container with an
3605 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
3606 to create declaration and loop statements for both forms of
3607 container iterators.
3608 (Expand_Formal_Container_Element_Iterator): New procedure
3609 to handle loops of the form "for E of C" when C is a formal
3611 (Expand_Formal_Container_Iterator): Code cleanup.
3613 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3615 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
3616 (Analyze_Contract_Case): Remove the use of
3617 "may". Replace "aspect Contract_Cases" to avoid categorization
3618 of aspect vs pragma.
3619 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
3620 (Analyze_Global_Item): Remove
3621 the use of "formal", specify the subprogram. Split the
3622 error message about a state with visible refinement into
3623 two. Remove the use of "global" from "volatile global item".
3624 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
3626 (Analyze_Input_Output): Update the call to
3627 Check_Mode. Specify the duplicated item. Reword the error
3628 message concerning an input of a null output list. Use "\"
3629 for error message continuation.
3630 (Analyze_Part_Of): Remove
3631 the use of "may". Use "\" for error message continuation.
3632 (Analyze_Refined_Depends_In_Decl_Part): Update the error
3633 message concerning a useless refinement to match the format
3635 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
3636 concerning a useless refinement.
3637 (Analyze_Refinement_Clause): Use "\" for error message continuation.
3638 (Check_Constituent_Usage): Use "\" for error message continuation.
3639 (Check_Dependency_Clause): Use "\" for error message continuation.
3640 (Check_Matching_Constituent): Use "\" for error message continuation.
3641 (Check_Missing_Part_Of): Use "\" for error message continuation.
3642 (Check_Mode): Renamed to
3643 Check_Role. Update the comment on usage. Redo the error reporting
3645 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
3646 message continuation.
3647 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
3648 with comment on usage. Update all occurrences of Is_Input and Is_Output.
3649 (Inconsistent_Mode_Error): Use "\" for error message continuation.
3650 (Input_Match): Use "\" for error message continuation.
3651 (Role_Error): New routine.
3652 (Set_Convention_From_Pragma): Use "\" for error message continuation.
3653 (Usage_Error): Add local variable Error_Msg. Build specialized error
3654 message showcasing the offending item kind. Redo the diagnostics for
3655 unconstrained types.
3657 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3659 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
3660 to determine whether a type is a container type, rather than
3661 examining only its type declaration, so that subtypes and derived
3662 types are handled properly.
3664 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
3666 * gnat_ugn.texi: gnatmetric: add description of project-specific
3669 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3671 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
3672 all choices in an association for a record type have the same
3673 type, as is done for record aggregates.
3675 2014-02-20 Robert Dewar <dewar@adacore.com>
3677 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
3678 Unmodified rather than Warnings (Off). Make comments
3679 uniform in the four affected units.
3681 2014-02-20 Robert Dewar <dewar@adacore.com>
3683 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3684 Object_Size): For non-scalar types allow any value that is a
3686 * gnat_rm.texi: Document Object_Size for composites more clearly.
3688 2014-02-20 Yannick Moy <moy@adacore.com>
3690 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
3692 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3694 * stand.ads: Raise_Type: new predefined entity, used as the type
3695 of a Raise_Expression prior to resolution.
3696 * cstand.adb: Build entity for Raise_Type.
3697 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
3698 initial type of the node.
3699 * sem_type.adb (Covers): Raise_Type is compatible with all
3701 * sem_res.adb (Resolve): Remove special handling of Any_Type on
3702 Raise_Expression nodes.
3703 (Resolve_Raise_Expression): Signal ambiguity if the type of the
3704 context is still Raise_Type.
3706 2014-02-20 Robert Dewar <dewar@adacore.com>
3708 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
3709 mismatching predicates.
3710 * sem_ch6.adb (Check_Conformance): Give better messages on
3712 * sem_eval.adb (Predicates_Match): Move to spec.
3713 * sem_eval.ads (Predicates_Match): Moved here from body.
3715 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3717 * a-cbmutr.adb: Use default value in Insert_Child.
3719 2014-02-20 Vincent Celier <celier@adacore.com>
3721 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
3722 Stringt.Initialize in all project aware tools.
3724 2014-02-20 Doug Rupp <rupp@adacore.com>
3726 * gnat_ugn.texi: Document gnatbind -X option.
3727 * vms_data.ads: Minor warnings documentation reformatting.
3729 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3731 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
3732 procedure for a base type.
3734 2014-02-20 Robert Dewar <dewar@adacore.com>
3736 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
3737 expression with type info.
3738 * sem_ch13.adb: Minor reformatting.
3739 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
3740 False if predicates do not match on the two types.
3742 2014-02-20 Arnaud Charlet <charlet@adacore.com>
3744 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
3745 In Relaxed_RM_Semantics mode, allow any static integer value,
3746 for compatibility with other compilers.
3748 2014-02-20 Vincent Celier <celier@adacore.com>
3750 * errutil.adb (Initialize): Properly initialize entry in table
3751 Warnings when warnings are suppressed.
3753 2014-02-20 Robert Dewar <dewar@adacore.com>
3755 * s-os_lib.ads: Add warning about non-portability of Rename_File.
3756 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
3757 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
3758 * gnat_ugn.texi: Document no warnings on junk variable names.
3759 * layout.adb: Minor code reorganization (use Ekind_In).
3760 * stringt.adb: Move initialization of Null_String_Id to Initialize
3763 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3765 * sem_ch13.adb: Initialize optional Element_Id.
3767 2014-02-20 Robert Dewar <dewar@adacore.com>
3769 * s-os_lib.ads (Rename_File): Minor commment addition.
3771 2014-02-20 Thomas Quinot <quinot@adacore.com>
3773 * einfo.ads: Minor reformatting.
3775 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3777 * aspects.adb (Exchange_Aspects): New routine.
3778 * aspects.ads (Exchange_Aspects): New routine.
3779 * atree.adb (Rewrite): Do not check whether the save node has
3780 aspects as it never will, instead check the node about to be clobbered.
3781 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
3782 entities of generic packages.
3783 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
3784 pointer of an aspect specification list after rewriting takes place.
3785 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
3786 specifications of the generic template and the copy used for analysis.
3787 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
3788 the aspect specifications of the generic template and the
3789 copy used for analysis.
3790 (Analyze_Package_Instantiation): Propagate the aspect specifications
3791 from the generic template to the instantiation.
3792 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
3793 specifications from the generic template to the instantiation.
3794 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
3795 Abstract_State, Initializes and Initial_Condition when they
3796 apply to a package instantiation.
3798 2014-02-20 Robert Dewar <dewar@adacore.com>
3800 * stringt.adb: Add call to Initialize in package initialization.
3802 2014-02-20 Robert Dewar <dewar@adacore.com>
3804 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
3805 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
3806 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
3807 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
3810 2014-02-20 Bob Duff <duff@adacore.com>
3812 * s-os_lib.ads: Minor: Remove incorrect comment.
3814 2014-02-20 Robert Dewar <dewar@adacore.com>
3816 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
3818 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3820 * a-cborma.adb (Assign): When creating a node without a specified
3821 element, insert an uninitialized element in the map, because
3822 the instance may provide an element type with a default
3823 initialization, e.g a scalar with a Default_Value aspect.
3824 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
3825 (Insert): In the version without explicit element, provide an
3826 uninitialized element, as above.
3827 * a-cbdlli.adb (Append): In the version without explicit element,
3828 provide an uninitalized element, as above.
3829 (Allocate): Remove unused version.
3831 2014-02-20 Robert Dewar <dewar@adacore.com>
3833 * sem_elab.adb: Minor code reorganization (use Nkind_In).
3834 * stringt.adb: Remove temporary pragma Warnings (Off).
3835 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
3838 2014-02-20 Matthew Heaney <heaney@adacore.com>
3840 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
3843 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3845 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
3846 properly the cursor type for subsequent volatile testing in SPARK
3847 mode, when domain is a formal container with an Iterabe aspect.
3849 2014-02-20 Robert Dewar <dewar@adacore.com>
3851 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
3852 (Set_Specific_Warning_Off): Add Reason argument.
3853 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
3854 (Set_Specific_Warning_Off): Add Reason argument.
3855 * erroutc.adb (Warnings_Entry): Add Reason field
3856 (Specific_Warning_Entry): Add Reason field.
3857 (Warnings_Suppressed): return String_Id for Reason.
3858 (Warning_Specifically_Suppressed): return String_Id for Reason.
3859 * erroutc.ads (Warnings_Entry): Add Reason field.
3860 (Specific_Warning_Entry): Add Reason field.
3861 (Set_Specific_Warning_Off): Add Reason argument.
3862 (Set_Warnings_Mode_Off): Add Reason argument.
3863 (Warnings_Suppressed): return String_Id for Reason.
3864 (Warning_Specifically_Suppressed): return String_Id for Reason.
3865 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
3866 (Warning_Specifically_Suppressed): returns String_Id for Reason
3867 * gnat_rm.texi: Document that Warning parameter is string literal
3868 or a concatenation of string literals.
3869 * par-prag.adb: New handling for Reason argument.
3870 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
3871 for Reason argument.
3872 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
3873 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
3874 * stringt.adb: Set Null_String_Id.
3875 * stringt.ads (Null_String_Id): New constant.
3877 2014-02-20 Robert Dewar <dewar@adacore.com>
3879 * einfo.ads: Minor comment addition: Etype of package is
3881 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
3882 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
3883 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
3884 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
3885 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
3886 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3887 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
3888 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
3889 Replace all calls with calls to New_Occurrence_Of.
3891 2014-02-20 Robert Dewar <dewar@adacore.com>
3893 * par-util.adb (Ignore, case of right paren): Make this a
3896 2014-02-19 Robert Dewar <dewar@adacore.com>
3898 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
3899 * debug.adb: Remove -gnatd.X switch, no longer used.
3900 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
3903 2014-02-19 Bob Duff <duff@adacore.com>
3905 * g-socket.ads: Minor: Correct some comments.
3907 2014-02-19 Ed Schonberg <schonberg@adacore.com>
3909 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
3911 2014-02-19 Arnaud Charlet <charlet@adacore.com>
3913 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
3914 an error on out of range priorities if Relaxed_RM_Semantics.
3915 * sem_prag.adb (Analyze_Pragma): Ditto.
3917 2014-02-19 Bob Duff <duff@adacore.com>
3919 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
3920 where F denotes the renaming of an enumeration literal, and
3921 issue a specialized error message.
3923 2014-02-19 Matthew Heaney <heaney@adacore.com>
3925 * a-chtgop.ads (Checked_Index): New operation.
3926 (Next): Changed mode of hash table.
3927 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
3928 (Generic_Read, Reserve_Capacity): Ditto.
3929 (Generic_Equal): Detect tampering.
3930 (Next): Changed mode of hash table, detect tampering.
3931 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
3933 (Find): Changed mode of hash table.
3934 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
3935 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
3937 (Find): Changed mode of hash table, check for tampering.
3938 (Generic_Replace_Element): Check for tampering.
3939 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
3940 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
3941 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
3943 (Find, Generic_Replace_Element): Check for tampering.
3944 * a-chtgbo.ads (Checked_Index): New operation.
3945 * a-chtgbo.adb (Checked_Index): New operation
3946 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
3947 (Generic_Read, Next): Ditto.
3948 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
3949 table (Difference, Intersection): Use variable view of
3950 source, detect tampering (Find, Is_Subset, Overlap): Use
3951 variable view of container (Symmetric_Difference, Union):
3952 Detect tampering (Vet): Use Checked_Index to detect tampering
3953 (Constant_Reference, Element, Find): Use variable view of
3955 (Update_Element_Preserving_Key): Detect tampering.
3956 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
3959 (Equivalent_Sets, Overlap): Use Node's Next component.
3960 (Vet): Use Checked_Index to detect tampering.
3961 (Constant_Reference, Element, Find): Use variable view of container.
3962 (Update_Element_Preserving_Key): Detect tampering.
3963 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
3964 Element, Find): Use variable view of container.
3965 (Reference): Rename hash table component.
3966 (Vet): Use Checked_Index to detect tampering.
3968 2014-02-19 Arnaud Charlet <charlet@adacore.com>
3970 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
3973 2014-02-19 Thomas Quinot <quinot@adacore.com>
3975 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
3976 against calls without Def_Id.
3978 2014-02-19 Claire Dross <dross@adacore.com>
3980 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3981 a-cofove.ads: Add global annotations to subprograms.
3983 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
3985 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
3986 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
3987 Initial_Condition no longer requires the presence of pragma
3988 Initialized. Do not try to diagnose whether all variables mentioned in
3989 pragma Initializes also appear in Initial_Condition.
3990 (Collect_Variables): Removed.
3991 (Match_Variable): Removed.
3992 (Match_Variables): Removed.
3993 (Report_Unused_Variables): Removed.
3995 2014-02-19 Thomas Quinot <quinot@adacore.com>
3997 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
3999 2014-02-19 Robert Dewar <dewar@adacore.com>
4001 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
4004 2014-02-19 Vincent Celier <celier@adacore.com>
4006 * prj-part.adb (Parse_Single_Project): Use the fully resolved
4007 project path, with all symbolic links resolved, to check if the
4008 same project is imported with a different unresolved path.
4009 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
4010 changed to Resolved_Path to reflect that all symbolic links
4013 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4015 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
4016 from sem_ch13, for use elsewhere.
4017 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
4018 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
4019 cursor type on the loop variable when the iteration is over o
4022 2014-02-19 Vincent Celier <celier@adacore.com>
4024 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
4025 for an empty Target (Check_Target): Never fail when an empty
4026 target is declared in the configuration project.
4028 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4030 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
4031 the pragma comes fron a predicate aspect and the context is a
4032 record declaration within the scope that declares the type.
4034 2014-02-19 Robert Dewar <dewar@adacore.com>
4036 * gnat_rm.texi: Minor clarifications.
4037 * expander.adb, sem_aggr.adb: Add comments.
4039 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4041 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
4042 applies to a subprogram body, the name is the current scope,
4043 rather than being declared in the current scope.
4044 (Analyze_Pragma, case No_Return): Handle properly a No_Return
4045 aspect applied to a subprogram body.
4047 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4049 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
4050 of overloaded subprograms, and fix bug in handling of primitive
4053 2014-02-19 Pascal Obry <obry@adacore.com>
4055 * s-os_lib.adb: Minor reformatting.
4057 2014-02-19 Yannick Moy <moy@adacore.com>
4059 * expander.adb (Expand): Do nothing inside generics.
4060 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
4063 2014-02-19 Yannick Moy <moy@adacore.com>
4065 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
4067 2014-02-19 Robert Dewar <dewar@adacore.com>
4069 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
4070 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
4073 2014-02-19 Claire Dross <dross@adacore.com>
4075 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4076 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
4078 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4080 * sem_ch3.adb (Analyze_Declarations): Analyze
4081 a package contract at the end of the private declarations (if
4082 applicable), otherwise analyze it and the end of the visible
4085 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4087 * style.adb (Missing_Overriding): If subprogram is an
4088 instantiation, place warning on the instance node itself,
4089 without mention of the original generic. Do not emit message
4090 if explicit Ada version is older than the introduction of the
4091 overriding indicator.
4093 2014-02-19 Yannick Moy <moy@adacore.com>
4095 * gnat_rm.texi: Doc clarifications.
4097 2014-02-19 Yannick Moy <moy@adacore.com>
4099 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
4102 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4104 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
4105 specified First primitive, rather than by name.
4106 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
4107 and extend error checking for missing primitives and incorrect
4110 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4112 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
4113 errors when a Synchronization aspect on an overriding protected
4114 operation does not match the given aspect on the overridden
4115 operation of an ancestor interface.
4117 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4119 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
4120 (Check_Loop_Pragma_Placement): Update
4121 comment on usage. Remove local variables Orig_Stmt and
4122 Within_Same_Sequence. Check that the current Loop_Invariant or
4123 Loop_Variant pragma is grouped together with other such pragmas.
4124 (Is_Loop_Pragma): New routine.
4125 (Prev_In_Loop): Removed.
4127 2014-02-19 Robert Dewar <dewar@adacore.com>
4129 * par-ch6.adb (P_Return): For extended return, end column lines
4131 * par.adb: Minor documentation clarification.
4133 2014-02-19 Yannick Moy <moy@adacore.com>
4135 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
4136 that Loop_Invariant and Loop_Variant appear consecutively.
4137 * gnat_rm.texi Update documentation of Loop_Invariant and
4138 Loop_Variant pragmas.
4140 2014-02-19 Robert Dewar <dewar@adacore.com>
4142 * debug.adb: Document -gnatd.X.
4143 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
4145 (Check_Then_Column): Ditto.
4146 * styleg.adb (Check_Then): Allow THEN on line after IF.
4147 (Check_Then): Check THEN placement under control of -gnatd.X
4148 * styleg.ads (Check_Then): Now called even if THEN is not first
4150 * stylesw.ads (Style_Check_If_Then_Layout): Document new
4152 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
4154 2014-02-19 Robert Dewar <dewar@adacore.com>
4156 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
4157 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
4158 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
4159 vms_conv.adb: Fix bad layout of IF statements
4161 2014-02-19 Robert Dewar <dewar@adacore.com>
4163 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
4165 2014-02-19 Robert Dewar <dewar@adacore.com>
4167 * exp_util.adb: Update comments.
4169 2014-02-19 Doug Rupp <rupp@adacore.com>
4171 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
4172 * init.c (__gl_float_format): [VMS] New global.
4173 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
4174 representation in effect.
4176 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4178 * exp_ch6.adb Add with and use clause for Exp_Prag.
4179 (Expand_Contract_Cases): Relocated to Exp_Prag.
4180 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
4181 * exp_prag.adb Add with and use clauses for Checks and Validsw.
4182 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
4183 structure of the expanded code to showcase the evaluation of
4184 attribute 'Old prefixes. Add local variable Old_Evals. Expand
4185 any attribute 'Old references found within a consequence. Add
4186 circuitry to evaluate the prefixes of attribute 'Old that
4187 belong to a selected consequence.
4188 (Expand_Old_In_Consequence): New routine.
4189 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
4190 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
4191 potentially unevaluated prefix is always evaluated.
4193 2014-02-19 Robert Dewar <dewar@adacore.com>
4195 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
4196 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
4197 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
4198 handling for the case of Modify_Tree_For_C, this approach did
4200 * exp_util.adb (Matching_Standard_Type): New function
4201 (Side_Effect_Free): New top level functions (from
4202 Remove_Side_Effects).
4203 * exp_util.ads (Side_Effect_Free): New top level functions
4205 * sinfo.ads: Minor comment updates.
4207 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4209 * exp_ch6.adb (Expand_Simple_Function_Return): If return
4210 type is unconstrained and uses the secondary stack, mark the
4211 enclosing function accordingly, to ensure that the value is not
4212 prematurely removed.
4214 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4216 * par.adb Alphabetize the routines in Par.Sync.
4217 (Resync_Past_Malformed_Aspect): New routine.
4218 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
4219 variables. Code and comment reformatting. Detect missing
4220 parentheses on aspects [Refined_]Global and [Refined_]Depends
4221 with a non-null definition.
4222 * par-sync.adb: Alphabetize all routines in this separate unit.
4223 (Resync_Past_Malformed_Aspect): New routine.
4225 2014-02-19 Robert Dewar <dewar@adacore.com>
4227 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
4228 if Esize values do not match.
4230 2014-02-19 Yannick Moy <moy@adacore.com>
4232 * sinfo.ads: Minor comment update.
4234 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4236 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
4238 2014-02-19 Thomas Quinot <quinot@adacore.com>
4240 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
4241 that has the No_Ctrl_Actions flag is a suitable node to be
4242 wrapped if the assigned expression has no finalization actions.
4243 * sem_eval.adb (Eval_Entity_Name): For a compile time known
4244 boolean value, mark the corresponding condition SCO as constant.
4246 2014-02-19 Robert Dewar <dewar@adacore.com>
4248 * exp_util.adb: Minor reformatting.
4249 * exp_util.ads (Matching_Standard_Type): New function.
4250 * exp_ch7.adb: Minor reformatting.
4252 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4254 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
4255 to find declaration for Cursor, to handle properly the case of
4256 a discriminated iterable type.
4258 2014-02-19 Vincent Celier <celier@adacore.com>
4260 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
4261 imported library projects with the library ALI dirs, when setting
4263 * prj-env.ads (Ada_Objects_Path): Correct comments about
4264 argument Including_Libraries.
4266 2014-02-19 Gary Dismukes <dismukes@adacore.com>
4268 * gnat_rm.texi: Minor spelling fixes.
4270 2014-02-19 Doug Rupp <rupp@adacore.com>
4272 * init.c: Remove unneeded code.
4273 * fe.h (Float_Format): New macro
4274 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
4276 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4278 * sem_prag.adb (Check_Refined_Global_Item):
4279 A state or variable acts as a constituent only it is part of an
4280 encapsulating state and the state has visible refinement.
4282 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4284 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
4285 postcondition for a function when the expression does not mention
4286 'Result but the function has in-out parameters.
4288 2014-02-19 Robert Dewar <dewar@adacore.com>
4290 * gnat_rm.texi: Add documentation on Value_Size forcing biased
4293 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4295 * lib-xref.ads Remove the small table of letter and symbol usage as we
4298 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4300 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
4301 messages depending on the offending misplaced aspect specifications.
4302 (Diagnose_Misplaced_Aspect_Specifications): New routine.
4304 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4306 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
4307 for iterable aspect primitives.
4308 (Resolve_Iterable_Operation): Use expected signature of iterable
4309 aspect to resolve primitive when overloading is present.
4310 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
4311 (Check_Signature): Removed.
4313 2014-02-19 Yannick Moy <moy@adacore.com>
4315 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
4316 subunit in GNATprove_Mode.
4317 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
4319 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4321 * lib-xref.ads Alphabetize the contents of table
4322 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
4323 for E_Abstract_State. List all letters and symbols in use.
4324 * sem_prag.adb (Analyze_Abstract_State): Update all calls
4325 to Create_Abstract_State to reflect the new signature.
4326 (Create_Abstract_State): Change subprogram profile and update
4327 the comment on usage. Use the proper location of the state
4328 declaration when creating a new abstract state entity. Do not
4329 generate an external name, but simply reuse the name coming from
4330 the state declaration.
4332 2014-02-19 Robert Dewar <dewar@adacore.com>
4334 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
4335 declarations get properly inserted in Modify_Tree_For_C mode.
4336 * sinfo.ads: Minor comment addition.
4338 2014-02-19 Robert Dewar <dewar@adacore.com>
4340 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
4341 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
4343 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4345 * style.adb (Missing_Overriding): Warning does not apply in
4346 language versions prior to Ada 2005.
4347 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
4348 * sem_attr.adb: Add Attribute_Iterable where needed.
4349 * exp_attr.adb: ditto.
4350 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
4351 handle loops and quantified expressions over types that have an
4352 iterable aspect. Called from Expand_Iterator_Loop.
4353 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
4354 with Iterable aspect.
4355 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
4356 subprograms specified in the Iterable aspect have the proper
4357 signature involving container and cursor.
4358 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
4359 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
4360 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
4361 New procedure to retrieve one of the primitives First, Last,
4362 or Has_Element, from the value of the iterable aspect of a
4364 (Is_Container_Element): Predicate to recognize expressions
4365 that denote an element of one of the predefined containers,
4366 for possible optimization. This subprogram is not currently
4367 used, pending ARG discussions on the legality of the proposed
4368 optimization. Worth preserving for eventual use.
4369 (Is_Iterator): Recognize formal container types.
4370 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
4372 2014-02-19 Robert Dewar <dewar@adacore.com>
4374 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
4375 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
4376 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
4377 declarations from list of actions.
4378 * output.ads, output.adb (Delete_Last_Char): New procedure.
4379 * sinfo.ads: Document handling of Mod and expression with actions
4380 in Modify_Tree_For_C mode.
4382 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4384 * par-ch9.adb (P_Task): Add a null statement to produce a
4385 well-formed task body when due to a previous syntax error the
4386 statement list is empty.
4388 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4390 * sem_prag.adb (Check_Dependency_Clause): Account
4391 for the case where a state with a non-null refinement matches a
4392 null output list. Comment reformatting.
4393 (Inputs_Match): Copy a solitary input to avoid an assertion failure
4394 when trying to match the same input in multiple clauses.
4396 2014-02-19 Gary Dismukes <dismukes@adacore.com>
4398 * sem_attr.adb: Minor typo fix.
4400 2014-02-18 Robert Dewar <dewar@adacore.com>
4402 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
4403 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
4404 (Create_Standard): Create new unsigned types.
4405 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
4406 mode (Expand_N_Reference): Removed, problematic and not needed
4408 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
4410 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
4411 * expander.adb: Remove call to Expand_N_Reference (problematic,
4412 and not needed now).
4413 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
4414 * stand.adb: Read and write unsigned type entities.
4415 * stand.ads: Add new unsigned types.
4417 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
4419 * sem_ch4.adb (Analyze_Call): Do not mark a function call
4420 as being inside an assertion expression as the flag is now removed.
4421 (Check_Ghost_Subprogram_Call): Do not query the
4422 In_Assertion_Expression flag as it is now removed, instead use
4423 a predicate function.
4424 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
4425 In_Assertion_Expression flag as it is now removed, instead use
4426 a predicate function.
4427 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
4428 * sem_util.adb Add with and use clause for Sem_Prag.
4429 (In_Assertion_Expression_Pragma): New routine.
4430 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
4431 * sinfo.adb (In_Assertion_Expression): Removed.
4432 (Set_In_Assertion_Expression): Removed.
4433 * sinfo.ads Remove flag In_Assertion_Expression along with its
4435 (In_Assertion_Expression): Removed along with
4436 pragma Inline. (Set_In_Assertion_Expression): Removed along
4439 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
4441 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
4442 used together with '-r', '-rf' or '-rnb' options.
4444 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
4446 * sem_attr.adb (Analyze_Attribute): Comment
4447 and code reformatting. Use separate routines to check the
4448 legality of attribute 'Old in certain pragmas. Verify
4449 the use of 'Old, 'Result and locally declared entities
4450 within the prefix of 'Old.
4451 (Check_References_In_Prefix): New routine.
4452 (Check_Use_In_Contract_Cases): New routine.
4453 (Check_Use_In_Test_Case): New routine.
4455 2014-02-18 Vincent Celier <celier@adacore.com>
4457 * sem_aux.adb (Is_By_Reference_Type): For each components of
4458 a record type, check also if the component is volatile as it
4459 may have an aspect that makes it volatile. If it is, then the
4460 record type is a by reference type.
4462 2014-02-18 Robert Dewar <dewar@adacore.com>
4464 * exp_attr.adb: Minor reformatting.
4465 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
4466 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
4467 as another case where we don't generate N_Reference nodes for
4469 * expander.adb (Expand): Add call to Expand_N_Reference.
4471 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4473 * sem_prag.adb (Analyze_Refined_Pragma): Remove
4474 local variable Pack_Spec. Refinement pragmas may now apply to
4475 bodies of both visible and private subprograms.
4477 2014-02-06 Robert Dewar <dewar@adacore.com>
4479 * exp_attr.adb (Expand_Loop_Entry_Attribute):
4480 Minor change (Attr => N) (Expand_Pred_Succ): New name
4481 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
4482 Max): Expand into if expression if Modify_Tree_For_C mode.
4483 (Expand_N_Attribute_Reference, case Min): ditto
4484 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
4487 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4489 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
4490 predicate check if this is an internal declaration with
4491 No_Initialization set, as for an expanded aggregate component.
4493 2014-02-06 Doug Rupp <rupp@adacore.com>
4495 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
4496 conditions with severity of "SUCCESS" or "INFORMATIONAL".
4498 2014-02-06 Yannick Moy <moy@adacore.com>
4500 * sem_prag.adb (Analyze_Pragma): Analyze pragma
4501 Debug rewritten node before rewriting it as a null statement in
4504 2014-02-06 Robert Dewar <dewar@adacore.com>
4506 * sem_attr.adb (Min_Max): New procedure.
4507 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
4510 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4512 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
4515 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4517 * sem_prag.adb (Analyze_Abstract_State): Update
4518 all calls to Create_Abstract_State to pass the proper state
4520 (Create_Abstract_State): Add new formal parameter
4521 State_Decl along with comment on usage. Establish a link between
4522 the abstract state entity and the state declaration.
4524 2014-02-06 Robert Dewar <dewar@adacore.com>
4526 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
4527 comparison of unordered enumeration type.
4528 (Analyze_Attribute, case Max): Check for improper comparison of
4529 unordered enumeration type.
4530 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
4532 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
4533 Moved here from Sem_Res.
4535 2014-02-06 Robert Dewar <dewar@adacore.com>
4537 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
4540 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4542 * sem_ch6.adb (Process_Formals): Error message reformatting.
4544 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4546 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
4547 variable Spec. Do not inherit the null indicator from the
4548 subprogram body when generating the spec.
4550 2014-02-06 Robert Dewar <dewar@adacore.com>
4552 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
4555 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4557 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
4558 when the function has a foreign convention, but not if only the
4559 limited return type has such a convention.
4561 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4563 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
4564 variable Spec. Comment reformatting. Use Copy_Separate_Tree
4565 rather than New_Copy_Tree when building the corresponding
4566 subprogram declaration.
4568 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4570 * sem_prag.adb (Analyze_Global_Item): Remove
4571 the mode-related checks on abstract states with enabled external
4573 (Property_Error): Removed.
4575 2014-02-06 Javier Miranda <miranda@adacore.com>
4577 * lib-xref.adb (Generate_Reference): When
4578 generating the reference to the first private entity take care
4579 of handling swapped entities.
4581 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4583 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
4586 2014-02-06 Robert Dewar <dewar@adacore.com>
4588 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
4589 than the word size when operating in Modify_Tree_For_C mode.
4590 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
4592 2014-02-06 Robert Dewar <dewar@adacore.com>
4594 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
4595 compare is case insensitive.
4596 * gnat_rm.texi: Document that string compare for Warnings Off
4597 is now case insensitive.
4599 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
4601 * gnat_rm.texi: Small wording tweak.
4603 2014-02-06 Pascal Obry <obry@adacore.com>
4605 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
4606 and Included_Artifact_Patterns attribute definitions.
4608 2014-02-06 Yannick Moy <moy@adacore.com>
4610 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
4611 SPARK_Mode pragma component for all subprograms, including stubs.
4613 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4615 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
4616 the configuration options of the enclosing context in a
4618 (Analyze_Subprogram_Body_Stub): Maintain the
4619 configuration options of the enclosing context in a stack-like
4622 2014-02-06 Robert Dewar <dewar@adacore.com>
4624 * debug.adb: -gnatd.u sets Modify_Tree_For C
4625 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
4626 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
4627 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
4628 * exp_intr.adb (Expand_Shift): Call expander so we do
4629 Modify_Tree_For_C expansions.
4630 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
4633 2014-02-06 Fedor Rybin <frybin@adacore.com>
4635 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
4636 after the phase 1 of the processing of each aggregated project
4637 to get access to project trees of aggregated projects.
4638 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
4639 If specified, On_New_Tree_Loaded is called after each aggregated
4640 project has been processed succesfully.
4641 (Process): new parameter On_New_Tree_Loaded.
4642 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
4643 callback added after processing of each aggregated project.
4644 (Recursive_Process): new parameter On_New_Tree_Loaded.
4645 (Process): new parameter On_New_Tree_Loaded.
4646 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
4647 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
4649 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
4652 2014-02-06 Bob Duff <duff@adacore.com>
4654 * gnat_ugn.texi: Implement --insert-blank-lines and
4655 --preserve-blank-lines switches.
4657 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4659 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
4662 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
4664 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
4665 of the pragma on individual objects.
4667 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4669 * einfo.adb Node29 is now used as BIP_Initialization_Call.
4670 (BIP_Initialization_Call): New routine.
4671 (Set_BIP_Initialization_Call): New routine.
4672 (Write_Field29_Name): Add an entry for constants and variables.
4673 * einfo.ads Add new attribute BIP_Initialization_Call and update
4675 (BIP_Initialization_Call): New routine along with pragma Inline.
4676 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
4677 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4678 Add local declaration Res_Decl. Capture the build-in-place
4679 initialization call when the related object declaration has
4680 created a transient block.
4681 * exp_ch7.adb (Process_Transient_Objects): Add local variable
4682 Fin_Insrt. Recognize a scenario where an object declaration acts
4683 as a transient context and is initialized by a build-in-place
4686 2014-02-06 Pascal Obry <obry@adacore.com>
4688 * prj-util.adb (For_Interface_Sources): Fix handling of required
4689 bodies for aggregate libs.
4691 2014-02-06 Robert Dewar <dewar@adacore.com>
4693 * nlists.ads: Minor comment clarifications.
4695 2014-02-06 Robert Dewar <dewar@adacore.com>
4697 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
4699 * opt.ads (Modify_Tree_For_C): New flag.
4700 * output.ads, output.adb (Last_Char): New function.
4702 2014-02-06 Pascal Obry <obry@adacore.com>
4704 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
4705 share/gpr for cross-builds.
4707 2014-02-06 Robert Dewar <dewar@adacore.com>
4709 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
4710 Minor reformatting and code clean ups.
4712 2014-02-06 Pascal Obry <obry@adacore.com>
4714 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
4715 * prj.ads: Minor typo fix in comment.
4717 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4719 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
4720 local variable Expr. Flag clauses with extra parenthesis as this
4721 is not allowed by the syntax of the pragma. Code reformatting.
4723 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4725 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
4726 variables. Rename variabme Tnn to Temp. Do not create a temporary
4727 if assertions are disabled. Find enclosing routine _Postconditions
4728 and insert the temporary that captures the value of the prefix
4730 * exp_ch6.adb (Build_Postconditions_Procedure):
4731 Insert the generated _Postconditions routine
4732 before the first source declaration of the related
4734 (Insert_After_Last_Declaration): Removed.
4735 (Insert_Before_First_Source_Declaration): New routine.
4737 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4739 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
4740 Utility to determine whether current expansion is for the body
4741 of a predefined primitive operation.
4742 (Make_Predicate_Check): Use Within_Internal_Subpgram
4743 * checks.adb (Apply_Predicate_Check): Use
4744 Within_Internal_Subprogram
4745 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
4747 2014-02-06 Pascal Obry <obry@adacore.com>
4749 * prj.ads, prj-util.adb: Minor reformatting.
4751 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4753 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
4754 Take into account the Split_PPC flag to ensure that conjuncts
4755 in a composite postcondition aspect are tested in source order.
4757 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4759 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
4761 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
4762 illegal use of SPARK_Mode.
4763 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
4764 * sem_prag.adb (Analyze_Pragma): Code reformatting.
4765 * sem_util.adb Add with and use clause for Aspects.
4766 (Check_SPARK_Mode_In_Generic): New routine.
4767 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
4769 2014-02-06 Thomas Quinot <quinot@adacore.com>
4771 * a-calend.adb (Formatting_Operations.Split): Ensure that
4772 Time_Error is raised for invalid time values.
4774 2014-02-06 Arnaud Charlet <charlet@adacore.com>
4776 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
4779 2014-02-06 Robert Dewar <dewar@adacore.com>
4781 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
4782 * exp_ch3.adb (Build_Dcheck_Function): Set
4783 Is_Discriminant_Check_Function.
4785 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4787 * exp_ch7.adb (Is_Subprogram_Call): Inspect
4788 the original tree in certain cases where a construct has been
4789 factored out and replaced by a reference to a temporary.
4791 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4793 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
4794 parameters when propagating predicate function to full view.
4795 (Find_Type_Of_Object): Freeze base type of object type to catch
4796 premature use of discriminated private type without a full view.
4798 2014-02-06 Robert Dewar <dewar@adacore.com>
4800 * sprint.adb: Minor reformatting.
4802 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4804 * exp_ch4.adb (Process_Transient_Object): Add local variable
4805 Temp_Ins. When the transient object is initialized by an
4806 aggregate, the hook must capture the object after the last
4807 component assignment takes place.
4808 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
4809 routine Is_Subprogram_Call.
4810 (Is_Subprogram_Call): Inspect an
4811 aggregate that has been heavily expanded for subprogram calls.
4812 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
4813 and Temp_Ins. Remove the nested declare block and adjust the
4814 indentation. When the transient object is initialized by an
4815 aggregate, the hook must capture the object after the last
4816 component assignment takes place.
4818 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4820 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
4821 external states with enabled properties that do not match the
4823 (Property_Error): New routine.
4824 * sem_res.adb (Property_Error): New routine.
4825 (Resolve_Actuals): Detect illegal uses of external variables with
4826 enabled properties in procedure calls that do not match the mode of
4827 the corresponding formal parameter.
4829 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4831 * sem_util.adb (Has_Enabled_Property): Rename
4832 formal parameter Prop_Nam to Property. Update the comment on usage
4833 and all occurrences in the body. Add local variable Prop_Nam. When
4834 inspecting a property with an expression, the property name
4835 appears as the first choice of the component association.
4837 2014-02-04 Robert Dewar <dewar@adacore.com>
4839 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
4841 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4843 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
4844 for consistency with other messages.
4846 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4848 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
4849 iterator, indicate that the element is a constant if the container
4850 type does not have a variable indexing aspect.
4851 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
4852 marked as constant, do not reset its Ekind, to ensure that
4853 container elements in an element loop are not modified if the
4854 container (e.g. a hashed set) only has a constant indexing aspect.
4856 2014-02-04 Arnaud Charlet <charlet@adacore.com>
4858 * g-souinf.ads: Subprograms in this unit are actually not pure.
4859 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
4860 * einfo.ads (Is_Pure): Update doc to match implementation.
4862 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4864 * exp_ch13.adb: Minor spelling fix.
4866 2014-02-04 Robert Dewar <dewar@adacore.com>
4868 * opt.ads: Minor comment update.
4870 2014-02-04 Robert Dewar <dewar@adacore.com>
4872 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
4875 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4877 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
4878 on null expressions if component type is non-null, when the
4879 corresponding association covers an empty range of index values.
4881 2014-02-04 Robert Dewar <dewar@adacore.com>
4883 * sinfo.ads: Further comments on N_Expression_With_Actions node.
4885 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
4887 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
4888 variables Out_Items and Ref_Global. Remove local constant
4889 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
4890 and D8. Remove the useless collection of global items as this
4891 was a leftover from an earlier version of the routine. Move
4892 several routines out to avoid deep nesting and indentation.
4893 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
4894 parameter Do_Checks to Post_Errors. Update the comment on usage.
4895 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
4896 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
4897 to Post_Errors. Update the comment on usage. Account for the
4898 case where a self referential state may have a null input_list.
4899 (Is_Self_Referential): New routine.
4901 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4903 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
4904 entity renames an expression, as in the case of an object of
4905 an unconstrained type initialized by a function call, defer the
4906 rewriting of the expression to the expander.
4907 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
4908 'Alignment): If the entity renames an expression, introduce
4909 temporary to capture value, and rewrite original declaration to
4912 2014-02-04 Gary Dismukes <dismukes@adacore.com>
4914 * g-comlin.adb: Minor typo fix.
4916 2014-02-04 Ed Schonberg <schonberg@adacore.com>
4918 * freeze.adb (Freeze_All): Types derived from a formal
4919 access_to_classwide type do not have a finalization master.
4921 2014-02-04 Robert Dewar <dewar@adacore.com>
4923 * sprint.adb: Minor reformatting.
4925 2014-02-04 Robert Dewar <dewar@adacore.com>
4927 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
4928 cases where Actions is a null list.
4929 * sinfo.ads (N_Expression_With_Actions): Actions can be
4930 temporarily empty during semantic analysis, but must be non-empty
4931 in the final expanded tree.
4933 2014-01-31 Robert Dewar <dewar@adacore.com>
4935 * exp_ch9.adb: Minor reformatting.
4937 2014-01-31 Emmanuel Briot <briot@adacore.com>
4939 * g-comlin.adb (Set_Command_Line): Take the switches
4940 configuration from the Command_Line_Config.
4942 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4944 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
4947 2014-01-31 Vincent Celier <celier@adacore.com>
4949 * projects.texi: Add more documentation about others used as an
4950 index in indexed attributes.
4952 2014-01-31 Robert Dewar <dewar@adacore.com>
4954 * gnat_ugn.texi: Minor update.
4955 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
4956 * exp_util.adb: Minor reformatting.
4958 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4960 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
4961 depends on data that is not private to the protected object,
4962 and potentially modifiable in unsynchronized fashion.
4964 2014-01-31 Yannick Moy <moy@adacore.com>
4966 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
4969 2014-01-31 Robert Dewar <dewar@adacore.com>
4971 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
4972 for Unknown_Package.
4973 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
4975 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
4977 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
4978 the logic that generates a runtime check to determine the
4979 controlled status of the object about to be allocated or
4980 deallocated. Class-wide types now always use a runtime check
4981 even if they appear as generic actuals.
4982 (Find_Object): Detect
4983 a special case that involves interface class-wide types because
4984 the object appears as a complex expression.
4986 2014-01-31 Ed Schonberg <schonberg@adacore.com>
4988 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
4989 subprogram with an incomplete untagged formals on the list of
4990 private dependents, to verify that the type is properly completed
4991 in the private part.
4992 * sem_attr.adb: Code clean up.
4994 2014-01-31 Robert Dewar <dewar@adacore.com>
4996 * exp_ch6.adb: Minor reformatting.
4998 2014-01-31 Vincent Celier <celier@adacore.com>
5000 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
5001 when Pkg is unknown.
5003 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5005 * sem_res.adb (Resolve_Entity_Name): Comment
5006 reformatting. Allow volatile objects in various generated checks.
5008 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5010 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
5011 component association, set the etype of the identifier, for
5014 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5016 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
5017 declared in a package, not checks can apply to the subprogram.
5019 2014-01-31 Robert Dewar <dewar@adacore.com>
5021 * erroutc.adb (Validate_Specific_Warnings): Warnings are
5022 controlled -gnatw.W.
5023 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
5024 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
5026 2014-01-31 Arnaud Charlet <charlet@adacore.com>
5028 * exp_disp.adb: Update comments.
5030 2014-01-31 Yannick Moy <moy@adacore.com>
5032 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
5033 Save_Global_References): Guard access to expression in aspect.
5035 2014-01-31 Yannick Moy <moy@adacore.com>
5037 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
5038 Issue an error when the pragma is applied to a generic unit,
5039 a generic declaration, or inside a generic.
5041 2014-01-31 Yannick Moy <moy@adacore.com>
5043 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
5046 2014-01-31 Robert Dewar <dewar@adacore.com>
5048 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
5051 2014-01-31 Tristan Gingold <gingold@adacore.com>
5053 * exp_disp.adb: Add a historic note.
5055 2014-01-31 Robert Dewar <dewar@adacore.com>
5057 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
5058 Process_Deferred_References.
5060 2014-01-31 Yannick Moy <moy@adacore.com>
5062 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
5063 ineffective pragma Warnings(Off) in GNATprove_Mode.
5065 2014-01-31 Bob Duff <duff@adacore.com>
5067 * s-taskin.ads: Minor comment fix.
5068 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
5069 just direct dependents. If this is actually an abort, each task
5070 will take care of aborting its dependents, so all dependents will
5071 get aborted, as before. However, when this is called the second
5072 time from Vulnerable_Complete_Master "for convenience" (i.e. to
5073 kill off tasks waiting at terminate alternatives), aborting
5074 indirect dependents is wrong, because it causes some unrelated
5075 tasks to get aborted.
5077 2014-01-31 Robert Dewar <dewar@adacore.com>
5079 * sem_ch4.adb: Minor reformatting.
5081 2014-01-31 Robert Dewar <dewar@adacore.com>
5083 * exp_ch2.adb: New calling sequence for Is_LHS.
5084 * frontend.adb: Add call to Process_Deferred_References.
5085 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
5086 (Deferred_References): New table.
5087 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
5089 (Find_Expanded_Name): Ditto.
5090 * sem_res.adb: New calling sequence for Is_LHS.
5091 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
5092 * sem_warn.adb: Call Process_Deferred_References before issuing
5095 2014-01-31 Tristan Gingold <gingold@adacore.com>
5097 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
5098 use of System_Tasking_Protected_Objects_Single_Entry.
5099 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
5100 of Protected_Single_Entry_Call.
5101 (Expand_N_Timed_Entry_Call): Remove single_entry case.
5102 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
5104 (Make_Disp_Timed_Select_Body): Likewise.
5105 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
5106 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
5108 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
5109 (Wait_For_Completion_With_Timeout): Remove.
5110 (Protected_Single_Entry_Call): Remove Mode parameter
5111 (always Simple_Call).
5112 (Service_Entry): Remove Self_Id constant (not used anymore).
5113 (Timed_Protected_Single_Entry_Call): Remove.
5114 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
5115 (Protected_Single_Entry_Call): Remove Mode parameter.
5117 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5119 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
5120 * einfo.ads (Get_Pragma): Update the comment on special pragmas
5121 handled by this routine.
5122 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
5123 to the contract of the related subprogram body.
5124 * sem_util.adb (Add_Contract_Item): Handle the insertion of
5125 pragma Refined_Post into the contract of a subprogram body.
5126 * sinfo.ads Update the documentation of node N_Contract.
5127 * sem_res.adb (Resolve_Entity_Name): Add a guard
5128 to detect abstract states and variables only when checking the
5129 SPARK 2014 rules concerning volatile object placement.
5131 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5133 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
5134 null is compatible with any access type.
5136 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5138 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
5139 placement is not in a package.
5141 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5143 * sem_util.adb (Has_Enabled_Property): Compare the character field of
5146 2014-01-29 Robert Dewar <dewar@adacore.com>
5148 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
5149 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
5150 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
5152 2014-01-29 Robert Dewar <dewar@adacore.com>
5154 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
5155 * sem_warn.adb (Check_References): Suppress warnings if inside
5156 Initial_Condition pragma.
5158 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5160 * sem_prag.adb (Check_Missing_Part_Of): List all values of
5161 State_Space_Kind for readability reasons. Do not emit an error on
5162 a private item when the enclosing package lacks aspect/pragma
5163 Abstract_State. Do not emit an error on a private package
5164 instantiation when the corresponding generic template lacks
5166 (Has_Visible_State): New routine.
5167 * sem_util.adb (Find_Placement_In_State_Space): The visible
5168 declarations of any kind of child units in general act as proper
5171 2014-01-29 Robert Dewar <dewar@adacore.com>
5173 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
5174 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
5175 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
5176 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
5177 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
5178 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
5179 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
5180 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
5181 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
5182 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
5183 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
5184 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
5185 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
5186 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
5187 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
5188 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
5189 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
5190 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
5191 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
5192 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
5193 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
5194 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
5195 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
5196 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
5197 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
5198 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
5199 s-regpat.adb, s-secsta.adb, s-stalib.ads,
5200 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
5201 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
5202 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
5203 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
5204 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
5206 2014-01-29 Robert Dewar <dewar@adacore.com>
5208 * expander.adb: Minor reformatting.
5210 2014-01-29 Javier Miranda <miranda@adacore.com>
5212 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
5215 2014-01-29 Javier Miranda <miranda@adacore.com>
5217 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
5218 that checks if an interface types defines the predefined "="
5219 function because the compiler was erroneously not generating the
5220 predefined "=" primitive as soon as the name of some interface
5221 primitive is "=" (formals were not checked).
5223 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5225 * expander.adb (Expander): In GNATprove mode, do not process
5226 transient scopes: they are in general not created in this mode,
5227 and an attempt to examine them will lead to constraint errors when
5228 processing configuration pragmas that have analyzable expressions.
5230 2014-01-29 Vincent Celier <celier@adacore.com>
5232 * clean.adb (Gnatclean): Fail if main project is an aggregate
5233 project or if there is an aggregate library project in the
5235 * gnatcmd.adb: Fail if the main project is an aggregate project
5236 or if there is an aggegate library project in the project tree.
5237 * make.adb (Initialize): : Fail if main project is an aggregate
5238 project or if there is an aggregate library project in the
5240 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
5241 * prj-makr.adb (Initialize): Fail if the main project is an
5242 aggregate project or an aggregate library project.
5244 2014-01-29 Vincent Celier <celier@adacore.com>
5246 * prj-part.adb (Check_Import_Aggregate): New procedure
5247 to check if an imported project is an aggregate project.
5248 (Parse_Single_Project): Call Check_Import_Aggregate
5249 * projects.texi: Document that aggregate projects cannot be
5250 extended or imported.
5252 2014-01-29 Robert Dewar <dewar@adacore.com>
5254 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
5255 reformatting and code clean up.
5256 * gnat_ugn.texi: Add documentation section on Atomic Variables
5259 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5261 * einfo.adb Flag264 is now unused.
5262 (Has_Body_References): Removed.
5263 (Set_Has_Body_References): Removed.
5264 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
5265 * einfo.ads Update the comment on usage of attribute
5266 Body_References. Remove attribute Has_Body_References and its
5268 (Has_Body_References): Removed along with pragma Inline.
5269 (Set_Has_Body_References): Removed along with pragma Inline.
5270 * sem_prag.adb (Analyze_Global_Item): Move the call to
5271 Record_Possible_Body_Reference in the state related checks
5272 section. Add a comment intended function.
5273 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
5274 in the state related checks section. Add a comment intended function.
5275 (Analyze_Refinement_Clause): Cleanup the illegal body reference
5276 reporting. Add a comment on timing of error reporting.
5277 (Record_Possible_Body_Reference): Reimplement the routine.
5279 2014-01-29 Vincent Celier <celier@adacore.com>
5281 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
5282 unit-based languages.
5283 (Mains.Complete_Mains.Do_Complete): Use the source file project
5284 tree when calling Find_File_Add_Extension. Use the correct
5285 project name when reporting an error.
5287 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5289 * aspects.adb Add an entry for aspect Part_Of in table
5291 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
5292 Aspect_Argument, Aspect_Names and Aspect_Delay.
5293 * atree.h Define Elist9.
5294 * atree.adb (Elist9): New routine.
5295 (Set_Elist9): New routine.
5296 * atree.ads (Elist9): New routine.
5297 (Set_Elist9): New routine.
5298 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
5299 the list of node usage. Remove Refined_State from the list of
5301 (Encapsulating_State): New routine.
5303 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
5304 (Refined_State): Removed.
5305 (Set_Encapsulating_State): New routine.
5306 (Set_Part_Of_Constituents): New routine.
5307 (Set_Refined_State): Removed.
5308 (Write_Field9_Name): Add an entry
5309 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
5310 Encapsulating_State. Remove the entry for Refined_State.
5311 * einfo.ads Add new attributes Encapsulating_State
5312 and Part_Of_Constituents alond with their usage in
5313 entities. Remove attribute Refined_State along with its
5315 (Encapsulating_State): New routine and
5316 pragma Inline. (Get_Pragma): Update the comment on usage.
5317 (Part_Of_Constituents): New routine and pragma Inline.
5318 (Refined_State): Removed along with pragma Inline.
5319 (Set_Encapsulating_State): New routine and pragma Inline.
5320 (Set_Part_Of_Constituents): New routine and pragma Inline.
5321 (Set_Refined_State): Removed along with pragma Inline.
5322 * par-prag.adb Pragma Part_Of does not need any special processing
5324 * sem_ch3.adb (Analyze_Declarations): Remove local variables
5325 Body_Id and Prag. Call separate routines to analyze the
5326 contract of a package [body].
5327 (Analyze_Object_Contract):
5328 Update the comment on usage. Remove local variables
5329 Items and Nam. Use Get_Pragma rather than traversing the
5330 classification list. Verify whether the lack of indicator
5331 Part_Of agrees with the placement of the variable in state space.
5332 (Analyze_Object_Declaration): Initialize the encapsulating state
5333 of a variable. (Requires_State_Refinement): Moved to sem_util.
5334 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
5335 (Analyze_Package_Contract): New routine.
5336 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
5337 (Analyze_Package_Contract): New routine.
5338 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
5339 state and Part_Of constituents.
5340 * sem_ch13.adb (Analyze_Aspect_Specifications):
5341 Add processing for aspect Part_Of. Update all
5342 calls to Decorate_Delayed_Aspect_And_Pragma.
5343 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
5344 not need any special processing at freeze time.
5345 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
5346 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
5347 update the associated comment.
5348 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
5349 (Analyze_Abstract_State): Add new global variable State_Id. Remove
5350 local constants Errors and Loc. Remove local variables Is_Null
5351 and State_Nam. Create the entity of the abstract state on the
5352 spot, before all remaining checks are performed. Verify that a
5353 missing Part_Of option agrees with the placement of the abstract
5354 state within the state space.
5355 (Analyze_Depends_In_Decl_Part):
5356 Add new global variables Constits_Seen and States_Seen. Check
5357 that a state and a corresponding constituent do not appear
5358 in pragma [Refined_]Depends.
5359 (Analyze_Global_In_Decl_Part):
5360 Add new global variables Constits_Seen and States_Seen. Check
5361 that a state and a corresponding constituent do not appear
5362 in pragma [Refined_]Global.
5363 (Analyze_Global_Item):
5364 Remove the now obsolete code that deals with Part_Of.
5365 Add the entity of the global item to the list of processed
5366 items. (Analyze_Initializes_In_Decl_Part): Add new global
5367 variables Constits_Seen and States_Seen. Check that a state
5368 and a corresponding constituent do not appear in pragma
5370 (Analyze_Initialization_Item): Add the entity
5371 of the initialization item to the list of processed items.
5372 (Analyze_Input_Item): Add the entity of the initialization
5373 item to the list of processed items.
5374 (Analyze_Input_Output):
5375 Remove the now obsolete code that deals with Part_Of. Add the
5376 entity of the input/output to the list of processed items.
5377 (Analyze_Part_Of): New routine.
5378 (Analyze_Part_Of_Option): Remove
5379 local constant Par_State. Add local constant Encaps and local
5380 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
5381 the option. Turn the related state into a Part_Of constituent
5382 if the option is legal.
5383 (Analyze_Pragma): Add processing
5385 (Analyze_Refined_State_In_Decl_Part):
5386 Remove global constants Pack_Body and Spec_Id. Remove
5387 global variables Abstr_States and Hidden_States. Add new
5388 global variables Available_States, Body_Id, Body_States and
5389 Spec_Id. Add new local constant Body_Decl. Reimplement the
5390 logic that extracts the states available for refinement from
5391 the related package and the body hidden states of the said
5393 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
5394 (Check_Applicable_Policy): Alphabetize body.
5395 (Check_Dependency_Clause): Replace Refined_State
5396 with Encapsulating_State.
5397 (Check_Matching_Constituent):
5398 Reimplement the logic that determines whether an item is a valid
5399 / invalid constituent of the current refined state. Return when
5400 a construct does not denote a valid abstract state. Extract the
5401 list of Part_Of constituents for further analysis. Check that all
5402 Part_Of constituents of a state have been used in its refinement.
5403 (Check_Matching_State): Update the comment on usage. Operate
5404 on the list of available states.
5405 (Check_Missing_Part_Of): New routine.
5406 (Check_Refined_Global_Item): Replace Refined_State
5407 with Encapsulating_State.
5408 (Check_State_And_Constituent_Use): New routine.
5409 (Create_Abstract_State): New routine.
5410 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
5411 (Is_Part_Of): Removed.
5412 (Collect_Body_States): New routine.
5413 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
5414 (Collect_Hidden_States): Removed.
5415 (Report_Unrefined_States): Change the profile of the procedure along
5416 with the comment on usage.
5417 (Report_Unused_Constituents): New routine.
5418 (Report_Unused_Hidden_States): Removed.
5419 (Report_Unused_States): New routine.
5420 * sem_prag.ads (Check_Missing_Part_Of): New routine.
5421 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
5422 appear in the classification pragmas of a package instantiation
5424 (Find_Placement_In_State_Space): New routine.
5425 (Is_Child): Removed.
5426 (Is_Child_Or_Sibling): Remove formal
5427 parameter Private_Child. Remove the private child checks.
5428 (Requires_State_Refinement): Moved from sem_ch3.
5429 * sem_util.ads Add new type State_Space_Kind along with
5430 comment on its usage and values.
5431 (Add_Contract_Item): Update the comment on usage.
5432 (Find_Body_Discriminal): Alphabetize spec.
5433 (Find_Placement_In_State_Space): New routine.
5434 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
5435 and update the comment on usage.
5436 (Requires_State_Refinement): Moved from sem_ch3.
5437 * sinfo.ads: Update the documentation of N_Contract.
5438 * snames.ads-tmpl The predefined name for Part_Of is now used
5439 to denote a pragma. Add Pragma_Id for Part_Of.
5441 2014-01-29 Emmanuel Briot <briot@adacore.com>
5443 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
5445 (Dump): New subprogram.
5447 2014-01-29 Tristan Gingold <gingold@adacore.com>
5449 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
5450 Expand_Entry_Declaration to factorize code.
5452 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5454 * checks.adb: minor clarification.
5455 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
5456 search for primitive operations to the entities that immediately
5457 follow the type declaration.
5459 2014-01-29 Tristan Gingold <gingold@adacore.com>
5461 * exp_ch9.adb (Build_Protected_Entry): Do not call
5462 Complete_Entry_Body anymore.
5463 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
5464 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
5466 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
5468 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
5469 string when the Name input bigger than allowed. Adapt the function
5472 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5474 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
5475 if expression is within a case_expression of if_expression.
5477 2014-01-29 Robert Dewar <dewar@adacore.com>
5479 * exp_ch9.adb, inline.ads: Minor reformatting.
5481 2014-01-29 Tristan Gingold <gingold@adacore.com>
5483 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
5485 2014-01-29 Yannick Moy <moy@adacore.com>
5487 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
5488 SPARK_Mode_Pragma components to be able to analyze generic
5490 * sem_ch12.adb (Analyze_Package_Instantiation,
5491 Inline_Instance_Body, Need_Subprogram_Instance_Body,
5492 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
5493 for future analysis of the instance.
5494 (Instantiate_Package_Body,
5495 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
5496 from instantiation to analyze the instance.
5498 2014-01-29 Robert Dewar <dewar@adacore.com>
5500 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
5503 2014-01-29 Yannick Moy <moy@adacore.com>
5505 * gnat_rm.texi: Update description of SPARK_Mode pragma.
5507 2014-01-29 Tristan Gingold <gingold@adacore.com>
5509 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
5511 2014-01-29 Thomas Quinot <quinot@adacore.com>
5513 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
5515 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5517 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
5518 resulting string is an internal entity. and thus requires no
5519 initialization. This is relevant when Initialize_ Scalars is
5520 enabled, because the resultant spurious initialization may lead to
5521 secondary stack anomalies that produce a mangled name for a task.
5523 2014-01-29 Yannick Moy <moy@adacore.com>
5525 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
5526 not inherited from spec anymore. Check consistency
5527 rules after processing of declarations.
5528 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
5529 from spec anymore. Check consistency rules after processing of
5531 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
5533 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
5536 2014-01-27 Robert Dewar <dewar@adacore.com>
5538 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
5540 (Resolve_Range): Add type name/location to unordered msg.
5542 2014-01-27 Claire Dross <dross@adacore.com>
5544 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
5545 Capacity) is only called with Capacity >= Length (Source) and
5546 Capacity in Capacity_Range.
5547 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
5548 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
5549 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
5550 in the code is this is not the case.
5552 2014-01-27 Thomas Quinot <quinot@adacore.com>
5554 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
5555 selected component in an instance where the component of the
5556 actual is not visibile at instantiation.
5558 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5560 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
5561 has a dynamic predicate, generate freeze node for Actual_Subtype
5562 at once, because the declaration of the corresponding predicate
5563 function will make reference to it.
5565 2014-01-27 Tristan Gingold <gingold@adacore.com>
5567 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
5569 2014-01-27 Robert Dewar <dewar@adacore.com>
5571 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
5572 for 2**X optimization.
5574 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5576 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
5577 explicitly whether value is in range of Character, because the
5578 library is typically compiled with range checks disabled, and
5579 we cannot rely on the implicit check on the argument of 'Val.
5581 2014-01-27 Vincent Celier <celier@adacore.com>
5583 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
5584 not the Target to itself.
5586 2014-01-27 Robert Dewar <dewar@adacore.com>
5588 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
5589 changes to avoid incorrect use of unordered enum types.
5591 2014-01-27 Thomas Quinot <quinot@adacore.com>
5593 * sem_ch4.adb: Minor reformatting.
5595 2014-01-27 Robert Dewar <dewar@adacore.com>
5597 * scn.adb (Check_End_Of_Line): Removed.
5598 (Error_Long_Line): Removed.
5599 (Determine_License): Use versions of above routines from Scanner.
5600 * scng.adb (Check_End_Of_Line): Moved to spec.
5601 (Error_Long_Line): Removed, no longer used.
5602 * scng.ads (Check_End_Of_Line): Moved here from body.
5604 2014-01-27 Tristan Gingold <gingold@adacore.com>
5606 * exp_ch7.adb (Build_Cleanup_Statements): Call
5607 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
5609 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
5610 Remove Service_Name variable.
5611 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
5612 factorize code from the above subprograms.
5613 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
5615 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
5617 * einfo.adb (Has_Option): Reimplemented.
5618 * sem_prag.adb (Analyze_Refinement_Clause): Add global
5619 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
5620 External_Constit_Seen and State. Add local variables Body_Ref,
5621 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
5622 avoid a cumbersome while pool. Verify the legality of an external
5623 state and relevant properties.
5624 (Check_External_Property): New routine.
5625 (Check_Matching_State): Remove parameter profile
5626 and update comment on usage.
5627 (Collect_Constituent): Store the
5628 relevant external property of a constituent.
5629 * sem_util.adb (Async_Readers_Enabled): Update the call to
5630 Has_Enabled_Property.
5631 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
5632 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
5633 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
5634 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
5635 Update comment on usage. Reimplement the logic to recognize the various
5636 formats of properties.
5638 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5640 * par-ch5.adb: Minor reformatting.
5642 2014-01-27 Tristan Gingold <gingold@adacore.com>
5644 * s-tposen.ads: Harmonize style and comments.
5646 2014-01-27 Vincent Celier <celier@adacore.com>
5648 * projects.texi: Document that shared library projects, by
5649 default, cannot import projects that are not shared library
5652 2014-01-27 Robert Dewar <dewar@adacore.com>
5654 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
5657 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5659 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
5660 any other exception is raised.
5661 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
5662 still necessary to perform a conversion in order to remove overlong
5665 2014-01-27 Robert Dewar <dewar@adacore.com>
5667 * exp_smem.adb: Minor reformatting.
5669 2014-01-27 Thomas Quinot <quinot@adacore.com>
5671 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
5673 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5675 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
5676 nodes for operands to the original node for the call, to preserve
5677 Original_Node pointers within the resolved operands, given that
5678 they may have been rewritten as well. Previous approach copied
5679 the operands into a new tree and lost those pointers.
5681 2014-01-27 Claire Dross <dross@adacore.com>
5684 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
5686 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5688 * sem_util.adb (Check_Internal_Protected_Use): A call through
5689 an anonymous access parameter of the current protected function
5690 is not a potential modification of the current object.
5692 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5694 * a-cobove.adb (Reserve_Capacity): Procedure raises
5695 Capacity_Error, not Constraint_Error, when request cannot be
5698 2014-01-27 Vincent Celier <celier@adacore.com>
5700 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
5701 not the Target to itself.
5703 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5705 * exp_ch4.adb (Expand_Concatenate): If the target of the
5706 concatenation is a library-level entity, always use the off-line
5707 version of concatenation, regardless of optimization level. This
5708 is space-efficient, and prevents linking problems when some
5709 units are compiled with different optimization levels.
5711 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5713 * sem_ch5.adb: Code clean up.
5715 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5717 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
5718 when an array or container iterator includes a subtype indication,
5719 which is only legal in an element iterator.
5721 2014-01-27 Thomas Quinot <quinot@adacore.com>
5723 * exp_ch7.adb: Minor reformatting.
5725 2014-01-27 Robert Dewar <dewar@adacore.com>
5727 * opt.adb (SPARK_Mode): Default for library units is None rather
5729 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
5731 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
5733 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
5735 2014-01-27 Robert Dewar <dewar@adacore.com>
5737 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
5738 Suspicious_Labels table if we have identifier; followed by loop
5740 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
5741 * par.adb (Suspicious_Labels): New table.
5743 2014-01-27 Robert Dewar <dewar@adacore.com>
5745 * exp_aggr.adb (Check_Bounds): Reason is range check, not
5748 2014-01-27 Yannick Moy <moy@adacore.com>
5750 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
5752 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
5754 (Add_SPARK_Xrefs): Include references to constants.
5755 * spark_xrefs.ads Document new character 'c' for references to
5758 2014-01-27 Thomas Quinot <quinot@adacore.com>
5760 * exp_smem.adb (Add_Write_After): For a function call, insert write as
5761 an after action in a transient scope.
5763 2014-01-27 Thomas Quinot <quinot@adacore.com>
5765 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
5766 to a shared variable as an OUT formal in a call to an init proc,
5767 the 'Read call must be emitted after, not before, the call.
5769 2014-01-27 Robert Dewar <dewar@adacore.com>
5771 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
5773 2014-01-27 Robert Dewar <dewar@adacore.com>
5775 * a-wichha.adb (Character_Set_Version): Change to output proper
5778 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
5780 * einfo.adb (Is_Input_Only_State): Removed.
5781 (Is_Non_Volatile_State): Removed.
5782 (Is_Output_State): Removed.
5783 * einfo.ads (Is_Input_Only_State): Remove attribute and
5784 subprogram. Update related entity.
5785 (Is_Non_Volatile_State):
5786 Remove attribute and subprogram. Update related entity.
5787 (Is_Output_State): Removed attribute and subprogram. Update
5789 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
5791 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
5792 an object, not just variables.
5793 (Analyze_Object_Contract): New routine.
5794 (Analyze_Variable_Contract): Removed.
5795 (Process_Discriminants): Detect an illegal use of volatile
5796 discriminant in SPARK mode.
5797 * sem_ch5.adb (Analyze_Iterator_Specification):
5798 Detect an illegal use of volatile loop variable.
5799 (Analyze_Loop_Parameter_Specification): Detect an illegal use
5800 of volatile loop variable.
5801 * sem_ch6.adb (Process_Formals): Update the volatile object
5802 detection. Detect an illegal formal of mode IN OUT or OUT in
5803 SPARK mode. Enhance the error messages with references.
5804 * sem_ch12.adb (Instantiate_Object): Update the volatile object
5805 detection. Enhance the error messages with references.
5806 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
5807 messages with references.
5808 (Analyze_Contract_Case): Enhance the error messages with references.
5809 (Analyze_External_Property): Call Check_Duplicate_Property to process
5810 an external property.
5811 (Analyze_External_Property_In_Decl_Part): New routine.
5812 (Analyze_External_State_In_Decl_Part): Removed.
5813 (Analyze_Global_Item): Detect an illegal
5814 use of a volatile constant. Detect an illegal use
5815 of a variable with enabled Effective_Reads. Enhance
5816 the error messages with references. Remove obsolete
5817 checks concerning Input_Only and Output_Only states.
5818 (Analyze_Initialization_Item): Enhance the error messages
5820 (Analyze_Initializes_In_Decl_Part): Do not
5821 collect the states and variables when the initialization list
5823 (Analyze_Input_Item): Enhance the error messages with references.
5824 (Analyze_Input_Output): Enhance the error messages with references.
5825 (Analyze_Pragma): Enhance the error messages with references.
5826 (Analyze_Refinement_Clause): Code reformatting.
5827 (Analyze_Refined_Depends_In_Decl_Part):
5828 Rename global variable Global to Reg_Global and update all
5829 occurrences. Add local variables D7 and D8. Update the error
5830 messages with references. Update the call to Collect_Global_Items.
5831 (Analyze_Refined_Global_In_Decl_Part): Add local variables
5832 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
5833 the call to Collect_Global_Items. Account for a Proof_In state
5834 in null / useless refinement checks. Verify the coverage of
5836 (Check_Dependency_Clause): Remove local variable
5837 Out_Constits. Remove the retrieval and removal of constituents
5838 for an Output_Only state. Remove the reporting of unused
5839 Output_Only state constituents.
5840 (Check_Duplicate_Mode): Enhance
5841 the error message with a reference.
5842 (Check_Duplicate_Property): New routine.
5843 (Check_Duplicate_Option): Enhance the error message with a reference.
5844 (Check_External_Properties): Enhance the error message with a reference.
5845 (Check_Function_Return): Enhance the error message with a reference.
5846 (Check_In_Out_States): Update
5847 comment on usage. Add a specialized error message for Proof_In
5848 constituents. Enhance the error message with a reference.
5849 (Check_Input_States): Update comment on usage. Account for
5850 possible Proof_In constituents. Enhance the error message
5852 (Check_Matching_Constituent): Enhance the error message with a
5854 (Check_Matching_State): Enchance the error message with a reference.
5855 (Check_Mode): Add local variable From_Global. Update the call to
5856 Find_Mode. Emit more precise error messages concerning extra items
5857 (Check_Mode_Restriction_In_Enclosing_Context): Consider
5858 pragma Refined_Global. Enhance the error message with a
5860 (Check_Mode_Restriction_In_Function): Enhance the error message with
5862 (Check_Output_States): Update comment on usage. Add local variable
5863 Posted. Account for possible Proof_In constituents. Produce a detailed
5864 list of missing constituents.
5865 (Check_Proof_In_States): New routine.
5866 (Check_Refined_Global_Item): Handle Proof_In
5867 constituents. Enchance the error message with a reference.
5868 (Collect_Global_Items): Add formal parameters Proof_In_Items
5869 and Has_Proof_In_State. Update the comment on usage. Account
5871 (Create_Or_Modify_Clause): Enchance
5872 the error message with a reference.
5874 formal parameter From_Global. Update the comment on usage.
5875 Detect when the mode is governed by pragma [Refined_]Global.
5876 (Output_Constituents): Removed.
5877 (Report_Extra_Constituents):
5878 Report extra Proof_In constituents.
5879 (Report_Unused_Constituents): Removed.
5880 (Usage_Error): Code reformatting. Enhance the error
5881 messages with reference.
5882 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
5883 (Analyze_External_State_In_Decl_Part): Removed.
5884 * sem_res.adb (Resolve_Actuals): Update the volatile object
5885 detection. Enhance the error message with a reference.
5886 (Resolve_Entity_Name): Update the volatile object
5887 detection. Enhance the error message with a reference.
5888 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
5889 (Is_SPARK_Volatile_Object): New routine.
5890 (Has_Volatile_Component): New routine.
5891 * sem_util.ads (Is_Delegate): Alphabetized.
5892 (Is_SPARK_Volatile_Object): New routine.
5893 (Has_Volatile_Component): New routine.
5894 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
5896 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5898 * sem_attr.adb: Resolve fully prefix of 'Update.
5900 2014-01-27 Ben Brosgol <brosgol@adacore.com>
5902 * gnat_rm.texi: Minor clarifications.
5904 2014-01-27 Robert Dewar <dewar@adacore.com>
5906 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
5907 about call that is generated as part of an Initial_Condition
5909 * sem_prag.adb: Minor spelling correction.
5911 2014-01-27 Robert Dewar <dewar@adacore.com>
5913 * sem_prag.adb (Set_Convention_From_Pragma): Check that
5914 convention Ghost can only apply to functions.
5915 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
5917 2014-01-27 Robert Dewar <dewar@adacore.com>
5919 * gnat_ugn.texi: Add Short_Enums to documentation of
5922 2014-01-27 Robert Dewar <dewar@adacore.com>
5924 * sem_prag.adb (Analyze_Input_Item): Correct check for input
5925 item in same package.
5926 * sem_util.ads, sem_util.adb (Within_Scope): New function.
5928 2014-01-26 Arnaud Charlet <charlet@adacore.com>
5930 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
5931 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
5932 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
5933 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
5936 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
5938 * gcc-interface/Makefile.in: Fix oversight.
5940 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
5942 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
5943 conversion from a thin pointer with a shifted value.
5944 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
5945 read-only flag from the values onto the result.
5946 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
5948 2014-01-25 Tristan Gingold <gingold@adacore.com>
5950 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
5951 for E_Variable with a pragma Linker_Section.
5953 2014-01-25 Robert Dewar <dewar@adacore.com>
5955 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
5956 with Default_Value aspect is passed in by copy.
5958 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
5960 * set_targ.adb: Set Short_Enums.
5961 * gcc-interface/lang.opt (fshort-enums): New option.
5962 * gcc-interface/misc.c (gnat_handle_option): Handle it.
5963 (gnat_post_options): Do not modify the global settings.
5965 2014-01-24 Robert Dewar <dewar@adacore.com>
5967 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
5969 (Random_Decimal_Fixed): New generic function.
5970 * s-rannum.ads: Minor comment clarifications.
5972 2014-01-24 Robert Dewar <dewar@adacore.com>
5974 * back_end.adb: Remove Short_Enums handling (handled in
5975 Ttypes/Get_Targ now) Minor added comments.
5976 * freeze.adb: Change name Short_Enums_On_Target to
5978 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
5979 * opt.ads: Minor comment updates.
5980 * sem_ch13.adb: Change name Short_Enums_On_Target to
5982 * set_targ.adb: Set Short_Enums from gcc back end.
5983 * set_targ.ads (Short_Enums): New variable.
5984 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
5985 Ttypes/Get_Targ now).
5986 * ttypes.ads (Target_Short_Enums): New constant boolean switch
5988 2014-01-24 Pascal Obry <obry@adacore.com>
5990 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
5992 2014-01-24 Gary Dismukes <dismukes@adacore.com>
5994 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
5995 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
5998 2014-01-24 Robert Dewar <dewar@adacore.com>
6000 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
6002 2014-01-24 Vincent Celier <celier@adacore.com>
6004 * prj.adb (Add_Aggregated_Project): Do not add a project in
6005 the list if it is already there.
6007 2014-01-24 Yannick Moy <moy@adacore.com>
6009 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
6010 Correct the search for a subrogram declaration to which a pragma is
6013 2014-01-24 Bob Duff <duff@adacore.com>
6015 * gnat_ugn.texi: Document --decimal-grouping and
6016 --based-grouping switches in gnatpp.
6018 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6020 * sinfo.ads: Documentation update.
6022 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6024 * sem_ch3.adb (Constant_Redeclaration): New declaration is
6025 illegal if previous one has an initial expression that is an
6026 aggregate expanded into assignments.
6028 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6030 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
6031 code reorganization to remove spurious warning on a loop with
6032 an array element iterator that has a null range.
6034 2014-01-24 Vincent Celier <celier@adacore.com>
6036 * make.adb (Binding_Phase): When setting the Ada paths, use
6037 the library ALI dir, not the object dir in libraries.
6039 2014-01-24 Yannick Moy <moy@adacore.com>
6041 * sinfo.ads: Add documentation of check flag fields.
6043 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6045 * sem_res.adb (Resolve_Actuals): If an actual is a view
6046 conversion of a discriminated object, and the formal type is
6047 discriminated and constrained, apply a discriminant check to
6050 2014-01-24 Robert Dewar <dewar@adacore.com>
6052 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
6054 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6056 * sem_ch3.adb (Analyze_Declarations): At the end of an
6057 appropriate declarative part, call Freeze_All from the first
6058 declaration in the scope, not from the first unfrozen one. This
6059 is necessary to apply visibility checks to entities with delayed
6060 aspects. Otherwise, in the presence of instantiations and cleanups
6061 that they may generate, the delayed aspects may be analyzed too
6062 late and produce spurious visibility errors.
6063 * sem_attr.adb: Place etype on range.
6064 * sem_ch6.adb: Documentation expression functions.
6066 2014-01-24 Robert Dewar <dewar@adacore.com>
6068 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
6069 terminology in compiler).
6071 2014-01-24 Robert Dewar <dewar@adacore.com>
6073 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
6074 categories, now that Ada 95 supports raise expressions.
6076 2014-01-24 Robert Dewar <dewar@adacore.com>
6078 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
6079 Short_Enums_On_Target.
6080 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
6082 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
6084 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6086 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
6087 indication is given explicity, check that it matches the array
6088 component type or the container element type of the domain
6091 2014-01-24 Tristan Gingold <gingold@adacore.com>
6093 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
6094 * gcc-interface/misc.c (flag_short_enums): Declare.
6095 (gnat_post_options): Set it.
6097 2014-01-24 Vincent Celier <celier@adacore.com>
6099 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
6100 to cache the result when Including_Libraries is False.
6101 * prj-env.ads (Ada_Objects_Path): Update documentation
6102 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
6103 (Get_Object_Directory): Return the Library_Ali_Dir only when
6104 when Including_Libraries is True.
6105 * prj.ads (Get_Object_Directory): Fix and complete documentation
6106 (Project_Data): New component Ada_Objects_Path_No_Libs
6108 2014-01-24 Robert Dewar <dewar@adacore.com>
6110 * checks.adb (Expr_Known_Valid): Result of fpt operator never
6113 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
6115 * back_end.adb: Minor fix in comment.
6117 2014-01-24 Javier Miranda <miranda@adacore.com>
6119 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
6120 required to report the error in case of task types.
6122 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6124 * sem_attr.adb: Additional index checking.
6126 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6128 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
6129 expressions in each component association, and for records note
6130 the entity in each association choice, for subsequent resolution.
6131 (Resolve_Attribute, case 'Update): Complete resolution of
6132 expressions in each component association.
6134 2014-01-24 Robert Dewar <dewar@adacore.com>
6136 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
6137 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
6138 leading to wrong handling of SPARK_Mode for library units).
6140 2014-01-24 Robert Dewar <dewar@adacore.com>
6142 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
6143 on generic instances (do not consider them to be internally
6146 2014-01-24 Doug Rupp <rupp@adacore.com>
6148 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
6149 vice pthread_sigmask.
6151 2014-01-24 Vincent Celier <celier@adacore.com>
6153 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
6156 2014-01-24 Vincent Celier <celier@adacore.com>
6158 * prj-ext.adb (Add): Do not output anything when Silent is True,
6159 whatever the verbosity. When Source is From_External_Attribute,
6160 set the corresponding environment variable if it is not already set.
6161 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
6163 * prj-proc.adb (Process_Expression_For_Associative_Array):
6164 For attribute External, call Prj.Ext.Add with Silent set to
6165 True for the child environment, to avoid useless output in non
6168 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6170 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
6171 range given by a subtype indication, and force evaluation of
6172 the bounds, as for a simple range.
6173 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
6174 of bounds of slice for various kinds of discrete ranges.
6175 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
6176 Evaluate_Slice_Bounds.
6178 2014-01-24 Bob Duff <duff@adacore.com>
6180 * s-taskin.ads (Activator): Make this Atomic, because
6181 Activation_Is_Complete reads it, and that can be called
6182 from any task. Previously, this component was only
6183 modified by the activator before activation, and by
6184 Self after activation.
6185 * a-taside.ads, a-taside.adb (Environment_Task,
6186 Activation_Is_Complete): Implement these missing functions.
6188 2014-01-24 Doug Rupp <rupp@adacore.com>
6190 * init.c: Add a handler section for Android.
6192 2014-01-24 Arnaud Charlet <charlet@adacore.com>
6194 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
6196 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6198 * sem_ch4.adb (Operator_Check): If one operand is a
6199 Raise_Expression, set its type to that of the other operand.
6200 * sem_res.adb (Resolve_Raise_Expression): new procedure.
6201 (Resolve_Actuals): For an actual that is a Raise_Expression,
6202 set the type to that of the formal.
6203 * sem_type.adb (Find_Unique_Type): If one of the operands is a
6204 Raise_Expression, return type of the other operand.
6206 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6208 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
6209 component of the record has a type with a default aspect, and
6210 the corresponding aggregate component is initiaized with a box,
6211 use the default value in the rewritten aggregate.
6213 2014-01-24 Tristan Gingold <gingold@adacore.com>
6215 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
6216 s-interr-sigaction.adb,
6217 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
6218 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
6219 to the call to Install_Restricted_Handlers.
6221 2014-01-24 Emmanuel Briot <briot@adacore.com>
6223 * prj-nmsc.adb (Check_File): Add protection when the source is
6224 not fully initialized.
6226 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6228 * sem_util.adb (Is_Post_State): In a postcondition, a selected
6229 component that denotes an implicit dereference is a reference
6230 to the post state of the subprogram.
6232 2014-01-24 Robert Dewar <dewar@adacore.com>
6234 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
6235 for generated subprograms.
6236 (Analyze_Subprogram_Specification): Ditto.
6238 2014-01-24 Vincent Celier <celier@adacore.com>
6240 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
6241 attributes in package Builder of aggregate and aggregate library
6243 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
6244 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
6245 Remove parameters. Change error message from "... externally
6246 build library ..." to "... externally built project ...".
6247 (Process_Naming_Scheme.Check): Do not do any check in aggregate
6248 project, as attribute Library_Dir and Library_Name have already
6249 been detected as forbidden.
6251 2014-01-24 Vincent Celier <celier@adacore.com>
6253 * prj-env.adb (Find_Project): If cached project path is not in
6254 project directory, look in current directory first and use cached
6255 project path only if project is not found in project directory.
6257 2014-01-24 Robert Dewar <dewar@adacore.com>
6259 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
6261 2014-01-24 Vincent Celier <celier@adacore.com>
6263 * projects.texi: Document that aggregate projects are only
6264 supported by gprbuild, but not by gnatmake. Document that the
6265 only attribute Switches in package Binder of aggregate projects
6266 will be ignored if its index is not others. Document that
6267 attribute Global_Config_File is allowed in package Binder of
6270 2014-01-24 Robert Dewar <dewar@adacore.com>
6272 * sem_prag.adb: Minor code reorganization.
6273 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
6275 2014-01-24 Pascal Obry <obry@adacore.com>
6277 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
6278 attribute definition.
6280 2014-01-24 Vincent Celier <celier@adacore.com>
6282 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
6283 in the Queue the same source (same path, same multi-source index)
6284 from the same project file, to avoid compiling several times
6287 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
6289 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
6290 (Has_Gigi_Rep_Item): Likewise.
6291 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
6292 Has_Gigi_Rep_Item for objects.
6293 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
6294 (prepend_one_attribute): ...this.
6295 (prepend_one_attribute_pragma): New function extracted from...
6296 (prepend_attributes): ...here. Swap the parameters for consistency.
6297 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
6299 <object>: Deal with a pragma Linker_Section on a constant
6300 or variable. <E_Function>: Deal with a pragma Linker_Section
6302 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
6304 2014-01-24 Vincent Celier <celier@adacore.com>
6306 * opt.ads: Minor comment update.
6308 2014-01-24 Robert Dewar <dewar@adacore.com>
6310 * sem_prag.adb (Analyze_Input_Output): Add missing error check
6312 * sem_util.adb (Is_Refined_State): Add defense against junk
6315 2014-01-24 Pascal Obry <obry@adacore.com>
6317 * projects.texi: Removes Build_Slaves attribute documentation.
6319 2014-01-23 Robert Dewar <dewar@adacore.com>
6321 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
6324 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6326 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
6327 applies to expressions that come from source.
6328 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
6330 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
6331 rule regarding potentially unevaluated expressions, to prefix
6334 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6336 * exp_util.adb (Make_Invqriant_Call): If type of expression is
6337 a private extension, get invariant from base type.
6339 2014-01-23 Robert Dewar <dewar@adacore.com>
6341 * sem_util.adb, sem_attr.adb: Minor reformatting.
6343 2014-01-23 Robert Dewar <dewar@adacore.com>
6345 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
6346 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
6347 * sem.adb (Semantics): Remove save/restore of
6348 SPARK_Mode[_Pragma]. Not needed since already done in
6349 Save/Restore_Opt_Config_Switches.
6351 2014-01-23 Robert Dewar <dewar@adacore.com>
6353 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
6354 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
6355 Linker_Section enhancements.
6357 2014-01-23 Tristan Gingold <gingold@adacore.com>
6359 * gnat_rm.texi: Minor editing.
6361 2014-01-23 Robert Dewar <dewar@adacore.com>
6363 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
6364 with'ed internal units.
6365 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
6367 2014-01-23 Javier Miranda <miranda@adacore.com>
6369 * lib-xref.adb (Generate_Reference): As part of processing the
6370 "end-of-spec" reference generate an extra reference to the first
6371 private entity of the package.
6372 * xr_tabls.adb (Add_Reference): No action needed for the extra
6373 'E' reference associated; similar to the processing of the
6376 2014-01-23 Bob Duff <duff@adacore.com>
6378 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
6380 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6382 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
6383 predicate to implement rule given in 6.1.1 (20/3).
6384 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
6385 'Old in a postcondition, if it is potentially unevaluated and
6386 it is not an entity name.
6388 2014-01-23 Bob Duff <duff@adacore.com>
6390 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
6392 2014-01-23 Robert Dewar <dewar@adacore.com>
6394 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
6397 2014-01-23 Bob Duff <duff@adacore.com>
6399 * g-dynhta.ads: Minor comment fix.
6401 2014-01-23 Yannick Moy <moy@adacore.com>
6403 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
6404 from spec on body only when not already inherited on spec. Set
6405 SPARK_Mode from context on body without previous spec. *
6406 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
6407 library-level entities. Correct retrieval of entity from
6408 declaration, for cases where the declaration is not a unit.
6409 * sem_ch12.adb (Instantiate_Object): Avoid
6410 calling Is_Volatile_Object on an empty node.
6412 2014-01-23 Robert Dewar <dewar@adacore.com>
6414 * gnatlink.adb (Gnatlink): Check for suspicious executable file
6417 2014-01-23 Robert Dewar <dewar@adacore.com>
6419 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
6420 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
6421 style errors in instances.
6422 * g-dynhta.ads (Static_HTable): Comment updates.
6424 2014-01-23 Vincent Celier <celier@adacore.com>
6426 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
6427 to find a configuration project file when Config_File_Name is
6428 No_Configuration_File.
6429 * prj-conf.ads (No_Configuration_File): New constant String.
6430 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
6431 with Config_File_Name set to No_Configuration_File, so that
6432 no existing configuration project file will be used, and the
6433 configuration project will be only created in memory when
6434 Add_Default_GNAT_Naming_Scheme is called.
6435 * projects.texi: Minor reformatting.
6437 2014-01-23 Vincent Celier <celier@adacore.com>
6439 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
6440 a config project file if On_Load_Config is not null.
6441 * prj-pars.adb: Minor comment changes.
6443 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6445 * lib-xref.adb (Output_References): Output progenitors of
6446 synchronized tagged types, for source navigation.
6448 2014-01-23 Robert Dewar <dewar@adacore.com>
6450 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
6451 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
6452 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
6454 2014-01-23 Emmanuel Briot <briot@adacore.com>
6456 * prj-conf.adb (Get_Or_Create_Configuration_File): call
6457 On_Load_Config later.
6459 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6461 * sem_ch3.adb (Analyze_Declarations): Do not
6462 generate the spec of the late primitive in ASIS mode. Add two
6463 comments to explain the special cases when the expansion is
6466 2014-01-23 Robert Dewar <dewar@adacore.com>
6468 * sem_util.adb (Note_Possible_Modification): Fix error of
6469 misbehaving for implicit dereference cases in -gnatc mode.
6471 2014-01-23 Emmanuel Briot <briot@adacore.com>
6473 * prj-pars.adb: Minor reformatting.
6475 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6477 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
6478 body generated for an expression function within a protected body
6479 needs a set of renaming declarations if the expression function
6482 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6484 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
6485 list interface progenitor of a tagged concurrent type, for better
6488 2014-01-22 Robert Dewar <dewar@adacore.com>
6490 * lib.adb (In_Extended_Main_Code_Unit): Return False for
6492 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
6493 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
6494 treatment of Slocs No_Location and Standard_Location.
6495 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
6496 check for entity with Standard_Location Sloc, rather than relying
6497 on Lib routines to do that.
6498 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
6499 that a call cannot occur before a later occuring body within
6502 2014-01-22 Thomas Quinot <quinot@adacore.com>
6504 * rtsfind.adb: Update comment.
6506 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
6508 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
6509 * sem_ch3.adb (Analyze_Declarations): Add local variable
6510 Body_Seen. Generate the spec of a late controlled
6511 primitive body that is about to freeze its related type.
6512 (Handle_Late_Controlled_Primitive): New routine.
6514 2014-01-22 Robert Dewar <dewar@adacore.com>
6516 * a-stream.adb: Minor reformatting.
6518 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6520 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
6521 sub-procedure Declared_In_Actual to handle properly the visibility
6522 of actuals in actual packages, that are themselves actuals to a
6523 actual package of the current instance. This mimics properly the
6524 visibility of formals of formal packages declared with a box,
6525 within the corresponding generic unit.
6527 2014-01-22 Robert Dewar <dewar@adacore.com>
6529 * checks.adb: Do not assume that a volatile variable is valid.
6531 2014-01-22 Thomas Quinot <quinot@adacore.com>
6533 * g-catiio.ads (Image, Value): Clarify that these functions
6534 operate in the local time zone. Minor documentation update.
6536 2014-01-22 Thomas Quinot <quinot@adacore.com>
6538 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
6540 2014-01-22 Robert Dewar <dewar@adacore.com>
6542 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
6543 Moved to sem_aux.adb.
6545 2014-01-22 Robert Dewar <dewar@adacore.com>
6547 * vms_data.ads: Minor reformatting.
6549 2014-01-22 Robert Dewar <dewar@adacore.com>
6551 * debug.adb: Document messages affected by -gnatd.E including
6552 the new ones that relate to late definition of equality.
6553 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
6554 debug flag -gnatd.E is set, then generate warnings rather than
6556 (Check_Untagged_Equality): In earlier versions of Ada,
6557 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
6559 2014-01-22 Robert Dewar <dewar@adacore.com>
6561 * sem_prag.adb (Usage_Error): Output additional messages for
6562 unconstrained OUT parameters lacking an input dependency.
6564 2014-01-22 Robert Dewar <dewar@adacore.com>
6566 * sem_ch4.adb: Minor reformatting.
6568 2014-01-22 Robert Dewar <dewar@adacore.com>
6570 * restrict.ads: Minor reformatting.
6571 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
6572 forbids a call from within a subprogram to the same subprogram.
6574 2014-01-22 Thomas Quinot <quinot@adacore.com>
6576 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
6577 stream attributes for Stream_Element_Array.
6578 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
6579 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
6580 defined in the current scope.
6582 2014-01-22 Robert Dewar <dewar@adacore.com>
6584 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
6586 2014-01-22 Thomas Quinot <quinot@adacore.com>
6588 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
6590 2014-01-22 Thomas Quinot <quinot@adacore.com>
6592 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
6593 declaration initialized with a function call, whose type
6594 has variable size, need to remove side effects so that the
6595 initialization expression becomes a dereference of a temporary
6596 reference to the function result.
6598 2014-01-22 Yannick Moy <moy@adacore.com>
6600 * errout.adb (Initialize): Remove trick to add dummy entry
6602 * erroutc.adb (Set_Warnings_Mode_Off,
6603 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
6604 command line switch.
6605 * opt.ads (Warning_Mode): Document behavior
6606 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
6608 2014-01-22 Robert Dewar <dewar@adacore.com>
6610 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
6612 2014-01-22 Robert Dewar <dewar@adacore.com>
6614 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
6615 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
6616 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
6617 case Storage_Size): call Check_Pool_Size_Clash.
6619 2014-01-22 Robert Dewar <dewar@adacore.com>
6621 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
6622 sem_eval.ads: Minor reformatting.
6624 2014-01-22 Thomas Quinot <quinot@adacore.com>
6626 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
6627 Any_Composite to prevent cascaded errors.
6629 2014-01-22 Yannick Moy <moy@adacore.com>
6631 * errout.adb (Initialize): Do not insert special entry in Warnings
6632 table in GNATprove_Mode.
6633 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
6635 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
6638 2014-01-22 Robert Dewar <dewar@adacore.com>
6640 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
6643 2014-01-22 Robert Dewar <dewar@adacore.com>
6645 * snames.ads-tmpl: Update header.
6647 2014-01-22 Thomas Quinot <quinot@adacore.com>
6649 * exp_util.adb (Insert_Actions): When inserting actions on a
6650 short circuit operator that has already been analyzed, do not park
6651 actions in node; instead introduce an N_Expression_With_Actions
6652 and insert actions immediately.
6653 Add guard for unexpected case of climbing up through statement
6654 in Actions list of an N_Expression_With_Actions.
6655 * sem_elab.adb (Insert_Elab_Check): Remove complex
6656 specialized circuitry for the case where the context is already
6657 analyzed, as it is not needed and introduces irregularities in
6658 finalization. Instead rely on the above change to Insert_Actions
6659 to ensure that late insertion on short circuit operators works
6662 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6664 * sem_ch4.adb (Operator_Check): Improve error message when an
6665 operand of concatenation is an access type.
6667 2014-01-22 Thomas Quinot <quinot@adacore.com>
6669 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
6672 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6674 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
6675 of an expanded name in a proper body, whose prefix is a package
6676 in the context of the proper body, when there is a homonym of
6677 the package declared in the parent unit.
6679 2014-01-22 Robert Dewar <dewar@adacore.com>
6681 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
6682 msg if errors found.
6683 (Check_One_Unit): Same change.
6685 2014-01-22 Robert Dewar <dewar@adacore.com>
6687 * ug_words: Add missing/wrong entries for VMS warning switches.
6688 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
6690 2014-01-22 Jerome Guitton <guitton@adacore.com>
6692 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
6695 2014-01-22 Robert Dewar <dewar@adacore.com>
6697 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
6699 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
6701 * gcc-interface/Makefile.in: Minor fixes.
6703 2014-01-21 Robert Dewar <dewar@adacore.com>
6705 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
6706 * par-ch5.adb (P_Condition): New version with expression prescanned.
6707 * par.adb (P_Condition): New version with expression prescanned.
6709 2014-01-21 Robert Dewar <dewar@adacore.com>
6711 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
6712 if Address is not a private type.
6713 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6714 Ignore pragma if System.Address is not a private type.
6716 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6718 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
6719 uninitialized value.
6721 2014-01-21 Thomas Quinot <quinot@adacore.com>
6723 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
6725 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6727 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
6728 the value of Assertions_Enabled flag when compiling an instance of
6729 an internal unit. This facilitates the use of pre/postconditions
6730 in generic internal units, such as the new elementary function
6733 2014-01-21 Robert Dewar <dewar@adacore.com>
6735 * exp_aggr.adb: Minor reformatting.
6736 * sem_attr.adb: Minor reformatting.
6737 * sem_res.adb: Minor comment addition.
6738 * einfo.adb: Minor comment updates.
6739 * freeze.adb: Minor reformatting and code reorganization.
6741 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6743 * par-ch4.adb (P_If_Expression): Handle more gracefully an
6744 elsif clause that does not have an else part.
6746 2014-01-21 Robert Dewar <dewar@adacore.com>
6748 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
6749 * gcc-interface/Makefile.in: clean up target pairs.
6751 2014-01-21 Pascal Obry <obry@adacore.com>
6753 * projects.texi: Minor typo fix.
6755 2014-01-21 Thomas Quinot <quinot@adacore.com>
6757 * freeze.adb (Check_Component_Storage_Order): If a record type
6758 has an explicit Scalar_Storage_Order attribute definition clause,
6759 reject any component that itself is of a composite type and does
6762 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6764 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
6765 can be used to generate proper cross-reference information for
6766 the parent units of proper bodies.
6768 2014-01-21 Thomas Quinot <quinot@adacore.com>
6770 * exp_pakd.adb (Expand_Packed_Element_Set,
6771 Expand_Packed_Element_Reference): No byte swapping required in
6772 the front-end for the case of a reverse storage order array,
6773 as this is now handled uniformly in the back-end. However we
6774 still need to swap back an extracted element if it is itself a
6775 nested composite with reverse storage order.
6777 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6779 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
6780 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
6783 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6785 * gnat_ugn.texi: Minor updates.
6787 2014-01-21 Thomas Quinot <quinot@adacore.com>
6789 * exp_pakd.adb: Update comment, minor reformatting.
6791 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6793 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
6794 object check when SPARK_Mode is on.
6795 * sem_ch6.adb (Process_Formals): Trigger the volatile object
6796 check when SPARK_Mode is on.
6797 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
6798 check when SPARK_Mode is on.
6799 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
6800 corresponding pragma of aspect SPARK_Mode in the visible
6801 declarations of a package declaration.
6802 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
6803 check when SPARK_Mode is on.
6804 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
6805 check when SPARK_Mode is on.
6806 (Resolve_Entity_Name): Trigger
6807 the volatile object check when SPARK_Mode is on.
6809 2014-01-21 Robert Dewar <dewar@adacore.com>
6811 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
6812 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
6814 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6816 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
6817 object is declared, it is rewritten as a renaming of an dynamic
6818 expression that wraps the initial value. The renaming declaration
6819 is first given an internal name, to prevent collisions with the
6820 entity already declared, and then the name is modified to reflect
6821 the original one. the modification of the name must preserve
6822 the source location of the original, to prevent spurious errors
6823 when compiling with style checks if the declaration involves
6824 more than one entity.
6826 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
6828 * aspects.adb Add entries for Async_Readers, Async_Writers,
6829 Effective_Reads and Effective_Writes in table Canonical_Aspect.
6830 * aspects.ads Add entries for Async_Readers, Async_Writers,
6831 Effective_Reads and Effective_Writes in tables Aspect_Id,
6832 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
6833 * atree.adb (Ekind_In): New version with 8 parameters.
6834 (Node34): New routine.
6835 (Set_Node34): New routine.
6836 * atree.ads (Ekind_In): New version with 8 parameters.
6837 (Node34): New routine.
6838 (Set_Node34): New routine.
6839 * einfo.adb Contract is now Node34.
6840 (Contract): Update the assertion and node usage.
6841 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
6842 Effective_Reads and Effective_Writes.
6843 (Set_Contract): Update the assertion and node usage.
6844 (Write_Field24_Name): Remove the output for a contract.
6845 (Write_Field34_Name): Add output for a contract.
6846 * einfo.ads Contract is now Node34. Update the comment on
6847 attribute usage and related node structures.
6848 (Get_Pragma): Update the comment on usage.
6849 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
6850 Effective_Reads and Effective_Writes do not require special
6851 processing by the parser.
6852 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
6853 (Analyze_Declarations): Analyze the contract of a variable at
6854 the end of the declarative region.
6855 (Analyze_Object_Declaration): Create a contract for a variable.
6856 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
6857 of classification pragmas.
6858 (Process_Formals): Detect an illegal
6859 use of a volatile object as a formal in a function.
6860 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
6861 a volatile object as an actual in generic instantiation.
6862 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
6863 Effective_Reads and Effective_Writes in table Sig_Flags.
6864 (Analyze_External_State_In_Decl_Part): New routine.
6865 (Analyze_Global_Item): Detect an illegal use of a volatile object
6866 as a global item of a function.
6867 (Analyze_Pragma): Reimplement
6868 pragma Abstract_State. Add support for pragmas Async_Readers,
6869 Async_Writers, Effective_Reads and Effective_Writes.
6870 (Check_External_Properties): New routine.
6871 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
6872 (Check_External_Properties): New routine.
6873 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
6874 volatile object as an actual in a call.
6875 (Resolve_Entity_Name):
6876 Add local variables Par, Prev and Usage_OK. Detect illegal
6877 contexts of volatile objects.
6878 * sem_util.adb (Add_Contract_Item): Add support for
6879 pragmas associated with the contract of a variable.
6880 (Async_Readers_Enabled): New routine.
6881 (Async_Writers_Enabled): New routine.
6882 (Effective_Reads_Enabled): New routine.
6883 (Effective_Writes_Enabled): New routine.
6884 (Has_Enabled_Property):
6886 (Is_Unchecked_Conversion_Instance): New routine.
6887 (Is_Volatile_Object): Add support for entities that may denote
6889 * sem_util.ads (Add_Contract_Item): Update the
6891 (Async_Readers_Enabled): New routine.
6892 (Async_Writers_Enabled): New routine.
6893 (Effective_Reads_Enabled): New routine.
6894 (Effective_Writes_Enabled): New routine.
6895 (Is_Unchecked_Conversion_Instance): New routine.
6896 * sinfo.ads Update the comment on the structure of N_Contract.
6897 * snames.ads-tmpl Add predefined names for Async_Readers,
6898 Async_Writers, Effective_Reads and Effective_Writes. Add
6899 pragma ids for Async_Readers, Async_Writers, Effective_Reads
6900 and Effective_Writes.
6902 2014-01-21 Robert Dewar <dewar@adacore.com>
6904 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
6905 * sem_eval.adb (Compile_Time_Known_Value): Remove special
6906 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
6907 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
6908 (Test_Foldable): Add CRT_Safe parameter
6909 * sem_eval.ads (Compile_Time_Known_Value): Remove special
6910 handling of CRT mode.
6911 (CRT_Safe_Compile_Time_Known_Value): New function.
6913 2014-01-21 Robert Dewar <dewar@adacore.com>
6915 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
6916 with pragma or aspect that applies to package spec or subprogram
6919 2014-01-21 Robert Dewar <dewar@adacore.com>
6921 * exp_aggr.adb: Minor reformatting.
6923 2014-01-21 Johannes Kanig <kanig@adacore.com>
6925 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
6927 2014-01-21 Bob Duff <duff@adacore.com>
6929 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
6931 2014-01-21 Steve Baird <baird@adacore.com>
6933 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
6935 2014-01-21 Vincent Celier <celier@adacore.com>
6937 * prj-part.adb (Parse_Single_Project): Accept to extend a project
6938 if it has only be imported by an project being extended. When a
6939 project that has only been imported by a project being extended
6940 is imported by another project that is not being extended,
6941 reset the previous indication, so that it will be an error if
6942 this project is extended later.
6943 * prj-tree.adb (Create_Project): Include component From_Extended
6944 in table Projects_HT
6945 * prj-tree.ads (Project_Name_And_Node): New Boolean component
6948 2014-01-21 Robert Dewar <dewar@adacore.com>
6950 * atree.ads, atree.adb: Add Node33 and Set_Node33.
6951 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
6952 New field (SPARK_Pragma_Inherited): New flag
6953 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
6955 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
6956 * opt.ads (SPARK_Mode_Pragma): New global variable.
6957 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
6958 * sem_ch3.adb: Use new SPARK_Mode data structures.
6959 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
6960 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
6961 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
6962 (Pop_Scope): Restore SPARK_Mode_Pragma.
6963 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
6964 new data structures.
6966 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6968 * back_end.adb: Undo previous change, not needed. Minor reformatting.
6970 2014-01-21 Thomas Quinot <quinot@adacore.com>
6972 * exp_ch5.adb: Fix comment.
6973 * switch-c.adb: Minor comment update.
6974 * exp_ch3.adb: Minor reformatting.
6976 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6978 * back_end.adb (Scan_Compiler_Arguments): Do not store object
6979 filename in gnatprove mode.
6981 2014-01-21 Thomas Quinot <quinot@adacore.com>
6983 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
6984 suppresses usage of primitive _assign for tagged types).
6985 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
6986 No_Ctrl_Actions for a tagged type that does not require
6987 finalization, as we want to disable usage of _assign (which
6988 may cause undesirable discriminant checks on an uninitialized,
6991 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6993 * sem_prag.adb: Reject invariant'class on completion.
6995 2014-01-21 Javier Miranda <miranda@adacore.com>
6997 * exp_ch3.adb (Build_Init_Procedure): For
6998 derivations of interfaces, do not move the the initialization
6999 of the _parent field since such assignment is not generated.
7001 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7003 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
7004 with the operator it renames if we are within an expression of
7005 a pre/postcondition, because the expression will be reanalyzed
7006 at a later point, and the analysis of the renaming may affect
7007 the visibility of the operator when in an instance.
7009 2014-01-21 Robert Dewar <dewar@adacore.com>
7011 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
7012 Add this flag to type conversion nodes and assignment nodes.
7013 * treepr.adb: Deal properly with Flag 1,2,3.
7014 * treeprs.adt: Minor comment update.
7016 2014-01-21 Robert Dewar <dewar@adacore.com>
7018 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
7020 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
7021 parameter, completely rewrite spec.
7023 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7025 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
7026 instance that is inlined, it may have been rewritten as a wrapper
7027 package. In that case the unit that must be made visible is the
7028 related instance of the package.
7030 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7032 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
7033 previous change in codepeer mode.
7035 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7037 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
7038 call to Abort_Undefer, as expected by the runtime.
7039 * s-tasren.adb (Local_Complete_Rendezvous): Replace
7040 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
7041 deferred at this point. Update comments.
7043 2014-01-21 Thomas Quinot <quinot@adacore.com>
7045 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
7047 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7049 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
7052 2014-01-21 Robert Dewar <dewar@adacore.com>
7054 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
7056 2014-01-21 Thomas Quinot <quinot@adacore.com>
7058 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
7059 this is value is used in Node_Id arithmetic operations.
7060 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
7061 instead of hard-coded unrolled code.
7063 2014-01-21 Yannick Moy <moy@adacore.com>
7065 * gnat1drv.adb: Minor code cleanup, removing useless code.
7067 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7069 * opt.ads (SPARK_Switches_File_Name): New.
7070 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
7071 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
7072 * gnat_ugn.texi: Document -gnates.
7074 2014-01-21 Yannick Moy <moy@adacore.com>
7076 * errout.adb (Special_Msg_Delete): Update comment. Remove
7077 special case for GNATprove which should not ignore mismatch
7078 in sizes for representation clauses.
7079 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
7080 which should not ignore pragma Pack.
7082 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7084 * sem_ch4.adb: Code clean up.
7086 2014-01-21 Steve Baird <baird@adacore.com>
7088 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
7090 2014-01-21 Robert Dewar <dewar@adacore.com>
7092 * gcc-interface/gigi.h: Get Flags array address.
7093 * gcc-interface/trans.c: Acquire Flags array address.
7094 * atree.adb: Add support for Flags array and Flag0,1,2,3.
7095 * atree.ads: Add support for Flags array and Flag0,1,2,3.
7096 * atree.h: Add support for Flags array and Flag0,1,2,3.
7097 * back_end.adb: Pass Flags array address to gigi.
7099 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7101 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
7102 reference to generated body so that legality checks on stream
7103 attributes are properly applied. If type is tagged and already
7104 frozen, insert generated body at the point of the renaming
7107 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7109 * sem_ch12.adb: Code clean up.
7110 * sem_ch8.adb: Minor reformatting
7112 2014-01-20 Robert Dewar <dewar@adacore.com>
7114 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
7115 converting warnings on inevitable exceptions to errors.
7116 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
7117 converting warnings on inevitable exceptions to errors.
7118 * opt.adb (SPARK_Mode_Config): Handled like other config flags
7119 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
7120 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
7121 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
7122 New flag (Config_Switches_Type): Add SPARK_Mode field
7123 * sem.adb: Minor code reorganization (remove unnecessary with)
7124 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
7125 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
7126 converting warnings on inevitable exceptions to errors.
7127 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
7128 converting warnings on inevitable exceptions to errors.
7129 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
7130 converting warnings on inevitable exceptions to errors.
7131 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
7132 converting warnings on inevitable exceptions to errors.
7133 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
7135 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
7137 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
7139 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
7140 converting warnings on inevitable exceptions to errors.
7141 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
7142 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
7143 of Get_SPARK_Mode_Id
7144 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
7145 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
7146 converting warnings on inevitable exceptions to errors.
7147 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
7148 converting warnings on inevitable exceptions to errors.
7149 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
7152 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7154 * sem_ch13.adb: Add semantic information to rewritten type
7157 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7159 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
7160 are of a type with unknown discriminants, convert both to the
7161 underlying view of the type, so that the proper constraint check
7162 can be applied to the right-hand side.
7164 2014-01-20 Robert Dewar <dewar@adacore.com>
7166 * atree.adb (Copy_Node): Fix failure to copy last component
7167 (Exchange_Entities): Fix failure to exchange last entity
7169 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7171 * sem_ch12.adb: Code clean up.
7173 2014-01-20 Robert Dewar <dewar@adacore.com>
7175 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
7177 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7179 * sem_ch4.adb (Analyze_Quantified_Expression): If after
7180 pre-analysis the loop parameter specification has been
7181 rewritten as a iterator specification, propagate the change to
7182 the quantified expression, for ASIS navigtion needs.
7184 2014-01-20 Vincent Celier <celier@adacore.com>
7186 * par-ch10.adb: Minor error message change: escape [ and ].
7188 2014-01-20 Robert Dewar <dewar@adacore.com>
7190 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
7191 * errout.adb: Implement [ and ] insertion characters.
7192 * errout.ads: Document new [ and ] insertion characters.
7193 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
7194 addition of ??? comment.
7195 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
7196 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
7197 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
7198 Make warnings on exceptions into errors in GNATprove mode.
7199 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
7202 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7204 * sem_ch13.adb: Code clean up.
7206 2014-01-20 Robert Dewar <dewar@adacore.com>
7208 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
7210 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
7211 error in GNATprove mode.
7213 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7215 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
7216 reference 'Old takes no parameters, and thus can appear as a
7219 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7221 * exp_aggr.adb: Fix minor typos.
7223 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7225 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
7226 instance the attribute is legal, and its value is determined
7227 statically if the type has no discriminants. This choice is
7228 more useful than rechecking the legality rule in the instance,
7229 is consistent with older usage, and is also consistent with all
7232 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7234 * sem_cat.adb (Validate_Static_Object_Name): Change error into
7235 warning in Relaxed_Semantic_Mode.
7237 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7239 * sem_attr.adb: Code and comments cleanup.
7241 2014-01-20 Yannick Moy <moy@adacore.com>
7243 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
7244 * errout.adb (Compilation_Errors): Remove special handling in
7246 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
7247 removed debug flags.
7248 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
7249 Global, Initial_Condition, Initializes and Refined_State pragmas and
7251 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
7252 SPARK_Strict_Mode): Remove global flags.
7253 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
7254 always performed now, on packages declaring a null state.
7255 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
7256 at providing pedantic mode for bounds of integer types.
7257 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
7258 "some" quantified expression now issued under control of -gnatw.t,
7259 like the other warning on unused bound variable.
7260 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
7262 (Analyze_Pragma): Remove tests for SPARK 2014
7263 pragmas, not officially allowed by GNAT.
7265 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7267 * sem_prag.adb (Analyze_Pragma): Ensure that
7268 the sole argument of pragmas Abstract_State, Contract_Cases,
7269 Depends, Global and Initializes in in aggregate form.
7270 (Analyze_Refined_Pragma): Ensure that the sole argument of
7271 pragmas Refined_Depends, Refined_Global and Refined_State is in
7273 (Ensure_Aggregate_Form): New routine.
7275 2014-01-20 Doug Rupp <rupp@adacore.com>
7277 * sem_attr.adb (Analyze_Attribute): case
7278 Attribute_Constrained => treat all prefixes as legal for Declib
7281 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7283 * sem_prag.adb (Check_Mode): Reimplement the routine.
7284 (Find_Mode): New routine.
7286 2014-01-20 Robert Dewar <dewar@adacore.com>
7288 * sem_ch4.adb (Operator_Check): Handle additional
7289 Allow_Integer_Address cases.
7291 2014-01-20 Robert Dewar <dewar@adacore.com>
7293 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
7294 allowed if address is non-private, no longer true.
7295 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7296 Remove check for address being private, causes difficulty when
7297 pragma used in gnat.adc file and is not needed, since we guard
7298 this in Address_Integer_Convert_OK.
7299 * exp_ch7.adb: Minor reformatting.
7300 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
7302 2014-01-20 Robert Dewar <dewar@adacore.com>
7304 * checks.adb (Apply_Range_Check): Remove gnatprove special
7305 casing of exponentiation.
7306 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
7307 operand for integer case to check range against Natural.
7309 2014-01-20 Robert Dewar <dewar@adacore.com>
7311 * s-tataat.adb: Minor reformatting.
7313 2014-01-20 Robert Dewar <dewar@adacore.com>
7315 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
7316 entities, and also fix documentation to remove mention of visible
7317 integer type, since this is not what the implementation does.
7318 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
7319 entities, and also fix documentation to remove mention of visible
7320 integer type, since this is not what the implementation does.
7321 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
7323 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
7324 case for parameter type check.
7325 * sem_res.adb (Resolve): Use new function
7326 Address_Integer_Convert_OK.
7327 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
7328 reformatting throughout.
7329 * sem_util.adb (Address_Integer_Convert_OK): New function.
7330 * sem_util.ads: Minor reformatting (put specs in alpha order)
7331 (Address_Integer_Convert_OK): New function.
7333 2014-01-20 Thomas Quinot <quinot@adacore.com>
7335 * exp_ch7.adb (Wrap_Transient_Expression):
7336 Insertion extra conditional expression only if
7337 Opt.Suppress_Control_Flow_Optimizations is set.
7339 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7341 * s-tataat.adb (Initialize_Attributes): Abort might already be
7342 deferred in Create_Task.
7344 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7346 * checks.adb (Apply_Scalar_Range_Check): Flag
7347 the exponent as requiring a range check when the expression is
7350 2014-01-20 Fedor Rybin <frybin@adacore.com>
7352 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
7354 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7356 * sem_util.adb (Default_Initialization): New routine.
7357 * sem_util.ads: Add new type Default_Initialization_Kind.
7358 (Default_Initialization): New routine.
7360 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7362 * sem_prag.adb (Check_Mode): Correct all error
7363 message logic dealing with in/in out parameters that may appear
7364 as inputs or have a self reference.
7366 2014-01-20 Robert Dewar <dewar@adacore.com>
7368 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
7369 * sem_res.adb (Resolve): Fix error causing infinite loop for
7370 integer used as address. Allow addresses as integers.
7372 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7374 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
7376 2014-01-20 Bob Duff <duff@adacore.com>
7378 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
7379 error when "use all" is not followed by "type".
7381 2014-01-20 Bob Duff <duff@adacore.com>
7383 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
7386 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7388 * checks.adb (Apply_Address_Clause_Check): If there is an
7389 alignment check on the expression in an address clause, and there
7390 is no local exception propagation, add an additional explanatory
7391 message to clarify the cause of previous warning.
7393 2014-01-20 Robert Dewar <dewar@adacore.com>
7395 * exp_ch7.adb: Minor reformatting.
7396 * opt.ads: Minor comment updates.
7397 * sem.adb: Minor name change Is_Main_Unit =>
7398 Is_Main_Unit_Or_Main_Unit_Spec.
7399 * sem_ch6.adb: Minor reformatting and code reorganization.
7401 2014-01-20 Bob Duff <duff@adacore.com>
7403 * gnat_ugn.texi: Update gnatpp switches.
7405 2014-01-20 Thomas Quinot <quinot@adacore.com>
7407 * exp_ch9.adb: Minor comment edit.
7409 2014-01-20 Robert Dewar <dewar@adacore.com>
7411 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
7412 only if System.Address is a private type.
7413 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
7414 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7415 Allowed only if type System.Address is private, since otherwise
7417 * sem_res.adb: Fix failure to properly Analyze unchecked
7418 conversions that were introduced by Allow_Integer_Address.
7419 * switch-c.adb: Remove -gnates switch.
7420 * usage.adb: Remove -gnates switch.
7421 * gnat_ugn.texi: Remove documentation of -gnates flag.
7423 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7425 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
7426 resolve expression to perform proper name capture.
7428 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7430 * sem.adb (Semantics): When saving/restoring configuration
7431 switches, the spec of a pre- defined unit that is the main unit
7432 must be treated as a predefined unit as well.
7434 2014-01-20 Thomas Quinot <quinot@adacore.com>
7436 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
7437 expression, insert an extra conditional expression when saving
7438 the value of the expression, for the benefit of control flow
7439 graph based coverage analysis.
7440 * exp_ch3.adb: Minor reformatting.
7442 2014-01-20 Robert Dewar <dewar@adacore.com>
7444 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
7445 * gnat_rm.texi: Document pragma Allow_Integer_Address.
7446 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
7447 * opt.ads: New flag Allow_Integer_Address.
7448 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
7449 * sem_ch5.adb: Minor reformatting.
7450 * sem_prag.adb: Implement pragma Allow_Integer_Address.
7451 * sem_res.adb (Resolve): Allow integer address value if
7453 * sem_util.adb: Minor reformatting.
7454 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
7455 * switch-c.adb: Recognize flag -gnates.
7456 * usage.adb: Document flag -gnates.
7458 2014-01-20 Thomas Quinot <quinot@adacore.com>
7460 * s-tadeca.adb: Fix minor typos in comment.
7462 2014-01-20 Pascal Obry <obry@adacore.com>
7464 * s-win32.ads (FreeLibrary): New import.
7466 2014-01-20 Robert Dewar <dewar@adacore.com>
7468 * sem_res.adb, sem_cat.adb: Minor reformatting.
7469 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
7470 assigning to OUT parameters for the current subprogram scope.
7471 * exp_ch4.adb: Minor reformatting.
7473 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7475 * exp_ch4.adb (Process_Transient_Object,
7476 Find_Enclosing_Contexts): If the top-level if-expression that
7477 generated the transient object is an actual in a call, the proper
7478 Hook_Context is a construct enclosing the call.
7479 * einfo.ads: Indicate that Related_Expression is used to link a
7480 loop variable to the container expression over which the loop
7482 (Analyze_Iterator_Specification): Set the Related_Expression of
7483 the loop variable in a container element iterator.
7484 (Note_Possible_Modification): If the variable is the loop
7485 variable in a container element iterator, indicate that the
7486 enclosing container is also modified.
7488 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7490 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
7492 2014-01-20 Robert Dewar <dewar@adacore.com>
7494 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
7495 Minor reformatting and code clean up.
7497 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7499 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
7500 of objects of private type if Relaxed_RM_Semantics.
7502 2014-01-20 Claire Dross <dross@adacore.com>
7504 * a-cofove.ads (Vector): Capacity discriminant
7505 should be in range of the index.
7507 2014-01-20 Thomas Quinot <quinot@adacore.com>
7509 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
7510 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
7511 possible difference between epoch of Ada.Calendar clock and Ada
7512 real-time/tasking clock.
7513 * s-taprop-posix.adb: Minor comment fix.
7515 2014-01-20 Doug Rupp <rupp@adacore.com>
7517 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
7519 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7521 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
7522 checks on the prefix of attribute 'Old.
7523 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
7524 generation of validity checks on a range that belongs to the
7525 iteration scheme of a quantified expression.
7526 * sem_ch5.adb (One_Bound): Suppress the generation of validity
7527 checks on a bound that belongs to the iteration scheme of a
7528 quantified expression, generate the check in all other cases.
7530 2014-01-20 Bob Duff <duff@adacore.com>
7532 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
7534 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7536 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
7537 interpretations that do not come from other predefined units,
7538 to prevent spurious ambiguities in the presence of user-defined
7539 operators in the context of (an instance of) a predefined unit.
7541 2014-01-20 Robert Dewar <dewar@adacore.com>
7543 * gnat_rm.texi: Document that Loop_Variant is included in
7544 Statement_Assertions.
7545 * sem_prag.adb (Check_Kind): Add Loop_Variant to
7546 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
7547 to Statement_Assertions.
7549 2014-01-20 Doug Rupp <rupp@adacore.com>
7551 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
7552 for errno ENOENT from RTP on NFS mounted file system.
7554 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7556 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
7557 examine code that does not come from source. The check does not
7558 apply to code generated for constraint checks, and such code may
7559 generate spurious error messages when compiled with expansion
7560 disabled (as in a generic unit) because side effects may not
7562 2) Make error messages more explicit: indicate the component
7563 of the construct whose value is indeterminate because of a
7564 call to a function with in-out parameter in another component,
7565 when there is no mandated order of execution between the two
7566 components (actuals, aggregate components, alternatives).
7568 2014-01-20 Robert Dewar <dewar@adacore.com>
7570 * gnat_rm.texi: Minor cleanup.
7572 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7574 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
7575 can now apply to a refined postcondition.
7576 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
7577 variable Result_Seen. Add variables Case_Prag, Post_Prag,
7578 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
7579 whether postconditions and/or constract-cases mention attribute
7580 'Result and introduce a post-state when applied to functions.
7581 (Check_Result_And_Post_State): Removed.
7582 * sem_prag.adb (Analyze_Pragma): Add local variable
7583 Result_Seen. Verify that the expression of pragma Refined_Post
7584 mentions attribute 'Result and introduces a post-state.
7585 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
7587 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7589 * exp_ch7.adb (Is_Subprogram_Call): New routine.
7590 (Process_Transient_Objects): Make variable Must_Hook global with
7591 respect to all locally declared subprograms. Search the context
7592 for at least one subprogram call.
7593 (Requires_Hooking): Removed.
7595 2014-01-20 Claire Dross <dross@adacore.com>
7597 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
7598 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
7599 External_Axiomatization);
7601 2014-01-20 Robert Dewar <dewar@adacore.com>
7603 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
7604 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
7605 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
7606 Allow Loop_Entry to be used in these pragmas if they appear in
7607 an appropriate context.
7608 (Placement_Error): Specialize error
7609 message for pragma Assert[_And_Cut] or pragma Assume containing
7610 Loop_Entry attribute.
7611 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
7612 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
7615 2014-01-20 Robert Dewar <dewar@adacore.com>
7617 * gnat1drv.adb: Minor comment update.
7619 2014-01-20 Tristan Gingold <gingold@adacore.com>
7621 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
7622 variables, comment out unused code.
7623 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
7624 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
7625 * s-excmac-arm.ads: New file.
7627 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7629 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
7630 Drange and Index_Typ. Remove the circuitry which creates a
7631 range check to compare the index type of the array against the
7633 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
7634 the circuitry which creates a range check to handle a
7635 discrete_range denoted by a subtype indication.
7637 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
7639 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
7640 nodes to get the original sloc range.
7642 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7644 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
7645 entity of a [library level] package.
7647 2014-01-20 Tristan Gingold <gingold@adacore.com>
7649 * raise-gcc.c (exception_class_eq): New function.
7650 (is_handled_by): Use it to compare exception classes.
7651 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
7652 be called to return URC_CONTINUE_UNWIND.
7653 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
7654 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
7656 2014-01-20 Robert Dewar <dewar@adacore.com>
7658 * opt.ads: Minor comment update.
7660 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7662 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
7663 constants to the "Local variables" area. Add new constant D. Add
7664 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
7665 to Pref_Typ and update all occurrences. Add circuitry to extract
7666 the discrete_range and the index type and build a range check.
7668 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7670 * gnat1drv.adb (Adjust_Global_Switches): Enable
7671 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
7674 2014-01-20 Thomas Quinot <quinot@adacore.com>
7676 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
7678 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7680 * sem_ch13.adb (Analyze_Aspect_Specifications):
7681 When aspect SPARK_Mode appears on a package body, insert the
7682 generated pragma at the top of the body declarations.
7684 2014-01-20 Robert Dewar <dewar@adacore.com>
7686 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
7687 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
7688 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
7689 sem_ch8.adb, exp_dist.adb: Minor reformatting.
7691 2014-01-20 Yannick Moy <moy@adacore.com>
7693 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
7696 2014-01-20 Pascal Obry <obry@adacore.com>
7698 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
7700 * g-arrspl.adb: Adapt all routine to this new implementation.
7701 (Set): Copy the Slice_Set definition before reusing it.
7703 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7705 * sem_prag.adb (Process_Import_Or_Interface): In
7706 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
7707 (Analyze_Pragma): Ditto for pragma Export.
7708 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
7711 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7713 * einfo.ads: E_Abstract_State is now part of the entities that
7714 can be overloaded. Update type Overloadable_Kind to reflect the
7715 inclusion of abstract states.
7716 * sem_ch6.adb (New_Overloaded_Entity): A function can now
7717 overload an abstract state.
7718 * sem_prag.adb (Analyze_Constituent): Handle the overloading
7719 of states by functions. Use Entity_Of to obtain the entity of
7720 a constituent. (Analyze_Global_Item): Handle the overloading of
7721 states by functions.
7722 (Analyze_Initialization_Item): Handle the
7723 overloading of states by functions. Use Entity_Of to obtain the
7725 (Analyze_Input_Item): Handle the overloading
7726 of states by functions. Use Entity_Of to obtain the entity of an item.
7727 (Analyze_Input_Output): Handle the overloading of states by functions.
7728 (Analyze_Refinement_Clause): Handle the overloading
7729 of states by functions. Use Entity_Of to obtain the entity of an item.
7730 (Appears_In): Use Entity_Of to obtain the entity of an element.
7731 (Check_Usage): Use Entity_Of to obtain the entity of
7732 an item. Add a guard to prevent a crash due to a previous error.
7733 (Resolve_State): New routine.
7735 2014-01-20 Yannick Moy <moy@adacore.com>
7737 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
7738 opt.ads: Minor comments updates.
7740 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7742 * einfo.adb (Non_Limited_View): Applies to abstract states.
7743 (Set_From_Limited_With): Applies to abstract states.
7744 (Set_Non_Limited_View): Applies to abstract states.
7745 (Write_Field17): Output the non-limited view of an abstract state.
7746 * einfo.ads: Update the comment on usage and occurrences in
7747 nodes for attributes From_Limited_With and Non_Limited_View.
7748 * sem_aux.adb (Available_View): This routine can now handle
7750 * sem_aux.ads (Available_View): This routine can now handle
7751 abstract states. Update the comment on usage.
7752 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
7753 of states and variables.
7754 (In_Pragmas_Depends_Or_Global): New routine.
7755 * sem_ch10.adb (Build_Limited_Views): Implement
7756 abstract (limited) views of variables and states.
7757 (Build_Shadow_Entity): This routine is now a procedure. Add
7758 formal parameter Shadow. Update the comment on usage. Add
7759 context-specific decoration for states and variables.
7760 (Decorate_State): New routine. (Decorate_Variable): New routine.
7761 (Find_And_Process_States): New routine.
7762 (Process_Declarations): Renamed to Process_Declarations_And_States.
7763 (Process_Declarations_And_States): Add formal parameters
7764 Pack and Create_Abstract_Views. Update the comment on usage.
7765 (Process_States): New routine.
7766 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
7767 views of states and variables. Match the abstract view of a state
7768 against its corresponding non-abstract view.
7769 (Is_Matching_Input):
7770 Handle abstract views of states and variables. Match the abstract
7771 view of a state against its corresponding non-abstract view.
7772 (Process_Global_Item): Handle abstract views of states and
7775 2014-01-20 Bob Duff <duff@adacore.com>
7777 * sem_ch10.adb (Expand_With_Clause): Don't
7778 recurse on the prefix if the current with-ed name refers to a
7779 package that renames its own parent, eg "package P.Q renames P;".
7781 2014-01-20 Yannick Moy <moy@adacore.com>
7783 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
7784 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
7785 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
7786 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
7787 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
7790 2014-01-20 Yannick Moy <moy@adacore.com>
7792 * sinfo.ads Update documentation of GNATprove mode.
7794 2014-01-20 Yannick Moy <moy@adacore.com>
7796 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
7797 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
7798 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
7799 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
7801 * sem_ch13.adb: Remove blank.
7802 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
7803 subprograms by alias for renamings, not for inherited primitive
7805 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
7807 (Remove_Side_Effects): Apply the removal in
7808 GNATprove mode, for the full analysis of expressions.
7809 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
7811 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
7812 save/restore actions for Expander_Active flag in GNATprove mode,
7813 similar to what is done in ASIS mode.
7814 * frontend.adb (Frontend): Generic bodies are instantiated in
7816 * gnat1drv.adb (Adjust_Global_Switches): Set operating
7817 mode to Check_Semantics in GNATprove mode, although a light
7818 expansion is still performed.
7819 (Gnat1drv): Set Back_End_Mode to
7820 Declarations_Only in GNATprove mode, and later on special case
7821 the GNATprove mode to continue analysis anyway.
7822 * lib-writ.adb (Write_ALI): Always generate ALI files in
7824 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
7826 (SPARK_Mode): Renamed as GNATprove_Mode.
7827 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
7828 tree in GNATprove_Mode.
7829 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
7830 body in GNATprove mode.
7831 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
7833 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
7834 Make sure side effects are removed in GNATprove mode.
7836 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7838 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
7839 for aliased objects with an unconstrained nominal subtype.
7840 * gcc-interface/trans.c (Call_to_gnu): Likewise.
7841 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
7842 <case N_Op_Minus>: Remove useless code.
7843 (Exception_Handler_to_gnu_zcx): Minor tweaks.
7845 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7847 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
7848 Tidy up. For a subtype with discriminants and variant part, if a
7849 variant is statically selected and the fields all have a constant
7850 position, put them in order of increasing position. Likewise if
7851 no variant part but representation clause is present.
7852 * gcc-interface/utils.c (make_packable_type): Robustify.
7853 (maybe_pad_type): Use local variable and tidy up condition. If no
7854 alignment is specified, use the original one.
7855 (create_type_stub_decl): Minor tweak.
7856 (convert) <case VECTOR_CST>: Fix typo.
7857 <case CONSTRUCTOR>: Deal with padding types around the same type.
7858 Do not punt on missing fields.
7859 (unchecked_convert): Call finish_record_type to lay out the special
7860 record types made for conversions from/to problematic integer types.
7861 Bump the alignment of CONSTRUCTORs before converting them to a more
7864 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7866 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
7867 obsolete code for type_annotate_only mode, simplify code and slightly
7868 improve wording of comments.
7870 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
7873 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
7874 as intermediate type.
7875 (UI_To_gnu): Likewise.
7877 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
7879 * gnatvsn.ads (Current_Year): Bump to 2014.
7881 2014-01-02 Tobias Burnus <burnus@net-b.de>
7883 * gnat_ugn.texi: Bump @copying's copyright year.
7885 Copyright (C) 2014 Free Software Foundation, Inc.
7887 Copying and distribution of this file, with or without modification,
7888 are permitted in any medium without royalty provided the copyright
7889 notice and this notice are preserved.