1 2014-11-20 Thomas Quinot <quinot@adacore.com>
3 * sem_util.adb: Minor reformatting.
5 2014-11-20 Robert Dewar <dewar@adacore.com>
7 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Detect
8 duplicate Linker_Section.
10 2014-11-20 Ed Schonberg <schonberg@adacore.com>
12 * exp_ch4.adb: Add guard for build-in-place boolean op.
14 2014-11-20 Yannick Moy <moy@adacore.com>
16 * checks.adb (Apply_Scalar_Range_Check): In GNATprove mode,
17 put a range check when an empty range is used, instead of an
19 * sinfo.ads Update comment on GNATprove mode.
21 2014-11-20 Arnaud Charlet <charlet@adacore.com>
23 * a-stream.ads, s-osinte-linux.ads, a-reatim.ads, a-calend.ads,
24 s-crtl.ads, interfac.ads, s-taskin.ads: Replace uses of 2 ** 63 and
25 2 ** 64 by references to Long_Long_Integer instead, to allow these
26 units to be analyzed by codepeer or spark when using a target
27 configuration file with long_long_size set to 32.
29 2014-11-20 Hristian Kirtchev <kirtchev@adacore.com>
31 * sem_util.adb (Extensions_Visible_Status): Modify the logic to account
33 (Object_Access_Level): In ASIS mode, recognize
34 a selected component with an implicit dereference so that it
35 yields the same value with and without expansion.
37 2014-11-20 Ed Schonberg <schonberg@adacore.com>
39 * sem_prag.adb (Analyze_Pragma, case Implemented): In ASIS
40 (compile-only) mode, use original type declaration to determine
41 whether protected type implements an interface.
43 2014-11-20 Yannick Moy <moy@adacore.com>
45 * a-cfdlli.adb, a-cfdlli.ads, a-cfinve.adb, a-cfinve.ads,
46 * a-cofove.adb, a-cofove.ads: Mark spec as SPARK_Mode, and private
47 part/body as SPARK_Mode Off.
48 * a-cfhama.adb, a-cfhama.ads, a-cfhase.adb, a-cfhase.ads,
49 * a-cforma.adb, a-cforma.ads, a-cforse.adb, a-cforse.ads: Use
50 aspect instead of pragma for uniformity.
52 2014-11-20 Hristian Kirtchev <kirtchev@adacore.com>
54 * sem_util.adb (Is_EVF_Expression): Include
55 attributes 'Loop_Entry, 'Old and 'Update to the logic.
57 2014-11-20 Bob Duff <duff@adacore.com>
59 * sem_res.adb (Make_Call_Into_Operator): Don't
60 call Left_Opnd in the case of unary operators, because they only
63 2014-11-20 Pascal Obry <obry@adacore.com>
65 * initialize.c (ProcListCS): New extern variable (critical section).
66 (ProcListEvt): New extern variable (handle).
67 (__gnat_initialize)[Win32]: Initialize the ProcListCS critical
68 section object and the ProcListEvt event.
69 * final.c (__gnat_finalize)[Win32]: Properly finalize the
70 ProcListCS critical section and the ProcListEvt event.
71 * adaint.c (ProcListEvt): New Win32 event handle.
72 (EnterCS): New routine to enter the critical section when dealing with
73 child processes chain list.
74 (LeaveCS): As above to exit from the critical section.
75 (SignalListChanged): Routine to signal that the chain process list has
77 (add_handle): Use EnterCS/LeaveCS, also call SignalListChanged when the
78 handle has been added.
79 (__gnat_win32_remove_handle): Use EnterCS/LeaveCS,
80 also call SignalListChanged if the handle has been found and removed.
81 (remove_handle): Routine removed, implementation merged with the above.
82 (win32_wait): Use EnterCS/LeaveCS for the critical section. Properly
83 copy the PID list locally to ensure that even if the list is updated
84 the local copy remains valid. Add into the hl (handle list) the
85 ProcListEvt handle. This handle is used to signal that a change has
86 been made into the process chain list. This is to ensure that a waiting
87 call can be resumed to take into account new processes. We also make
88 sure that if the handle was not found into the list we start over
89 the wait call. Indeed another concurrent call to win32_wait()
90 could already have handled this process.
92 2014-11-20 Ed Schonberg <schonberg@adacore.com>
94 * sem_res.adb (Resolve_Actuals): The legality rule concerning
95 the use of class-wide actuals for a non-controlling formal are
96 not rechecked in an instance.
98 2014-11-20 Pascal Obry <obry@adacore.com>
100 * g-dirope.ads: Minor typo fix.
102 2014-11-20 Hristian Kirtchev <kirtchev@adacore.com>
104 * exp_attr.adb (Expand_N_Attribute_Reference,
105 Expand_Update_Attribute): Preserve the tag of a prefix by offering
106 a specific view of the class-wide version of the prefix.
108 2014-11-20 Javier Miranda <miranda@adacore.com>
110 * sem_ch6.adb (Analyze_Function_Return): For functions returning
111 an access to an interface add an implicit conversion to the target
112 type to force the displacement of the pointer to the object to
113 reference the secondary dispatch table.
114 (Check_Anonymous_Return): Skip internally built functions which handle
115 the case of null access when locating the master of a task.
116 * sem_res.adb (Valid_Conversion): Return true for internally
117 generated conversions of access to interface types added to force
118 the displacement of the pointer to reference the corresponding
121 2014-11-20 Pascal Obry <obry@adacore.com>
123 * adaint.c (add_handle): realloc with a size of +100.
125 2014-11-20 Ed Schonberg <schonberg@adacore.com>
127 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
128 back the resolved operands to the original call node, taking
129 into account that the original call may have named associations.
131 2014-11-20 Hristian Kirtchev <kirtchev@adacore.com>
133 * inline.adb (Has_Some_Contract): Change the
134 guard to test the Ekind of the entity rather than the Analyzed
135 flag. This handles partially analyzed contexts.
137 2014-11-20 Ed Schonberg <schonberg@adacore.com>
139 * sem_ch8.adb (Analyze_Object_Renaming): In Ada 83 mode, do
140 not reject the renaming of a function result if the renaming
141 does not come for source.
143 2014-11-20 Robert Dewar <dewar@adacore.com>
145 * exp_util.ads: Minor addition of ??? clause.
147 2014-11-20 Ed Schonberg <schonberg@adacore.com>
149 * sem_util.adb (Is_Variable): For an Ada 2012 implicit
150 dereference introduced for an indexing opertion, check that the
151 type of the corresponding access discriminant is not an access
154 2014-11-20 Hristian Kirtchev <kirtchev@adacore.com>
156 * sem_ch6.adb (Find_Corresponding_Spec): Inherit
157 the ghostness of the matching spec, the same way convention
160 2014-11-20 Eric Botcazou <ebotcazou@adacore.com>
162 * sem_ch3.adb (Analyze_Object_Declaration): Swap a couple of
163 tests in a condition so Following_Address_Clause is invoked
165 * exp_util.ads (Following_Address_Clause): Add small note.
167 2014-11-20 Pascal Obry <obry@adacore.com>
169 * adaint.c (remove_handle): New local routine without a lock.
170 (win32_wait): fix the critical section to properly protect needed
171 code, use new remove_handle.
172 (__gnat_win32_remove_handle): refactor code with remove_handle.
174 2014-11-20 Eric Botcazou <ebotcazou@adacore.com>
176 * inline.adb (Analyze_Inlined_Bodies): Iterate between loading
177 of the inlined bodies and instantiation of the generic bodies
178 until no more bodies need to be loaded.
180 2014-11-20 Vincent Celier <celier@adacore.com>
182 * prj.adb, prj.ads, prj-conf.adb: Minor change of procedure name:
183 Update_Ignore_Missing_With becomes Set_Ignore_Missing_With.
185 2014-11-20 Robert Dewar <dewar@adacore.com>
187 * exp_ch7.adb, sem_ch5.adb, sem_ch7.adb, sem_util.adb,
188 sem_ch6.adb: Minor reformatting.
190 2014-11-20 Javier Miranda <miranda@adacore.com>
192 * exp_ch4.adb (Expand_N_Type_Conversion): Add missing implicit
193 conversion to force the displacement of the pointer to the object
194 to reference the secondary dispatch table.
196 2014-11-11 Simon Wright <simon@pushface.org>
199 * mlib-utl.adb (ar): Output the options passed to ranlib.
201 2014-11-07 Arnaud Charlet <charlet@adacore.com>
203 * debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding'
204 a keyword in Ada 95 mode when -gnatd.D is used.
205 * gnat_ugn.texi: Document -gnatd.D.
207 2014-11-07 Vasiliy Fofanov <fofanov@adacore.com>
209 * gnatls.adb: Lower severity of the program's return value in
212 2014-11-07 Ed Schonberg <schonberg@adacore.com>
214 * sem_ch10.adb (Decorate_Type): The limited view of a tagged
215 type has an empty list of primitive operations.
217 2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
219 * sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK
221 (Process_Full_View): Update references to SPARK RM.
222 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
224 (Analyze_Subprogram_Body_Helper): Update references
226 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
228 * sem_prag.adb (Check_Ghost_Constituent): Update references to
230 * sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM.
231 (Resolve_Actuals): Ensure that the actual parameter of a Ghost
232 subprogram whose formal is of mode IN OUT or OUT is Ghost.
233 * sem_util.adb (Check_Ghost_Completion): Update references to
236 2014-11-07 Ed Schonberg <schonberg@adacore.com>
238 * exp_ch7.adb (Make_Final_Call): If type of designated object is
239 derived from that of the formal of the Deep_Finalize procedure,
240 add an unchecked conversion to prevent spurious type error.
242 2014-11-07 Robert Dewar <dewar@adacore.com>
244 * table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb,
245 exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads:
248 2014-11-07 Robert Dewar <dewar@adacore.com>
250 * sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting.
252 2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
254 * einfo.adb (Set_Is_Checked_Ghost_Entity,
255 Set_Is_Ignored_Ghost_Entity): Add exceptions to the assertion
257 * sem_ch6.adb (Check_Conformance): Consider only
258 source subprograms when checking for Ghost conformance.
259 * sem_prag.adb (Analyze_Pragma): Handle the case
260 where pragma Ghost applies to a stand alone subprogram body that
261 acts as a compilation unit.
262 * sem_res.adb: Minor reformatting (merge if statements).
264 2014-11-07 Ed Schonberg <schonberg@adacore.com>
266 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
267 Check whether underlying type is constrained before generating
268 the object declaration for the result object of the function.
270 2014-11-07 Robert Dewar <dewar@adacore.com>
272 * freeze.adb: Code clean up.
274 2014-11-07 Yannick Moy <moy@adacore.com>
276 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cfinve.ads,
277 * a-cforma.ads, a-cforse.ads, a-cofove.ads: Mark First_To_Previous,
278 Current_To_Last and Strict_Equal as Ghost.
280 2014-11-07 Ed Schonberg <schonberg@adacore.com>
282 * sem_ch3.adb: Code clean up.
284 2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
286 * freeze.adb (Freeze_Entity): Issue an error regardless of the
287 SPARK_Mode when a ghost type is effectively volatile.
288 * sem_ch3.adb (Analyze_Object_Contract): Decouple the checks
289 related to Ghost from SPARK_Mode.
290 * sem_res.adb (Check_Ghost_Policy): Issue an error regardless
291 of the SPARK_Mode when the Ghost policies do not match.
292 * sem_util.adb (Check_Ghost_Completion): Issue an error regardless
293 of the SPARK_Mode when the Ghost policies do not match.
295 2014-11-07 Ed Schonberg <schonberg@adacore.com>
297 * sem_ch5.adb (Analyze_Iterator_Specification): return if name
298 in iterator does not have any usable aspect for iteration.
300 2014-11-07 Ed Schonberg <schonberg@adacore.com>
302 * sem_ch6.adb (Analyze_Null_Procedure): Reject a null procedure
303 that there is a previous null procedure in scope with a matching
306 2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
308 * atree.adb (Copy_Separate_Tree): Copy the aspect specifications.
309 * inline.adb (Has_Some_Contract): Do the check only when the
310 related entity has been analyzed.
312 2014-11-07 Ed Schonberg <schonberg@adacore.com>
314 * exp_fixd.adb (Expand_Multiply_Fixed_By_Fixed_Giving_Integer):
315 If the restriction No_Floating_Point is in effect, and the
316 operands have the same type, introduce a temporary to hold
317 the fixed point result, to prevent the use of floating-point
318 operations at run-time.
320 2014-11-07 Robert Dewar <dewar@adacore.com>
322 * freeze.adb (Check_Address_Clause): Minor reformatting
323 (Find_Constant): Minor reformatting.
324 (Freeze_Array_Type): Modify check for packed declarations.
325 (Freeze_Entity): Minor reformatting.
327 2014-11-05 Eric Botcazou <ebotcazou@adacore.com>
329 * gnatvsn.ads (Library_Version): Bump to 5.0.
331 2014-11-05 Eric Botcazou <ebotcazou@adacore.com>
333 * gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
334 copy-in/copy-out parameters and which returns by invisible reference,
335 do not create the variable for the return value; instead, manually
336 generate the indirect copy out statements on exit.
337 (gnat_to_gnu) <N_Simple_Return_Statement>: Adjust accordingly and build
338 a simple indirect assignment for the return value.
340 2014-11-05 Eric Botcazou <ebotcazou@adacore.com>
342 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For a
343 derived untagged type that renames discriminants, be prepared for
344 a type derived from a private discriminated type when changing the
345 type of the stored discriminants.
347 2014-11-05 Eric Botcazou <ebotcazou@adacore.com>
349 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
350 the SLOC of the node on the call to set_jmpbuf_address_soft emitted
351 on block entry with SJLJ.
353 2014-11-05 Eric Botcazou <ebotcazou@adacore.com>
355 * gcc-interface/utils.c (create_subprog_decl): Move code dealing with
356 conflicting inlining status of nested subprograms to...
357 * gcc-interface/trans.c (check_inlining_for_nested_subprog): ...here.
358 (Attribute_to_gnu) <Attr_Access>: Call it.
359 (Call_to_gnu): Likewise.
360 (Subprogram_Body_to_gnu): Drop the body if it is an inlined external
361 function that has been marked uninlinable.
363 2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
365 * aspects.adb Add an entry for aspect Ghost in table
367 * aspects.ads Add an entry for aspect Ghost in tables
368 Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
369 Implementation_Defined_Aspect.
370 * einfo.adb: Flags 277 and 278 are now in use.
371 (Is_Checked_Ghost_Entity): New routine.
372 (Is_Ghost_Entity): Removed.
373 (Is_Ghost_Subprogram): Removed.
374 (Is_Ignored_Ghost_Entity): New routine.
375 (Set_Is_Checked_Ghost_Entity): New routine.
376 (Set_Is_Ignored_Ghost_Entity): New routine.
377 (Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
378 Is_Ignored_Ghost_Entity.
379 * einfo.ads: Add new flags Is_Checked_Ghost_Entity
380 and Is_Ignored_Ghost_Entity along with usage in nodes.
381 (Is_Checked_Ghost_Entity): New routine and pragma Inline.
382 (Is_Ghost_Entity): Removed along with synthesized flag
383 description and usage in nodes.
384 (Is_Ghost_Subprogram): Removed along with synthesized flag description
386 (Is_Ignored_Ghost_Entity): New routine and pragma Inline.
387 (Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
388 (Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
389 * freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
391 * par-prag.adb Pragma Ghost does not need special handling by
393 * repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
394 * sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
395 * sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
396 the type as Ghost when its enclosing context is Ghost.
397 (Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
398 its enclosing context is Ghost.
399 (Analyze_Number_Declaration): Mark the number as Ghost when its
400 enclosing context is Ghost.
401 (Analyze_Object_Declaration): Mark the object as Ghost when its
402 enclosing context is Ghost. Verify the Ghost policy between
403 initial declaration and completion of a deferred constant.
404 (Analyze_Object_Contract): A Ghost variable cannot be effectively
405 volatile, imported or exported.
406 (Build_Derived_Record_Type): Mark a type extension as Ghost when it
407 implements a Ghost interface.
408 (Build_Record_Type): Inherit volatility and "ghostness" from
410 (Check_Completion): A Ghost entity declared
411 in a non-Ghost package does not require completion in a body.
412 (Implements_Ghost_Interface): New routine.
413 (Process_Full_View): Inherit "ghostness" from the partial view. Verify
414 the Ghost policy between the partial and full views. Verify the
415 completion of a Ghost type extension.
416 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
417 * sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
418 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
419 the subprogram as Ghost when its enclosing context is Ghost.
420 (Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
421 when its enclosing context is Ghost. Verify the Ghost policy
422 between the spec and body.
423 (Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
424 enclosing context is Ghost. Verify the Ghost policy between the spec
426 (Check_Conformance): A Ghost subprogram profile and a non-Ghost
427 subprogram profile are not subtype conformant.
428 (Convention_Of): Removed.
429 * sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
430 "ghostness" from the spec. Verify the Ghost policy between
432 (Analyze_Private_Type_Declaration): Mark the type as Ghost when its
433 enclosing context is Ghost.
434 (Requires_Completion_In_Body): New routine.
435 (Unit_Requires_Body): Use Requires_Completion_In_Body.
436 (Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
437 comment on usage and all uses of P in the body. Use
438 Requires_Completion_In_Body.
439 * sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
440 to Pack_Id, update comment on usage and all uses of P in the body.
441 * sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
442 from the renamed excention.
443 (Analyze_Generic_Renaming): Inherit the "ghostness" from the
444 renamed generic subprogram.
445 (Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
447 (Analyze_Package_Renaming): Inherit the "ghostness" from the
449 (Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
451 * sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
452 as Ghost when its enclosing context is Ghost.
453 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
454 Analyze_Generic_Subprogram_Declaration): Mark an exception as
455 Ghost when its enclosing context is Ghost.
456 (Preanalyze_Actuals): Remove obsolete check.
457 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
459 (Check_Aspect_At_Freeze_Point): Aspects
460 Depends and Global do no need special checking at freeze point.
461 (Insert_After_SPARK_Mode): Update comment on usage.
462 * sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
463 * sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
464 (Analyze_Abstract_State): Update the grammar of the pragma. Add
465 formal parameter Pack_Id along with comment on usage. Mark an
466 abstract state as Ghost when its enclosing context is Ghost. Add
467 processing for option Ghost.
468 (Analyze_Constituent): Verify
469 that a Ghost abstract state is refined by Ghost constituents.
470 (Analyze_Pragma): "Ghost" is now a valid policy. Add checks
471 related to the use and placement of Check_Policy Ghost. Add
472 processing for pragma Ghost.
473 (Check_Ghost_Constituent): New routine.
474 (Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
475 (Process_Convention): Remove obsolete check.
476 (Set_Convention_From_Pragma): Remove the processing for convention
478 * sem_res.adb (Check_Ghost_Context): New routine.
479 (Resolve_Call): Verify that a reference to a Ghost entity appears in a
480 suitable context. Verify the Ghost polity between point of declaration
482 (Resolve_Entity_Name): Verify that a reference to
483 a Ghost entity appears in a suitable context. Verify the Ghost
484 polity between point of declaration and point of use.
485 * sem_util.adb (Check_Ghost_Completion): New routine.
486 (Check_Ghost_Derivation): New routine.
487 (Incomplete_Or_Partial_View): New routine.
488 (Incomplete_Or_Private_View): Removed.
489 (Is_Ghost_Entity): New routine.
490 (Is_Ghost_Statement_Or_Pragma): New routine.
491 (Is_Subject_To_Ghost): New routine.
492 (Policy_In_Effect): New routine.
493 (Set_Is_Ghost_Entity): New routine.
494 (Within_Ghost_Scope): New routine.
495 * sem_util.ads (Check_Ghost_Completion): New routine.
496 (Check_Ghost_Derivation): New routine.
497 (Incomplete_Or_Partial_View): New routine.
498 (Incomplete_Or_Private_View): Removed.
499 (Is_Ghost_Entity): New routine.
500 (Is_Ghost_Statement_Or_Pragma): New routine.
501 (Is_Subject_To_Ghost): New routine.
502 (Policy_In_Effect): New routine.
503 (Set_Is_Ghost_Entity): New routine.
504 (Within_Ghost_Scope): New routine.
505 * snames.adb-tmpl (Get_Convention_Id): Remove the entry for
507 (Get_Convention_Name): Remove the entry for convention Ghost.
508 * snames.ads-tmpl Remove the convention id for Ghost. Add a
511 2014-10-31 Sergey Rybin <rybin@adacore.com frybin>
513 * gnat_ugn.texi: Add description of --RTS option for ASIS tools.
515 2014-10-31 Olivier Hainque <hainque@adacore.com>
517 * gcc-interface/Makefile.in (arm-vxworks): Update target pairs.
519 2014-10-31 Vincent Celier <celier@adacore.com>
521 * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
522 * prj-proc.adb (Recursive_Process): Call Display_Name_Of to
523 get the project Display_Name.
524 * prj-tree.adb (Display_Name_Of): New function
525 (Set_Display_Name_Of): New procedure.
526 (Create_Project): Call Set_Display_Name_Of.
527 * prj-tree.ads (Display_Name_Of): New function.
528 (Set_Display_Name_Of): New procedure.
529 (Project_Node_Record): New component Display_Name.
530 (Project_Name_And_Node): Remove component Display_Name.
531 * prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
532 Config_File_Path as the Config_File_Name, not just its simple
535 2014-10-31 Thomas Quinot <quinot@adacore.com>
537 * get_scos.adb: Minor reformatting.
539 2014-10-31 Ed Schonberg <schonberg@adacore.com>
541 * exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
542 capture declaration for cursor to prevent spurious errors when
543 several formal iterators that use the same cursoe name appear
546 2014-10-31 Vincent Celier <celier@adacore.com>
548 * prj-proc.adb (Recursive_Process): Make sure that the project
549 display name is never No_Name.
551 2014-10-31 Ed Schonberg <schonberg@adacore.com>
553 * sem_attr.adb (Analyze_Access_Attribute): Do not emit error
554 message if reference does not come from source, as in the case
555 for the controlling argument of a dispatching call. Error is
556 diagnosed when call is resolved.
557 * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
558 reference in error message.
559 * sem_res.adb (Check_Prefixed_Call): ditto.
561 2014-10-31 Yannick Moy <moy@adacore.com>
563 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
564 suppress checks when pragma Restrictions (No_Exception) is used in
565 CodePeer or GNATprove mode.
567 2014-10-31 Yannick Moy <moy@adacore.com>
569 * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
570 checks as not suppressed in GNATprove mode.
572 2014-10-31 Ed Schonberg <schonberg@adacore.com>
574 * sem_elab.adb (Check_Elab_Call): Nothing to check if call is
576 * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
577 view are those of the base, use rep_item chain of partial view,
578 which may include aspects.
579 * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
580 of base type, to handle properly declared subtypes.
582 2014-10-31 Ed Schonberg <schonberg@adacore.com>
584 * sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
585 is a default storage pool, add a corresponding aspect to the
586 generic unit, to be used at the point of instantiation.
587 (Analyze_Package_Instantiation): If generic unit has aspect
588 specifications, propagate them to instance. If instance has a
589 Default_Storage_Pool aspect, make sure that it overrides the
590 one that may be inherited from the generic.
592 2014-10-31 Vincent Celier <celier@adacore.com>
594 * prj-attr.adb: Minor removal of attributes of package Linker
595 that have never been used and never been documented.
596 * projects.texi: Add documentation for attribute Runtime.
597 * prj-nmsc.adb (Check_Configuration): Do not report a warning
598 for unknown compilers when the project is externally built.
600 2014-10-31 Vasiliy Fofanov <fofanov@adacore.com>
602 * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
603 Normalized_Pathname doesn't inhibit the custom Selected_Target
605 * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
606 Automatically_Generated is correctly set after the first call
607 to Process_Project_And_Apply_Config and not modified after the
610 2014-10-31 Yannick Moy <moy@adacore.com>
612 * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
614 * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
615 vectors, suitable for use in client SPARK code, also more
616 efficient than the standard vectors.
617 * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
618 are used to define formal indefinite vectors in terms of formal
620 * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
621 definite vectors, similar to the API of the new indefinite ones. A
622 new formal parameter of the generic unit called Bounded allows
623 to define growable vectors that use dynamic allocation.
625 2014-10-31 Vincent Celier <celier@adacore.com>
627 * prj-conf.adb (Look_For_Project_Paths): New procedure
628 (Parse_Project_And_Apply_Config): Initially, parse the project
629 files ignoring missing withs. If there are missing withs, extend
630 the project path with directories rooted at the compiler roots,
631 including directories rooted at the runtime roots, if there are
632 non default runtimes, in the PATH orser.
633 * prj-env.adb (Initialize_Default_Project_Path): Do not add
634 any directory from the prefix if the target is "-".
635 * prj-part.adb (Parse): Initialize the tables, as Parse may be
636 call several times by gprbuild.
637 * prj.adb (Update_Ignore_Missing_With): New procedure.
639 2014-10-31 Ed Schonberg <schonberg@adacore.com>
641 * sem_aux.adb (First_Stored_Discriminant,
642 Has_Completely_Hidden_Discriminant): When scanning the list of
643 discriminants to locate possibly hidden (inherited) discriminants,
644 ignore itypes that may appear in the entity list, when an access
645 discriminants is constrained by an access attribute reference.
647 2014-10-31 Javier Miranda <miranda@adacore.com>
649 * freeze.adb (Freeze_Record_Type): Add missing
650 check to verify that all the primitives of an interface type
651 are abstract or null procedures.
653 2014-10-31 Vincent Celier <celier@adacore.com>
655 * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
656 redirects standard output and standard error to two different files.
658 2014-10-31 Bob Duff <duff@adacore.com>
660 * makeutl.ads: Minor comment fix.
662 2014-10-31 Arnaud Charlet <charlet@adacore.com>
664 * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
665 Memory_Size): Use Standard'Word_Size so that the value can be changed
666 via a target configuration file.
668 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
670 * exp_ch4.adb: Minor tweak.
672 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
674 * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
676 (Must_Inline_Subp): Delete.
677 * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
679 2014-10-31 Ed Schonberg <schonberg@adacore.com>
681 * freeze.adb (Freeze_Entity): A default_pool does not apply to
682 internal access types generated for 'access references.
683 * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
684 not null it must designate a variable.
686 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
688 * inline.adb: Minor reformatting.
690 2014-10-31 Ed Schonberg <schonberg@adacore.com>
692 * sem_ch3.adb (Build_Derived_Private_Type): If the derived
693 type has access discriminants, create itype references for their
694 anonymous types, so that they are elaborated before the generated
695 bodies for the primitive operations of the type.
697 2014-10-31 Tristan Gingold <gingold@adacore.com>
699 * prj-conf.adb (Locate_Runtime): Remove procedure.
701 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
703 * inline.adb (Has_Excluded_Declaration): With back-end inlining,
704 only return true for nested packages.
705 (Cannot_Inline): Issue errors/warnings whatever the optimization level
706 for back-end inlining and remove assertion.
708 2014-10-31 Sergey Rybin <rybin@adacore.com frybin>
710 * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
711 the desired order of '*' and '/' operations to avoid overflow.
713 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
715 * exp_ch6.adb (Do_Inline): Remove unreachable code.
716 (Do_Inline_Always): Likewise.
718 2014-10-31 Vincent Celier <celier@adacore.com>
720 * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
721 when library has no Ada interfaces and Library_Standalone is
724 2014-10-31 Arnaud Charlet <charlet@adacore.com>
726 * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
727 on address clauses in CodePeer mode.
729 2014-10-31 Javier Miranda <miranda@adacore.com>
731 * inline.adb (Expand_Inlined_Call): Do not skip
732 inlining of calls to subprogram renamings.
734 2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
736 * sem_res.adb (Resolve_Entity_Name): Account for
737 the case where the immediate parent of a reference to an entity
738 is a parameter association.
740 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
742 * inline.adb (Check_And_Split_Unconstrained_Function): Do not
743 test for the presence of nested subprograms.
745 2014-10-31 Ed Schonberg <schonberg@adacore.com>
747 * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
748 * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
749 Default_Storage_Pool.
751 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
753 * sem_ch6.adb: Remove obsolete comment.
755 2014-10-31 Olivier Hainque <hainque@adacore.com>
757 * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
758 of 4si, as pixels are short.
760 2014-10-31 Ed Schonberg <schonberg@adacore.com>
762 * sem_res.adb (Resolve_Call): Do not reject a call to a protected
763 operation in the spec of a protected type, when the call appears
764 in a pre/postcondition for another protected operation.
766 2014-10-31 Tristan Gingold <gingold@adacore.com>
768 * prj-conf.adb: Locate_Runtime: Always search the runtime in
771 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
773 * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
774 change to use correct idiom for back-end inlining.
776 2014-10-31 Ed Schonberg <schonberg@adacore.com>
778 * freeze.adb (Freeze_Record_Type): Do not check component size
779 if its type is generic.
781 2014-10-31 Bob Duff <duff@adacore.com>
783 * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
785 2014-10-31 Ed Schonberg <schonberg@adacore.com>
787 * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
788 * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
789 indexing as well as function calls. b) If the context is a
790 selected component and whe are in an instance, remove entity from
791 selector name to force resolution of the node, so that explicit
792 dereferences can be generated in the instance if they were in
795 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
797 * inline.adb (Back_End_Cannot_Inline): Delete.
798 (Add_Inlined_Subprogram): Do not call it.
800 2014-10-31 Ed Schonberg <schonberg@adacore.com>
802 * exp_ch3.ads (Make_Tag_Assignment): New function, used to
803 re-initialize the tag in a tagged object declaration with
805 * exp_ch3.adb (Expand_N_Object_Declaration): Use
806 Make_Tag_Assignment to simplify code for a tagged object
808 * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
809 for the freeze node of an object.
810 * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
811 needed to extend Freeze_Actions for a tagged object declaration.
813 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
815 * gnat_ugn.texi: Further minor improvement to -flto entry.
817 2014-10-31 Gary Dismukes <dismukes@adacore.com>
819 * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
821 2014-10-30 Ed Schonberg <schonberg@adacore.com>
823 * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
825 2014-10-30 Ed Schonberg <schonberg@adacore.com>
827 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
828 indication is provided, check properly that it covers the element
829 type of of the container type.
831 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
833 * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
836 2014-10-30 Ed Schonberg <schonberg@adacore.com>
838 * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
839 Has_Following_Address_Clause so that it returns the address
840 clause if present, rather than a boolean value.
841 * sem_ch3.adb (Analyze_Object_Declaration): use
842 Following_Address_Clause.
843 * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
844 is initialized, insert tag assignment after object is frozen,
845 which may be after an address clause that follows the declaration.
847 2014-10-30 Tristan Gingold <gingold@adacore.com>
849 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
850 system-vxworks-arm.ads, system-freebsd-x86_64.ads,
851 system-linux-hppa.ads, system-linux-s390.ads,
852 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
853 system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
854 system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
855 system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
856 system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
857 system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
858 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
859 system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
860 system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
861 pragma No_Elaboration_Code_All.
863 2014-10-30 Eric Botcazou <ebotcazou@adacore.com>
865 * gnat_ugn.texi: Minor improvement to -flto entry.
867 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
869 * sem_util.adb (Inherit_Subprogram_Contract):
870 Add a guard to protect against enumeration literal overriding.
871 * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
872 Minor reformatting (add SPARK RM references).
874 2014-10-30 Robert Dewar <dewar@adacore.com>
876 * exp_dbug.adb, opt.ads: Minor reformatting.
878 2014-10-30 Yannick Moy <moy@adacore.com>
880 * inline.adb (Has_Single_Return_In_GNATprove_Mode):
881 Return False when return statement is inside one or more blocks.
883 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
885 * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
886 object declaration initialized by a function call that returns
887 an unconstrained result may be rewritted as a renaming of the
888 secondary stack result.
890 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
892 * aspects.adb: Add an entry for aspect Extensions_Visible in
893 table Canonical_Aspect.
894 * aspects.ads: Add entry for aspect Extensions_Visible in
895 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
896 Implementation_Defined_Aspect.
897 * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
898 the list of contract pragmas.
899 * par-prag.adb Pragma Extensions_Visible does not require special
900 processing from the parser.
901 * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
902 implicit class-wide conversion of a formal parameter
903 of a specific tagged type whose related subprogram is
904 subject to pragma Extensions_Visible with value "False".
905 (Check_Abstract_Overriding): Add various overriding checks
906 related to pragma Extensions_Visible.
908 A subprogram subject to pragma Extensions_Visible with value
909 False requires overriding if the subprogram has at least one
910 controlling OUT parameter.
911 (Is_EVF_Procedure): New routine.
912 * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
913 a specific tagged type whose related subprogram is subject to
914 pragma Extensions_Visible with value "False" cannot appear in
915 a class-wide conversion.
916 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
917 the assertion to account for pragma Extensions_Visible.
918 (Check_Overriding_Indicator): An overriding subprogram
919 inherits the contact of the overridden subprogram.
920 (New_Overloaded_Entity): An overriding subprogram inherits the
921 contact of the overridden subprogram.
922 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
923 for aspect Extensions_Visible.
924 (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
925 require special processing at the freeze point.
926 * sem_prag.adb Add an entry for pragma Extensions_Visible in
928 (Analyze_Pragma): Ensure that various SPARK
929 pragmas lack identifiers in their arguments. Add processing for
930 pragma Extensions_Visible.
931 (Chain_CTC): Code reformatting.
932 * sem_res.adb (Resolve_Actuals): A formal parameter of a
933 specific tagged type whose related subprogram is subject to
934 pragma Extensions_Visible with value "False" cannot act as an
935 actual in a subprogram with value "True".
936 * sem_util.adb (Add_Classification): New routine.
937 (Add_Contract_Item): Account for pragma Extensions_Visible. Code
939 (Add_Contract_Test_Case): New routine.
940 (Add_Pre_Post_Condition): New routine.
941 (Extensions_Visible_Status): New routine.
942 (Inherit_Subprogram_Contract): New routine.
943 (Is_EVF_Expression): New routine.
944 (Is_Specific_Tagged_Type): New routine.
945 * sem_util.ads Add type Extensions_Visible_Mode and document all values.
946 (Add_Contract_Item): Add pragma Extensions_Visible to the
948 (Inherit_Subprogram_Contract): New routine.
949 (Is_EVF_Expression): New routine.
950 (Is_Specific_Tagged_Type): New routine.
951 * sinfo.adb (Is_Inherited): New routine.
952 (Set_Is_Inherited): New routine.
953 * sinfo.ads Add flag Is_Inherited along with its usage in
955 (Is_Inherited): New routine along with pragma Inline.
956 (Set_Is_Inherited): New routine along with pragma Inline.
957 * snames.ads-tmpl: Add predefined name "Extensions_Visible"
958 and a new Pragma_Id for the pragma.
960 2014-10-30 Vincent Celier <celier@adacore.com>
962 * prj-proc.adb (Process_Case_Construction): Do not look for
963 the ultimate extending project for a case variable.
965 2014-10-30 Pierre-Marie Derodat <derodat@adacore.com>
967 * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
969 (gnat_encodings): Define a dummy variable for the AAMP back-end.
970 (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
971 for all discrete types whose bounds do not match size and do so
972 only for biased types when -fgnat-encodings=minimal.
973 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
974 parallel types when array bounds are constant while the lower bound is
975 not 1. Also stop generating them because the bound type is
976 larger than sizetype.
977 * gcc-interface/misc.c (gnat_encodings): New.
979 2014-10-30 Thomas Quinot <quinot@adacore.com>
981 * opt.adb (Set_Opt_Config_Switches): For an internal unit,
982 always reset Default_SSO to ' '.
984 2014-10-30 Thomas Quinot <quinot@adacore.com>
986 * freeze.adb (Freeze_Record_Type): Set SSO from default before
987 checking SSO consistency.
989 2014-10-30 Javier Miranda <miranda@adacore.com>
991 * inline.adb (Check_Package_Body_For_Inlining):
992 Cleanup this subprogram to implement exactly the behavior
993 documented in the spec.
995 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
997 * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
998 Update the position after all insertions have taken place.
1000 2014-10-30 Ed Schonberg <schonberg@adacore.com>
1002 * sem_prag.adb (Analyze_Pragma, case License): Do not perform
1003 analysis of pragma arguments when in CodePeer mode, pragma has
1004 different format on other compilers.
1006 2014-10-30 Thomas Quinot <quinot@adacore.com>
1008 * s-os_lib.adb: Minor reformatting.
1010 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1012 * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
1013 gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
1014 Remove redundant enum from machine_mode.
1016 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1018 * gcc-interface/trans.c: Adjust include files.
1019 * gcc-interface/utils.c: Ditto.
1021 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
1023 * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
1025 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
1027 * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
1028 support here instead of...
1029 Do not set flag_delete_dead_exceptions to 1 unconditionally.
1030 (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
1031 (gnat_init_gcc_fp): ...here.
1033 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
1035 * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
1037 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
1039 * gcc-interface/utils.c (create_var_decl_1): For a variable declared
1040 in the unit, set TREE_PUBLIC only if it has static storage duration.
1042 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
1044 * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
1045 of derived packed array types to constrained subtypes only.
1047 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
1049 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
1050 superfluous computation for the max size.
1051 <E_Array_Subtype>: Likewise. Make sure that the max size calculation
1052 does not overflow at compile time.
1054 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1056 * sem_eval.adb (Check_Non_Static_Context): Do not set
1057 Is_Machine_Number on a literal of a fixed-point type.
1059 2014-10-23 Robert Dewar <dewar@adacore.com>
1061 * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
1063 2014-10-23 Pierre-Marie Derodat <derodat@adacore.com>
1065 * exp_dbug.ads: Update ___XA parallel type specification.
1067 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1069 * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
1070 chain of the source type.
1071 * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
1072 reformatting of an error message.
1073 * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
1074 chain that has been inherited already.
1076 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1078 * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
1079 in generic context, and generate body in this case as well,
1080 to simplify ASIS traversals on the construct.
1082 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1084 * sem_ch4.adb (Complete_Object_Operation): Indicate that the
1085 scope of the operation (s) is referenced, to prevent spurious
1086 warnings about unused units.
1088 2014-10-23 Johannes Kanig <kanig@adacore.com>
1090 * errout.adb (Error_Msg_Internal): Copy check flag, increment
1092 * erroutc.adb (Delete_Msg) adjust check msg count.
1093 (Output_Msg_Text) handle check msg case (do nothing).
1094 (Prescan_Message) recognize check messages with severity prefixes.
1095 * errutil.adb (Error_Msg) handle check flag, adjust counter.
1097 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1099 * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
1100 type, check for the presence of discriminants in its parent type,
1101 against the presence of discriminants in the context type.
1103 2014-10-23 Tristan Gingold <gingold@adacore.com>
1105 * adaint.c: __gnat_get_file_names_case_sensitive: Default is
1108 2014-10-23 Arnaud Charlet <charlet@adacore.com>
1110 * pprint.adb (Expression_Image): Add handling of quantifiers.
1112 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1114 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
1115 prefix is a source entity, generate a reference to it before
1116 transformation, because rewritten node might not generate a
1117 proper reference, leading to spurious warnings.
1119 2014-10-23 Tristan Gingold <gingold@adacore.com>
1121 * init.c: Fix thinko in previous patch.
1123 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1125 * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
1126 Inherit the rep chain of the implicit base type.
1127 (Floating_Point_Type_Declaration): Inherit the rep chain of the
1129 (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
1131 (Signed_Integer_Type_Declaration): Inherit the rep chain of the
1133 * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
1135 2014-10-23 Pascal Obry <obry@adacore.com>
1137 * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
1138 view of the registry.
1140 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1142 * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
1143 return without expanding expression, to prevent subsequent crash.
1144 * freeze.adb: better error message for illegal declaration.
1146 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1148 * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
1149 substring which represents the time zone on VxWorks.
1151 2014-10-23 Vincent Celier <celier@adacore.com>
1153 * gnatls.adb: If --RTS= was not used, check if there is a default
1154 runtime. If there is none, in verbose mode, indicate that the
1155 default runtime is not available and show only the current
1156 directory in the source and the object search paths.
1158 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1160 * sem_ch6.adb (Process_Formals): A thunk procedure with a
1161 parameter of a limited view does not need a freeze node.
1163 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1165 * sem_ch7.adb (Analyze_Package_Body_Helper):
1166 The logic which hides local entities from external
1167 visibility is now contained in routine Hide_Public_Entities.
1168 (Hide_Public_Entities): New routine. Object and subprogram
1169 renamings are now hidden from external visibility the same way
1172 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1174 * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
1175 does not require freezing, in particular if it denotes a generic
1178 2014-10-23 Yannick Moy <moy@adacore.com>
1180 * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
1181 Disable analysis in GNATprove mode.
1183 2014-10-23 Arnaud Charlet <charlet@adacore.com>
1185 * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
1187 2014-10-23 Arnaud Charlet <charlet@adacore.com>
1189 * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
1190 pragmas in codepeer mode.
1192 2014-10-23 Gary Dismukes <dismukes@adacore.com>
1194 * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
1196 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1198 * sem_ch12.adb (Inline_Instance_Body): Alphabetize
1199 local variables and constants. Add constants Save_SM and Save_SMP
1200 to capture SPARK_Mode-related attributes. Compile the inlined
1201 body with the SPARK_Mode of the enclosing context.
1203 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1205 * sinfo.adb (Elaboration_Boolean): Removed.
1206 (Set_Elaboration_Boolean): Removed.
1207 * sinfo.ads Remove attribute Elaboration_Boolean along with its
1208 occurrence in nodes.
1209 (Elaboration_Boolean): Removed along with pragma Inline.
1210 (Set_Elaboration_Boolean): Removed along with pragma Inline.
1212 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1214 * sem_ch3.adb (Constant_Redeclaration): Make error message more
1215 explicit on a deferred constant whose object_definition is an
1218 2014-10-23 Vincent Celier <celier@adacore.com>
1220 * gnatls.adb: Never call Targparm.Get_Target_Parameters.
1222 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1224 * sem_ch6.adb (Analyze_Expression_Function): In a generic
1225 context do not create a body, and only pre-analyze the expression,
1226 which may include incomplete views.
1228 2014-10-23 Robert Dewar <dewar@adacore.com>
1230 * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
1231 * sem_ch3.adb: Minor reformatting.
1233 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1235 * sem_ch12.adb (Analyze_Associations): If an actual for a formal
1236 object is a call to a parameterless expression function, add
1237 the function to the list of actuals to freeze.
1238 * freeze.adb (Check_Expression_Function): Create freeze nodes of
1239 outer types that may be references in the body of the expression.
1241 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1243 * exp_util.ads, checks.ads: Minor comment reformatting.
1245 2014-10-23 Javier Miranda <miranda@adacore.com>
1247 * sem_eval (Test_In_Range): Disable removal of range_check for
1250 2014-10-23 Robert Dewar <dewar@adacore.com>
1252 * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
1253 messages, which got disabled when we unconditionally added an
1254 asterisk at the start of the string.
1256 2014-10-23 Vincent Celier <celier@adacore.com>
1258 * gnatls.adb: Ensure that "gnatls -l" works even when there is
1261 2014-10-23 Eric Botcazou <ebotcazou@adacore.com>
1263 * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
1264 untagged and has discriminants, build the implicit full view after
1265 building the derived type. Capture original declaration and type
1267 (Copy_And_Build): ...here.
1268 * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
1270 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1272 * checks.adb (Ensure_Valid): Update the subprogram
1273 profile. Propagate the contex attributes to Insert_Valid_Check.
1274 (Insert_Valid_Check): Update the subprogram profile. Propagate
1275 the attributes of the context to Duplicate_Subexpr_No_Checks.
1276 (Validity_Check_Range): Update the subprogram profile. Propagate
1277 the context attribute to Ensure_Valid.
1278 * checks.ads (Ensure_Valid): Update the subprogram profile
1279 along with the comment on usage.
1280 (Insert_Valid_Check): Update the subprogram profile along with the
1282 (Validity_Check_Range): Update the subprogram profile along with
1283 the comment on usage.
1284 * exp_util.adb (Build_Temporary): New routine.
1285 (Duplicate_Subexpr_No_Checks): Update the subprogram
1286 profile. Propagate the attributes of the context to Remove_Side_Effects.
1287 (Remove_Side_Effects): Update the subprogram profile. Update all calls
1288 to Make_Temporary to invoke Build_Temporary.
1289 * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
1290 the subprogram profile along with the comment on usage.
1291 (Remove_Side_Effects): Update the subprogram profile along with
1292 the comment on usage.
1293 * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
1294 to the validity check machinery. Explain the reason for this
1297 2014-10-23 Robert Dewar <dewar@adacore.com>
1299 * a-strsea.adb: Minor reformatting.
1301 2014-10-23 Thomas Quinot <quinot@adacore.com>
1303 * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
1304 units from consistency check.
1305 * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
1306 consistency check excludes run-time units.
1308 2014-10-23 Ed Schonberg <schonberg@adacore.com>
1310 * a-strsea.adb (Find_Token): Enable constraint checking in this
1311 procedure, so that even when compiling with checks suppressed, as is
1312 the case for the run-time, an exception is raised in this routine when
1313 the input meets the conditions described in RM 2005 A.4.3 (68/1).
1315 2014-10-20 Eric Botcazou <ebotcazou@adacore.com>
1317 * sem_ch3.adb (Build_Derived_Private_Type): When the parent
1318 is untagged and has discriminants, build the implicit full
1319 view even if the derived type is a completion, and make it
1320 the Underlying_Full_View of the type.
1321 (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
1323 (Build_Derived_Record_Type): Likewise.
1325 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1327 * sem_ch13.adb: Add guard to convention setting.
1329 2014-10-20 Robert Dewar <dewar@adacore.com>
1331 * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
1334 2014-10-20 Robert Dewar <dewar@adacore.com>
1336 * par-prag.adb (Add_List_Pragma_Entry): New procedure.
1337 * par.adb (P_Pragma): Document requirement to handle multiple calls.
1339 2014-10-20 Robert Dewar <dewar@adacore.com>
1341 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1342 Fix error of bad inheritance of this pragma from with'ed unit.
1344 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1346 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
1347 inherit convention from parent type, because the subtype may
1348 have been declared on a partial view, prior to the pragma on
1351 2014-10-20 Olivier Hainque <hainque@adacore.com>
1352 Tristan Gingold <gingold@adacore.com>
1354 * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
1357 2014-10-20 Nicolas Roche <roche@adacore.com>
1359 * gcc-interface/Make-lang.in: ensure that automatically generated
1360 dependency are referencing generated gnatvsn rather than original
1363 2014-10-20 Gary Dismukes <dismukes@adacore.com>
1365 * gnat_ugn.texi: Minor reformatting.
1366 * sem_ch3.adb: Minor reformatting.
1368 2014-10-20 Vincent Celier <celier@adacore.com>
1370 * prj-attr.adb: New project level attribute Runtime.
1371 * prj-conf.adb (Get_Project_Runtimes): New procedure to get
1372 the attributes Runtime declared in the main project, to use
1373 in auto-configuration.
1374 (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
1375 * prj-proc.adb (Runtime_Defaults): New table to store
1376 the default values of attributes Runtime (<language>).
1377 (Set_Default_Runtime_For): New procedure to store the default
1378 value of a Runtime (<language>) in table Runtime_Defaults.
1379 (Expression): Use the value stored in table Runtime_Defaults as
1380 the default for Runtime (<language>).
1381 * prj-proc.ads (Set_Default_Runtime_For): New procedure.
1382 * prj.ads (Attribute_Default_Value): New enumerated value
1385 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1387 * sem_ch3.adb (Analyze_Object_Declaration): If the type is
1388 an unconstrained unchecked_union type, rewrite declaration
1389 as a renaming to prevent attempt to retrieve non- existent
1390 discriminants from expression.
1392 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1394 * gnat_ugn.texi: Minor reformatting.
1396 2014-10-20 Tristan Gingold <gingold@adacore.com>
1398 * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
1400 * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
1403 2014-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1405 * sem_attr.adb (Analyze_Attribute): Replace
1406 variables CS and PS with Proc_Id and Subp_Id to better illustrate
1407 their purpose. Account for the case where _Postconditions
1408 has not been generated yet and the context is aspect/pragma
1409 Refined_Post. In that scenario the expected prefix of attribute
1410 'Result is the current scope.
1412 2014-10-20 Robert Dewar <dewar@adacore.com>
1414 * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
1415 in middle of expression with logical operators.
1417 2014-10-20 Robert Dewar <dewar@adacore.com>
1419 * par-ch13.adb (Possible_Misspelled_Aspect): New function.
1421 2014-10-20 Steve Baird <baird@adacore.com>
1423 * pprint.adb: Improve Expression_Image function.
1425 2014-10-20 Robert Dewar <dewar@adacore.com>
1427 * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
1428 * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
1429 * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
1430 * einfo.adb (No_Tagged_Streams_Pragma): New field.
1431 * einfo.ads: Minor reformatting (reorder entries).
1432 (No_Tagged_Streams_Pragma): New field.
1433 * exp_ch3.adb: Minor comment update.
1434 * opt.ads (No_Tagged_Streams): New variable.
1435 * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
1436 * sem.ads (Save_No_Tagged_Streams): New field in scope record.
1437 * sem_attr.adb (Check_Stream_Attribute): Check stream ops
1438 prohibited by No_Tagged_Streams.
1439 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
1440 No_Tagged_Streams_Pragma.
1441 (Analyze_Subtype_Declaration): ditto.
1442 (Build_Derived_Record_Type): ditto.
1443 (Record_Type_Declaration): ditto.
1444 * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
1445 (Push_Scope): Save No_Tagged_Streams.
1446 * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
1449 2014-10-20 Robert Dewar <dewar@adacore.com>
1451 * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
1452 sem_ch13.adb: Minor reformatting.
1454 2014-10-20 Javier Miranda <miranda@adacore.com>
1456 * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
1457 declaration of a class-wide limited object containing an
1458 initializing expression into a renaming declaration. Required to
1459 avoid passing such declaration to the backend and also to avoid
1460 generating an extra copy.
1462 2014-10-20 Eric Botcazou <ebotcazou@adacore.com>
1464 * inline.adb (List_Inlining_Info): Minor tweaks.
1465 (Add_Inlined_Body): Inline the enclosing package
1466 if it is not internally generated, even if it doesn't come
1469 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1471 * sem_ch4.adb (Process_Function_Call): If the first actual
1472 denotes a discrete type, the mode must be interpreted as a slice
1473 of an array returned by a parameterless call.
1475 2014-10-20 Vasiliy Fofanov <fofanov@adacore.com>
1477 * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
1478 searching for runtime referenced by a simple name on a project path.
1480 2014-10-20 Olivier Hainque <hainque@adacore.com>
1482 * vxworks-x86-link.spec: New file.
1483 * system-vxworks-x86.ads: Add pragma Linker_Options to link with
1484 vxworks-x86-link.spec.
1486 2014-10-20 Vincent Celier <celier@adacore.com>
1488 * opt.ads (Origin_Of_Target): New type.
1489 (Target_Origin): New variable.
1490 * prj-conf.adb (Parse_Project_And_Apply_Config): Record
1491 Target_Value and Target_Origin. If target was not specified
1492 on the command line with --target=, check if attribute Target
1493 is declared in the main project. If it is and it is not the
1494 native target, parse again the projects so that 'Target get
1495 the new value. Fail if the target has changed again. Invoke
1496 Process_Project_And_Apply_Config with Do_Phase_1 set to False
1497 is Process_Project_Tree_Phase_1 has already been invoked.
1498 * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
1499 parameter Do_Phase_1, defaulted to True.
1500 * prj-proc.adb (Expression): Check the special values and
1501 defaults for attribute Target.
1503 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1505 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
1506 the subprogram spec of the body in full, because it will be
1507 reanalyzed when the declaration itself is analyzed; otherwise. a
1508 formal may end up duplicated in the list of formals leading to
1509 spurious conformance errors with an existing declaration.
1511 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1513 * sem_ch13.adb: Improve error recovery on illegal aspect.
1515 2014-10-20 Arnaud Charlet <charlet@adacore.com>
1517 * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
1518 Fix calling C APIs with no trailing NUL char by calling better
1521 2014-10-20 Tristan Gingold <gingold@adacore.com>
1523 * gnat_ugn.texi: Document that gdb users must be in group
1524 _developer on mac os.
1526 2014-10-20 Arnaud Charlet <charlet@adacore.com>
1528 * a-tgdico.ads: Fix typo.
1530 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1532 * exp_aggr.adb (Convert_To_Assignments): Do not create a
1533 transient scope for a component whose type requires it, if the
1534 context is an initialization procedure, because the target of
1535 the assignment must be visible outside of the block.
1537 2014-10-20 Tristan Gingold <gingold@adacore.com>
1539 * tracebak.c: Define PC_ADJUST for arm-darwin.
1540 * env.c: Remove darwin specific code.
1541 * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
1543 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1545 * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
1546 is incomplete rather than private, and full type declaration
1547 has aspects, analyze aspects on the full view rather than
1548 the incomplete view, to prevent freezing anomalies with the
1551 2014-10-17 Robert Dewar <dewar@adacore.com>
1553 * exp_ch9.adb (Expand_N_Task_Body): Add defense against
1555 * freeze.adb (Freeze_Entity): Add defense against checking null
1557 * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
1558 * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
1560 * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
1561 in No_Run_Time mode.
1563 2014-10-17 Robert Dewar <dewar@adacore.com>
1565 * prj-makr.adb: Minor reformatting.
1567 2014-10-17 Robert Dewar <dewar@adacore.com>
1569 * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
1570 prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
1572 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1574 * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
1575 is enabled, code will be generated for some composite types
1576 to initialize an object after its declaration. If there is
1577 a subsequent Import pragma for the object, that code must be
1578 removed as specified byw the semantics of the pragma, and to
1579 prevent out-of-order elaboration issues in the back-end.
1581 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1583 * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
1584 wrapping mechanism under debug flag -gnatd.h.
1585 * debug.adb: Claim debug switch -gnatd.h.
1587 2014-10-17 Doug Rupp <rupp@adacore.com>
1589 * gcc-interface/Makefile.in: Enable the socket runtime bits
1592 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1594 * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
1595 not perform the replacement on the expression for an inherited
1596 class-wide invariant if in ASIS_Mode and the type reference is
1597 already the prefix of a 'Class attribute reference: the expression
1598 has already been preanalyzed and the replacement performed when
1599 first encountered on the declaration of the parent type.
1601 2014-10-17 Robert Dewar <dewar@adacore.com>
1603 * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
1606 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1608 * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
1609 subprogram from base type.
1610 * sem_ch7.adb (Analyze_Package_Specification): Build invariant
1611 subprogram for private type, not any of its subtypes.
1612 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
1613 of procedure entity, because a call to it may be generated in
1614 a client unit before the corresponding subprogram declaration
1617 2014-10-17 Vincent Celier <celier@adacore.com>
1619 * prj-nmsc.adb (Get_Directories): Do not create directories
1620 when a project is abstract.
1622 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1624 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1625 of iteration is given by an expression that is not an array type,
1626 verify that its type implements an iterator iterface.
1628 2014-10-17 Robert Dewar <dewar@adacore.com>
1630 * sem_attr.adb (Eval_Attribute): Ensure that attribute
1631 reference is not marked as being a static expression if the
1632 prefix evaluation raises CE.
1634 2014-10-17 Robert Dewar <dewar@adacore.com>
1636 * exp_pakd.adb: Move bit packed entity tables to spec.
1637 * exp_pakd.ads: Move bit packed entity tables here from body.
1638 * freeze.adb (Freeze_Array_Type): Check that packed array type
1640 * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
1641 Specialize messages using PRE_Id_Table.
1642 * uintp.ads, uintp.adb (UI_Image): New functional form.
1644 2014-10-17 Robert Dewar <dewar@adacore.com>
1646 * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
1647 * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
1649 * exp_ch3.adb (Default_Initialize_Object): Handle
1650 Suppress_Initialization.
1651 * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
1652 procedure (Expand_N_Pragma): Handle Suppress_Initialization
1653 (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
1654 (Undo_Initialization): New procedure.
1655 * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
1656 This is now allowed for E_Variable case.
1657 * gnat_rm.texi: Document new aspect Suppress_Initialization
1658 Suppress_Initialization aspect/pragma can apply to variable.
1659 * einfo.ads: Minor reformatting.
1661 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1663 * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
1665 2014-10-17 Robert Dewar <dewar@adacore.com>
1667 * cstand.adb (Create_Standard): Mark Short_Integer as
1668 implementation defined.
1669 * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
1670 compiler built with assertions for No_Implementation_Identifiers test.
1672 2014-10-17 Robert Dewar <dewar@adacore.com>
1674 * aspects.ads: Documentation fix, aspect Lock_Free does have a
1675 corresponding pragma.
1676 * gnat_rm.texi: Document implementation defined boolean aspects
1679 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1681 * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
1682 preserve semantic information on the invariant expression
1683 (typically a function call) because it may be inherited by a
1684 type extension in a different unit, and it cannot be resolved
1685 by visibility elsewhere because it may refer to local entities.
1687 2014-10-17 Robert Dewar <dewar@adacore.com>
1689 * gnat_rm.texi: Document that string literal can be used for
1690 pragma Warnings when operating in Ada 83 mode.
1692 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1694 * freeze.adb (Find_Aggregate_Component_Desig_Type): New
1695 subsidiary function to Freeze_ Expression, used to determine
1696 whether an aggregate for an array of access types also freezes the
1697 designated type, when some aggregate components are allocators.
1699 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1701 * a-strsea.adb (Find_Token): AI05-031 indicates that the
1702 procedure must raise Index_Error when Source is not empty and
1703 the From parameter is not within the range of the Source string.
1705 2014-10-17 Robert Dewar <dewar@adacore.com>
1707 * sem_prag.adb (Is_Static_String_Expression): Allow string
1708 literal in Ada 83 mode.
1710 2014-10-17 Vincent Celier <celier@adacore.com>
1712 * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
1713 not take into account any compiler command from package IDE.
1715 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1717 * sem_ch12.adb (Build_Function_Wrapper): The formals of the
1718 wrapper must have the same identifiers as those of the formal
1719 subprogram, because calls within the generic may use named
1722 2014-10-17 Robert Dewar <dewar@adacore.com>
1724 * sem_ch3.adb, a-strsea.adb: Minor reformatting.
1725 * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
1727 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1729 * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
1730 specfications from original type declaration to declaration of
1731 implicit base, because original node is rewritten as a subtype
1732 declaration on which type aspects do not belong.
1734 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1736 * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
1737 inherits the attributes related to pragma Default_Initial_Condition
1738 from its parent type.
1740 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1742 * a-strsea.adb (Index - versions with a From parameter):
1743 According to AI05-056, the Index functions with a From parameter
1744 return 0 if the source is an empty string.
1746 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1748 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
1749 the consistency checks in ASIS mode.
1751 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1753 * s-expmod.ads: Minor typo fix.
1755 2014-10-17 Robert Dewar <dewar@adacore.com>
1757 * sem_util.adb: Minor reformatting.
1759 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1761 * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
1762 actuals that are defaulted subprograms of the formal subprogram
1765 2014-10-17 Robert Dewar <dewar@adacore.com>
1767 * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
1768 implementation base type.
1769 * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
1770 operands are always expanded out into component comparisons.
1772 2014-10-17 Robert Dewar <dewar@adacore.com>
1774 * s-vallli.adb: Minor comment correction.
1775 * s-valuti.ads: Minor comment reformatting.
1777 2014-10-17 Robert Dewar <dewar@adacore.com>
1779 * gnat_rm.texi: Document System.Atomic_Counters.
1780 * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
1781 list of user- accessible units added as children of System.
1782 * s-atocou.ads: Update comment.
1784 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1786 * s-expmod.ads: Add comments.
1788 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1790 * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
1791 of all attributes related to pragma Default_Initial_Condition.
1792 (Build_Derived_Type): Propagation of all attributes related
1793 to pragma Default_Initial_Condition.
1794 (Process_Full_View): Account for the case where the full view derives
1795 from another private type and propagate the attributes related
1796 to pragma Default_Initial_Condition to the private view.
1797 (Propagate_Default_Init_Cond_Attributes): New routine.
1798 * sem_util.adb: Alphabetize various routines.
1799 (Build_Default_Init_Cond_Call): Use an unchecked type conversion
1800 when calling the default initial condition procedure of a private type.
1801 (Build_Default_Init_Cond_Procedure_Declaration): Prevent
1802 the generation of multiple default initial condition procedures.
1804 2014-10-17 Robert Dewar <dewar@adacore.com>
1806 * prj-conf.adb: Revert previous change.
1808 2014-10-17 Robert Dewar <dewar@adacore.com>
1810 * lib-writ.ads, s-valdec.ads: Minor reformatting.
1812 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1814 * sem_ch12.adb: Additional work on function wrappers.
1816 2014-10-17 Eric Botcazou <ebotcazou@adacore.com>
1818 * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
1819 on the renamed object of renamings.
1821 2014-10-17 Vincent Celier <celier@adacore.com>
1823 * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
1824 mode, always use the native target.
1826 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1828 * gcc-interface/misc.c: Adjust include files.
1830 2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
1831 Alan Modra <amodra@gmail.com>
1834 * uintp.adb (Vector_To_Uint): Move from here to...
1835 * uintp.ads (UI_Vector): Make public.
1836 (Vector_To_Uint): ...here.
1838 2014-10-10 Robert Dewar <dewar@adacore.com>
1840 * freeze.adb, sem_attr.adb: Minor reformatting.
1842 2014-10-10 Johannes Kanig <kanig@adacore.com>
1844 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
1845 a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
1848 2014-10-10 Vincent Celier <celier@adacore.com>
1850 * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
1851 any configuration switches from the project file.
1853 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1855 * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
1856 (Build_Function_Wrapper): New function, to construct a wrapper
1857 function for actuals that are functions with an arbitrary
1858 number of parameters. Used in GNATProve mode to simplify proof
1859 propagation in instantiations.
1861 2014-10-10 Robert Dewar <dewar@adacore.com>
1863 * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
1866 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1868 * sem_res.adb (Is_OK_Volatile_Context): Allow
1869 a volatile object reference to appear as the expression of a
1872 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1874 * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
1875 Aspect specification is legal on a local instantiation of a
1876 library-level generic unit.
1878 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1880 * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
1881 if inlining has been enabled via -gnatn and the target is not GCC.
1883 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1885 * freeze.adb (Freeze_Entity): Freezing a subprogram does
1886 not always freeze its profile. In particular, an attribute
1887 reference that takes the access type does not freeze the types
1890 2014-10-10 Robert Dewar <dewar@adacore.com>
1892 * errout.adb (Adjust_Name_Case): New procedure.
1893 (Set_Msg_Node): Use Adjust_Name_Case.
1894 * errout.ads (Adjust_Name_Case): New procedure.
1895 * exp_intr.adb (Add_Source_Info): Minor code reorganization
1897 (Write_Entity_Name): Use Errout.Adjust_Name_Case.
1898 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
1899 and fix up entries in Sig_Flags, and correct logical errors in
1901 * sprint.adb (Sprint_Node_Actual): Properly print string for
1904 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1906 * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
1907 anonymous array type with delayed aspects, defer freezing of
1908 type until object itself is frozen.
1909 * freeze.adb (Freeze_Entity): When freezing an object of an
1910 anonymous array type with delayed aspects, remove freeze node of
1911 object after freezing type, to prevent out-of-order elaboration
1912 in the back-end. The initialization call for the object has
1913 already been constructed when expanding the object declaration.
1915 2014-10-10 Robert Dewar <dewar@adacore.com>
1917 * exp_intr.adb (Write_Entity_Name): Moved to outer level
1918 (Write_Entity_Name): Properly handle operator names
1919 (Expand_Source_Info): New procedure.
1920 * exp_intr.ads (Add_Source_Info): New procedure.
1922 2014-10-10 Robert Dewar <dewar@adacore.com>
1924 * butil.ads: Minor reformatting.
1925 * sem_ch5.adb: Code clean up.
1927 2014-10-10 Robert Dewar <dewar@adacore.com>
1929 * exp_ch11.adb (Expand_N_Raise_Statement): Handle
1930 Prefix_Exception_Messages.
1931 * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
1932 * opt.ads: New flags Prefix_Exception_Message[_Config].
1933 * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
1934 * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
1935 * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
1936 * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
1938 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1940 * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
1941 raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
1943 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1945 * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
1946 contain pragmas generated for loop invariants and type predicates.
1947 Clarify use of this subprogram.
1949 2014-10-10 Yannick Moy <moy@adacore.com>
1951 * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
1953 * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
1956 2014-10-10 Vadim Godunko <godunko@adacore.com>
1958 * a-stwima.adb (To_Sequence): Compute size of result array.
1960 2014-10-10 Javier Miranda <miranda@adacore.com>
1962 * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
1963 sources of the example to avoid a warning when the Ada files are
1964 automatically generated by the binding generator.
1966 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1968 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
1969 Do_Range_Check on the expression of a record component
1970 association when needed, as is done for array components, when
1971 the corresponding type is a scalar type.
1973 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1975 * a-coinho-shared.adb: Minor typo fix.
1976 * prj-env.ads: Minor reformatting.
1978 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1980 * sem_res.adb (Resolve_String_Literal): Do not
1981 generate a string literal subtype for the default expression of
1982 a formal parameter in GNATprove mode.
1984 2014-10-10 Yannick Moy <moy@adacore.com>
1986 * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
1988 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1990 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
1991 declaration for loop parameter before rest of loop, and set
1992 entity kind to prevent assignments to it in the user code.
1993 * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
1994 loop parameter in an element iteration over o formal container.
1996 2014-10-10 Robert Dewar <dewar@adacore.com>
1998 * gnat_ugn.texi: Document use of user-level routines to handle
1999 e.g. col major arrays.
2001 2014-10-10 Doug Rupp <rupp@adacore.com>
2003 * s-osinte-android.adb: Fix misspelling.
2004 * gsocket.h: Tweak the Android quirks.
2006 2014-10-10 Robert Dewar <dewar@adacore.com>
2008 * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
2010 2014-10-10 Robert Dewar <dewar@adacore.com>
2012 * sem_ch13.adb: Minor code reorganization.
2014 2014-10-10 Pat Rogers <rogers@adacore.com>
2016 * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
2019 2014-10-10 Vadim Godunko <godunko@adacore.com>
2021 * a-coinho-shared.adb: Add minor comment.
2022 * a-stzmap.adb (To_Sequence): Compute size of result array.
2024 2014-10-10 Javier Miranda <miranda@adacore.com>
2026 * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
2027 if-stmt to match its current documentation.
2029 2014-10-10 Robert Dewar <dewar@adacore.com>
2031 * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
2032 freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
2033 sem_ch6.adb, sem_cat.adb, sem_disp.adb
2034 (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
2035 throughout where appropriate.
2037 2014-10-10 Bob Duff <duff@adacore.com>
2039 * a-coinho-shared.ads: Minor reformatting.
2040 * s-traceb.adb: Minor clean up.
2042 2014-10-10 Robert Dewar <dewar@adacore.com>
2044 * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
2045 * ali.ads (GNATprove_Mode): New component in ALI table.
2046 (GNATprove_Mode_Specified): New global.
2047 * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
2049 * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
2052 2014-10-10 Javier Miranda <miranda@adacore.com>
2054 * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
2055 (Build_Init_Statement): Ensure that statements
2056 associated with the parent components are located at the beginning
2057 of the returned list of statements.
2059 2014-10-10 Ed Schonberg <schonberg@adacore.com>
2061 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
2062 view of a private type T that has a type invariant is a scalar
2063 or constrained array type, the base type created for the full
2064 view has the same type invariant.
2066 2014-10-10 Robert Dewar <dewar@adacore.com>
2068 * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
2071 2014-09-22 Eric Botcazou <ebotcazou@adacore.com>
2073 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
2074 * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
2076 2014-09-15 Jakub Jelinek <jakub@redhat.com>
2078 * gcc-interface/Make-lang.in (check_acats_numbers0,
2079 check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
2080 check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
2081 check_acats_numbers, check_acats_subdirs): New variables.
2082 (check_acats_targets): Use $(check_acats_subdirs).
2083 (check-acats, check-acats%): Rewritten so that for parallelized
2084 testing each job runs all the chapters files, with
2085 GCC_RUNTEST_PARALLELIZE_DIR set in environment. Prepare the support
2086 directory sequentially and share it.
2087 (check-acats-subtargets): Always print just check-acats.
2089 2014-08-25 Martin Liska <mliska@suse.cz>
2091 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
2092 new cgraph interface.
2093 (gnat_write_global_declarations): Likewise.
2095 2014-08-13 Sylvestre Ledru <sylvestre@debian.org>
2097 * 9drpc.adb: Fix a typo
2098 * s-interr.ads: Likewise
2099 * s-taskin.ads: Likewise
2100 * s-traces.ads: Likewise
2101 * sysdep.c: Likewise
2103 2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
2105 * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
2106 * gsocket.h Add include of <unistd.h> on RTEMS.
2108 2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
2110 * s-osinte-rtems.adb: Correct formatting of line in license block.
2112 2014-08-04 Claire Dross <dross@adacore.com>
2114 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2115 For an instance, look at the scope before the generic parent.
2117 2014-08-04 Yannick Moy <moy@adacore.com>
2119 * lib-writ.ads: Update comments.
2120 * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
2121 parameters to filter inherited subprograms.
2123 2014-08-04 Robert Dewar <dewar@adacore.com>
2125 * gnat_rm.texi: Add section on use of address clause for memory
2128 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2130 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
2131 particular the subtype created for a generic actual, inherits
2132 invariant information from the base type.
2134 2014-08-04 Robert Dewar <dewar@adacore.com>
2136 * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
2137 * gnat_rm.texi: Add documentation for aspect Obsolescent.
2138 * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
2140 (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
2141 * s-osprim-mingw.adb: Minor reformatting.
2142 * sem_res.adb (Is_Atomic_Ref_With_Address): New function
2143 (Resolve_Indexed_Component): Rework warnings for non-atomic access
2144 (Resolve_Selected_Component): Add warnings for non-atomic access.
2146 2014-08-04 Doug Rupp <rupp@adacore.com>
2148 * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
2149 formal to long_long.
2150 * g-calend.ads (timeval): Bump up size to accomodate sec type.
2151 * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
2153 * s-osprim-posix.adb (timeval): Bump up size to accomodate
2155 (timeval_to_duration): Change sec formal to Long_Long_Integer
2156 * s-osinte-darwin.adb (timeval): Bump up
2157 size to accomodate new sec type.
2158 (timeval_to_duration): Change sec formal to long_long
2159 * s-osinte-android.adb: Likewise.
2160 * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
2161 sec formal from long to long long.
2163 2014-08-04 Robert Dewar <dewar@adacore.com>
2165 * sem_res.adb (Resolve_Qualified_Expression): Make sure
2166 Do_Range_Check flag gets set.
2168 2014-08-04 Robert Dewar <dewar@adacore.com>
2170 * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
2171 * exp_ch3.adb (Build_Array_Init_Proc): Use
2172 Is_Standard_String_Type.
2173 (Expand_Freeze_Array_Type): ditto.
2174 (Get_Simple_Init_Val): ditto.
2175 (Needs_Simple_Initialization): ditto.
2176 * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
2177 * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
2179 2014-08-04 Pascal Obry <obry@adacore.com>
2181 * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
2182 _stprintf which insert garbage into the wfull_path buffer.
2184 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2186 * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
2188 * fe.h: Minor reformatting.
2190 2014-08-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2192 * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
2194 2014-08-04 Robert Dewar <dewar@adacore.com>
2196 * par-ch13.adb (Get_Aspect_Specifications): Improve error
2197 recovery, fixing a -gnatQ bomb.
2199 2014-08-04 Yannick Moy <moy@adacore.com>
2201 * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
2202 do not generate two Itypes with the same name for an array
2204 * sinfo.ads: Expand doc on GNATprove mode.
2206 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2208 * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
2209 master and storage pool attributes on the root type of an
2210 anonymous access type.
2211 * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
2212 and storage pool attributes on the root type of an anonymous
2215 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2217 * exp_ch3.adb: Minor reformatting.
2218 * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
2219 * tracebak.c: Remove use of above files.
2220 * gcc-interface/Makefile.in: Update dependencies.
2222 2014-08-04 Pierre-Marie Derodat <derodat@adacore.com>
2224 * gcc-interface/utils.c (gnat_set_type_context): Also set the
2225 context for parallel types' TYPE_STUB_DECL. Do not change
2226 anything if the context is already set for them.
2227 (gnat_pushdecl): Update the comment for calls to
2228 gnat_set_type_context to mention parallel types.
2229 (add_parallel_type): When adding a context-less parallel type to
2230 a type that has a context, propagate the context from the latter
2232 (process_deferred_decl_context): Call gnat_set_type_context
2233 rather than manually setting the type context.
2234 (build_unc_object_type): Call gnat_set_type_context on the
2237 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2239 * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
2240 subtype indication and the case statement has only two choices,
2241 replace subtype indication with its range, because the resulting
2242 membership test cannot have a subtype indication as an operand.
2244 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2246 * exp_ch3.adb: Update comments, minor reformatting.
2248 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2250 * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
2251 the default initial condition procedures are build here.
2252 * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
2253 analyzed argument of pragma Default_Initial_Condition in some
2254 dummy code as GNATprove mode disables assertions, but still
2255 needs to see the argument.
2257 2014-08-04 Robert Dewar <dewar@adacore.com>
2259 * exp_ch6.adb, sem_util.adb: Minor reformatting.
2261 2014-08-04 Olivier Hainque <hainque@adacore.com>
2263 * a-comutr.ads: Set Root_Node_Type'Alignment to
2264 Standard'Maximum_Alignment, so that it is at least as large as
2265 the max default for Tree_Node_Type'Alignment.
2267 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2269 * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
2270 of the default initial condition procedure [body].
2271 * sem_ch3.adb (Analyze_Declarations): Create the bodies of
2272 all default initial condition procedures at the end of private
2273 declaration analysis.
2274 * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
2276 (Build_Default_Init_Cond_Procedure_Body): Merged in the
2277 processing of routine Build_Default_Init_Cond_Procedure_Bodies.
2278 * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
2280 (Build_Default_Init_Cond_Procedure_Body): Removed.
2282 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2284 * sem_elab.adb (Check_Elab_Call): Do not check a call to a
2286 * exp_ch6.adb (Expand_Call): Clarify handling of inserted
2289 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2291 * sem_prag.adb (Analyze_Pragma): Ensure that an
2292 internally generated spec for a stand alone body is recognized
2293 as a proper context for pragma SPARK_Mode.
2295 2014-08-04 Robert Dewar <dewar@adacore.com>
2297 * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
2299 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2301 * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
2302 when -gnatO has already been specified, for compatibility
2304 (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
2306 * g-expect.ads: Fix typo.
2308 2014-08-04 Thomas Quinot <quinot@adacore.com>
2310 * exp_ch4.adb (Insert_Dereference_Action): the actual Size
2311 must account for the bounds template if the designated type is
2312 an unconstrained array.
2314 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2316 * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
2317 SPARK_Mode in the body.
2318 * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
2319 way to verify the consistency of SPARK_Mode between a spec and
2321 * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
2322 to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2324 (Analyze_Subprogram_Instantiation): Remove the call to
2325 Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
2327 * sem_prag.adb (Analyze_Pragma): Remove local variable
2328 Inst_Id. SPARK_Mode can no longer be applied to a package or
2329 subprogram instantiation.
2330 * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
2333 2014-08-04 Robert Dewar <dewar@adacore.com>
2335 * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
2337 2014-08-04 Yannick Moy <moy@adacore.com>
2339 * sem_ch3.adb (Derive_Type_Declaration,
2340 Process_Discriminants): Remove SPARK-specific legality checks.
2342 2014-08-04 Thomas Quinot <quinot@adacore.com>
2344 * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
2345 * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
2348 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2350 * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
2351 compatibility of SPARK_Mode between a spec and a body, use the
2352 SPARK_Mode of the public part.
2353 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
2354 the already available routine to exchange the aspects between
2355 the template and its copy. Analyze the aspects of copy to
2356 ensure that the corresponding pragmas perform their semantic
2357 effects. The partial analysis of aspects is no longer needed.
2358 (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
2360 (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
2362 * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
2363 instantiation which does not come from source.
2365 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2367 * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
2368 SPARK_Mode pragmas to the public and private part of the unit.
2369 * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
2370 type cannot have discriminants if the parent type already has
2372 (Process_Discriminants): Ensure that the type of a discriminant is
2374 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
2375 SPARK_Mode compatibility between a spec and a body can now be
2376 safely performed while processing a generic.
2377 * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
2378 SPARK_Mode compatibility between a spec and a body can now be
2379 safely performed while processing a generic.
2380 * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
2381 safely analyzed when processing a generic.
2383 2014-08-04 Nicolas Roche <roche@adacore.com>
2385 * g-dirope.adb: Minor reformating.
2387 2014-08-04 Robert Dewar <dewar@adacore.com>
2389 * sem_ch6.adb: Minor reformatting.
2391 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2393 * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
2394 Before normalizing these pragmas into a pragma Check, preanalyze
2395 the optional Message argument, (which is subsequently copied)
2396 so that it has the proper semantic information for ASIS use.
2397 * sem_case.adb: Initialize flag earlier.
2398 * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
2399 the full source path of a configuration file is requested.
2400 (Read_Source_File): Use Full_Name parameter..
2402 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2404 * opt.ads Alphabetize various global flags. New flag
2405 Ignore_Pragma_SPARK_Mode along with a comment on usage.
2406 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2407 Pragma SPARK_Mode is now allowed in generic units.
2408 (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
2409 between the SPARK_Mode of a spec and that of a body when inside
2411 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
2412 compatibility between the SPARK_Mode of a spec and that of a
2413 body when inside a generic.
2414 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
2415 Pragma SPARK_Mode is now allowed in generic units.
2416 (Analyze_Package_Instantiation): Save and restore the value of
2417 flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2418 the governing SPARK_Mode before analyzing the instance.
2419 (Analyze_Subprogram_Instantiation): Save and restore the value
2420 of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2421 the governing SPARK_Mode before analyzing the instance.
2422 * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
2423 placement of a source pragma when inserting the generated pragma
2424 for aspect SPARK_Mode.
2425 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
2426 pragma SPARK_Mode to allow for generics and their respective
2428 * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
2429 (Set_Ignore_Pragma_SPARK_Mode): New routine.
2431 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
2433 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
2434 renaming discriminants in tagged types first.
2435 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
2436 the underlying type of the prefix.
2437 (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
2438 (process_freeze_entity): Reset the nodes of all the view of a type,
2441 2014-08-04 Doug Rupp <rupp@adacore.com>
2442 Olivier Hainque <hainque@adacore.com>
2444 * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
2445 and remove incorrect EH_MECHANISM macros.
2446 Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
2449 2014-08-04 Robert Dewar <dewar@adacore.com>
2451 * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
2452 of constructed 'Valid attribute in -gnatVa mode does not appear
2453 to come from source.
2454 * sem_attr.adb (Analyze_Access_Attribute): Don't set
2455 Never_Set_In_Source for non-source reference.
2456 * sem_util.adb: Minor reformatting.
2457 * sem_warn.adb (Check_References): Don't check Address_Taken,
2458 not necessary, see comment.
2460 2014-08-04 Robert Dewar <dewar@adacore.com>
2462 * sem_util.adb, sem_case.adb: Minor reformatting.
2464 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2466 * exp_ch9.adb (Extract_Entry): If the synchronized object is a
2467 limited view, replace with non-limited view, which is available
2468 at the point of an entry call.
2470 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2472 * exp_ch6.adb (Expand_Call): If the call is to a function in
2473 a run-time unit that is marked Inline_Always, we must suppress
2474 debugging information on it, so that the code that is eventually
2475 inlined will not affect debugging of the user program.
2477 2014-08-04 Robert Dewar <dewar@adacore.com>
2479 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
2482 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2484 * sem_prag.adb (Process_Import_Or_Interface): Handle properly
2485 an aspect Import that specifies a False value.
2487 2014-08-04 Robert Dewar <dewar@adacore.com>
2489 * gnat_rm.texi: Add section on aspect Invariant'Class.
2491 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2493 * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
2494 for better control of cascaded error messages when some choice
2495 in a case statement over a predicated type violates the given
2498 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2500 * sem_ch3.adb (Build_Derived_Type): Modify the
2501 inheritance of the rep chain to ensure that a non-tagged type's
2502 items are not clobbered during the inheritance.
2504 2014-08-04 Robert Dewar <dewar@adacore.com>
2506 * sem_ch3.adb, einfo.ads: Minor reformatting.
2508 2014-08-04 Yannick Moy <moy@adacore.com>
2510 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
2511 detection of subprograms that cannot be inlined in GNATprove mode.
2513 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2515 * einfo.adb: Add guard to Returns_Limited_View.
2517 2014-08-04 Jose Ruiz <ruiz@adacore.com>
2519 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
2520 the secondary stack to respect the alignments of the returned objects.
2522 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2524 * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
2525 on function entities whose return type is a limited view.
2526 * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
2527 where to place the freeze node for a function that returns the
2528 limited view of a type, when the function is called and frozen
2529 in a different unit.
2531 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
2533 * sem_ch3.adb (Build_Derived_Private_Type): Minor code
2536 2014-08-04 Robert Dewar <dewar@adacore.com>
2538 * gnat_ugn.texi: Clarify documentation on assertions.
2540 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2542 * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
2543 if a component association has a box initialization when the
2544 component type has no default initialization, either through an
2545 initial value, an aspect, or an implicit initialization procedure.
2547 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2549 * freeze.adb: Code clean up.
2551 2014-08-04 Thomas Quinot <quinot@adacore.com>
2553 * sem_ch5.adb: Minor reformatting.
2555 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2557 * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
2558 a function can return a limited view of a type declared
2559 elsewhere. In that case the function cannot be frozen at the end
2560 of its enclosing package. If its first use is in a different unit,
2561 it cannot be frozen there, but if the call is legal the full view
2562 of the return type is available and the subprogram can now be
2563 frozen. However the freeze node cannot be inserted at the point
2564 of call, but rather must go in the package holding the function,
2565 so that the backend can process it in the proper context.
2567 2014-08-04 Robert Dewar <dewar@adacore.com>
2569 * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
2571 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2573 * sem_ch4.adb (Operator_Check): Refine previous change.
2575 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2577 * sem_scil.ads: Improve comments.
2578 * sem_ch4.adb (Analyze_Equality_Op): Add support for
2579 Allow_Integer_Address (equality between Address and Integer).
2581 2014-08-04 Yannick Moy <moy@adacore.com>
2583 * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
2584 notation on untagged objects.
2585 * sem.ads: Update comment.
2586 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
2587 not inline subprograms declared in the visible part of a package.
2589 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2591 * exp_ch5.adb: minor reformatting.
2592 * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
2595 2014-08-04 Thomas Quinot <quinot@adacore.com>
2597 * s-fatgen.adb: Minor reformatting.
2599 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2601 * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
2604 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2606 * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
2607 the loop parameter for element iterators over containers and
2608 arrays, so that improper uses of it are detected in the loop
2609 body when expansion is disabled.
2610 * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
2611 generated cursor is that of the analyzed loop parameter.
2613 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2615 * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
2616 Flag_Decl. Do not analyze the declaration of the flag as it is
2617 not part of the tree yet, instead add it to the freeze actions
2620 2014-08-04 Robert Dewar <dewar@adacore.com>
2622 * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
2623 case of OUT and IN OUT parameter correctly (where Source_Typ is
2624 set), we were missing one case where a check must be applied.
2626 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2628 * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
2629 the generated code. Instead of hiding the renaming and using the
2630 wrapper as the proper association, have the subprogram renaming
2632 (Build_Spec): The entity of the wrapper is
2633 now derived from the entity of the related primitive.
2635 2014-08-04 Emmanuel Briot <briot@adacore.com>
2637 * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
2638 using non-capturing groups.
2640 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2642 * inline.adb (Build_Body_To_Inline): Remove Unmodified and
2643 related pragmas before copying the original body, to prevent
2644 spurious errors when the pragmas apply to formals that will not
2645 appear in the inlined body.
2647 2014-08-04 Robert Dewar <dewar@adacore.com>
2649 * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
2650 exp_ch3.adb: Minor reformatting.
2652 2014-08-04 Robert Dewar <dewar@adacore.com>
2654 * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
2656 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2658 * aspects.adb Add an entry in table Canonical_Aspect for
2659 Default_Initial_Condition.
2660 * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
2661 Aspect_Names and Aspect_Delay for Default_Initial_Condition.
2662 * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
2663 is now Is_Default_Init_Cond_ Procedure. Flag133 is now
2664 Has_Inherited_Default_Init_Cond.
2665 (Default_Init_Cond_Procedure): New routine.
2666 (Has_Default_Init_Cond): New routine.
2667 (Has_Inherited_Default_Init_Cond): New routine.
2668 (Is_Default_Init_Cond_Procedure): New routine.
2669 (Set_Default_Init_Cond_Procedure): New routine.
2670 (Set_Has_Default_Init_Cond): New routine.
2671 (Set_Has_Inherited_Default_Init_Cond): New routine.
2672 (Set_Is_Default_Init_Cond_Procedure): New routine.
2673 (Write_Entity_Flags): Output all the new flags.
2674 * einfo.ads New attributes Default_Init_Cond_Procedure,
2675 Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
2676 along with usage in nodes.
2677 (Default_Init_Cond_Procedure): New routine.
2678 (Has_Default_Init_Cond): New routine and pragma Inline.
2679 (Has_Inherited_Default_Init_Cond): New routine and
2681 (Is_Default_Init_Cond_Procedure): New routine and
2683 (Set_Default_Init_Cond_Procedure): New routine.
2684 (Set_Has_Default_Init_Cond): New routine and pragma Inline.
2685 (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
2686 (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
2687 * exp_ch3.adb (Expand_N_Object_Declaration): New constant
2688 Next_N. Generate a call to the default initial condition procedure
2689 if the object's type is subject to the pragma. (Freeze_Type):
2690 Generate the body of the default initial condition procedure or
2691 inherit the spec from a parent type.
2692 * exp_ch7.adb Add with and use clause for Exp_Prag.
2693 (Expand_Pragma_Initial_Condition): Removed.
2694 * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
2696 * par-prag.adb (Prag): Pragma Default_Initial_Condition does
2697 not need special treatment by the parser.
2698 * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
2699 attributes related to pragma Default_Initial_Condition to the
2701 (Process_Full_View): Propagate the attributes
2702 related to pragma Default_Initial_Condition to the full view.
2703 * sem_ch7.adb (Analyze_Package_Specification): Build the
2704 declaration of the default initial condition procedure for all
2705 types that qualify or inherit the one from the parent type.
2706 * sem_ch13.adb (Analyze_Aspect_Specifications):
2707 Add processing for aspect Default_Initial_Condition.
2708 (Check_Aspect_At_Freeze_Point): Aspect
2709 Default_Initial_Condition does not require delayed analysis.
2710 (Replace_Type_References_Generic): Moved to spec.
2711 * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
2712 * sem_prag.adb Add an entry in table Sif_Glags for
2713 Default_Initial_Condition.
2714 (Analyze_Pragma): Pragma
2715 Default_Initial_Condition is now part of assertion
2716 policy. Add processing for pragma Default_Initial_Condition.
2717 (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
2718 now recognized as a proper assertion policy.
2719 * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
2721 (Build_Default_Init_Cond_Procedure_Body): New routine.
2722 (Build_Default_Init_Cond_Procedure_Declaration): New routine.
2723 (Inherit_Default_Init_Cond_Procedure): New routine.
2724 * snames.ads-tmpl Add new predefined name and pragma id for
2725 Default_Initial_Condition.
2727 2014-08-04 Vincent Celier <celier@adacore.com>
2729 * prj-dect.adb (Parse_Case_Construction): It is no longer
2730 an error if the variable for a case construction is not
2731 typed, only if the variable value is not a single string. Call
2732 Parse_Choice_List and End_Case_Construction with the new parameter
2733 to indicate that the variable is typed.
2734 * prj-strt.adb (End_Case_Construction): Only check the labels
2735 if the variable is typed. If the variable is not typed,
2736 issue a warning when there is no "when others" allternative.
2737 (Parse_Choice_List): Manage the labels only if the variable
2739 * prj-strt.ads (End_Case_Construction): New Boolean parameter
2741 (Parse_Choice_List): Ditto.
2743 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2745 * sem_ch5.adb: Additional fix to Check_Predicate_Use.
2747 2014-08-04 Vincent Celier <celier@adacore.com>
2749 * projects.texi: Update documentation of case constructions with
2750 variables that are not typed.
2752 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2754 * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
2755 an Eliminated pragma, indicate that the wrapper is also to be
2756 eliminated, to prevent spurious errors when using gnatelim on
2757 programs that include box-initialization of equality operators
2758 (consequence of AI05-071)..
2760 2014-08-04 Robert Dewar <dewar@adacore.com>
2762 * checks.adb (Activate_Overflow_Check): Handle floating-point
2764 * checks.ads (Activate_Overflow_Check): Clarify handling of
2765 floating-point cases.
2766 * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
2767 flag if we generate an explicit overflow check (for
2768 Check_Float_Overflow mode).
2770 2014-08-04 Robert Dewar <dewar@adacore.com>
2772 * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
2773 prj-attr.adb, prj-attr.ads: Minor reformatting.
2775 2014-08-04 Yannick Moy <moy@adacore.com>
2777 * expander.adb (Expand): Always perform special
2778 expansion in GNATprove mode, even when doing pre-analysis.
2780 2014-08-04 Thomas Quinot <quinot@adacore.com>
2782 * repinfo.adb (List_Scalar_Storage_Order): List bit order if
2783 not default. Also list bit order if SSO is specified. Do not
2784 assume that bit order is always equal to scalar storage order.
2786 2014-08-04 Thomas Quinot <quinot@adacore.com>
2788 * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
2789 order to reverse SSO for a type that has an explicit native
2792 2014-08-04 Doug Rupp <rupp@adacore.com>
2794 * cal.c: Macro check for VxWorks7.
2795 * init.c (getpid): Likewise.
2796 * mkdir.c (__gnat_mkdir): Likewise.
2797 * sysdep.c (__gnat_is_file_not_found_error): Likewise.
2799 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2801 * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
2802 of an invariant check in the case where No_Initialization is set,
2803 since the object is uninitialized.
2805 2014-08-04 Thomas Quinot <quinot@adacore.com>
2807 * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
2808 name, in addition to a pragma name.
2809 * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
2810 Is_Pragma_Name): Adjust accordingly.
2811 * sem_attr.ads, sem_attr.adb, exp_attr.adb
2812 (Attribute_Default_Scalar_Storage_Order): Add handling of new
2814 * gnat_rm.texi: Document the above.
2816 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2818 * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
2819 mode for now, to revert to previous behavior.
2820 * checks.adb: Revert previous change, no longer needed.
2822 2014-08-04 Robert Dewar <dewar@adacore.com>
2824 * gnat1drv.adb (Adjust_Global_Switches): Don't set
2825 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2826 * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
2827 set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2828 * switch-c.adb (Scan_Front_End_Switches): Don't set
2829 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2831 2014-08-04 Vincent Celier <celier@adacore.com>
2833 * prj-attr.adb: Add new default indications for
2834 attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
2835 (Attribute_Default_Of): New function (Initialize): Set the
2836 default for those attributes that have one specified.
2837 * prj-attr.ads (Attribute_Data): New component Default.
2838 * prj-proc.adb (Expression): Take into account the new defaults
2839 for attributes Object_Dir, Exec_Dir and Source_Dirs.
2840 * prj-strt.adb (Attribute_Reference): Set the default for
2842 * prj-tree.ads, prj-tree.adb (Default_Of): New function.
2843 (Set_Default_Of): New procedure.
2844 * prj.adb (The_Dot_String): New global Name_Id variable,
2845 initialized in procedure Initialize.
2846 (Dot_String): New function
2847 (Initialize): Initialize The_Dot_String.
2848 (Reset): Create the string list Shared.Dot_String_List.
2849 * prj.ads (Attribute_Default_Value): New enumeration type.
2850 (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
2851 (Dot_String): New function.
2852 (Shared_Project_Tree_Data): New string list component Dot_String_List.
2853 * projects.texi: Document new defaults for attribute Object_Dir,
2854 Exec_Dir and Source_Dirs.
2856 2014-08-04 Robert Dewar <dewar@adacore.com>
2858 * sem_ch12.adb: Minor reformatting.
2860 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2862 * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
2863 expansion in CodePeer_Mode.
2864 (Selected_Range_Checks): Add handling of overflow checks in
2867 2014-08-04 Robert Dewar <dewar@adacore.com>
2869 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
2870 Remove special test for Float'First, no longer required.
2871 (Expand_N_Attribute_Reference, case Succ): Remove special test
2872 for Float'First, no longer required.
2873 * s-fatgen.adb (Pred): return infinity unchanged.
2876 2014-08-04 Claire Dross <dross@adacore.com>
2878 * sem_ch12.adb (Analyze_Associations): Defaults should only be
2879 used if there is no explicit match.
2880 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2881 Also check for pragma external_axiomatization on generic units.
2883 2014-08-04 Robert Dewar <dewar@adacore.com>
2885 * checks.adb (Activate_Overflow_Check): Remove
2886 Check_Float_Overflow processing.
2887 (Apply_Scalar_Range_Check): Ditto.
2888 (Generate_Range_Check): Ditto.
2889 * exp_ch4.adb (Expand_N_Op_Add): Add call to
2890 Check_Float_Op_Overflow.
2891 (Expand_N_Op_Divide): ditto.
2892 (Expand_N_Op_Multiply): ditto.
2893 (Expand_N_Op_Subtract): ditto.
2894 * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
2895 * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
2896 Do_Range_Check is set for floating-point case in -gnatc or
2898 (Analyze_Attribute, case Succ): Make sure
2899 Do_Range_Check is set for floating-point case in -gnatc or
2901 * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
2902 flag is set for real to integer conversion in GNATprove or
2905 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2907 * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
2908 the expression of an Import or Export aspect as type Boolean
2909 and require it to be static. Add ??? comment. Also, set the
2910 Is_Exported flag when appropriate.
2912 2014-08-04 Robert Dewar <dewar@adacore.com>
2914 * exp_ch4.adb: Minor reformatting.
2915 * exp_attr.adb: Minor reformatting.
2917 2014-08-04 Thomas Quinot <quinot@adacore.com>
2919 * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
2920 (Unaligned_Valid): Remove now unused subprogram.
2921 * exp_attr.adb (Expand_N_Attribute_Reference, case
2922 Attribute_Valid): If the prefix is in reverse SSO or potentially
2923 unaligned, copy it using a byte copy operation to a temporary
2925 * einfo.adb: Minor comment fix.
2927 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2929 * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
2931 2014-08-04 Robert Dewar <dewar@adacore.com>
2933 * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
2934 * s-fatgen.adb (Pred): Handle Float'First.
2935 (Succ): Handle Float'Last.
2937 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2939 * sem_util.adb (Is_Potentially_Unevaluated): If the original
2940 node of a parent node in the tree is a short-circuit operation,
2941 the node is potentially unevaluated.
2943 2014-08-04 Robert Dewar <dewar@adacore.com>
2945 * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
2946 conversion from a real type to an integer type.
2948 2014-08-04 Yannick Moy <moy@adacore.com>
2950 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
2951 sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
2952 exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
2953 sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
2954 SPARK_05 instead of SPARK.
2956 2014-08-04 Robert Dewar <dewar@adacore.com>
2958 * sem.ads: Minor reformatting.
2959 * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
2961 (Analyze_Aspect_Specifications, case Convention): Put External_Name
2962 before Link_Name when constructing pragma.
2964 2014-08-04 Yannick Moy <moy@adacore.com>
2966 * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
2967 to True during analysis of a default component expression.
2968 (Semantics): Save and restore In_Default_Expr around analysis.
2969 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
2970 Call new wrapper Preanalyze_Default_Expression.
2971 (Preanalyze_Default_Expression): New wrapper on
2972 Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
2973 * sem_res.adb (Resolve_Call): Mark calls inside default
2974 expressions as not inlined in GNATprove mode.
2976 2014-08-04 Robert Dewar <dewar@adacore.com>
2978 * exp_ch4.adb: Minor reformatting.
2980 2014-08-04 Olivier Hainque <hainque@adacore.com>
2982 * link.c: remove const on __gnat_objlist_file_supported for AIX
2984 2014-08-04 Robert Dewar <dewar@adacore.com>
2986 * sem_util.ads: Minor addition of comment.
2988 2014-08-04 Vincent Celier <celier@adacore.com>
2990 * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
2991 all projects, including aggregate and aggregate library projects.
2993 2014-08-04 Yannick Moy <moy@adacore.com>
2995 * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
2997 2014-08-04 Robert Dewar <dewar@adacore.com>
2999 * sem_eval.adb (Test_In_Range): Always in range for
3000 Is_Known_Valid target type, where input type has smaller or
3001 equal size and does not have biased rep.
3003 2014-08-04 Ed Schonberg <schonberg@adacore.com>
3005 * sem_attr.adb (Eval_Attribute): Constrained is not treated as
3006 a static attribute, and the Static flag must not be set on it
3007 during resolution. It may be constant-folded during expansion,
3008 but if expansion is disabled it is not a static expression.
3010 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3012 * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
3013 referenced once resolution has taken place.
3015 2014-08-04 Gary Dismukes <dismukes@adacore.com>
3017 * exp_ch4.adb (Expand_N_Type_Conversion): Don't
3018 compare access levels in the case where the target type is the
3019 anonymous type of an access discriminant, since the level of
3020 such types is defined based on context. Add comment.
3022 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3024 * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
3025 cases related to equality. Remove the special processing
3026 for dispatching abstract subprograms as it is not needed.
3027 (Interpretation_Error): Add a specialized error message for
3028 predefined operators.
3029 (Is_Intrinsic_Equality): New routine.
3030 (Is_Suitable_Candidate): New routine.
3032 2014-08-04 Gary Dismukes <dismukes@adacore.com>
3034 * checks.adb: Minor comment reformatting.
3036 2014-08-04 Ed Schonberg <schonberg@adacore.com>
3038 * restrict.adb (Check_Restriction): For checked max_parameter
3039 restrictions reset Violated flag, so that subsequent violations
3040 are properly detected.
3042 2014-08-04 Robert Dewar <dewar@adacore.com>
3044 * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
3046 (Process_Discriminants): Fix bad test of GNATprove mode
3048 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3050 * sem_ch12.adb (Instantiate_Formal_Subprogram):
3051 Move variable to their own section. Propagate the source
3052 location of a formal parameter to the corresponding formal of
3053 the subprogram renaming declaration. Code reformatting.
3055 2014-08-04 Arnaud Charlet <charlet@adacore.com>
3057 * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
3059 2014-08-04 Ed Schonberg <schonberg@adacore.com>
3061 * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
3062 if error already detected. We may reach this point in spite of
3063 previous errors when compiling with -gnatq, to force all possible
3064 errors (this is the usual ACATS mode).
3066 2014-08-04 Gary Dismukes <dismukes@adacore.com>
3068 * checks.adb (Generate_Range_Check): For the case of converting
3069 a base type with a larger range to a smaller target subtype, only
3070 use unchecked conversions of bounds in the range check followed
3071 by conversion in the case where both types are discrete. In other
3072 cases, convert to the target base type and save in a temporary
3073 followed by the range check.
3074 (Convert_And_Check_Range): New procedure factoring code to save
3075 conversion to a temporary followed by a range check (called two
3076 places in Generate_Range_Check).
3077 * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
3078 check-in, to generate range checks for conversions between
3079 any floating-point types rather than limiting it to matching
3082 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3084 * gcc-interface/trans.c: Use hash_set instead of pointer_set.
3086 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3088 * restrict.adb (Update_Restrictions): For restrictions with a
3089 maximum parameter (e.g. number of protected entries in Ravenscar)
3090 do not compute the maximum of the violation over several objects,
3091 because the restriction is per-object.
3092 (Check_Restriction): After possible message, reset the value
3093 of of a checked max_parameter restriction to zero, to prevent
3095 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
3096 (sub)type to determine whether derived type should be on the
3097 list of private dependents of a type whose full view may become
3098 visible subsequently.
3100 2014-08-01 Olivier Hainque <hainque@adacore.com>
3102 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
3103 $(CXX) instead of ../../xg++ to feed CXX.
3104 (CXX_LFLAGS): Remove. Now unused as the proper flags
3105 are expected to be included in the CXX variable.
3107 2014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
3109 * gcc-interface/decl.c (elaborate_expression_1): Return the new
3110 variable when debug info is needed and the expression is not
3111 constant. Tag as external only new variables that are global.
3112 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
3113 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
3114 attributes for IN array parameters when their actual subtype
3116 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
3117 * gcc-interface/gigi.h (process_deferred_decl_context): New.
3118 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
3119 emit debug info for ignored global declarations.
3120 (struct deferred_decl_context_node,
3121 add_deferred_decl_context, add_deferred_type_context,
3122 compute_deferred_decl_context, defer_or_set_type_context,
3123 deferred_decl_context_queue, get_debug_scope,
3124 get_global_context, process_deferred_decl_context): New.
3125 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
3126 computation machinery to rely on the GNAT Scope attribute.
3128 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3130 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
3132 2014-08-01 Robert Dewar <dewar@adacore.com>
3134 * sem_ch8.adb, opt.ads Minor comment updates.
3136 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3138 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
3139 from the side effects removal machinery.
3140 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
3141 Renaming_Req. Update the nested call to Remove_Side_Effects.
3142 (Duplicate_Subexpr_No_Checks): Add formal parameter
3143 Renaming_Req. Update the nested call to Remove_Side_Effects.
3144 (Duplicate_Subexpr_Move_Checks): Add formal parameter
3145 Renaming_Req. Update the nested call to Remove_Side_Effects.
3146 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
3147 an object renaming declaration when the caller requests it.
3148 * exp_util.ads (Duplicate_Subexpr): Add formal
3149 parameter Renaming_Req. Update comment on usage.
3150 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
3151 (Duplicate_Subexpr_Move_Checks): Add formal parameter
3154 2014-08-01 Bob Duff <duff@adacore.com>
3156 * gnat_ugn.texi: Minor updates.
3158 2014-08-01 Robert Dewar <dewar@adacore.com>
3160 * atree.adb: Minor reformatting.
3162 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3164 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
3165 private extension, get stored constraint, if any, from full view.
3167 2014-08-01 Robert Dewar <dewar@adacore.com>
3169 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
3170 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
3171 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
3172 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
3173 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3174 Remove code for checking with's, now in sem_ch10.adb, set
3175 Opt.No_Elab_Code_All_Pragma.
3177 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3179 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
3180 access types as well and adjust the subtype mark if there are
3183 2014-08-01 Robert Dewar <dewar@adacore.com>
3185 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
3187 2014-08-01 Robert Dewar <dewar@adacore.com>
3189 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
3191 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3193 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
3194 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
3195 of the actuals in the case of untagged record types too.
3196 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
3197 full derivation of a derived private type, extracted from...
3198 (Copy_And_Build): In the case of record types and most
3199 enumeration types, copy the original declaration. Build the
3200 full derivation according to the approach extracted from...
3201 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
3202 to create the full derivation in all existing cases and also
3203 create it in the no-discriminants/discriminants case instead of
3204 deriving directly from the full view.
3205 (Is_Visible_Component): Remove obsolete code.
3206 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
3208 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3210 * fe.h (GNAT_Mode): New.
3211 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
3212 reverse SSO in GNAT mode.
3214 2014-08-01 Thomas Quinot <quinot@adacore.com>
3216 * freeze.adb: Minor reformatting.
3218 2014-08-01 Thomas Quinot <quinot@adacore.com>
3220 * exp_ch3.adb (Default_Initialize_Object): Do not generate
3221 default initialization for an imported object.
3223 2014-08-01 Olivier Hainque <hainque@adacore.com>
3225 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
3226 to the expected FARPROC type instead of void *.
3227 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
3228 other datastructures.
3229 (__gnat_file_time_name_attr): Adjust accordingly.
3230 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
3232 (__gnat_check_OWNER_ACL): Declare AccessMode
3233 parameter as ACCESS_MODE instead of DWORD, in line with callers
3235 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
3236 unused on win32. Correct cast of "args" on call to spawnvp.
3237 (add_handle): Cast realloc calls into their destination types.
3238 (win32_wait): Remove declaration and initialization of unused variable.
3239 (__gnat_locate_exec_on_path): Cast alloca calls
3240 into their destination types.
3241 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
3242 their destination types.
3244 2014-08-01 Gary Dismukes <dismukes@adacore.com>
3246 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
3247 range checks for conversions between floating-point subtypes
3248 when the target and source types are the same.
3250 2014-08-01 Robert Dewar <dewar@adacore.com>
3252 * exp_aggr.adb: Minor reformatting.
3254 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3256 * sem_ch13.adb (Check_Indexing_Functions): Initialize
3259 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3261 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
3262 ALI file before we call the backend (so that gnat2why can append
3265 2014-08-01 Thomas Quinot <quinot@adacore.com>
3267 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
3268 Expand_Packed_Element_Reference): Pass additional Rev_SSO
3269 parameter indicating whether the packed array type has reverse
3270 scalar storage order to the s-pack* Set/Get routines.
3271 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
3272 indicating reverse scalar storage order.
3274 2014-08-01 Robert Dewar <dewar@adacore.com>
3276 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
3277 for initial component value in -gnatc or GNATprove mode.
3278 (Process_Discriminants): Same fix for default discriminant values.
3279 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
3282 2014-08-01 Robert Dewar <dewar@adacore.com>
3284 * sinfo.ads: Minor comment clarification.
3286 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3288 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
3289 reformatting. Store the generated pragma Import in the related
3290 subprogram as routine Wrap_Imported_Subprogram will need it later.
3291 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
3292 a private type with discriminants is considered to fall in the
3293 category of unconstrained or tagged items.
3295 2014-08-01 Arnaud charlet <charlet@adacore.com>
3297 * s-os_lib.adb (Open_Append): New functions to open a file for
3298 appending. This binds to the already existing (but not used)
3300 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
3301 to open a file for appending.
3302 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
3303 to open the ALI file for appending.
3305 2014-08-01 Robert Dewar <dewar@adacore.com>
3307 * sem_ch8.adb: Minor reformatting.
3309 2014-08-01 Yannick Moy <moy@adacore.com>
3311 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
3312 pragmas from aspects, which need to be inserted in proper order.
3314 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3316 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
3317 Handle properly a type extension that constrains a discriminated
3318 derived type that renames other discriminants of an ancestor.
3320 2014-08-01 Thomas Quinot <quinot@adacore.com>
3322 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
3323 s-pack25.adb: Fix minor inconsistencies and typos.
3325 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3327 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
3328 globals and move certain variables to the "local
3329 variable" section. Call Build_Class_Wide_Wrapper when
3330 renaming a default actual subprogram with a class-wide actual.
3331 (Build_Class_Wide_Wrapper): New routine.
3332 (Check_Class_Wide_Actual): Removed.
3333 (Find_Renamed_Entity): Code reformatting.
3334 (Has_Class_Wide_Actual): Alphabetize. Change the
3335 logic of the predicate as the renamed name may not necessarely
3336 denote the correct subprogram.
3338 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3340 * sem_ch7.adb: Fix minor oversight in condition.
3342 2014-08-01 Bob Duff <duff@adacore.com>
3344 * projects.texi: Minor documentation improvements.
3346 2014-08-01 Robert Dewar <dewar@adacore.com>
3348 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
3349 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
3350 * lib-load.adb: Initialize No_Elab_Code_All field.
3351 * lib-writ.adb: Initialize No_Elab_Code_All.
3352 * lib.ads, lib.adb: New field No_Elab_Code_All.
3353 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
3354 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
3356 * sem_ch10.adb (Analyze_Context): Processing for
3357 No_Elaboration_Code_All removed.
3358 (Generate_Parent_References): Moved to Sem_Util.
3359 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
3360 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
3362 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
3363 * targparm.adb: Minor comment updates Add comments on ignoring
3364 pragma No_Elaboration_Code_All.
3366 2014-08-01 Nicolas Roche <roche@adacore.com>
3368 * adaint.c (__gnat_set_close_on_exec): Ensure that
3369 we can unset "close_on_exec" flag.
3371 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3373 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
3374 the parameter specs of the wrapper program for a primitive operation
3375 of a synchronized type that implements an interface, copy the
3376 null_exclusion indicator as well.
3378 2014-08-01 Robert Dewar <dewar@adacore.com>
3380 * sem_eval.ads: Minor reformatting.
3382 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3384 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
3385 to go down the chain of private derivations.
3386 * freeze.adb (Freeze_Entity): Fix typo in comment.
3388 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3390 * sem_ch3.adb (Access_Type_Declaration): If designated type is
3391 a limited view, create a master entity (as is already done for
3392 class-wide types) in case the full view designates a type that
3394 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
3395 and the designated type is a limited view, use the non-limited
3398 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3400 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
3401 (DECL_FUNCTION_STUB): Likewise.
3402 (SET_DECL_FUNCTION_STUB): Likewise.
3403 (DECL_PARM_ALT_TYPE): Likewise.
3404 (SET_DECL_PARM_ALT_TYPE): Likewise.
3405 (TYPE_VAX_FLOATING_POINT_P): Delete.
3406 (TYPE_DIGITS_VALUE): Likewise.
3407 (SET_TYPE_DIGITS_VALUE): Likewise.
3408 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
3409 (malloc32_decl): Delete.
3410 (build_vms_descriptor): Likewise.
3411 (build_vms_descriptor32): Likewise.
3412 (fill_vms_descriptor): Likewise.
3413 (convert_vms_descriptor): Likewise.
3414 (TARGET_ABI_OPEN_VMS): Likewise.
3415 (TARGET_MALLOC64): Likewise.
3416 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
3417 (gnat_to_gnu_entity): Call it to add the original type as a parallel
3418 type to the implementation type of a packed array type.
3419 <E_Procedure>: Remove now obsolete kludge.
3420 <E_Exception>: Delete obsolete comment.
3421 <object>: Small tweak.
3422 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
3423 for the descriptor passing mechanism.
3424 (gnat_to_gnu_param): Likewise.
3425 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
3426 (gnat_print_type): Adjust.
3427 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
3428 (vms_builtin_establish_handler_decl): Delete.
3429 (gnat_vms_condition_handler_decl): Likewise.
3430 (establish_gnat_vms_condition_handler): Likewise.
3431 (build_function_stub): Likewise.
3432 (Subprogram_Body_to_gnu): Do not call above functions.
3433 (Call_to_gnu): Remove support for the descriptor passing mechanism.
3434 * gcc-interface/utils.c (make_descriptor_field): Delete.
3435 (build_vms_descriptor32): Likewise.
3436 (build_vms_descriptor): Likewise.
3437 (fill_vms_descriptor): Likewise.
3438 (convert_vms_descriptor64): Likewise.
3439 (convert_vms_descriptor32): Likewise.
3440 (convert_vms_descriptor): Likewise.
3441 * gcc-interface/utils.c (unchecked_convert): Likewise.
3442 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
3444 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3446 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
3447 type and get_unpadded_type for the longest FP type.
3448 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
3449 (convert_with_check): Adjust formatting and remove FIXME.
3451 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3453 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
3454 Do not convert the RM bounds to the base type.
3455 (E_Floating_Point_Subtype): Likewise.
3456 (E_Array_Subtype): Convert the bounds to the base type.
3457 * gcc-interface/trans.c (get_type_length): New function.
3458 (Attribute_to_gnu) <Range_Length>: Call it.
3460 (Loop_Statement_to_gnu): Convert the bounds to the base type.
3461 (gnat_to_gnu) <N_In>: Likewise.
3462 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
3463 bounds to the base type.
3464 (create_range_type): Likewise.
3465 (convert): Convert the bounds to the base type for biased types.
3466 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
3469 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3471 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
3472 incorrect implicit type derivation.
3473 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
3476 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3478 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
3479 prefix of attribute Loop_Entry.
3480 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
3481 Loop_Variant with respect to an enclosing loop (if any).
3482 (Contains_Loop_Entry): Update the parameter profile and all
3483 calls to this routine.
3484 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
3485 for the corresponding body before determining the nature of the
3486 ultimate alias's declarative node.
3488 2014-08-01 Robert Dewar <dewar@adacore.com>
3490 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
3492 2014-08-01 Robert Dewar <dewar@adacore.com>
3494 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
3495 constraint error node since it is a list member.
3497 2014-08-01 Robert Dewar <dewar@adacore.com>
3499 * sem_warn.adb: Minor reformatting.
3501 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3503 * einfo.adb (Underlying_Type): Return the underlying full view
3504 of a private type if present.
3505 * freeze.adb (Freeze_Entity):
3506 Build a single freeze node for partial, full and underlying full
3508 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
3509 missing guard before the access to the Underlying_Full_View.
3510 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
3511 full view if present.
3512 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
3514 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3516 * sem_res.adb (Resolve_Entry_Call): When an entry has
3517 preconditions, the entry call is wrapped in a procedure call
3518 that incorporates the precondition checks. To prevent a double
3519 expansion, with possible duplication of extra formals, that
3520 procedure call must only be pre-analyzed and resolved. Expansion
3521 takes place upon return to the caller Resolve_Call.
3523 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3525 * sem_res.adb (Resolve_Call): Do not perform
3526 GNATprove-specific inlining while within a generic.
3528 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3530 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
3531 case expression with incompatible alternatives, when the first
3532 alternative is overloaded.
3534 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3536 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
3537 to create the name of the parameterless call, rather than
3538 New_Copy, to preserve the tree structure when the name is a
3539 complex expression, e.g. a selected component that denotes a
3540 protected operation, whose prefix is itself a selected component.
3542 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3544 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
3545 Unit_Declaration_Node to retrieve body when inlining, to handle
3546 properly subprogram child units.
3548 2014-08-01 Robert Dewar <dewar@adacore.com>
3550 * sem_attr.adb: Minor reformatting.
3552 2014-08-01 Vincent Celier <celier@adacore.com>
3554 * debug.adb: Minor documentation addition for -dn switch.
3556 2014-08-01 Robert Dewar <dewar@adacore.com>
3558 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
3559 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
3560 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
3561 In several places, use the Is_OK version as suggested by the spec.
3563 2014-08-01 Vincent Celier <celier@adacore.com>
3565 * gnatcmd.adb: Revert last change which was not correct.
3567 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3569 * freeze.adb (Find_Constant): Ensure that the constant being
3570 inspected is still an object declaration (i.e. not a renaming).
3572 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3574 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
3575 An attribute_reference to Loop_Entry denotes an iterator
3576 specification: its prefix is an object, as is the case for 'Old.
3577 b) If the domain of iteration is an expression whose type has
3578 the Iterable aspect defined, this is an iterator specification.
3580 2014-08-01 Robert Dewar <dewar@adacore.com>
3582 * gnatcmd.adb: Minor reformatting.
3584 2014-08-01 Robert Dewar <dewar@adacore.com>
3586 * atree.ads (Info_Messages): New counter.
3587 * err_vars.ads: Minor comment update.
3588 * errout.adb (Delete_Warning_And_Continuations): Deal
3589 with new Info_Messages counter.
3590 (Error_Msg_Internal): ditto.
3591 (Delete_Warning): ditto.
3592 (Initialize): ditto.
3593 (Write_Error_Summary): ditto.
3594 (Output_Messages): ditto.
3595 (To_Be_Removed): ditto.
3596 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
3597 (Compilation_Errors): ditto.
3598 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
3600 (Initialize): ditto.
3601 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
3602 * gnat_ugn.texi: Document that -gnatwe does not affect info
3605 2014-08-01 Robert Dewar <dewar@adacore.com>
3607 * debug.adb: Document debug switch -gnatd.Z.
3608 * sem.adb (Semantics): Force expansion on in no or configurable
3611 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3613 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
3614 unchecked conversion denotes an iterator specification. Such a
3615 conversion will be inserted in the context of an inlined call
3616 when needed, and its argument is always an object.
3618 2014-08-01 Robert Dewar <dewar@adacore.com>
3620 * make.adb, makeutl.ads: Minor reformatting.
3621 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
3624 2014-08-01 Tristan Gingold <gingold@adacore.com>
3626 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
3628 2014-08-01 Javier Miranda <miranda@adacore.com>
3630 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
3632 * debug.adb: Updating documentation.
3633 * exp_ch6.adb (Expand_Call): Remove assertion.
3635 2014-08-01 Robert Dewar <dewar@adacore.com>
3637 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
3638 sem_res.adb: Minor reformatting.
3640 2014-08-01 Vincent Celier <celier@adacore.com>
3642 * make.adb (Initialize): Set Keep_Temporary_Files to True when
3644 * makeusg.adb: Add line for new switch --keep-temp-files.
3645 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
3646 * opt.ads (Keep_Temporary_Files): Document that it is also used
3647 by gnatmake and gprbuild.
3648 * switch-m.adb: Recognize new switch --keep-temp-files.
3650 2014-08-01 Tristan Gingold <gingold@adacore.com>
3652 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
3653 * exp_ch9.adb (Make_Task_Create_Call): ... here.
3655 2014-08-01 Vincent Celier <celier@adacore.com>
3657 * gnat1drv.adb: Do not try to get the target parameters when
3658 invoked with -gnats.
3660 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3662 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
3663 declaration subject to No_Initialization.
3665 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3667 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
3668 is a subtype with dynamic predicates, or a non-static subtype
3670 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
3671 expression if subtype has a dynamic predicate.
3672 (Constrain_Index): Reject subtype indication if subtype mark
3674 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
3675 (Make_Index): If index is a subtype indication, itype inhereits
3676 predicate flags for subsequent testing.
3677 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
3678 procedure Check_Predicate_Use, to reject illegal uses of domains
3679 of iteration that have dynamic predicates.
3680 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
3681 indication to which a predicate applies.
3682 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
3683 prevent cascaded errors when subtype is invalid.
3685 2014-08-01 Robert Dewar <dewar@adacore.com>
3687 * sem_ch10.adb: Minor reformatting.
3689 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3691 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
3692 because either type may be a subtype of the other.
3694 2014-08-01 Vincent Celier <celier@adacore.com>
3696 * makeusg.adb: Add documentation for debug switch -dn.
3698 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3700 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
3701 expression with standard operator and type, for pretty-printing
3702 use, when in ASIS_Mode. When generating code dimensional analysis
3703 is not involved and dimension expressions are handled statically,
3704 and other operators are resolved in the usual way.
3706 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3708 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
3709 Parent_Subtype in ASIS mode, leads to several failures.
3710 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
3711 if the prefix is a type extension, check whether component is
3712 declared in the parent type, possibly in a parent unit. Needed
3713 in ASIS mode when Parent_Subtype is not set.
3715 2014-08-01 Robert Dewar <dewar@adacore.com>
3717 * sem_prag.adb: Minor reformatting.
3718 * s-regpat.adb: Minor reformatting.
3719 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
3720 Treat_As_Volatile on constants.
3722 2014-08-01 Tristan Gingold <gingold@adacore.com>
3724 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
3726 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3728 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
3729 warning on a with_clause created for the renaming of a parent
3730 unit in an explicit with_clause.
3732 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3734 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
3735 Set Is_Imported flag at once, to simplify subsequent legality
3736 checks. Reject the aspect on an object whose declaration has an
3737 explicit initial value.
3738 * sem_prag.adb (Process_Import_Or_Interface): Use original node
3739 to check legality of an initial value for an imported entity.
3740 Set Is_Imported flag in case of error to prevent cascaded errors.
3741 Do not set the Is_Imported flag if the pragma comes from an
3742 aspect, because it is already done when analyzing the aspect.
3744 2014-08-01 Emmanuel Briot <briot@adacore.com>
3746 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
3748 2014-08-01 Robert Dewar <dewar@adacore.com>
3750 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
3753 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3755 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
3756 checks when the related variable comes from source.
3757 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
3758 when the related actual parameter comes from source. Update comment.
3759 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
3760 type of an array of pointers when the designated type is
3761 class-wide and its root type is the record being currently frozen.
3763 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3765 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
3766 of renaming declaration created for domain of iteration.
3767 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
3768 for error messages on aggregates whose index subtypes have
3769 predicates. The new placement avoids posting messages on previous
3770 subtype declarations rather than on the aggregate itself.
3771 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
3772 Add_Dispatching_Operation, to handle properly the overriding of
3773 the predefined operations on controlled types, when the partial
3774 view of a type is not visibly controlled.
3776 2014-08-01 Ben Brosgol <brosgol@adacore.com>
3778 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
3781 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3783 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
3784 assertion check as the attribute is defined for all entities.
3785 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
3786 check as the attribute is defined for all entities.
3787 * einfo.ads Update the documentation of attribute
3788 Is_Hidden_Non_Overridden_Subprogram.
3789 * sem_ch7.adb (Install_Package_Entity): No need to check the
3790 entity kind of the Id.
3791 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
3792 usage. Ensure that the homographs are of the same entity kind
3793 and not fully conformant.
3794 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
3796 2014-08-01 Robert Dewar <dewar@adacore.com>
3798 * inline.adb: Minor code reorganization.
3799 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
3801 2014-08-01 Robert Dewar <dewar@adacore.com>
3803 * inline.adb, s-os_lib.ads: Minor reformatting.
3805 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3807 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
3808 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
3811 2014-08-01 Yannick Moy <moy@adacore.com>
3813 * inline.adb (Cannot_Inline): Issue info message instead of
3814 warning for subprograms not inlined in GNATprove mode.
3815 * sem_res.adb (Resolve_Call): Take body into account for deciding
3816 whether subprogram can be inlined in GNATprove mode or not.
3818 2014-08-01 Claire Dross <dross@adacore.com>
3820 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
3821 of Get_First_Parent_With_External_Axiomatization_For_Entity for
3823 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
3824 for parameters of packages with external axiomatization.
3826 2014-08-01 Robert Dewar <dewar@adacore.com>
3828 * sem_res.adb: Minor comment addition.
3830 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3832 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
3833 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
3835 * s-os_lib.ads: Minor reformatting.
3837 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3839 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
3840 completely previous code since only GCC back-ends are prepared
3841 to handle e.g. 'Machine attribute.
3842 * targparm.adb, targparm.ads: Remove remaining refs and
3843 handling of OpenVMS_On_Target, VAX_Float_On_Target and
3844 RTX_RTSS_Kernel_Module_On_Target.
3845 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
3848 2014-08-01 Robert Dewar <dewar@adacore.com>
3850 * exp_dist.adb, exp_attr.adb: Minor reformatting.
3851 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
3852 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
3853 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
3854 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
3855 improper use of shall.
3857 2014-08-01 Robert Dewar <dewar@adacore.com>
3859 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
3860 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
3861 exp_ch3.adb: Minor reformatting & code reorganization.
3863 2014-08-01 Robert Dewar <dewar@adacore.com>
3865 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
3866 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
3867 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
3868 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
3869 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
3871 * gcc-interface/decl.c, gcc-interface/Makefile.in,
3872 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
3874 2014-08-01 Pascal Obry <obry@adacore.com>
3876 * s-os_lib.ads: Rename File_Size to Large_File_Size.
3878 2014-08-01 Robert Dewar <dewar@adacore.com>
3880 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
3881 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
3882 a-numaux-libc-x86.ads: Fix bad package header comments.
3883 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
3884 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
3885 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
3886 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
3887 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
3888 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
3889 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
3890 s-os_lib.adb: Remove VMS-specific code.
3892 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3894 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
3895 previous state in CodePeer_Mode.
3897 2014-08-01 Robert Dewar <dewar@adacore.com>
3899 * hostparm.ads: Put back definition of OpenVMS as False to aid
3900 the transition process.
3901 * sem_ch7.adb: Minor reformatting.
3902 * prj-env.adb: Minor code fix.
3903 * gnat_rm.texi: Complete previous change.
3904 * sem_ch3.adb: Minor reformatting.
3905 * sem_ch6.adb: Minor reformatting.
3906 * sem_elab.adb: Minor reformatting.
3907 * exp_strm.adb: Complete previous change.
3909 2014-08-01 Vincent Celier <celier@adacore.com>
3911 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
3912 warning when a constant is unreferenced and its type has pragma
3913 Unreferenced_Objects.
3915 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3917 * einfo.adb: Flag2 is now known as
3918 Is_Hidden_Non_Overridden_Subprogram.
3919 (Is_Hidden_Non_Overridden_Subprogram): New routine.
3920 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
3921 (Write_Entity_Fields): Output Flag2.
3922 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
3923 along with occurrences in entities.
3924 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
3925 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
3927 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
3928 declared non-overriden homographs into visibility.
3929 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
3930 implicitly declared non-overriden homographs.
3931 (Hide_Non_Overridden_Subprograms): New routine.
3933 2014-08-01 Robert Dewar <dewar@adacore.com>
3935 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
3937 * prj-conf.adb: Minor reformatting.
3938 * xr_tabls.adb (Read_File): Restore code which was enabled on
3939 non VMS platforms before.
3940 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
3941 * sem_ch5.adb: Minor reformatting.
3942 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
3943 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
3944 Remove VMS-specific code.
3946 2014-08-01 Vincent Celier <celier@adacore.com>
3948 * make.adb (Await_Compile): Remove loop that was only needed
3951 2014-08-01 Robert Dewar <dewar@adacore.com>
3953 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
3954 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
3955 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
3956 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
3957 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
3958 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
3959 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
3960 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
3961 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
3962 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
3963 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
3964 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
3965 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
3966 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
3967 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
3968 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
3969 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
3970 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
3971 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
3972 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
3973 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
3974 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
3975 specific code and comments.
3977 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3979 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
3980 Check_Reverse_Iteration, to verify the legality of the Reverse
3981 indicator on various container types, and to detect illegal
3982 reverse iterations on containers that only supoort forward
3985 2014-08-01 Vincent Celier <celier@adacore.com>
3987 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
3988 procedure GNATCmd the relevant declarations from packages VMS_Cmds
3990 * gnatcmd.ads: Update comments to remove any trace of VMS
3992 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3994 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
3995 defaulted actual that is an operator, before building wrapper
3996 for it in GNATprove mode. Restrict construction of wrapper to
3997 actuals that are operators.
3999 2014-08-01 Vincent Celier <celier@adacore.com>
4001 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
4002 specific packages no longer needed.
4004 2014-08-01 Pascal Obry <obry@adacore.com>
4006 * s-os_lib.ads (System.CRTL): Move with clause to body.
4007 (File_Size): New type.
4008 (File_Length64): Use it.
4009 (File_Length): Restore previous spec returning a Long_Integer.
4010 * s-os_lib.adb (System.CRTL): Move with clause here.
4012 2014-08-01 Vincent Celier <celier@adacore.com>
4014 * mlib-prj.adb: Update comments to remove any mention of VMS.
4016 2014-08-01 Arnaud Charlet <charlet@adacore.com>
4018 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
4019 xgnatugn.adb and ug_words.
4021 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
4023 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
4024 expansion can be avoid for Machine, Model and Rounding.
4025 (Is_Inline_Floating_Point_Attribute): Return true for Machine
4026 & Model, as well as Rounding if wrapped in a conversion to an
4028 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
4029 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
4030 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
4031 * gcc-interface/misc.c (enumerate_modes): Compute it.
4032 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
4033 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
4035 (Attribute_to_gnu) <Attr_Model>: New case.
4036 <Attr_Machine>): Likewise.
4037 (convert_with_check): Test
4038 fp_arith_may_widen variable.
4040 2014-08-01 Pascal Obry <obry@adacore.com>
4042 * adaint.h (GNAT_FOPEN): New definition for Windows.
4043 (GNAT_OPEN): Likewise.
4044 (GNAT_STAT): Likewise.
4045 (GNAT_FSTAT): Likewise.
4046 (GNAT_LSTAT): Likewise.
4047 (GNAT_STRUCT_STAT): Likewise.
4048 * adaint.c (__gnat_stat): Fix computation of file size for
4051 2014-08-01 Vincent Celier <celier@adacore.com>
4053 * Makefile.rtl: Minor comment update.
4055 2014-08-01 Vincent Celier <celier@adacore.com>
4057 * Make-generated.in: Remove dependencies for vms-help.
4059 2014-08-01 Gary Dismukes <dismukes@adacore.com>
4061 * makeutl.ads, opt.ads: Minor grammar fixes.
4062 * makeutl.adb: Minor code reorganization.
4064 2014-08-01 Arnaud Charlet <charlet@adacore.com>
4066 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
4067 gnatsym.adb: Remove gnatsym (VMS only tool).
4069 2014-08-01 Ben Brosgol <brosgol@adacore.com>
4071 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
4072 conditionalization from gnat_ugn.texi and projects.texi, and updated
4073 (considerably simplified) xgnatugn.adb, to be removed soon.
4075 2014-08-01 Vincent Celier <celier@adacore.com>
4077 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
4078 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
4079 instead of Debug.Debug_Flag_S.
4080 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
4081 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
4083 * makeutl.ads (No_Exit_Message_Option): New constant string
4084 for switch --no-exit-message.
4085 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
4086 * switch-m.adb (Scan_Make_Switches): Recognize new switch
4089 2014-08-01 Arnaud Charlet <charlet@adacore.com>
4091 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
4092 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
4094 2014-08-01 Javier Miranda <miranda@adacore.com>
4096 * inline.ads (Inlined_Calls, Backend_Calls,
4097 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
4098 moved to inline.adb (Cannot_Inline): Update documentation.
4099 (Check_And_Build_Body_To_Inline): Renamed.
4100 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4101 * inline.adb (Check_Inlining_Restrictions): New local variable.
4102 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
4103 Backend_Not_Inlined_Subps): Declarations moved here
4104 from inline.ads (Number_Of_Statements): Removed.
4105 (Remove_Pragmas): Avoid duplicated version of this subprogram.
4106 (Build_Body_To_Inline): Code cleanup.
4107 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
4108 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
4109 (Check_Body_To_Inline): Removed.
4110 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
4111 (Has_Excluded_Declaration): No action if not
4112 Check_Inlining_Restrictions.
4113 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
4114 (Initialize): Initialize the lists of inlined calls and subprograms.
4115 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
4116 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
4117 to Check_And_Build_Body_To_Inline since it has been renamed as
4118 Check_And_Split_Unconstrained_Function
4119 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
4121 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
4123 2014-08-01 Vincent Celier <celier@adacore.com>
4125 * debug.adb: Add documentation for new debug switch -ds.
4126 * make.adb (List_Bad_Compilations): Do not issue any message
4127 when switch -ds is specified.
4128 * makeutl.adb (Fail_Program): Do not issue any message when
4130 (Finish_Program): Ditto.
4132 2014-08-01 Robert Dewar <dewar@adacore.com>
4134 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
4135 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
4136 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
4137 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
4138 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
4139 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
4140 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
4141 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
4142 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
4143 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
4144 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
4145 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
4146 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
4147 s-tratas.ads: Minor fix to copyright notices.
4149 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
4151 * sinfo.ads: Remove long obsolete comment.
4152 2014-08-01 Ed Schonberg <schonberg@adacore.com>
4154 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
4155 * sem_ch3.adb: Minor reformatting.
4157 2014-08-01 Pascal Obry <obry@adacore.com>
4159 * cstreams.c: Only enable large file support on know supported
4160 platforms. Add missing defines/includes.
4162 2014-08-01 Ed Schonberg <schonberg@adacore.com>
4164 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
4165 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
4166 on generic units that contain constructs that forbid subtypes
4168 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
4169 Inherit flags indicating the presence of predicates in subtype
4170 declarations with and without constraints.
4171 (Inherit_Predicate_Flags): Utility for the above.
4172 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
4173 indicate that the actual cannot have predicates, and preserve
4174 warning. In an instance, report error if actual has predicates
4175 and the construct appears in a package declaration.
4176 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
4177 for an actual with predicates, if the corresponding formal
4178 carries No_Predicate_On_Actual or (in the case of a loop)
4179 No_Dynamic_Predicate_On_Actual.
4180 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
4181 Static_Predicate function if the type is non-static (in the
4182 presence of previous errors),
4183 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
4184 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
4185 generic contract on actuals that cannot have predicates.
4187 2014-08-01 Pascal Obry <obry@adacore.com>
4189 * a-direct.adb (C_Size): Returns an int64.
4190 * osint.adb (System.CRTL): New with clause.
4191 (File_Length.Internal): Returns an int64.
4192 * s-os_lib.ads (File_Length): Returns an int64.
4194 2014-08-01 Robert Dewar <dewar@adacore.com>
4196 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
4197 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
4198 osint.adb, krunch.adb: Minor reformatting.
4200 2014-08-01 Robert Dewar <dewar@adacore.com>
4202 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
4203 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
4204 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
4205 Remove VMS-specific code.
4206 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
4208 2014-08-01 Arnaud Charlet <charlet@adacore.com>
4210 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
4211 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
4212 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
4213 mlib.ads, tempdir.adb: Remove VMS handling.
4215 2014-08-01 Pascal Obry <obry@adacore.com>
4217 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
4218 (__gnat_named_file_length): Likewise.
4219 (__gnat_file_length_attr): Likewise.
4220 * a-direct.adb (C_Size): Use size_t as returned type.
4221 * osint.adb (File_Length): Adjust spec for Internal routine
4223 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
4224 (System.CRTL): With claused moved to spec.
4225 * s-os_lib.ads (System.CRTL): With clause moved to here.
4227 2014-08-01 Pascal Obry <obry@adacore.com>
4229 * adaint.h, adaint.c (__gnat_open): Added.
4230 * s-crtl.ads (open): Import __gnat_open for large file support.
4232 2014-08-01 Robert Dewar <dewar@adacore.com>
4234 * sem_case.adb (Dup_Choice): Improve message for integer constants.
4236 2014-08-01 Arnaud Charlet <charlet@adacore.com>
4238 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
4240 2014-08-01 Pascal Obry <obry@adacore.com>
4242 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
4243 * adaint.c (GNAT_OPEN): Uses new macro where needed.
4245 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4247 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
4249 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
4250 * gcc-interface/gigi.h: Update comment.
4252 2014-07-31 Javier Miranda <miranda@adacore.com>
4254 * debug.adb Remove documentation of -gnatd.k (no longer needed).
4255 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
4256 * inline.ads (Backend_Inlined_Subps): New
4257 Elist. (Backend_Not_Inlined_Subps): New Elist.
4258 (Has_Excluded_Declaration): Declaration previously located in
4259 * inline.adb (Has_Excluded_Statement): Declaration previously
4260 located in inline.adb
4261 * inline.adb (Has_Single_Return): Moved out of
4262 Build_Body_To_Inline to avoid having duplicated code.
4263 (Number_Of_Statements): New subprogram.
4264 (Register_Backend_Inlined_Subprogram): New subprogram.
4265 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
4266 (Add_Inlined_Subprogram): Register backend inlined subprograms and
4267 also register subprograms that cannot be inlined by the backend.
4268 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
4269 to avoid having duplicated code. Replace occurrences of
4270 Debug_Flag_Dot_K by Back_End_Inlining.
4271 * sem_res.adb (Resolve_Call): Code cleanup.
4272 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
4273 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
4274 (List_Inlining_Info): Add listing of subprograms passed to the
4275 backend and listing of subprograms that cannot be inlined by
4277 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
4278 Debug_Flag_Dot_K by Back_End_Inlining.
4280 2014-07-31 Robert Dewar <dewar@adacore.com>
4282 * nlists.ads: Minor code fix (remove unwise Inline for
4285 2014-07-31 Arnaud Charlet <charlet@adacore.com>
4287 * einfo.adb: Remove VMS specific code.
4288 * exp_attr.adb: Remove VAX specific code.
4289 * set_targ.adb: Remove handling of VAX_Float.
4290 * sem_vfpt.adb: Remove references to Vax_Native.
4291 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
4293 2014-07-31 Robert Dewar <dewar@adacore.com>
4295 * sem_ch4.adb: Minor reformatting.
4297 2014-07-31 Arnaud Charlet <charlet@adacore.com>
4299 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
4300 to VMS. Misc clean ups.
4301 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
4303 2014-07-31 Robert Dewar <dewar@adacore.com>
4305 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
4306 exp_prag.adb, frontend.adb, interfac.ads,
4307 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
4308 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
4309 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
4310 snames.ads-tmpl: Remove obsolete VMS-specific code.
4312 2014-07-31 Robert Dewar <dewar@adacore.com>
4314 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4316 2014-07-31 Arnaud Charlet <charlet@adacore.com>
4318 * a-intnam-linux.ads: Minor: update obsolete comments.
4319 * s-taasde.adb: Minor: fix comment header.
4321 2014-07-31 Arnaud Charlet <charlet@adacore.com>
4323 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
4324 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
4325 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
4326 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
4327 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
4328 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
4329 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
4330 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
4331 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
4332 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
4333 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
4334 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
4335 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
4336 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
4337 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
4338 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
4339 * namet.h (Is_Non_Ada_Error): Remove.
4341 2014-07-31 Robert Dewar <dewar@adacore.com>
4343 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
4346 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4348 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
4349 which demonstrates the expansion of while loops subject to
4350 attribute 'Loop_Entry. The condition of a while loop along with
4351 related condition actions is now wrapped in a function. Instead
4352 of repeating the condition, the expansion now calls the function.
4354 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4356 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
4357 error when reporting of missing values in a case statement for
4358 a type with a static predicate.
4359 (Check_Choices): Reject a choice given by a subtype to which a
4360 Dynamic_Predicate applies.
4361 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
4362 Has_Dynamic_Predicate_Aspect flag from parent.
4364 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4366 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
4367 cannot apply to a subtype of an incomplete type.
4368 (Is_Static_Choice): Treat an Others_Clause as static. The
4369 staticness of the expression and of the range are checked
4372 2014-07-31 Pascal Obry <obry@adacore.com>
4374 * adaint.h (__gnat_ftell64): Added.
4375 (__gnat_fseek64): Added.
4377 * cstreams.c (__int64): Removed.
4379 2014-07-31 Pascal Obry <obry@adacore.com>
4381 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
4382 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
4383 (ftell64): Always returns a 64bit value.
4384 * cstreams.c (int64): New definition.
4385 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
4386 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
4387 uses ftello() on UNIX.
4388 (__gnat_fseek64): Offset is always a 64bit value. The
4389 implementation now uses fseeko() on UNIX.
4390 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
4391 always use fseek64 to set the offset.
4392 (Size): Simplify code, always use fseek64/ftell64.
4393 * s-direio.ads (Count): Now an int64.
4394 * g-socket.ads (Vector_Element): Adjust definition for Length
4395 to be a size_t. This matches the C definition and avoid using
4396 a 64bit integer on 32bit platforms now that Count is always 64bit.
4397 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
4398 (C_Recvmsg): Change some conversion to account for change in
4400 (C_Sendmsg): Likewise.
4402 2014-07-31 Robert Dewar <dewar@adacore.com>
4404 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
4405 * debug.adb: Remove documentation of -gnatdm flag.
4406 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
4409 2014-07-31 Arnaud Charlet <charlet@adacore.com>
4411 * lib-writ.adb (Write_Unit_Information): Fix case where U =
4414 2014-07-31 Claire Dross <dross@adacore.com>
4416 * exp_util.adb, exp_util.ads
4417 (Get_First_Parent_With_External_Axiomatization_For_Entity):
4418 New routine to find the first parent of an entity with
4419 a pragma Annotate (GNATprove, External_Axiomatization).
4420 (Has_Annotate_Pragma_For_External_Axiomatization): New function
4421 to check if a package has a pragma Annotate (GNATprove,
4422 External_Axiomatization).
4423 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
4424 flag on the entity for the declaration created for a formal
4425 subprogram in an instance. This is a renaming declaration,
4426 or in GNATprove_Mode the declaration of an expression function
4427 that captures the axiomatization of the actual.
4428 * sem_ch6.adb (Analyze_Expression_Function): For a
4429 Generic_Actual_Subprogram, place body immediately after the
4430 declaration because it may be used in a subsequent declaration
4432 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
4433 the actual is a function, not an operator. Handle functions with
4434 one and two parameters and binary and unary operators.
4436 2014-07-31 Pascal Obry <obry@adacore.com>
4438 * cstreams.c (__gnat_is_regular_file_fd): Removed.
4439 * adaint.c (__gnat_is_regular_file_fd): Added.
4441 2014-07-31 Robert Dewar <dewar@adacore.com>
4443 * exp_strm.adb: Minor reformatting.
4445 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4447 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
4448 Analyze_Associations, to create a wrapper around operators that
4449 are actuals to formal subprograms. This is done in GNATProve
4450 mode in order to propagate the contracts of the operators to
4451 the body of the instance.
4453 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4455 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
4456 legal if within an aspect specification for a generic subprogram.
4458 2014-07-31 Javier Miranda <miranda@adacore.com>
4460 * gnat1drv.adb (Back_End_Inlining): Set to false if
4461 Suppress_All_Inlining is set.
4462 * debug.adb: Adding documentation for -gnatd.z.
4463 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
4464 processing to -gnatn1 for calls to Inline_Always routines.
4465 (Add_Inlined_Subprogram): Remove previous patch.
4467 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4469 * sem_ch13.adb (Check_One_Function): Apply properly the static
4470 semantic rules for indexing aspects and the functions they denote.
4472 2014-07-31 Javier Miranda <miranda@adacore.com>
4474 * debug.adb: Complete documentation of -gnatd.z.
4476 2014-07-31 Bob Duff <duff@adacore.com>
4478 * gnat_ugn.texi: Minor doc fixes.
4480 2014-07-31 Robert Dewar <dewar@adacore.com>
4482 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
4485 2014-07-31 Tristan Gingold <gingold@adacore.com>
4487 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
4488 (Packed_Bytes1): Make component aliased.
4490 2014-07-31 Robert Dewar <dewar@adacore.com>
4492 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
4494 2014-07-31 Robert Dewar <dewar@adacore.com>
4496 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
4499 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4501 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
4502 on array references here, now done more selectively in trans.c.
4504 2014-07-31 Doug Rupp <rupp@adacore.com>
4506 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
4508 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4510 * sem_util.adb (Is_Effectively_Volatile): New routine.
4512 2014-07-31 Fedor Rybin <frybin@adacore.com>
4514 * gnat_ugn.texi: Document --test-duration option for gnattest.
4516 2014-07-31 Javier Miranda <miranda@adacore.com>
4517 Eric Botcazou <ebotcazou@adacore.com>
4519 * opt.ads (Back_End_Inlining): New variable which controls
4520 activation of inlining by back-end expansion.
4521 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
4522 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
4523 the body to be inlined by the frontend if Back_End_Inlining
4525 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
4526 (Expand_Call): If backend inlining is enabled let the backend to
4527 handle inlined subprograms.
4528 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
4529 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
4530 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
4531 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
4533 * debug.adb Document -gnatd.z
4534 * fe.h Import Back_End_Inlining variable.
4535 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
4536 enabled then declare attribute "always inline"
4537 * gcc-interface/decl.c, gcc-interface/trans.c,
4538 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
4540 2014-07-31 Robert Dewar <dewar@adacore.com>
4542 * a-ngelfu.ads: Minor comment fix.
4544 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4546 * freeze.adb (Freeze_Record_Type): Replace all calls to
4547 Is_SPARK_Volatile with Is_Effectively_Volatile and update
4549 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
4550 Replace all calls to Is_SPARK_Volatile with
4551 Is_Effectively_Volatile and update related comments.
4552 * sem_ch5.adb (Analyze_Iterator_Specification,
4553 Analyze_Loop_Parameter_Specification): Replace all calls to
4554 Is_SPARK_Volatile with Is_Effectively_Volatile and update
4556 * sem_ch6.adb (Process_Formals): Replace all calls to
4557 Is_SPARK_Volatile with Is_Effectively_Volatile and update
4559 * sem_ch12.adb (Instantiate_Object): Replace the call to
4560 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
4561 and update related comment.
4562 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
4563 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
4564 with Is_Effectively_Volatile and update related comments.
4565 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
4566 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
4567 update related comments.
4568 * sem_util.adb (Has_Enabled_Property,
4569 Variable_Has_Enabled_Property): Replace all calls
4570 to Is_SPARK_Volatile with Is_Effectively_Volatile and
4571 update related comments.
4572 (Is_Effectively_Volatile): New routine.
4573 (Is_Effectively_Volatile_Object): New routine.
4574 (Is_SPARK_Volatile): Removed.
4575 (Is_SPARK_Volatile_Object): Removed.
4576 * sem_util.ads (Is_Effectively_Volatile): New routine.
4577 (Is_Effectively_Volatile_Object): New routine.
4578 (Is_SPARK_Volatile): Removed.
4579 (Is_SPARK_Volatile_Object): Removed.
4581 2014-07-31 Pascal Obry <obry@adacore.com>
4583 * s-fileio.adb (Open): Make sure a shared file gets inserted into
4584 the global list atomically. This ensures that the file descriptor
4585 won't be freed because another tasks is closing the file.
4587 2014-07-31 Robert Dewar <dewar@adacore.com>
4589 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
4590 generation of _FIRST and _LAST variables even in GNATprove_Mode.
4591 * gnat_ugn.texi: Minor editing.
4592 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
4593 aggregate is marked Comes_From_Source if argument is CFS.
4595 2014-07-31 Pascal Obry <obry@adacore.com>
4597 * s-fileio.adb: Remove obsolete comment.
4599 2014-07-31 Vincent Celier <celier@adacore.com>
4601 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
4602 overriding keyword before function to avoid error when compiler
4603 is called with -gnatyO (check overriding indicators).
4605 2014-07-31 Tucker Taft <taft@adacore.com>
4607 * gnat_ugn.texi: Add a paragraph pointing the reader
4608 to the "plugins" example.
4610 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4612 * freeze.adb (Freeze_Expression): Document the
4613 purpose of the parent chain traversal.
4615 2014-07-31 Robert Dewar <dewar@adacore.com>
4617 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
4618 unconstrained fpt ops.
4620 2014-07-31 Pascal Obry <obry@adacore.com>
4622 * s-fileio.adb (Open): Make sure a shared file gets inserted into
4623 the global list atomically. This ensures that the file descriptor
4624 won't be freed because another tasks is closing the file.
4626 2014-07-31 Vincent Celier <celier@adacore.com>
4628 * projects.texi: Minor spelling error fix.
4630 2014-07-31 Robert Dewar <dewar@adacore.com>
4632 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
4633 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
4635 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
4636 * restrict.adb (Process_Restriction_Synonyms): Add handling
4637 of No_Elaboration_Code_All.
4638 * restrict.ads (Process_Restriction_Synonyms): Now handles
4639 No_Elaboration_Code_All.
4640 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
4641 No_Elaboration_Code_All.
4642 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4643 Handle setting of No_Elab_Code in unit information. Handle
4644 No_Elaboration_Code_All.
4645 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
4647 (Name_No_Elaboration_Code_All): New name for pragma processing.
4649 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4651 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4652 types with a null range and use the Esize of the component
4653 instead of its RM_Size to identify appropriate values.
4655 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4657 * freeze.adb Add with and use clause for Aspects.
4658 (Freeze_Expression): Emit an error when a volatile constant lacks
4659 Boolean aspect Import.
4660 (Has_Boolean_Aspect_Import): New routine.
4662 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4664 * exp_util.adb: Minor reformatting.
4666 2014-07-31 Vincent Celier <celier@adacore.com>
4668 * errutil.adb (Error_Msg): Make sure that all components of
4669 the error message object are initialized.
4671 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4673 * sem_ch4.adb (Try_Container_Indexing): If the container type is
4674 class-wide, use specific type to locate iteration primitives.
4675 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
4676 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
4677 Minor error message reformating.
4678 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
4679 aspect for a derived type.
4681 2014-07-31 Robert Dewar <dewar@adacore.com>
4683 * debug.adb: Document debug flag d.X.
4685 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4687 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
4688 * sem_util.adb (Find_Specific_Type): If type is untagged private,
4689 retrieve full view so that primitive operations can be located.
4690 * exp_disp.adb Move Find_Specific_Type to sem_util.
4691 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
4692 Find_Specific_Type to locate primitive equality.
4693 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
4694 type does not require initialization.
4695 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
4696 body all visibility is established, and the enclosing package
4697 declarations must not be installed.
4699 2014-07-31 Yannick Moy <moy@adacore.com>
4701 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
4702 Make subprogram public.
4704 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4706 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
4707 predicate Discriminated_Size, to distinguish between private
4708 components that depend on discriminants from those whose size
4709 depends on some other non-static expression.
4711 2014-07-31 Nicolas Setton <setton@adacore.com>
4713 * g-exptty.adb (Close): Fix binding to Waitpid: use the
4716 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4718 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
4719 in a discrete range, when 'range was probably intended.
4721 2014-07-31 Robert Dewar <dewar@adacore.com>
4723 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
4725 2014-07-31 Robert Dewar <dewar@adacore.com>
4727 * frontend.adb: Minor reformatting.
4728 * sem.adb: Minor reformatting.
4729 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
4730 identifiers on rewrite.
4731 * par.adb: Minor comment updates.
4732 * a-ngelfu.adb (Cos): Minor simplification.
4733 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
4734 and recovery for bad aspect.
4735 * exp_ch3.adb: Code clean up.
4736 * sem_util.ads: Minor comment correction.
4737 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
4738 * sem_ch3.adb: Code clean up.
4739 * binderr.ads: Minor comment correction.
4741 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4743 * exp_disp.adb (Expand_Interface_Conversion): A call whose
4744 prefix is a static conversion to an interface type that is not
4745 class-wide is not dispatching.
4747 2014-07-31 Robert Dewar <dewar@adacore.com>
4749 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
4750 s-traceb-mastop.adb: Minor reformatting.
4752 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4754 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
4755 expansion, to handle properly visibility of selected components
4758 2014-07-31 Robert Dewar <dewar@adacore.com>
4760 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
4761 * par-ch2.adb (P_Pragma): Set Inside_Depends.
4762 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
4763 Check_Unary_Plus_Or_Minus.
4764 * scans.ads (Inside_Depends): New flag.
4765 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
4766 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
4767 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4768 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
4769 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
4770 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
4771 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4773 2014-07-31 Javier Miranda <miranda@adacore.com>
4775 * s-vaflop.adb Move the body of function T_To_G before
4776 T_To_D. Required for frontend inlining.
4777 * inline.adb (Has_Excluded_Contract): New subprogram used to
4778 check if a subprogram inlined by the frontend has contracts
4779 which cannot be inlined.
4781 2014-07-31 Bob Duff <duff@adacore.com>
4783 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
4784 (Call_Chain): Add 1 to number of frames to skip, to account for
4785 the fact that there's one more frame on the stack.
4786 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
4788 2014-07-31 Robert Dewar <dewar@adacore.com>
4790 * checks.adb (Enable_Overflow_Check): More precise setting of
4791 Do_Overflow_Check flag for division.
4793 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4795 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
4796 array types with implementation type.
4798 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4800 * sem_ch10.adb (Process_State): Remove local variable Name. Add
4801 local variable Decl. Partially declare an abstract state by
4802 generating an entity and storing it in the state declaration.
4803 * sem_prag.adb (Create_Abstract_State): Fully declare a
4804 semi-declared abstract state.
4806 2014-07-31 Robert Dewar <dewar@adacore.com>
4808 * prj-nmsc.adb: Minor reformatting.
4810 2014-07-31 Bob Duff <duff@adacore.com>
4812 * s-tasdeb.adb (System.Tasking.Debug): Remove
4813 all usage of the secondary stack from this package.
4815 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4817 * freeze.adb (Freeze_Expression): Update the loop in charge
4818 of finding a proper insertion place for freeze nodes to handle
4819 N_Expression_With_Actions nodes.
4821 2014-07-31 Robert Dewar <dewar@adacore.com>
4823 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
4826 2014-07-31 Pascal Obry <obry@adacore.com>
4828 * prj-nmsc.adb: Minor reformatting.
4830 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4832 * sem_util.adb (Has_Preelaborable_Initialization): Check that
4833 type is tagged before checking whether a user-defined Initialize
4834 procedure is present.
4836 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4838 * a-ngelfu.ads (Sqrt): Augment postcondition.
4840 2014-07-31 Pascal Obry <obry@adacore.com>
4842 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
4843 directory and ALI directory must be different than all object
4844 and library directories of aggregated projects.
4846 2014-07-31 Vincent Celier <celier@adacore.com>
4848 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
4849 to package body, as it is not called from outside. Remove argument
4850 Project_Tree, no longer used. When runtime cannot be found,
4851 call Raise_Invalid_Config instead of failing the program.
4853 2014-07-31 Robert Dewar <dewar@adacore.com>
4855 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
4857 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
4860 2014-07-31 Robert Dewar <dewar@adacore.com>
4862 * gnat_ugn.texi: Document new switch -gnato0.
4863 * sem_ch3.ads: Minor reformatting.
4864 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
4865 (we do not want overflow checks when incrementing elaboration
4867 * einfo.ads: Minor reformatting.
4869 2014-07-31 Robert Dewar <dewar@adacore.com>
4871 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
4872 * s-arit64.adb: Minor reformatting.
4874 2014-07-31 Robert Dewar <dewar@adacore.com>
4876 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
4877 checking is enabled except in GNAT_Mode.
4878 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
4879 (suppress overflow checks).
4881 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4883 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
4884 invariant procedure for an internally generated subtype that is
4885 created for an object of a class-wide type.
4887 2014-07-31 Vincent Celier <celier@adacore.com>
4889 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
4891 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4893 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
4894 exp_disp.adb: Minor reformatting.
4896 2014-07-31 Robert Dewar <dewar@adacore.com>
4898 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
4899 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
4900 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
4903 2014-07-31 Robert Dewar <dewar@adacore.com>
4905 * sem_ch13.adb: Minor reformatting.
4907 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4909 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
4910 is an unchecked_union, warn that invariants will not be checked
4911 on components that have them.
4913 2014-07-31 Robert Dewar <dewar@adacore.com>
4915 * freeze.adb (Freeze_Entity): Check for error of
4916 Type_Invariant'Class applied to a untagged type.
4917 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
4918 as null body, so that we perform error checks even if expansion
4921 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4923 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
4924 is already present, nothing to do.
4925 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
4926 component, check whether the access type has an invariant before
4927 checking the designated type.
4928 (Build_Record_Invariant_Proc): Change suffix of generated
4929 name to prevent ambiguity when record type has invariants
4930 in addition to those of components, and two subprograms are
4931 constructed. Consistent with handling of array types.
4932 (Insert_Component_Invariant_Checks): Build invariant procedure
4933 body when one has not been created yet, in the case of composite
4934 types that are completions and whose full declarations carry
4937 2014-07-30 Thomas Quinot <quinot@adacore.com>
4939 * gnat_rm.texi: Minor doc fixes.
4941 2014-07-30 Robert Dewar <dewar@adacore.com>
4943 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
4945 2014-07-30 Vincent Celier <celier@adacore.com>
4947 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
4949 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
4950 message to report that a directory cannot be created, to avoid
4951 processing of the directory path that may contains special
4952 insertion characters.
4954 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4956 * a-crdlli.ads: Place declaration of Empty_List after full type
4957 declaration for Curosr, to prevent freezing error.
4959 2014-07-30 Robert Dewar <dewar@adacore.com>
4961 * get_targ.adb: Minor code reorganization.
4962 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
4965 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4967 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
4968 not Program_Error, when attempting to remove an element not in
4969 the set. This is the given semantics for all set containers.
4971 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4973 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
4974 element is not present in tree return rather than violating
4975 an assertion. Constraint_Error will be raised in the caller if
4976 element is not in the container.
4978 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4980 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
4981 (elab body): Add provision for default target config file.
4982 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
4984 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4986 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
4987 when attempting to remove an element not in the set. This is
4988 the given semantics for all set containers.
4989 * a-cborse.adb (Delete): Attempt removal first, to check for
4990 tampering, before checking whether this is an attempt to
4991 delete a non-existing element, and in fthe latter case raise
4994 2014-07-30 Vincent Celier <celier@adacore.com>
4996 * prj-proc.adb (Recursive_Process): Do not create a new
4997 Project_Id if the project is already in the list of projects of
5000 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5002 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
5003 whose type is an incomplete formal type.
5004 (Analyze_Return_Type): Reject a return type that is an untagged
5005 imcomplete formal type.
5006 (Process_Formals): Reject a formal parameter whose type is an
5007 untagged formal incomplete type.
5008 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
5009 an untagged formal incomplete type.
5011 2014-07-30 Robert Dewar <dewar@adacore.com>
5013 * gnat_ugn.texi: Minor spelling correction.
5014 * makeutl.adb: Minor code reorganization.
5015 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5017 2014-07-30 Robert Dewar <dewar@adacore.com>
5019 * einfo.ads (Has_Unchecked_Union): Document that this is used
5020 to check for illegal Valid_Scalars attribute references.
5021 * exp_attr.adb (Build_Record_VS_Func): New function
5022 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
5024 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
5025 Unchecked_Union Add note on 'Valid_Scalars generating a lot
5027 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
5028 error on attempt to apply Valid_Scalars to Unchecked_Union type.
5030 2014-07-30 Steve Baird <baird@adacore.com>
5032 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
5033 of A(I..J)(K) in CodePeer_Mode.
5035 2014-07-30 Ben Brosgol <brosgol@adacore.com>
5037 * gnat_ugn.texi: Fix typo.
5039 2014-07-30 Thomas Quinot <quinot@adacore.com>
5041 * lib-writ.ads: document format change.
5043 2014-07-30 Pascal Obry <obry@adacore.com>
5045 * prj-util.adb (For_Interface_Sources): Do not
5046 include sources from withed externally built projects.
5048 2014-07-30 Robert Dewar <dewar@adacore.com>
5050 * lib.adb: Minor reformatting.
5051 * prj-util.adb: Minor reformatting.
5053 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5055 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
5056 that depends on discriminants, and which is given by an others
5057 clause, create an explicit subtype with the discriminant values
5058 of the enclosing aggregate, because the backend cannot otherwise
5059 retrieve the actual bounds of the array.
5061 2014-07-30 Fedor Rybin <frybin@adacore.com>
5063 * gnat_ugn.texi: Improve gnattest documentation.
5065 2014-07-30 Pascal Obry <obry@adacore.com>
5067 * makeutl.adb (Insert_Project_Sources): Properly handle sources
5068 that are aggregated. We want to include sources not only part
5069 of libraries but also if part of an aggregated project from an
5071 * prj.adb (For_Project_And_Aggregated_Context): Properly check
5072 state of root project.
5074 2014-07-30 Thomas Quinot <quinot@adacore.com>
5076 * lib-load.ads: Minor reformatting.
5077 * sinfo.ads (Library_Unit): Update comment.
5078 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
5079 is redundant. Instead used the pragma Node_Id directly as the
5082 2014-07-30 Thomas Quinot <quinot@adacore.com>
5084 * lib.adb (Store_Note): Store only notes that do not come from
5085 an instance, and that are in the extended main source unit.
5086 * lib-writ (Write_Unit_Information): Annotations from subunits
5087 must be emitted along with those for the main unit, and they
5088 must carry a specific file name.
5089 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
5090 Unit_Id for the source file containing the pragma, as in the
5091 case of annotations from subunits we might not have a readily
5093 * ali.adb (Scan_ALI): Account for above change in data structure.
5095 2014-07-30 Vincent Celier <celier@adacore.com>
5097 * makeutl.adb (Insert_Project_Sources): When the library project
5098 is an aggregate Stand-Alone Library, insert in the queue the
5099 Ada interface units, with Closure set to True;
5101 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5103 * sem_util.adb: Fix minor typo.
5104 * makeutl.adb: Minor reformatting.
5106 2014-07-30 Robert Dewar <dewar@adacore.com>
5108 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
5110 2014-07-30 Yannick Moy <moy@adacore.com>
5112 * checks.ads: Fix typo in comment.
5114 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
5116 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
5117 entities that materialize range bounds, if any.
5119 2014-07-30 Vincent Celier <celier@adacore.com>
5121 * projects.texi: Minor spelling fix.
5123 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5125 * checks.adb (Make_Bignum_Block): Use the new secondary stack
5126 build routines to manage the mark.
5127 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
5128 Use the new secodary stack build routines to manage the mark.
5129 (Insert_Actions_In_Scope_Around): Add new formal parameter
5130 Manage_SS along with comment on its usage. Code and comment
5131 reformatting. Mark and release the secondary stack when the
5132 context warrants it.
5133 (Make_Transient_Block): Update the call
5134 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
5135 (Wrap_Transient_Declaration): Remove local variable
5136 Uses_SS. Ensure that the secondary stack is marked and released
5137 when the related object declaration appears in a library level
5138 package or package body. Code and comment reformatting.
5139 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
5140 (Build_SS_Release_Call): New routine.
5142 2014-07-30 Steve Baird <baird@adacore.com>
5144 * exp_attr.adb: Revert previous change, not needed after all.
5146 2014-07-30 Vincent Celier <celier@adacore.com>
5148 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
5149 Closure => True for interfaces of Stand-Alone Libraries.
5150 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
5151 Boolean component Closure, defaulted to False.
5153 2014-07-30 Yannick Moy <moy@adacore.com>
5155 * sem_res.adb: Fix typo in error message.
5157 2014-07-30 Robert Dewar <dewar@adacore.com>
5159 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
5160 as name suffixes rather than L/H for subtype bounds.
5161 * tbuild.ads: Minor comment improvements and fixes
5162 (Make_External_Name): Document that suffix can start with an
5165 2014-07-30 Bob Duff <duff@adacore.com>
5167 * gnat_ugn.texi: Document --rep-clauses switch.
5169 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5171 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
5172 Default_Component_Value can only be specified for scalar type or
5173 arrays of scalar types respectively. This legality check must
5174 be performed at the point the aspect is analyzed, in order to
5175 reject aspect specifications that apply to a partial view.
5177 2014-07-30 Thomas Quinot <quinot@adacore.com>
5179 * freeze.adb: Minor reformatting.
5181 2014-07-30 Robert Dewar <dewar@adacore.com>
5183 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
5186 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5188 * freeze.adb (Check_Expression_Function): At the freeze point
5189 of an expression function, verify that the expression in the
5190 function does not contain references to any deferred constants
5191 that have no completion yet.
5192 (Freeze_Expression, Freeze_Before): call
5193 Check_Expression_Function.
5194 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
5195 * a-ciorse.adb: Add Adjust and Finalize routines for
5196 Reference_Control_Type. Use it in the construction of Reference
5197 and Constant_Reference values.
5199 2014-07-30 Robert Dewar <dewar@adacore.com>
5201 * exp_aggr.adb: Update comments.
5202 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
5205 2014-07-30 Robert Dewar <dewar@adacore.com>
5207 * cstand.adb (New_Standard_Entity): New version takes name
5208 string to call Make_Name.
5209 (Create_Standard): Use this routine to set name before setting other
5212 2014-07-30 Robert Dewar <dewar@adacore.com>
5214 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
5216 (Expand_Attribute, case Last): Ditto.
5217 * exp_ch3.adb (Constrain_Index): New calling sequence for
5218 Process_Range_Expr_In_Decl.
5219 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
5221 * sem_ch3.adb (Constrain_Index): New calling sequence for
5222 Process_Range_Expr_In_Decl.
5223 (Set_Scalar_Range_For_Subtype): ditto.
5224 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
5226 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
5227 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
5228 types if we are not assuming no invalid values.
5230 2014-07-30 Robert Dewar <dewar@adacore.com>
5232 * clean.adb: Minor reformatting.
5233 * opt.ads: Minor fix to incorrect comment.
5235 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5237 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
5238 subprogram, used by bounded hashed sets, to delete a node at
5239 a given index, whose element may have been improperly updated
5240 through a Reference_Preserving key.
5241 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
5242 * a-cbhase.adb: Add Adjust and Finalize routines for
5243 Reference_Control_Type.
5244 (Delete, Insert): Raise Program_Error, not Constraint_Error,
5245 when operation is illegal.
5246 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
5247 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
5248 private with_clause for Ada.Finalization.
5249 * a-cbmutr.adb: Add Adjust and Finalize routines for
5250 Reference_Control_Type. Use it in the construction of Reference
5251 and Constant_Reference values.
5253 2014-07-30 Robert Dewar <dewar@adacore.com>
5255 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
5257 2014-07-30 Pascal Obry <obry@adacore.com>
5259 * clean.adb (Clean_Project): Properly check for directory
5260 existence before trying to enter it.
5262 2014-07-30 Robert Dewar <dewar@adacore.com>
5264 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
5266 2014-07-30 Robert Dewar <dewar@adacore.com>
5268 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
5269 missing semicolon after name.
5271 2014-07-30 Pascal Obry <obry@adacore.com>
5273 * prj.ads (Gprinstall_Flags): New constant.
5274 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
5275 missing library dir if Directories_Must_Exist_In_Projects
5278 2014-07-30 Bob Duff <duff@adacore.com>
5280 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
5281 * s-traceb.ads: Updagte comments.
5283 2014-07-30 Robert Dewar <dewar@adacore.com>
5285 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
5286 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
5287 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
5290 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5292 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
5293 subprogram, used by all versions of hashed sets, to delete a node
5294 whose element has been improperly updated through a Reference_
5296 * a-cohase.adb: Remove Delete_Node, use new common procedure
5297 Delete_Node_At_Index.
5298 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
5299 * a-cihase.adb: Add Adjust and Finalize routines for
5300 Reference_Control_Type.
5301 (Reference_Preserving_Key): Build aggregate for
5302 Reference_Control_Type
5304 2014-07-30 Yannick Moy <moy@adacore.com>
5306 * checks.adb, checks.ads (Determine_Range_R): New procedure to
5307 determine the possible range of a floating-point expression.
5309 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5311 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
5312 * a-cborse.adb: Add Adjust and Finalize routines for
5313 Reference_Control_Type.
5314 (Reference_Preserving_Key): Build aggregate for
5315 Reference_Control_Type.
5316 (Delete): Check for tampering, and raise Program_Error (not
5317 Constraint_Error) when attempting to delete an element not in
5321 2014-07-30 Bob Duff <duff@adacore.com>
5323 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
5324 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
5325 Exception_Information is used to produce useful debugging
5326 information for the programmer. However, it was also used to
5327 implement the stream attributes for type Exception_Occurrence. The
5328 latter requires a stable and portable interface, which meant
5329 that we couldn't include a symbolic traceback. A separate set of
5330 routines was used to provide symbolic tracebacks under program
5331 control (i.e. not automatically). The goal of this ticket is
5332 to provide such automatic tracebacks, so the change here is to
5333 split the two functionalities: Exception_Information gives the
5334 maximally useful information for debugging (i.e. it now includes
5335 a symbolic traceback when a decorator is set, and it can be
5336 improved freely in the future without disturbing streaming).
5337 Untailored_Exception_Information always uses hexadecimal addresses
5338 in the traceback, has a stable and portable output, and is now
5341 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5343 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
5344 on the target of the assignment to find out whether it
5345 can be directly done by the back-end.
5346 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
5348 2014-07-30 Robert Dewar <dewar@adacore.com>
5350 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
5351 a-tasatt.adb: Minor reformatting.
5353 2014-07-30 Robert Dewar <dewar@adacore.com>
5355 * exp_ch4.adb: Minor reformatting.
5357 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5359 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
5360 Reference_Control_Type to generic package, to keep additional
5361 information for Reference_Types that manipulate keys. Add Adjust and
5362 Finalize procedures for this type.
5363 (Finalize): When finalizing a reference_preserving_key, verify
5364 that the key of the new value is equivalent to the key of the
5365 original element, raise Program_Error otherwise.
5366 (Insert): Detect tampering.
5367 (Reference_Preserving_Key): Build proper Reference_Control_Type,
5368 and update Busy and Lock bits to detect tampering.
5369 * a-cohase.ads: Keep with-clause private.
5371 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5373 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
5374 of an equality are of an Unchecked_Union type and lack inferable
5377 2014-07-30 Bob Duff <duff@adacore.com>
5379 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
5380 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
5381 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
5382 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
5383 we can call them from the runtimes. Leave renamings in place under GNAT.
5385 2014-07-30 Yannick Moy <moy@adacore.com>
5387 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
5388 inlining in GNATprove mode.
5390 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5392 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
5393 Reference_Control_Type to generic package, to keep additional
5394 information for Reference_Types that manipulate keys. Add Adjust and
5395 Finalize procedures for this type.
5396 (Delete_Node): New procedure called when finalizing a
5397 Reference_Control_Type, to remove a node whose element has been
5398 improperly updated through a Reference.
5399 (Insert): Detect tampering.
5400 (Reference_Preserving_Key): Build proper Reference_Control_Type,
5401 and update Busy and Lock bits to detect tampering.
5403 2014-07-30 Bob Duff <duff@adacore.com>
5405 * exp_intr.ads: Minor comment fix.
5407 2014-07-30 Gary Dismukes <dismukes@adacore.com>
5409 * exp_prag.adb, a-tags.ads: Minor typo fixes.
5411 2014-07-30 Bob Duff <duff@adacore.com>
5413 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
5414 a-except.ads, g-traceb.adb, memtrack.adb,
5415 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
5416 Cleanup: Make the three versions of System.Traceback.Call_Chain
5417 have the same interface. Use an array for the Traceback parameter
5418 instead of an Address. This will enable reduction in code
5421 2014-07-30 Pat Rogers <rogers@adacore.com>
5423 * gnat_ugn.texi: Corrected minor textual error in description
5426 2014-07-30 Bob Duff <duff@adacore.com>
5428 * Makefile.rtl: Sort file names.
5430 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5432 * a-tasatt.adb: Complete previous change: kill spurious warning
5433 on e.g. sparc, and make sure we only use the fast path when the
5434 alignment is compatible.
5436 2014-07-30 Yannick Moy <moy@adacore.com>
5438 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
5441 2014-07-30 Yannick Moy <moy@adacore.com>
5443 * inline.adb (Build_Body_To_Inline): Issue more precise messages
5444 for declarations that prevent inlining.
5445 (Cannot_Inline): Change usual start of message to refer to contextual
5446 analysis in GNATprove mode.
5447 * sem_res.adb (Resolve_Call): Change usual start of message to
5448 refer to contextual analysis in GNATprove mode, when inlining
5451 2014-07-30 Robert Dewar <dewar@adacore.com>
5453 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
5454 * inline.adb: Minor reformatting.
5456 2014-07-30 Javier Miranda <miranda@adacore.com>
5458 * a-tags.ads: Add comments.
5460 2014-07-30 Pat Rogers <rogers@adacore.com>
5462 * gnat_rm.texi: Minor word error.
5464 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5466 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
5467 created to capture the value of the prefix of 'Old at the
5468 beginning of the current declarative part, to prevent data flow
5469 anomalies in the postcondition procedure that will follow.
5471 2014-07-30 Yannick Moy <moy@adacore.com>
5473 * debug.adb: Retire debug flag -gnatdQ.
5474 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
5475 on decl, not on body. Ignore predicate functions.
5476 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
5477 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
5478 body when generating a decl for a body on which SPARK_Mode aspect
5480 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
5481 attaching pragma to entity, to account for declaration not coming
5483 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
5484 as not always inlined in GNATprove mode, when called in an
5487 2014-07-30 Vincent Celier <celier@adacore.com>
5489 * debug.adb: Minor comment update.
5491 2014-07-30 Robert Dewar <dewar@adacore.com>
5493 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
5494 * sprint.adb (Sprint_Node): Handle N_Contract case.
5495 * exp_prag.adb: Minor reformatting.
5496 * freeze.adb (Freeze_Entity): Check useless postcondition for
5497 No_Return subprogram.
5498 * sem_prag.adb: Minor reformatting.
5500 2014-07-30 Javier Miranda <miranda@adacore.com>
5502 * a-tags.ads: Complete comments about performance.
5504 2014-07-30 Fedor Rybin <frybin@adacore.com>
5506 * gnat_ugn.texi: Adding description for --exit-status option to
5507 gnattest section. Fixing index entry of --passed-tests option
5508 in gnattest section.
5510 2014-07-30 Javier Miranda <miranda@adacore.com>
5512 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
5513 rtsfind.ads: Remove references to package Interfaces.CPP since this
5514 package is no longer needed.
5516 2014-07-30 Bob Duff <duff@adacore.com>
5518 * s-taasde.adb (Timer_Queue): Don't use a
5519 build-in-place function call to initialize the Timer_Queue.
5520 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
5521 Turn off polling in these units, because otherwise we get
5522 elaboration circularities with Ada.Exceptions when the -gnatP
5524 * s-tassta.adb (Create_Task): Make sure independent tasks
5525 are created with Parent = Environment_Task. This was not true,
5526 for example, in s-interr.adb, when Interrupt_Manager does "new
5527 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
5528 which is wrong because the master is determined by the access
5529 type, which is at library level.
5530 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
5531 now set correctly by Create_Task.
5532 (Make_Passive): Remove the workaround for the race condition in
5534 * frontend.adb (Frontend): Revert to previous method of detecting
5535 temporary configuration pragma files, recognizing such files by
5536 ".tmp" in the name. This is more general than detecting pragmas
5537 Source_File_Name_Project, because it allows any tool to use
5538 this naming convention, no matter the content of the file.
5539 * gnat_ugn.texi: Document this naming convention.
5541 2014-07-30 Robert Dewar <dewar@adacore.com>
5543 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
5544 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
5545 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
5546 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
5547 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
5550 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5552 * sem_ch5.adb: Improve error recovery.
5553 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
5554 before analyzing the body, so that in GNATprove mode there is
5555 no light expansion. Whatever expansion is required by SPARK will
5556 be performed when analysing the inlined code.
5558 2014-07-30 Bob Duff <duff@adacore.com>
5560 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
5562 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5564 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
5565 verify that it is not hidden by an inner implicit declaration.
5567 2014-07-30 Thomas Quinot <quinot@adacore.com>
5569 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
5570 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
5571 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
5572 the call returns an unconstrained type: in this case there is
5573 already a transient scope, and we should not establish a new one.
5574 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
5575 True, also insert cleanup actions in the tree.
5576 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
5577 with Clean set True.
5579 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5581 * s-taskin.ads (Direct_Index, Direct_Index_Range,
5582 Direct_Attribute_Element, Direct_Attribute_Array,
5583 Direct_Index_Vector, Direct_Attributes, Is_Defined,
5584 Indirect_Attributes): Removed. (Atomic_Address,
5585 Attribute_Array, Attributes): New.
5586 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
5587 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
5588 (Finalize_Attributes): Reimplement.
5589 * s-tassta.adb (Create_Task): Remove call to
5590 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
5591 Replace Finalize_Attributes_Link by Finalize_Attributes.
5592 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
5593 Reimplement from scratch, using a simpler and more efficient
5595 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
5596 * s-parame.ads, s-parame-hpux.ads,
5597 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
5598 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
5599 Default_Attribute_Count.
5601 2014-07-30 Olivier Hainque <hainque@adacore.com>
5603 * vxworks-ppc-link.spec: New file. Extra link
5604 instructions for ppc-vxworks.
5605 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
5606 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
5607 * system-vxworks-arm.ads: Likewise.
5608 * gcc-interface/Makefile.in: Enable .spec files.
5610 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5612 * sem_aggr.adb: Minor comment reformatting.
5614 2014-07-30 Robert Dewar <dewar@adacore.com>
5616 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
5617 * sem_warn.adb (Has_Junk_Name): New function
5618 (Check_References): Use Has_Junk_Name to delete junk warnings
5619 (Check_Unset_Reference): ditto.
5620 (Warn_On_Unreferenced_Entity): ditto.
5621 (Warn_On_Useless_Assignment): ditto.
5623 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5625 * checks.adb (Insert_Valid_Check): Do not check for the packed
5626 array type of a prefix that is an access type.
5628 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5630 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
5631 Unconstrained_Array even if prefix is not frozen yet, as can
5632 occur with a private subtype used as a generic actual.
5634 2014-07-30 Gary Dismukes <dismukes@adacore.com>
5636 * sem_attr.adb: Minor reformatting.
5638 2014-07-30 Pat Rogers <rogers@adacore.com>
5640 * gnat_rm.texi: Corrected minor wording error in description
5641 of No_Exception_Registration.
5643 2014-07-30 Yannick Moy <moy@adacore.com>
5645 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
5646 mode. Realphabetize two subprograms.
5647 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
5648 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
5649 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
5651 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
5652 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
5653 Is_Inline in GNATprove mode.
5654 (Analyze_Subprogram_Specification):
5655 Set Is_Inlined_Always at subprogram entity creation.
5656 * sem_res.adb (Resolve_Call): Do not deal with inlining during
5657 pre-analysis. Issue warning on call to possibly inlined
5658 subprogram when body not seen.
5660 2014-07-30 Yannick Moy <moy@adacore.com>
5662 * lib-xref.adb (Generate_Reference): Add special
5663 case for compiler-generated formals in GNATprove mode.
5665 2014-07-30 Yannick Moy <moy@adacore.com>
5667 * sem_ch6.adb: Add comments.
5669 2014-07-30 Thomas Quinot <quinot@adacore.com>
5671 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
5673 2014-07-30 Robert Dewar <dewar@adacore.com>
5675 * sem_aggr.adb, sem_res.adb: Minor reformatting.
5677 2014-07-30 Thomas Quinot <quinot@adacore.com>
5679 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5680 Bit_Order): Set Reverse_Bit_Order on the base type of the
5681 specified first subtype.
5683 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5685 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
5686 to capture the value of actuals of a limited type rather than
5687 an object declaration, to prevent spurious errors when analyzing
5690 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5692 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
5693 as an instance, and inhibit semantic checks on already analyzed
5694 code to prevent spurious errors.
5696 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5698 * a-exctra.ads ("="): New function, to restore compatibility.
5700 2014-07-30 Pascal Obry <obry@adacore.com>
5702 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
5703 routine to use the OS dst setting.
5705 2014-07-30 Pat Rogers <rogers@adacore.com>
5707 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
5709 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5711 * sem_util.adb (Wrong_Type): Disable some checks equally within
5712 instances and within inlined bodies, to suppress spurious type
5713 errors on already analyzed code.
5714 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
5715 is legal in an inlined body, juts as it is in an instance body.
5717 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5719 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
5720 body the operand of an unchecked conversion may be a literal, in
5721 which case its type is the target type of the conversion. This
5722 is in contrast to conversions in other contexts, where the
5723 operand cannot be a literal and must be resolvable independent
5726 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
5728 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
5729 mere scalar constant instead of a reference for a renaming of
5731 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
5732 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
5734 2014-07-30 Robert Dewar <dewar@adacore.com>
5736 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
5737 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
5738 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
5739 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
5740 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
5741 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
5742 & code reorganization.
5744 2014-07-30 Bob Duff <duff@adacore.com>
5746 * s-tassta.adb, sem_util.ads: Minor reformatting.
5748 2014-07-30 Yannick Moy <moy@adacore.com>
5750 * inline.adb (Build_Body_To_Inline): Detect when
5751 subprogram has multiple returns, or not a single last return
5752 statement, in GNATprove mode.
5753 (Cannot_Inline): Simplify logic to handle case of GNATprove
5756 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5758 * sem_ch6.adb: Stubs are not subject to inlining.
5760 2014-07-30 Bob Duff <duff@adacore.com>
5762 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
5763 from a procedure to a function, so that it can more easily be
5764 called before the "begin" of a task.
5765 * s-taasde.ads (Delay_Block): Make this type immutably limited,
5766 so we can use a build-in-place function call to initialize
5767 Timer_Queue in the body.
5768 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
5769 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
5770 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
5771 Make_Independent before reaching its "begin", to avoid race
5772 conditions. This causes the activating task to wait until after
5773 Make_Independent is complete before proceeding. In addition,
5774 we initialize data structures used by independent tasks before
5775 activating those tasks, to avoid possible use of uninitialized data.
5776 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
5777 Minor comment fixes.
5779 2014-07-30 Bob Duff <duff@adacore.com>
5781 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
5782 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
5783 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
5784 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
5785 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
5787 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5789 * a-tasatt.adb: Remove old comments.
5791 2014-07-30 Yannick Moy <moy@adacore.com>
5793 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
5794 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
5795 to explain rationale for inlining or not in GNATprove mode.
5796 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
5797 to False when inlining is not possible.
5798 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
5799 flag to indicate that subprogram is fully inlined. To be reversed
5800 if inlining problem is found.
5801 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
5802 call in potentially unevaluated context.
5804 2014-07-30 Jose Ruiz <ruiz@adacore.com>
5806 * s-tarest.adb, s-tarest.ads: Fix comments.
5808 2014-07-30 Robert Dewar <dewar@adacore.com>
5810 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
5811 Change No_Scalar_Parts predicate to Scalar_Part_Present and
5812 invert sense of test. This avoids the "not No_xxx" situation
5813 which is always ugly.
5815 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5817 * inline.adb (Expand_Inlined_Call): When generating code for
5818 an internal subprogram the expansion uses the location of the
5819 call, so that gdb can skip over it. In GNATprove mode we want to
5820 preserve slocs of original subprogram when expanding an inlined
5821 call, to obtain better warnings, even though subprogram appears
5822 not to come from source if it is the inlining of a subprogram
5823 body without a previous spec.
5825 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5827 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5828 types with atomic components.
5830 2014-07-30 Thomas Quinot <quinot@adacore.com>
5832 * Make-generated.in: Remove now unnecessary targets after s-oscons
5835 2014-07-30 Yannick Moy <moy@adacore.com>
5837 * sem_res.adb (Resolve_Call): Use ultimate alias
5838 of callee when available.
5840 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5842 * sem_ch6.adb (Analyze_Expression_Function): To check whether
5843 an expression function is a completion, use the specification of
5844 the previous declaration, not its entity, which may be internally
5845 generated in an inlined context.
5847 2014-07-30 Doug Rupp <rupp@adacore.com>
5849 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
5850 temp files in /cache directory unless overridden by TMPDIR.
5852 2014-07-30 Jose Ruiz <ruiz@adacore.com>
5854 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
5855 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
5856 type CPU, so it can never be greater than CPU_Range'Last.
5858 2014-07-30 Bob Duff <duff@adacore.com>
5860 * s-taskin.ads: Minor comment fix.
5862 2014-07-30 Thomas Quinot <quinot@adacore.com>
5864 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
5867 2014-07-30 Yannick Moy <moy@adacore.com>
5869 * debug.adb: Free debug flag dQ used for frontend inlining in
5871 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
5874 2014-07-30 Thomas Quinot <quinot@adacore.com>
5876 * Make-generated.in: Remove generation of s-oscons.ads, only
5877 generate the xoscons utility, in runtime-agnostic rules.
5878 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
5879 no longer supported.
5881 2014-07-30 Bob Duff <duff@adacore.com>
5883 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
5884 parameter Chain to be used in the allocator case.
5885 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
5886 has tasks, wrap the code in a block that will activate them,
5887 including the usual finalization code to kill them off in case
5888 of exception or abort.
5890 2014-07-30 Robert Dewar <dewar@adacore.com>
5892 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
5893 Remove renamings (don't work for gdb).
5894 (par): New synonym for p (avoid gdb ambiguities).
5895 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
5897 2014-07-30 Bob Duff <duff@adacore.com>
5899 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
5901 * treepr.ads, treepr.adb (ppp): Make this debugging routine
5902 accept any type covered by Union_Id.
5904 2014-07-30 Robert Dewar <dewar@adacore.com>
5906 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
5908 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
5911 2014-07-30 Robert Dewar <dewar@adacore.com>
5913 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
5914 of predicate aspect on entity other than a type.
5916 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5918 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
5919 when a subprogram body without a previous spec cannot be inlined
5920 in GNATprove mode, because it includes aspects or pragmas that
5921 generate a SPARK contract clause.
5922 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
5923 instance cannot be inlined.
5925 2014-07-30 Robert Dewar <dewar@adacore.com>
5927 * debug.adb: Document that d7 suppresses compilation time output.
5928 * errout.adb (Write_Header): Include compilation time in
5930 * exp_intr.adb (Expand_Intrinsic_Call): Add
5931 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
5932 Compilation_Date/Compilation_Time.
5933 * g-souinf.ads (Compilation_Date): New function
5934 (Compilation_Time): New function.
5935 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
5936 * gnat_rm.texi (Compilation_Date): New function
5937 (Compilation_Time): New function.
5938 * opt.ads (Compilation_Time): New variable.
5939 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
5940 * sem_intr.adb (Compilation_Date): New function.
5941 (Compilation_Time): New function.
5942 * snames.ads-tmpl (Name_Compilation_Date): New entry.
5943 (Name_Compilation_Time): New entry.
5945 2014-07-30 Yannick Moy <moy@adacore.com>
5947 * inline.adb: Add comment.
5949 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5951 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
5952 parameterless attribute, and a postondition can mention an
5953 indexed component or a slice whose prefix is an attribute
5956 2014-07-30 Robert Dewar <dewar@adacore.com>
5958 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
5959 Avoid bomb when printing package Standard.
5961 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5963 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
5964 entity is created at this point, ensure that the name of the
5965 flag is unique, because the subprogram may be overloaded and
5966 other homonyms may also have elaboration flags created on the fly.
5968 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5970 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
5971 (Analyze_Attribute): Major cleanup of attribute
5972 'Update. The logic is now split into two distinct routines
5973 depending on the type of the prefix. The use of <> is now illegal
5974 in attribute 'Update.
5975 (Analyze_Record_Component_Update): New routine.
5976 (Check_Component_Reference): Removed.
5977 (Resolve_Attribute): Remove the return statement and ??? comment
5978 following the processing for attribute 'Update. As a result,
5979 the attribute now freezes its prefix.
5981 2014-07-30 Javier Miranda <miranda@adacore.com>
5983 * exp_ch4.adb (Apply_Accessibility_Check): Do
5984 not call Base_Address() in VM targets.
5986 2014-07-30 Yannick Moy <moy@adacore.com>
5988 * gnat1drv.adb (Adjust_Global_Switches): Set
5989 Ineffective_Inline_Warnings to True in GNATprove mode.
5990 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
5992 * opt.ads (Ineffective_Inline_Warnings): Add comment that
5993 describes use in GNATprove mode.
5994 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
5995 pragma when applied to the special body created for inlining.
5997 2014-07-30 Robert Dewar <dewar@adacore.com>
5999 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
6002 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
6004 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
6005 not delayed. Update the delay status of most SPARK 2014 aspects.
6006 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
6007 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
6008 to Decorate and Insert_Pragma. Add various comments concerning
6009 the delay status of several SPARK 2014 aspects. The insertion
6010 of Refined_State now uses routine Insert_After_SPARK_Mode.
6011 (Decorate): New routine.
6012 (Decorate_Aspect_And_Pragma): Removed.
6013 (Insert_Delayed_Pragma): Removed.
6014 (Insert_Pragma): New routine.
6016 2014-07-30 Ed Schonberg <schonberg@adacore.com>
6018 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
6019 only a warning, not an error on an attempt to inline a recursive
6022 2014-07-30 Robert Dewar <dewar@adacore.com>
6024 * g-forstr.adb: Minor code reorganization (use J rather than I
6025 as a variable name).
6026 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
6027 g-forstr.ads: Minor reformatting.
6029 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
6031 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
6032 we are debugging the generated code.
6034 2014-07-30 Yannick Moy <moy@adacore.com>
6036 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
6037 returns True for source pointer for an inlined body.
6039 2014-07-30 Javier Miranda <miranda@adacore.com>
6041 * exp_ch4.adb (Apply_Accessibility_Check): Add
6042 missing calls to Base_Address().
6044 2014-07-30 Ed Schonberg <schonberg@adacore.com>
6046 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
6047 mode, subprogram bodies without a previous declaration are also
6048 candidates for front-end inlining.
6050 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
6052 * aspects.ads Aspects Async_Readers, Async_Writers,
6053 Effective_Reads and Effective_Writes do not need to be delayed.
6054 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
6055 optional Boolean expression when generating the corresponding
6056 pragma for an external property aspect.
6057 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
6058 local constant Obj. Add local constant Obj_Id. Reimplement the
6059 check which ensures that the related variable is in fact volatile.
6060 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
6061 * sem_util.adb (Is_Enabled): New routine.
6062 (Variable_Has_Enabled_Property): Reimplement the detection of
6063 an enabled external property.
6065 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
6067 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
6070 2014-07-30 Pascal Obry <obry@adacore.com>
6072 * g-forstr.adb, g-forstr.ads: New.
6073 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
6074 GNAT.Formatted_String.
6076 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
6078 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
6079 (Expand_Array_Aggregate): Also enable in-place expansion for
6080 code generated by the compiler. For an object declaration,
6081 set the kind of the object in addition to its type. If an
6082 in-place assignment is to be generated and it can be directly
6083 done by the back-end, do not expand the aggregate.
6084 * fe.h (Is_Others_Aggregate): Declare.
6085 * gcc-interface/trans.c
6086 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
6087 aggregate with a single Others choice on the RHS by means of
6088 __builtin_memset. Tidy up.
6090 2014-07-30 Ed Schonberg <schonberg@adacore.com>
6092 * gnat_rm.texi: minor reformatting.
6094 2014-07-30 Yannick Moy <moy@adacore.com>
6096 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
6099 2014-07-30 Robert Dewar <dewar@adacore.com>
6101 * gnat_rm.texi: Document additional implementation-defined use
6104 2014-07-30 Robert Dewar <dewar@adacore.com>
6106 * prj-proc.adb, prj-strt.adb: Update comments.
6108 2014-07-30 Gary Dismukes <dismukes@adacore.com>
6110 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
6112 2014-07-30 Vincent Celier <celier@adacore.com>
6114 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
6115 parameter No_Extending, defaulted to False. When No_Extending
6116 is True, do not look for an extending project.
6117 (Expression): For a variable reference that is not for the current
6118 project, get its Id calling Imported_Or_Extended_Project_From
6119 with No_Extending set to True.
6120 * prj-strt.adb (Parse_Variable_Reference): If a referenced
6121 variable is not found in the current project, check if it is
6122 defined in one of the projects it extends.
6124 2014-07-30 Robert Dewar <dewar@adacore.com>
6126 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
6127 some additional cases of internally generated routines.
6129 2014-07-30 Ed Schonberg <schonberg@adacore.com>
6131 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
6132 if the compilation unit is a subunit, extend optional processing
6133 to all subunits of the current one. This allows gnatstub to
6134 supress generation of spurious bodies.
6136 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
6138 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
6139 track of the initial element's index within the tree.
6141 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6143 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
6144 (Insert_Child): Add local variable First. Capture the index of the
6145 first node being created to ensure correct cursor construction
6146 later on. Use the three parameter version of Allocate_Node
6147 when creating multiple children as this method allows aspect
6148 Default_Value to take effect (if applicable).
6150 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
6152 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
6153 (Expand_Array_Aggregate): For a safe slice assignment, just set
6154 the target and use the common code path.
6156 2014-07-29 Robert Dewar <dewar@adacore.com>
6158 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
6159 predicate No_Predicate_Test_On_Arguments, new name is
6160 Predicate_Tests_On_Arguments (with the opposite sense).
6162 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6164 * sem_attr.adb (Resolve_Attribute): Clean up the code for
6165 attribute 'Access. Do not generate an elaboration flag for a
6166 stand alone expression function. The expression of an expression
6167 function is now frozen when the expression function appears as
6168 the prefix of attribute 'Access.
6169 * sem_ch6.adb (Analyze_Expression_Function): Remove local
6170 variable New_Decl and update all references to it after the
6171 rewriting has taken place. Establish the linkages between the
6172 generated spec and body.
6174 2014-07-29 Robert Dewar <dewar@adacore.com>
6176 * sem_prag.adb (ip, rv): Prevent from being optimized away.
6177 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
6178 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
6181 2014-07-29 Vincent Celier <celier@adacore.com>
6183 * prj-pp.adb: Minor comment update.
6184 * frontend.adb: If a target dependency info file has been read
6185 through switch -gnateT= add it to the dependencies of the source
6188 2014-07-29 Robert Dewar <dewar@adacore.com>
6190 * sem_ch3.adb, prj.adb: Minor reformatting.
6192 2014-07-29 Vincent Celier <celier@adacore.com>
6194 * prj-pp.adb (Pretty_Print.Output_Project_File): New
6195 procedure to output project file names between quotes without
6196 concatenation, even if the line is too long.
6197 (Pretty_Print): Use Output_Project_File for project being extended and
6200 2014-07-29 Vincent Celier <celier@adacore.com>
6202 * gnat_ugn.texi: Document that configuration pragmas files are
6203 added to the dependencies, unless they contain only pragmas
6204 Source_File_Name_Project.
6206 2014-07-29 Robert Dewar <dewar@adacore.com>
6208 * frontend.adb: Minor reformatting.
6210 2014-07-29 Robert Dewar <dewar@adacore.com>
6212 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
6213 (Expand_Actuals): Make sure predicate checks are properly applied
6214 for the case of OUT or IN OUT parameters.
6215 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
6216 predicate tests on arguments for Finalize
6217 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
6218 if predicate tests on subprogram arguments should be skipped.
6219 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
6221 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6223 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
6224 clause for the object and the expression is an aggregate, defer
6225 resolution and expansion of the aggregate until the freeze point
6227 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
6228 the parent node is an N_Reference generated during expansion.
6230 2014-07-29 Vincent Celier <celier@adacore.com>
6232 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
6234 2014-07-29 Robert Dewar <dewar@adacore.com>
6236 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
6237 prepcomp.ads: Minor reformatting and code clean up.
6238 * exp_ch6.adb (Expand_Actuals): Generate predicate test
6239 unconditionally for case of OUT or IN OUT actual (before this
6240 was generated only for certain subcases, which is wrong, the
6241 test is always needed).
6243 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6245 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
6246 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
6247 until context type is available.
6248 * sem_res.adb (Resolve_Allocator): In the case of a qualified
6249 expression, complete resolution of expression.
6250 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
6251 to apply Ada2012 checks on aliased formals, as well as
6252 accesibility checks when the context of the call is an allocator
6253 or a qualified expression.
6254 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
6255 Moved here from sem_ch3.
6256 (Object_Access_Level): Handle properly aliased formals and
6258 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
6259 now properly performed in sem_res (Resolve_Actuals,
6260 Check_Aliased_Parameter).
6262 2014-07-29 Yannick Moy <moy@adacore.com>
6264 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
6265 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
6266 function to decide when a subprogram can be inlined in GNATprove mode.
6267 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
6268 condition for possible inlining.
6269 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
6270 for Inline_Always in GNATprove mode.
6271 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
6272 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
6273 * sem_prag.adb Minor change in comments.
6274 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
6275 inside subprograms marked as SPARK_Mode On.
6276 * sinfo.ads: Minor typo fix.
6278 2014-07-29 Vincent Celier <celier@adacore.com>
6280 * frontend.adb: Add dependency on gnat.adc when taken into account
6281 and on non-temporary configuration pragmas files specified in
6283 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
6284 dependencies on configuration pragmas files.
6286 2014-07-29 Pat Rogers <rogers@adacore.com>
6288 * gnat_ugn.texi: Minor clarification to the explanation for the
6291 2014-07-29 Robert Dewar <dewar@adacore.com>
6293 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
6294 documentation that explains the need for this extended range
6295 (use by C_Pass_By_Copy).
6297 2014-07-29 Robert Dewar <dewar@adacore.com>
6299 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
6301 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
6303 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
6306 2014-07-29 Thomas Quinot <quinot@adacore.com>
6309 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
6310 CRTSCTS to be visible.
6312 2014-07-29 Bob Duff <duff@adacore.com>
6314 * g-trasym.adb, g-trasym.ads: Code cleanup.
6316 2014-07-29 Doug Rupp <rupp@adacore.com>
6318 * sigtramp-vxworks.c: Minor reformatting.
6320 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6322 * gnat_rm.texi: No doc needed for Ada2012 aspect
6323 Implicit_dereference.
6325 2014-07-29 Robert Dewar <dewar@adacore.com>
6327 * sem_attr.adb (Attribute_12): New array
6328 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
6329 (Check_Ada_2012_Attribute): Removed.
6331 2014-07-29 Doug Rupp <rupp@adacore.com>
6333 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
6335 * sigtramp-vxworks.c: New file.
6336 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
6338 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6340 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
6341 derived array type, add information about component type, which
6342 was previously missing in ali file.
6343 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
6345 2014-07-29 Thomas Quinot <quinot@adacore.com>
6347 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
6348 of the subtype created for a record component, do not mark
6349 the subtype as frozen. For one thing, this is anomalous (in
6350 particular, the base type might not itself be frozen yet);
6351 furthermore, proper freezing of the subtype must happen in any
6352 case. So, we just mark the subtype as requiring delayed freezing
6353 (and we'll actually freeze it when generating the init_proc of
6354 the enclosing record).
6355 Also change the name of the constrained record subtype (append a
6356 'C' so that it is clearly different from the unconstrained record
6357 type, "related_idV") to make debugging easier.
6358 (Process_Full_View): When creating a full subtype for a pending
6359 private subtype, re-establish the scope of the private subtype
6360 so that we get proper visibility on outer discriminants.
6361 * exp_ch3.adb (Build_Init_Statements): Freeze any component
6362 subtype that is not frozen yet.
6364 2014-07-29 Vincent Celier <celier@adacore.com>
6366 * prj-proc.adb (Recursive_Process): Always initialize the
6367 environment when the project is an aggregate project, even when
6368 it is not the root tree.
6369 2014-07-29 Robert Dewar <dewar@adacore.com>
6371 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
6372 * gnat_rm.texi: Complete list of implementation aspects.
6373 * aspects.ads: Minor comment clarification.
6375 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6377 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
6378 is a null-excluding access type, do not generate a constraint
6379 check if Suppress_Assignment_Checks is set on assignment node.
6380 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
6381 parameter of a null-excluding access type, there is access check
6382 on entry, so set Suppress_Assignment_Checks on generated statement
6383 that assigns actual to parameter block.
6384 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
6386 2014-07-29 Robert Dewar <dewar@adacore.com>
6388 * gnat_rm.texi: Change theta to @ in documentation of aspect
6391 2014-07-29 Robert Dewar <dewar@adacore.com>
6393 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
6395 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
6397 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
6398 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
6400 2014-07-29 Javier Miranda <miranda@adacore.com>
6402 * types.ads Update documentation on how to add new reason codes
6404 (RT_Exception_Code): Keep values ordered by their
6405 reason code. Required by the .NET backend.
6406 (RT_CE_Exceptions): Subtype declaration removed.
6407 (RT_PE_Exceptions): Subtype declaration removed.
6408 (RT_SE_Exceptions): Subtype declaration removed.
6409 (Kind): New mapping table of RT_Exception_Codes.
6410 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
6412 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
6413 mapping table. (Make_Raise_Program_Error): Updated to use the
6415 (Make_Raise_Storage_Error): Updated to use the new mapping table.
6416 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
6419 2014-07-29 Thomas Quinot <quinot@adacore.com>
6421 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
6422 distributed stubs generation.
6423 * exp_ch3.adb: Minor reformatting.
6425 2014-07-29 Yannick Moy <moy@adacore.com>
6427 * sinfo.ads: Document constraint between frontend and GNATprove.
6429 2014-07-29 Robert Dewar <dewar@adacore.com>
6431 * a-except.adb: Minor comment clarification.
6433 2014-07-29 Robert Dewar <dewar@adacore.com>
6435 * gnat_rm.texi: Complete list of implementation attributes.
6436 * snames.ads-tmpl: Clean up list of impl-defined attributes.
6438 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6440 * freeze.adb (Freeze_Record_Type): Perform various
6441 volatility-related checks.
6443 2014-07-29 Robert Dewar <dewar@adacore.com>
6445 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
6447 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6449 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
6450 the case where the attribute reference appears in a nested scope
6451 from that of the subprogram prefix.
6452 * sem_attr.adb: Minor reformatting.
6454 2014-07-29 Robert Dewar <dewar@adacore.com>
6456 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
6457 initialization options.
6459 2014-07-29 Robert Dewar <dewar@adacore.com>
6461 * sinfo.ads: Minor comment addition.
6463 2014-07-29 Bob Duff <duff@adacore.com>
6465 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
6467 2014-07-29 Doug Rupp <rupp@adacore.com>
6469 * init.c: Complete previous change.
6471 2014-07-29 Robert Dewar <dewar@adacore.com>
6473 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
6476 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6478 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
6479 and the completion will appear in the same declarative part,
6480 create elaboration flag.
6481 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
6482 is a completion of a declaration in the same declarative part,
6483 and the subprogram has had its address taken, add elaboration
6484 check inside the subprogram body, to detect elaboration errors
6485 that may occur through indirect calls.
6487 2014-07-29 Doug Rupp <rupp@adacore.com>
6489 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
6490 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
6492 2014-07-29 Vincent Celier <celier@adacore.com>
6494 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
6495 runtime directorie specified with two switches --RTS= designate
6496 the same directory, even when there are no literarily the same.
6498 2014-07-29 Robert Dewar <dewar@adacore.com>
6500 * gnat_ugn.texi: Minor documentation clarification.
6501 * switch-c.adb: Minor reformatting.
6503 2014-07-29 Robert Dewar <dewar@adacore.com>
6505 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6506 Fix incorrect RTE call which caused bomb if pragma was in
6507 configuration pragma file.
6509 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
6511 * expect.c (__gnat_expect_poll): Fix typo in previous change.
6512 * g-expect.adb: Update comments.
6514 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6516 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
6517 (Default_Attribute_Count): Bump to 16 on native platforms.
6519 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6521 * sem_res.adb: Add guard to front-end inlining for SPARK.
6523 2014-07-29 Robert Dewar <dewar@adacore.com>
6525 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
6528 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6530 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
6531 inline in GNATprove mode when subprogran is marked Inline_Always.
6532 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
6533 mode if body to inline is available.
6534 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
6535 effective in GNATprove mode.
6536 * sem_ch10.adb (Analyze_Compilation_Unit): Call
6537 Check_Package_Body_For_Inlining in GNATprove mode, so that body
6538 containing subprograms with Inline_Always can be available before
6541 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6543 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
6544 to Check_Package_Body_For_Inlining, to prevent confusion with other
6545 inlining subprograms.
6547 2014-07-29 Robert Dewar <dewar@adacore.com>
6549 * opt.ads: Minor comment update.
6550 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
6551 we want setting of Uneval_Old at time of encountering the aspect.
6552 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
6554 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
6555 New function (Set_Uneval_Old_Accept): New procedure.
6556 (Set_Uneval_Old_Warn): New procedure.
6557 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
6559 2014-07-29 Robert Dewar <dewar@adacore.com>
6561 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
6562 * snames.ads-tmpl: Minor reformatting.
6563 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
6564 to give <Error>. Not clear why this was there, but the compiler
6565 sources do not reference Name_Error, and this interfered with
6566 the circuits for pragma Unevaluated_Use_Of_Old.
6568 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6570 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
6571 types in SPARK 2014 (again).
6572 * sem_res.adb (Is_OK_Volatile_Context): New routine.
6573 (Resolve_Entity_Name): Ensure that a volatile object with
6574 enabled properties Async_Writers or Effectire_Reads appears in
6575 a non-interfering context.
6577 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6579 * sem_ch6.adb: Move Build_Body_To_Inline,
6580 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
6581 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
6582 * inline.ads, inline.adb: Package now contains subprograms that
6583 implement front-end inlining. No functional changes, no test
6586 2014-07-29 Robert Dewar <dewar@adacore.com>
6588 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
6590 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6592 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
6593 is a limited view when the context is a package body, because
6594 there is no subsequent place at which the non-limited view may
6596 (Process_Formals): Ditto.
6597 * sinfo.ads, par-ch3.adb: Minor reformatting.
6599 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
6601 * expect.c (__gnat_expect_poll): New parameter dead_process
6602 used to return the dead process among the array of file
6603 descriptors. The Windows, VMS and HPUX implementations now
6604 properly report the dead process via this parameter. Other unixes
6606 * g-expect.adb (Poll): Adapt to the C profile.
6607 (Expect_Internal): Use the new parameter to properly close the
6608 File Descriptor. This then can be properly reported by the
6609 function First_Dead_Process as is expected.
6611 2014-07-29 Robert Dewar <dewar@adacore.com>
6613 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
6615 2014-07-29 Robert Dewar <dewar@adacore.com>
6617 * einfo.adb (Derived_Type_Link): New function
6618 (Set_Derived_Type_Link): New procedure.
6619 (Write_Field31_Name): Output Derived_Type_Link.
6620 * einfo.ads: New field Derived_Type_Link.
6621 * exp_ch6.adb (Expand_Call): Warn if change of representation
6623 * sem_ch13.adb: Minor addition of ??? comment.
6624 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
6625 expensive implicit conversion.
6626 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
6628 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6630 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
6631 to DF_Id. Add new local variable DF_Call. Do not perform any
6632 elaboration-related checks on the call to the partial finalization
6633 routine within an init proc to avoid generating bogus elaboration
6634 warnings on expansion-related code.
6635 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
6636 the top level of the routine. Ensure that Output_Calls takes
6637 into account flags -gnatel and -gnatwl when emitting warnings
6639 (Check_Internal_Call_Continue): Update the call to Output_Calls.
6640 (Elab_Warning): Moved to the top level of routine Check_A_Call.
6641 (Emit): New routines.
6642 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
6643 comment on usage. Output all warnings or info messages only when the
6644 caller context demands it and the proper elaboration flag is set.
6646 2014-07-29 Yannick Moy <moy@adacore.com>
6648 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
6649 Check rule about Old appearing in potentially unevaluated
6650 expression everywhere, not only in Post.
6652 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6654 * sem_prag.adb: Update comment.
6655 * a-except.adb, a-except-2005.adb: Minor editing.
6657 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
6659 * exp_dbug.adb (Debug_Renaming_Declaration):
6660 Do not create renaming entities for renamings of non-packed
6661 objects and for exceptions.
6663 2014-07-29 Robert Dewar <dewar@adacore.com>
6665 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
6666 sem_ch6.adb, par-ch3.adb: Minor reformatting.
6668 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6670 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
6671 subtype indication in an extended return statement when the
6672 return value is an ancestor of the return type of the function,
6673 and that return type is a null record extension.
6675 2014-07-29 Thomas Quinot <quinot@adacore.com>
6677 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
6678 message produced for the case of a type-related representation
6679 item that is made illegal by 13.10(1).
6680 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
6683 2014-07-29 Robert Dewar <dewar@adacore.com>
6685 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
6686 * erroutc.adb (Output_Error_Msgs): Take wide characters into
6687 account in computing position of error flags.
6688 * sinput.adb (Get_Column_Number): Take wide characters into
6691 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6693 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
6694 in an access type definition can carry a null_exclusion indicator.
6695 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
6696 carries a null_exclusion indicator, verify that the subtype
6697 indication denotes an access type, and create a null-excluding
6699 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
6700 defined on N_Access_To_Object_Definition to indicate that the
6701 subtype indication carries a null_exclusion indicator.
6703 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6705 * exp_ch6.adb (Add_Extra_Actual): Do not construct
6706 the extra actual by name, generate a reference instead.
6708 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6710 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
6711 Allow_Integer_Address if already set.
6712 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
6713 Fix order, for consistency with Rmsg_xx declarations.
6715 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6717 * sem_ch4.adb (Complete_Object_Operation): If the type of the
6718 candidate subprogram is a limited view, use non-limited view
6721 2014-07-29 Robert Dewar <dewar@adacore.com>
6723 * sem_ch13.adb: Minor change in RM reference.
6724 * sem_mech.ads: Minor reformatting.
6725 * einfo.ads: Minor comment fix.
6726 * types.ads: Minor correction to range given for Mechanism_Type.
6727 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
6728 check predicate on way out for OUT or IN OUT parameters.
6729 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
6730 better (P_Range_Constraint): Corresponding fix.
6731 * checks.ads: Minor comment clarification.
6733 2014-07-29 Gary Dismukes <dismukes@adacore.com>
6735 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
6736 and Treat_As_Volatile flags based on whether the renamed object
6737 is a volatile object.
6739 2014-07-29 Olivier Hainque <hainque@adacore.com>
6742 (Default_Alignment): Rename as Storage_Alignment. This is not
6743 a "default" that can be overriden. Augment comment to clarify
6744 intent and document why we need to manage alignment padding.
6745 (Header_Offset): Set to Header'Object_Size instead of 'Size
6746 rounded up to Storage_Alignment. Storage_Alignment on the
6747 allocation header is not required by our internals so was
6748 overkill. 'Object_Size is enough to ensure proper alignment
6749 of the header address when substracted from a storage address
6750 aligned on Storage_Alignment.
6751 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
6752 this is always added on top of the incoming allocation requests.
6753 (Align): New function, to perform alignment rounding operations.
6754 (Allocate): Add comments on the Storage_Address computation
6755 scheme and adjust so that the alignment padding applies to that
6756 (Storage_Address) only.
6758 2014-07-29 Robert Dewar <dewar@adacore.com>
6760 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
6761 pragma Unreferenced.
6762 * cstand.adb (Create_Standard): Use E_Array_Type for standard
6763 string types. Make sure index of Any_String/Any_Array is in a list.
6764 * errout.adb: Minor reformatting.
6766 2014-07-29 Robert Dewar <dewar@adacore.com>
6768 * gnat_ugn.texi: Clean up and correct documentation of warnings.
6769 * usage.adb: Minor corrections to make sure warnings are properly
6771 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
6772 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
6774 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6776 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
6777 created to match internal sequence numbers between compilations
6778 with/without abort must have its type properly set.
6780 2014-07-29 Robert Dewar <dewar@adacore.com>
6782 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
6783 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
6784 SSO_Default_Specified.
6785 * ali.ads (ALIs_Record): Add field SSO_Default
6786 (SSO_Default_Specified): New global switch.
6787 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
6788 (Check_Configuration_Consistency): Call this procedure
6789 * einfo.adb (SSO_Set_High_By_Default): New
6790 function (SSO_Set_Low_By_Default): New function
6791 (Set_SSO_Set_High_By_Default): New procedure
6792 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
6794 * einfo.ads (SSO_Set_Low_By_Default): New flag
6795 (SSO_Set_High_By_Default): New flag
6796 * freeze.adb (Set_SSO_From_Default): New procedure
6797 (Freeze_Array_Type): Call Set_SSO_From_Default
6798 (Freeze_Record_Type): Call Set_SSO_From_Default
6799 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
6800 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
6801 * lib-writ.ads: Add OL/OH parameters to P line
6802 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
6803 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
6805 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
6806 set by default using pragma Default_Scalar_Storage_Order.
6807 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
6808 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
6809 Clear SSO defaults when explicit SSO is inherited.
6810 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
6811 explicit SSO is specified.
6812 (Inherit_Aspects_At_Freeze_Point):
6813 Clear SSO default when inheriting SSO.
6814 * sem_ch3.adb (Set_Default_SSO): New procedure
6815 (Analyze_Private_Extension_Declaration): Set defualt SSO
6816 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
6817 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
6818 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
6819 (Record_Type_Declaration): ditto
6820 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
6822 * sem_prag.adb (Analyze_Pragma, case
6823 Default_Scalar_Storage_Order): Set Default_SSO
6825 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6827 * sem_ch6.adb (Valid_Operator_Definition): Verify that
6828 all parameter have mode IN. This check must be done here for
6829 subprogram instantiations that have operator names, because their
6830 analysis does not follow the same path as that for subprogram
6833 2014-07-29 Robert Dewar <dewar@adacore.com>
6835 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
6836 to make sure that the Etype of a component of the corresponding
6837 record type is present before trying to freeze it.
6838 * sem_ch5.adb: Minor reformatting.
6840 2014-07-29 Robert Dewar <dewar@adacore.com>
6842 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
6843 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
6844 and then use it when a stream operation is used from a library generic
6845 when the restriction (No_Streams) is active.
6847 2014-07-29 Thomas Quinot <quinot@adacore.com>
6849 * projects.texi: Fix minor typo.
6851 2014-07-29 Yannick Moy <moy@adacore.com>
6853 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
6855 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6857 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
6860 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6862 * exp_ch7.adb (Find_Last_Init): Add local variable
6863 Deep_Init_Found. Check the statement immediately following the
6864 declaration if [Deep_]Initialization was not found.
6866 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6868 * exp_util.adb (Is_Aliased): It appears that
6869 'reference-d and renamed objects still play some role in Boolean
6870 expression with actions and cannot be finalized immediately.
6872 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6874 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
6875 Loop names are not part of the full qualification of entity names.
6877 2014-07-29 Robert Dewar <dewar@adacore.com>
6879 * einfo.adb (Has_Protected): Test base type.
6880 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
6881 that we always properly check No_Protected_Type_Allocators.
6883 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6885 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
6886 loop declarations as well.
6887 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
6888 to an iterator loop, because it may contain local renaming
6889 declarations that require debugging information.
6891 2014-07-29 Robert Dewar <dewar@adacore.com>
6893 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
6895 2014-07-29 Robert Dewar <dewar@adacore.com>
6897 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
6898 (Set_Static_Real_Or_String_Predicate): New procedure
6899 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
6900 string predicates (Is_Predicate_Static): Handle static string
6902 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
6903 New procedure (Check_Expression_Against_Static_Predicate):
6904 Deal with static string predicates, now fully implemented
6905 (Eval_Relational_Op): Allow string equality/inequality as static
6906 if not comes from source.
6908 2014-07-29 Robert Dewar <dewar@adacore.com>
6910 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
6911 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
6912 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
6913 handling. Change name of Discrete_Predicate to
6914 Discrete_Static_Predicate, and replace testing of the presence of this
6915 field by testing the flag Has_Static_Expression.
6917 2014-07-29 Robert Dewar <dewar@adacore.com>
6919 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
6920 * opt.adb: Handle Uneval_Old.
6921 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
6922 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
6923 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
6924 * sem_attr.adb (Uneval_Old_Msg): New procedure.
6925 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
6926 (Pop_Scope): Restore Uneval_Old.
6927 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
6929 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
6930 Add entries for Name_Warn, Name_Allow.
6932 2014-07-29 Robert Dewar <dewar@adacore.com>
6934 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
6935 to Is_OK_Static_Range.
6936 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
6937 static attributes (Eval_Attribute, case Size): Handle size of
6938 zero properly (Eval_Attribute, case Value_Size): Handle size of
6940 * sem_ch13.adb: Minor reformatting.
6941 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
6942 Is_Static_Range to Is_OK_Static_Range.
6943 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
6944 wrong in several ways (Is_Static_Range): Moved here from spec
6945 (Is_Static_Subtype): Moved here from spec Change some incorrect
6946 Is_Static_Subtype calls to Is_OK_Static_Subtype.
6947 * sem_eval.ads: Add comments to section on
6948 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
6949 Add clarifying comments (Is_Static_Range): Moved to body
6950 (Is_Statically_Unevaluated): New function.
6951 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
6952 Is_Static_Range to Is_OK_Static_Range.
6953 * sinfo.ads: Additional commments for Is_Static_Expression noting
6954 that clients should almost always use Is_OK_Static_Expression
6955 instead. Many other changes throughout front end units to obey
6957 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
6958 for enumeration literal.
6959 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
6960 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
6961 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
6962 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
6963 Replace all occurrences of Is_Static_Expression by
6964 Is_OK_Static_Expression.
6966 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6968 * exp_ch4.adb (Process_Transient_Object): Remove constant
6969 In_Cond_Expr, use its initialization expression in place.
6970 * exp_ch7.adb (Process_Declarations): There is no need to check
6971 that a transient object being hooked is controlled as it would
6972 not have been hooked in the first place.
6973 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
6974 objects are not considered aliased when the related context is
6975 a Boolean expression_with_actions.
6976 (Requires_Cleanup_Actions): There is no need to check that a transient
6977 object being hooked is controlled as it would not have been hooked in
6980 2014-07-29 Robert Dewar <dewar@adacore.com>
6982 * errout.adb: Minor reformatting.
6984 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6986 * exp_ch3.adb (Default_Initialize_Object): Add new variables
6987 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
6988 not allowed to ensure the symmetrical generation of symbols.
6989 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
6990 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
6991 temporary when aborts are not allowed to ensure symmertrical
6992 generation of symbols.
6993 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
6994 Dummy. Generate a dummy temporary when aborts are not allowed
6995 to ensure symmertrical generation of symbols.
6997 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6999 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
7000 renaming, indicate that the renamed entity itself needs debug
7001 information. This is necessary if that entity is a temporary,
7002 e.g. part of the expansion of an explicit dereference in an
7005 2014-07-29 Thomas Quinot <quinot@adacore.com>
7007 * errout.adb (Set_Error_Posted): When propagating flag to
7008 an enclosing named association, also propagate to the parent
7009 of that node, so that named and positional associations are
7010 treated consistently.
7012 2014-07-29 Ed Schonberg <schonberg@adacore.com>
7014 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
7015 Do_Range_Check properly on array component expressions that
7016 have a scalar type. In GNATprove mode, only checks on scalar
7017 components must be marked by the front-end.
7019 2014-07-29 Ed Schonberg <schonberg@adacore.com>
7021 * sem_res.adb (Resolve_Type_Conversion): If the type of the
7022 expression is a limited view, use the non-limited view when
7025 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
7027 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
7028 case statement as coming from a conditional expression.
7029 (Expand_N_If_Expression): Mark the generated if statement as
7030 coming from a conditional expression.
7031 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
7032 objects found in case statement alternatives when the case
7033 statement is actually a case expression.
7034 (Expand_N_If_Statement):
7035 Do not process controlled objects found in an if statement when
7036 the if statement is actually an if expression.
7037 * sinfo.adb (From_Conditional_Expression): New routine.
7038 (Set_From_Conditional_Expression): New routine.
7039 * sinfo.ads Add new semantic flag From_Conditional_Expression and
7040 update related nodes.
7041 (From_Conditional_Expression): New routine along with pragma Inline.
7042 (Set_From_Conditional_Expression): New routine along with pragma Inline.
7044 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
7046 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
7047 formal parameter Obj_Id and update the comment on usage. Renamed
7048 Obj_Typ to Func_Typ and update all occurrences.
7049 (Find_Last_Init): Remove formal parameter Decl and update the comment
7051 Remove local constants Obj_Id and Obj_Typ. Remove local variables
7052 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
7053 (Find_Last_Init_In_Block): Remove formal parameter
7054 Init_Typ and update the comment on usage.
7055 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
7056 on usage. Check whether the procedure call is an initialization
7057 procedure of either the object type or the initialization type.
7058 (Is_Init_Proc_Of): New routine.
7059 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
7060 routine. Add new variable Init_Typ. Add circuitry to extract the object
7061 type as well as the initialization type.
7063 2014-07-29 Robert Dewar <dewar@adacore.com>
7065 * sem_case.adb: Minor reformatting.
7066 * sem_aux.ads: Minor reformatting.
7068 2014-07-29 Ed Schonberg <schonberg@adacore.com>
7070 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
7071 pointer on these fields, even though they are semantic, because
7072 subsequent analysis and expansion of action nades may require
7073 exploring the tree, for example to locate a node to be wrapped
7074 when a function with controlled result is called.
7076 2014-07-29 Claire Dross <dross@adacore.com>
7078 * sem_aux.adb (Get_Binary_Nkind): Use case on
7079 Name_Id instead of an intermediate string.
7080 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
7083 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
7085 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
7086 about processing sources with preprocessor directives.
7088 2014-07-24 Martin Liska <mliska@suse.cz>
7090 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
7091 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
7092 (gnat_write_global_declarations): Likewise.
7094 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
7096 * gnat_rm.texi: Clean up for makeinfo 5.2.
7098 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
7100 * gnat_rm.texi (Machine Code Insertions): Clean up.
7102 2014-07-18 Robert Dewar <dewar@adacore.com>
7104 * exp_ch7.adb: Minor reformatting.
7106 2014-07-18 Claire Dross <dross@adacore.com>
7108 * sem_aux.ads (Get_Binary_Nkind): New function that returns
7109 the Node_Kind value of an entity defining a binary operator.
7110 (Get_Unary_Nkind): New function that returns the Node_Kind value
7111 of an entity defining a unary operator.
7113 2014-07-18 Pascal Obry <obry@adacore.com>
7115 * sysdep.c: comment update.
7116 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
7117 platforms where it is known to be supported.
7119 2014-07-18 Thomas Quinot <quinot@adacore.com>
7121 * sem_dist.adb (Process_Remote_AST_Declaration): Need
7122 to set Fat_Type's Ekind in order to be able to use its
7123 Corresponding_Remote_Type attribute.
7125 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7127 * einfo.adb Last_Aggregate_Assignment is now Node 30.
7128 (Last_Aggregate_Assignment): Include
7129 constants in the assertion. Update the underlying node.
7130 (Set_Last_Aggregate_Assignment): Include constants in the
7131 assertion. Update the underlying node. (Write_Field11_Name):
7132 Remove the entry for Last_Aggregate_Assignment.
7133 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
7134 * einfo.ads Update the node designation and usage of attribute
7135 Last_Aggregate_Assignment.
7136 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
7137 assignment statement used to initialize a controlled object.
7138 (Late_Expansion): Store the last assignment statement used to
7139 initialize a controlled record or an array of controlled objects.
7140 * exp_ch3.adb (Expand_N_Object_Declaration): Default
7141 initialization of objects is now performed in a separate routine.
7142 (Default_Initialize_Object): New routine.
7143 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
7144 Obj_Id. Update the comment on usage.
7145 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
7146 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
7147 (Is_Init_Call): Add formal parameter Init_Typ. Update the
7148 comment on usage. Account for the type init proc when trying
7149 to determine whether a statement is an initialization call.
7150 (Make_Adjust_Call): Rename formal parameter For_Parent to
7151 Skip_Self. Update all occurrences of For_Parent. Account for
7152 non-tagged types. Update the call to Make_Call.
7153 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
7154 comment on usage. Update all occurrences of For_Parent.
7155 (Make_Final_Call): Rename formal parameter For_Parent to
7156 Skip_Self. Update all occurrences of For_Parent. Account
7157 for non-tagged types. Update the call to Make_Call.
7158 (Process_Object_Declaration): Most variables and constants are
7159 now local to the routine.
7160 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
7161 For_Parent to Skip_Self. Update the comment on usage.
7162 (Make_Final_Call): Rename formal parameter For_Parent to
7163 Skip_Self. Update the comment on usage.
7165 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7167 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
7168 can be a procedure that is implemented by entry, and have a
7169 formal that is a synchronized interface. It does not have to
7170 be declared as a protected operation.
7172 2014-07-18 Robert Dewar <dewar@adacore.com>
7174 * gnat_rm.texi: Remove mention of obsolete attributes
7175 Max[_Interrupt]_Priority, which have never been implemented
7176 (or at the very least were removed long ago if they ever were
7177 implemented. Add documentation of Max[_Interrupt]_Priority
7178 constants in package System.
7179 * ttypes.ads: Document actual handling of package System,
7180 rather than a historical fantasy version. Remove mention of
7181 non-existent attributes Max[_Interrupt]_Priority.
7183 2014-07-18 Pascal Obry <obry@adacore.com>
7185 * a-witeio.adb (Put): No 16-bit character output when text
7186 translation is disabled.
7187 * i-cstrea.ads: Code clean up.
7189 2014-07-18 Robert Dewar <dewar@adacore.com>
7191 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
7194 2014-07-18 Arnaud Charlet <charlet@adacore.com>
7196 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
7198 2014-07-18 Pascal Obry <obry@adacore.com>
7200 * adaint.c: Do not include wchar.h on VxWorks.
7201 * mingw32.h: Remove obsolete definition.
7203 2014-07-18 Pascal Obry <obry@adacore.com>
7205 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
7206 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
7207 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
7208 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
7210 2014-07-18 Pascal Obry <obry@adacore.com>
7212 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
7213 * a-ztexio.adb: Likewise.
7214 * a-witeio.adb: Likewise.
7215 (Open): Pass file's translation mode to set_text_mode.
7216 * s-ficobl.ads (Content_Encoding): New type.
7217 (Text_Content_Encoding): New subtype.
7218 (AFCB): Rename Is_Text_File to Text_Encoding.
7219 * s-fileio.adb (Open): Handles new text_translation
7220 values. Remove Is_Text_File which is equivalent to Text_Encoding
7221 in Text_Content_Encoding.
7222 * adaint.h (__gnat_set_mode): New routine.
7223 * sysdep.c (__gnat_set_wide_text_mode): Removed.
7224 (__gnat_set_mode): New routine.
7226 2014-07-18 Arnaud Charlet <charlet@adacore.com>
7228 * gcc-interface/decl.c, gcc-interface/trans.c,
7229 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
7230 Is_Packed_Array_Impl_Type.
7232 2014-07-18 Gary Dismukes <dismukes@adacore.com>
7234 * sem_util.adb: Minor typo correction.
7236 2014-07-18 Ben Brosgol <brosgol@adacore.com>
7238 * gnat_rm.texi: Complete previous change.
7240 2014-07-18 Pascal Obry <obry@adacore.com>
7242 * s-fileio.adb: Minor style fix.
7244 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7246 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
7247 specification of stream attributes for subtypes that are not
7248 first subtypes, to prevent malformed rep_item chains in the case
7249 of such illegal specifications for discriminated private subtypes.
7250 (Check_Overloaded_Name): Verify that the name is an entity name
7251 before other checks.
7253 2014-07-18 Pascal Obry <obry@adacore.com>
7255 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
7257 2014-07-18 Robert Dewar <dewar@adacore.com>
7259 * sem_prag.adb, sem_attr.adb,
7260 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
7262 2014-07-18 Pascal Obry <obry@adacore.com>
7264 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
7265 * initialize.c (__gnat_wide_text_translation_required): Defined here.
7267 2014-07-18 Pascal Obry <obry@adacore.com>
7269 * adaint.c (__gnat_fputwc): New routine.
7270 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
7272 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7274 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
7275 (Set_Stores_Attribute_Old_Prefix): New routine.
7276 (Stores_Attribute_Old_Prefix): New routine.
7277 (Write_Entity_Flags):
7278 Output flag Stores_Attribute_Old_Prefix.
7279 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
7281 (Set_Stores_Attribute_Old_Prefix): New routine
7282 along with pragma Inline.
7283 (Stores_Attribute_Old_Prefix): New
7284 routine along with pragma Inline.
7285 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
7286 constant which captures the result of attribute 'Old's prefix.
7287 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
7288 relocated expression which acted as a prefix of attribute 'Old.
7290 2014-07-18 Bob Duff <duff@adacore.com>
7292 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
7293 null before dispatching to Deallocate_Subpool.
7294 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
7295 parameter of Default_Subpool_For_Pool to 'in out'.
7296 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
7297 a message to the raise.
7298 * sem_util.adb: Minor reformatting.
7300 2014-07-18 Robert Dewar <dewar@adacore.com>
7302 * sem_util.adb (Check_Expression_Against_Static_Predicate):
7303 Mark expression as non-static if it fails static predicate check,
7304 and issue additional warning.
7306 2014-07-18 Pascal Obry <obry@adacore.com>
7308 * a-witeio.adb (Put): Control translation based on
7309 wide_text_translation_required.
7310 * adaint.c (CurrentCCSEncoding): New variable.
7311 * initialize.c (__gnat_initialize): On Windows initialize
7312 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
7313 environment variable.
7314 * mingw32.h (CurrentCCSEncoding): New external.
7315 (__gnat_wide_text_translation_required): Likewise.
7316 * sysdep.c (wide_text_translation_required): New variable.
7317 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
7319 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7321 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
7322 variable Refined_States. Add global variable Matched_Items.
7323 (Check_Dependency_Clause): Account for dependency
7324 clauses utilizing states with visible null refinements.
7325 (Is_Null_Refined_State): New routine.
7326 (Match_Items): Record each successfully matched item of pragma Depends.
7327 (Record_Item): New routine.
7329 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7331 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7332 Do_Range_Check flag on a dynamic index expression used in a
7333 component association in the argument of Update.
7335 2014-07-18 Gary Dismukes <dismukes@adacore.com>
7337 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
7339 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7341 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
7342 of enclosing blocks, loops and the enclosing function using a
7343 parent-based traversal.
7344 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
7345 stack reclamation if the iterator loop contains a return statement
7346 that uses the stack.
7347 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
7348 patch up the scope stack as the secondary stack management now
7349 takes into account the enclosing function of the iterator loop.
7351 2014-07-18 Robert Dewar <dewar@adacore.com>
7353 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
7355 2014-07-18 Robert Dewar <dewar@adacore.com>
7357 * einfo.adb (Has_Static_Predicate): New function.
7358 (Set_Has_Static_Predicate): New procedure.
7359 * einfo.ads (Has_Static_Predicate): New flag.
7360 * sem_ch13.adb (Is_Predicate_Static): New function
7361 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
7362 (Add_Call): Minor change in Sloc of generated expression
7363 (Add_Predicates): Remove setting of Static_Pred, no longer used.
7364 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
7365 replace by use of the entity flag Has_Static_Predicate_Aspect.
7366 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
7367 and issue warning that predicate is not checked for now.
7368 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
7370 * sem_util.adb (Check_Expression_Against_Static_Predicate):
7371 Carry out check for any case where there is a static predicate,
7372 and output appropriate message.
7373 * sinfo.ads: Minor comment corrections.
7375 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7377 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
7378 from an untagged private type whose full view is tagged, the type
7379 is marked tagged for layout reasons, but it has no dispatch table,
7380 so Set_All_DT_Position must not be called.
7381 * exp_ch13.adb: If the freeze node is for a type internal to a
7382 record declaration, as is the case for a class-wide subtype
7383 of a parent component, the relevant scope is the scope of the
7386 2014-07-18 Thomas Quinot <quinot@adacore.com>
7388 * g-memdum.adb, g-memdum.ads: Code clean ups.
7390 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7392 * sem_prag.adb (Check_Dependency_Clause):
7393 Update the comment on usage. Reimplement the mechanism which
7394 attempts to match a single clause of Depends against one or
7395 more clauses of Refined_Depends.
7396 (Input_Match): Removed.
7397 (Inputs_Match): Removed.
7398 (Is_Self_Referential): Removed.
7399 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
7400 (Normalize_Outputs): Rename variable Split to New_Claue and update
7401 all its occurrences.
7402 (Report_Extra_Clauses): Update the comment on usage.
7403 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
7405 2014-07-18 Gary Dismukes <dismukes@adacore.com>
7407 * i-cstrea.ads: Minor reformatting.
7409 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7411 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
7412 secondary stack-related flags to the generated block.
7413 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
7414 once the loop is relocated in a block.
7416 2014-07-18 Robert Dewar <dewar@adacore.com>
7418 * repinfo.ads: Add documentation on handling of back annotation
7421 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7423 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
7424 of full type declaration, denotes previous declaration for
7425 incomplete view of the type.
7426 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
7427 of declaration if one is present.
7428 (Replace_Type): When constructing the signature of an inherited
7429 operation, handle properly the case where the operation has a
7430 formal whose type is an incomplete view.
7431 * sem_util.adb (Collect_Primitive_Operations): Handle properly
7432 the case of an operation declared after an incomplete declaration
7433 for a type T and before the full declaration of T.
7435 2014-07-18 Pascal Obry <obry@adacore.com>
7437 * i-cstrea.ads: Add documentation for set_wide_text_mode.
7439 2014-07-18 Robert Dewar <dewar@adacore.com>
7441 * a-witeio.adb: Minor code reorganization.
7442 * i-cstrea.ads: Add comment.
7444 2014-07-18 Thomas Quinot <quinot@adacore.com>
7446 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
7449 2014-07-18 Robert Dewar <dewar@adacore.com>
7451 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
7453 2014-07-18 Pascal Obry <obry@adacore.com>
7455 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
7456 * a-witeio.adb (Put): On platforms where there is translation
7457 done by the OS output the raw text.
7458 (New_Line): Use Put above to properly handle the LM wide characters.
7460 2014-07-18 Thomas Quinot <quinot@adacore.com>
7462 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
7463 to Absolute_Address.
7465 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
7467 * opt.ads (Suppress_Back_Annotation): Remove as unused.
7468 * fe.h (Back_Annotate_Rep_Info): Likewise.
7469 (Global_Discard_Names): Likewise.
7471 2014-07-18 Robert Dewar <dewar@adacore.com>
7473 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
7476 2014-07-18 Vincent Celier <celier@adacore.com>
7478 * s-osinte-vms.ads: Fix style errors.
7480 2014-07-18 Thomas Quinot <quinot@adacore.com>
7482 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
7483 NAME_MAX and PATH_MAX.
7485 2014-07-18 Bob Duff <duff@adacore.com>
7487 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
7488 Build_Record_Or_Elementary_Output_Procedure): For Input and
7489 Output attributes, do not read/write the discriminants if they
7490 have default values; that will be done by Read/Write.
7492 2014-07-18 Robert Dewar <dewar@adacore.com>
7494 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
7495 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
7496 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
7497 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
7498 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
7500 2014-07-18 Robert Dewar <dewar@adacore.com>
7502 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
7504 2014-07-18 Vincent Celier <celier@adacore.com>
7506 * lib-writ.ads: Update documentation about the D lines.
7508 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7510 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
7511 as a parameter, rather than its Chars field, in order to locate
7512 freeze node of type. If the predicate or invariant has references
7513 to types other than the one to which the contract applies, these
7514 types must be frozen, and the corresponding predicate functions
7515 created, before that freeze node.
7517 2014-07-18 Robert Dewar <dewar@adacore.com>
7519 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
7520 * par_sco.adb: Minor reformatting.
7522 2014-07-18 Gary Dismukes <dismukes@adacore.com>
7524 * exp_ch4.adb (Real_Range_Check): Turn off
7525 the Do_Range_Check flag on the conversion's current Expression
7526 argument rather than on the originally captured Operand node,
7527 as Expression may reflect a rewriting (as in conversions to a
7530 2014-07-18 Vincent Celier <celier@adacore.com>
7532 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
7534 * ali.ads (Sdep_Record): New component Unit_Name.
7535 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
7536 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
7537 dependent unit is in a project and the source file name is not
7540 2014-07-18 Bob Duff <duff@adacore.com>
7542 * s-addima.ads: Minor: add comment.
7544 2014-07-18 Thomas Quinot <quinot@adacore.com>
7546 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
7547 of nesting rules for composites with different SSOs.
7549 2014-07-18 Thomas Quinot <quinot@adacore.com>
7551 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
7552 a proper logical operator.
7553 (Has_Decision): An If_Expression indicates the presence of a decision
7554 although it is not a logical operator.
7556 2014-07-18 Robert Dewar <dewar@adacore.com>
7558 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
7559 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
7561 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
7563 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
7564 on the null statement.
7566 2014-07-18 Thomas Quinot <quinot@adacore.com>
7568 * adaint.c: Minor comment rewording.
7569 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
7570 use of errno in this file is thread safe.
7572 2014-07-18 Arnaud Charlet <charlet@adacore.com>
7574 * gnat_ugn.texi: Doc clarification.
7575 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
7576 * sem_ch13.ads: Minor comment update.
7578 2014-07-18 Robert Dewar <dewar@adacore.com>
7580 * repinfo.ads: Minor comment fix.
7582 2014-07-18 Robert Dewar <dewar@adacore.com>
7584 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
7585 * sem_prag.adb: Add dummy implementation of
7586 Default_Scalar_Storage_Order.
7587 * snames.ads-tmpl: Add dummy entry for
7588 Default_Scalar_Storage_Order pragma.
7590 2014-07-18 Robert Dewar <dewar@adacore.com>
7592 * opt.adb (Tree_Read): Read Address_Is_Private,
7593 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
7594 (Tree_Write): Corresponding writes
7595 * opt.ads: Minor comment reformatting and fixes.
7596 * tree_io.ads: Increment ASIS_Version_Number.
7598 2014-07-18 Robert Dewar <dewar@adacore.com>
7600 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
7601 * types.h: Fix typo.
7603 2014-07-18 Robert Dewar <dewar@adacore.com>
7605 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
7607 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
7609 * sem_ch13.adb (Kill_Rep_Clause): New procedure
7610 (Analyze_Attribute_Definition_Clause): Use
7611 Kill_Rep_Clause. This is just a cleanup, no functional effect.
7612 (Analyze_Enumeration_Representation_Clause):
7613 Use Kill_Rep_Clause. This means that enum rep
7614 clauses are now properly removed from -gnatct trees.
7615 (Analyze_Record_Representation_Clause): Same change.
7616 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
7618 2014-07-18 Pascal Obry <obry@adacore.com>
7620 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
7621 OS_Time from time parts.
7622 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
7624 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7626 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
7627 indexing over containers that are derived types: check whether
7628 signature of found operation has the correct first parameter
7629 before retrieving directly a primitive operation.
7631 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7633 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7634 Do_Range_Check flag on dynamic bounds of a range used in a
7635 component association in the argument of Update.
7637 2014-07-18 Thomas Quinot <quinot@adacore.com>
7639 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
7640 accesses to errno(3) to be thread safe.
7642 2014-07-18 Vincent Celier <celier@adacore.com>
7644 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
7645 limited imported project that is an extending project, return
7646 a project being extended if it has the expected name.
7648 2014-07-18 Pascal Obry <obry@adacore.com>
7650 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
7651 routine to set the last modification time stamp for the given file.
7652 * gnatchop.adb (File_Time_Stamp): Removed.
7654 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
7656 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7658 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
7659 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
7660 Moved here, so it can be shared with the resolution of 'Update,
7661 whose argument shares some features with aggregates.
7662 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
7663 Aggregate_Constraint_Checks with the expression of each
7664 association, so that the Do_Range_Check flag is set when needed.
7666 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7668 * sem_ch4.adb (Try_Container_Indexing): If the container
7669 type is a derived type, the value of the inherited aspect is
7670 the Reference operation declared for the parent type. However,
7671 Reference is also a primitive operation of the new type, and
7672 the inherited operation has a different signature. We retrieve
7673 the right one from the list of primitive operations of the
7676 2014-07-18 Vincent Celier <celier@adacore.com>
7678 * debug.adb: Update comment.
7680 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7682 * exp_util.adb (Needs_Finalization): There is no reason why a
7683 C type should not benefit from finalization actions.
7685 2014-07-18 Thomas Quinot <quinot@adacore.com>
7687 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
7688 (FILENAME_MAX): Remove unneeded definition.
7690 2014-07-18 Robert Dewar <dewar@adacore.com>
7692 * exp_attr.adb, debug.adb: Update comments.
7694 2014-07-18 Vincent Celier <celier@adacore.com>
7696 * par-ch4.adb (Simple_Expression): Add missing style check
7697 for binary adding operators.
7698 (Term): Add missing style check for multiplying operators.
7700 2014-07-18 Robert Dewar <dewar@adacore.com>
7702 * impunit.adb: Minor comment correction.
7703 * widechar.adb, s-wchcon.ads: Minor comment corrections.
7705 2014-07-18 Robert Dewar <dewar@adacore.com>
7707 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
7708 for Build_Static_Predicate (Build_Predicate_Functions):
7709 Don't try to build discrete predicate for real type.
7710 (Build_Predicate_Functions): Report attempt to use
7711 Static_Predicate function on real type as unimplemented.
7712 * sem_util.adb (Check_Expression_Against_Static_Predicate):
7713 Add guard to prevent blow up on predicate for real type.
7715 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7717 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
7718 properly static predicate on enumeration types and modular types
7721 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
7723 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
7724 the corresponding source file index.
7725 * get_scos.ads (Get_SCOs): Add a default value for it.
7726 * par_sco.adb (SCO_Record): Fill the corresponding value.
7729 2014-07-18 Vincent Celier <celier@adacore.com>
7731 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
7732 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
7734 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
7736 2014-07-18 Thomas Quinot <quinot@adacore.com>
7738 * g-sercom.ads (Set): document possible data loss.
7740 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7742 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
7743 Output, Read, Write): If the restriction No_Streams is active,
7744 replace each occurrence of a stream attribute by an explicit
7747 2014-07-18 Robert Dewar <dewar@adacore.com>
7749 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
7752 2014-07-18 Robert Dewar <dewar@adacore.com>
7754 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
7756 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
7757 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
7758 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
7759 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
7761 2014-07-18 Robert Dewar <dewar@adacore.com>
7763 * bcheck.adb (Check_Consistent_Restrictions):
7764 Remove obsolete code checking for violation of
7765 No_Standard_Allocators_After_Elaboration (main program)
7766 * bindgen.adb (Gen_Adainit): Handle
7767 No_Standard_Allocators_After_Elaboration
7768 (Gen_Output_File_Ada): ditto.
7769 * exp_ch4.adb (Expand_N_Allocator): Handle
7770 No_Standard_Allocators_After_Elaboration.
7771 * Makefile.rtl: Add entry for s-elaall
7772 * rtsfind.ads: Add entry for Check_Standard_Allocator.
7773 * s-elaall.ads, s-elaall.adb: New files.
7774 * sem_ch4.adb (Analyze_Allocator): Handle
7775 No_Standard_Allocators_After_Elaboration.
7777 2014-07-18 Robert Dewar <dewar@adacore.com>
7779 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
7780 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
7781 Remove AB parameter from ali files and all uses.
7782 Remove Allocator_In_Body and all uses.
7784 2014-07-18 Robert Dewar <dewar@adacore.com>
7786 * g-expect-vms.adb: Add comment.
7788 2014-07-18 Thomas Quinot <quinot@adacore.com>
7790 * par_sco.adb (Is_Logical_Operation): return True for
7793 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7795 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
7796 analysis and resolution of each choice in the associations within
7797 the argument of Update, because they may be variable names.
7799 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7801 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
7802 actions before the generated if statement.
7804 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7806 * gnat_ugn.texi Enhance the documentation of
7807 switches -gnateA and -gnateV.
7809 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7811 * sem_util.adb (Build_Default_Subtype): Add missing condition
7812 so that code matches description: use the full view of the base
7813 only if the base is private and the subtype is not.
7815 2014-07-17 Gary Dismukes <dismukes@adacore.com>
7817 * exp_disp.adb: Minor reformatting.
7818 * exp_disp.adb: Minor code reorganization.
7820 2014-07-17 Thomas Quinot <quinot@adacore.com>
7822 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
7823 require an explicit SSO attribute definition clause on a composite type
7824 just because one of its components has one.
7826 2014-07-17 Robert Dewar <dewar@adacore.com>
7828 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
7829 attribute out of existence if the enclosing pragma is ignored.
7830 * sem_util.adb: Minor reformatting.
7832 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7834 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
7835 array aggregate expanded into assignments when it appears as a
7836 local declaration in an inlined body.
7838 2014-07-17 Doug Rupp <rupp@adacore.com>
7840 * init.c [__ANDROID__]: Modify for ZCX.
7841 * exp_aggr.adb: Minor reformatting
7842 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
7844 2014-07-17 Robert Dewar <dewar@adacore.com>
7846 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
7847 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
7848 scng.adb: Remove incorrect usage "allow to" and "allows to".
7850 2014-07-17 Robert Dewar <dewar@adacore.com>
7852 * exp_dist.adb: Minor reformatting.
7854 2014-07-17 Bob Duff <duff@adacore.com>
7856 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
7858 2014-07-17 Robert Dewar <dewar@adacore.com>
7860 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
7861 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
7863 2014-07-17 Thomas Quinot <quinot@adacore.com>
7865 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
7866 non-bit-packed array, propagate Reverse_Storage_Order to the
7869 2014-07-17 Javier Miranda <miranda@adacore.com>
7871 * exp_disp.adb: Fix comment.
7872 * exp_pakd.adb: Minor reformatting.
7874 2014-07-17 Robert Dewar <dewar@adacore.com>
7876 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
7877 entity if none exists (Gen_Elab_Calls): Complain if clash with
7878 No_Multiple_Elaboration.
7879 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
7880 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
7882 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
7883 * sem_ch4.adb: Minor comment updates.
7885 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7887 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
7888 of function call for later use when shared passive objects
7891 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7893 * par-ch13.adb (Get_Aspect_Specifications):
7894 Catch a case where the argument of SPARK aspect Refined_State
7895 is not properly parenthesized.
7897 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7899 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
7900 the lifetime of a reference to an Ada 2012 container element.
7901 (Is_Element_Reference): New routine.
7903 2014-07-17 Robert Dewar <dewar@adacore.com>
7905 * ali.ads: Minor comment fix.
7906 * lib-writ.adb: Minor reformatting.
7908 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7910 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
7911 in ASIS mode, load another subunit only if it a subunit of the
7912 current one, not a sibling that has been reached through the
7913 analysis of an ancestor. This allows the construction of the
7914 ASIS tree for the subunit even when sibling subunits have errors.
7916 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7918 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
7919 prevents the analysis of various contracts when the associated
7920 construct is erroneous.
7921 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
7922 SPARK_Pragma of an illegal or a partially decorated construct.
7924 2014-07-17 Robert Dewar <dewar@adacore.com>
7926 * s-imguns.ads: Minor reformatting.
7928 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7930 * exp_ch7.adb (Build_Finalization_Master): Move all local
7931 variables to the proper code section. When looking for an existing
7932 finalization master, inspect the ultimate ancestor type of the
7934 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
7936 2014-07-17 Robert Dewar <dewar@adacore.com>
7938 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
7939 * gnat_rm.texi: Document Entity argument for pragma Annotate and
7941 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
7942 for Annotate aspect.
7943 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
7944 Entity argument at end.
7945 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
7947 2014-07-17 Tristan Gingold <gingold@adacore.com>
7949 * s-imguns.ads: Fix minor typo.
7951 2014-07-17 Thomas Quinot <quinot@adacore.com>
7953 * sprint.adb: Minor reformatting.
7955 2014-07-17 Robert Dewar <dewar@adacore.com>
7957 * sprint.adb (Write_Itype): Print proper header for string
7960 2014-07-17 Steve Baird <baird@adacore.com>
7962 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
7964 2014-07-17 Vincent Celier <celier@adacore.com>
7966 * gnatbind.adb: Change in message "try ... for more information".
7968 2014-07-17 Robert Dewar <dewar@adacore.com>
7970 * sprint.adb: Code clean up.
7972 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7974 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
7975 the relevant code section. Add new local constant Obj_Id. When
7976 a limited controlled object is initialized by a function call,
7977 the build-in-place object access function call acts as the last
7978 initialization statement.
7979 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
7980 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
7981 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
7983 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7985 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
7986 propagate intrinsic flag to renamed entity, to allow e.g. renaming
7987 of Unchecked_Conversion.
7988 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
7989 if the declaration has errors.
7991 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7993 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
7994 container is busy before checking whether capacity allows for
7995 a further insertion. Insertion in a busy container that is full
7996 raises Program_Error rather than Capacity_Error. Previous to that
7997 patch which exception was raised varied among container types.
7999 2014-07-17 Robert Dewar <dewar@adacore.com>
8001 * g-comlin.ads, g-comlin.adb: Minor clean up.
8003 2014-07-17 Bob Duff <duff@adacore.com>
8005 * gnat_ugn.texi: Update gnatpp doc.
8007 2014-07-17 Robert Dewar <dewar@adacore.com>
8009 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
8010 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
8011 could do this by actually expanding a real generic.
8012 * a-tags.ads: Add comments about performance.
8013 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
8014 Print Etype of defining identifier, rather than the object
8015 definition. More information.
8017 2014-07-17 Thomas Quinot <quinot@adacore.com>
8019 * exp_dist.adb: Minor documentation clarification.
8021 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
8023 * exp_util.adb (Is_Aliased): Revert previous change.
8025 2014-07-17 Vincent Celier <celier@adacore.com>
8027 * g-comlin.adb (Try_Help): New procedure.
8028 (Getopt): Use new procedure Try_Help.
8029 * g-comlin.ads (Try_Help): New procedure.
8031 2014-07-17 Bob Duff <duff@adacore.com>
8033 * gnat_ugn.texi: Minor update.
8035 2014-07-17 Robert Dewar <dewar@adacore.com>
8037 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
8038 * sinfo.ads: Document restriction on aggregates (must expand to
8039 assignments if one or more assignments needs expansion, e.g. for
8041 * sem_ch13.adb: All warning messages regarding bit order should
8043 * gnat_ugn.texi: Minor correction of missing @ on @code
8045 2014-07-17 Robert Dewar <dewar@adacore.com>
8047 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
8048 * s-rident.ads (Partition_Boolean_Restrictions): Add
8049 No_Long_Long_Integer.
8050 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
8051 Long_Integer'Size if restriction No_Long_Long_Integer is active.
8052 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
8053 as the implicit base type for a signed integer type declaration
8054 if restriction No_Long_Long_Integer is active.
8055 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
8056 No_Long_Long_Integer.
8058 2014-07-17 Robert Dewar <dewar@adacore.com>
8060 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
8061 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
8062 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
8063 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
8064 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
8066 2014-07-17 Robert Dewar <dewar@adacore.com>
8068 * debug.adb: Remove -gnatdQ.
8069 * exp_disp.adb: Remove -gnatdQ.
8070 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
8071 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
8072 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
8073 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
8074 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
8075 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
8077 2014-07-17 Robert Dewar <dewar@adacore.com>
8079 * back_end.adb: Minor reformatting and comment additions.
8080 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
8082 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
8083 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
8084 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
8085 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
8086 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
8087 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
8089 2014-07-17 Robert Dewar <dewar@adacore.com>
8091 * gnat_rm.texi: Minor comment updates.
8093 2014-07-17 Ed Schonberg <schonberg@adacore.com>
8095 * sem_util.adb (Make_Explicit_Dereference): If the expression
8096 being dereferenced is a generalized indexing, reset the overloaded
8097 flag on the generalized indexing call, consistent with the
8098 resetting of the flag on the original indexed component.
8100 2014-07-17 Robert Dewar <dewar@adacore.com>
8102 * gnat_ugn.texi: Document advise not to mix -gnatV? and
8105 2014-07-17 Robert Dewar <dewar@adacore.com>
8107 * checks.adb (Insert_Valid_Check): Don't insist on a name
8108 for the prefix when we make calls to Force_Evaluation and
8109 Duplicate_Subexpr_No_Checks.
8110 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
8111 (Remove_Side_Effects): Handle all volatile references right
8112 (Side_Effect_Free): Volatile reference is never side effect free
8113 * sinfo.ads (N_Attribute_Reference): Add comments explaining
8114 that in the tree, the prefix can be a general expression.
8116 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
8118 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8119 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
8120 * sem_ch7.adb (Analyze_Package_Body_Contract,
8121 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
8123 2014-07-17 Robert Dewar <dewar@adacore.com>
8125 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
8126 Store_After_Actions_In_Scope.
8128 2014-07-17 Robert Dewar <dewar@adacore.com>
8130 * sem_aux.ads: Minor comment addition.
8132 2014-07-17 Ed Schonberg <schonberg@adacore.com>
8134 * sem_res.adb (Make_Call_Into_Operator): If the call is already
8135 a rewriting of an operator node, there are no actuals to be
8136 propagated from original node to rewritten node when in ASIS mode.
8138 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
8140 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
8141 Analyze_Subprogram_Contract): Add new local variable Mode. Save
8142 and restore the SPARK mode of the related construct in a
8144 * sem_ch7.adb (Analyze_Package_Body_Contract,
8145 Analyze_Package_Contract): Add new local variable Mode. Save and
8146 restore the SPARK mode of the related construct in a stack-like fashion.
8147 * sem_util.adb Remove with and use clause for Opt.
8148 (Restore_SPARK_Mode): New routine.
8149 (Save_SPARK_Mode_And_Set): New routine.
8150 * sem_util.ads Add with and use clause for Opt.
8151 (Restore_SPARK_Mode): New routine.
8152 (Save_SPARK_Mode_And_Set): New routine.
8154 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
8156 * exp_util.adb (Is_Aliased): Transient objects
8157 within an expression with actions cannot be considered aliased.
8159 2014-07-17 Thomas Quinot <quinot@adacore.com>
8161 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
8162 introduce a new list (cleanup actions) for each (transient) scope.
8163 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
8165 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
8166 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
8167 processing for Store_xxx_Actions_In_Scope.
8168 (Build_Cleanup_Statements): Allow for a list of additional
8169 cleanup statements to be passed by the caller.
8170 (Expand_Cleanup_Actions): Take custom cleanup actions associated
8171 with an N_Block_Statement into account.
8172 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
8173 reorganization (refactoring only, no behaviour change).
8174 (Make_Transient_Block): Add assertion to ensure that the current
8175 scope is indeed a block (namely, the entity for the transient
8176 block being constructed syntactically, which has already been
8177 established as a scope). If cleanup actions are present in the
8178 transient scope, transfer them now to the transient block.
8179 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
8180 called function while it is still present as the name in a call
8181 in the tree. This may not be the case later on if the call is
8182 rewritten into a transient block.
8183 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
8184 inserted after calling a protected operation on a shared passive
8185 protected must be performed in a block finalizer, not just
8186 inserted in the tree, so that they are executed even in case of
8187 a normal (RETURN) or abnormal (exception) transfer of control
8188 outside of the current scope.
8189 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
8190 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
8191 Scope_Stack_Entry reorganization.
8193 2014-07-17 Thomas Quinot <quinot@adacore.com>
8195 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
8196 call for types that do not have an explicit attribute definition
8197 clause for External_Tag, as their default tag may clash with an
8198 explicit tag defined for some other type.
8200 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
8202 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
8203 controlled function call with multiple actual parameters that
8204 appears in Object.Operation form.
8206 2014-07-17 Thomas Quinot <quinot@adacore.com>
8208 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
8210 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8211 External_Tag): No need to set entity flag.
8212 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
8213 Reimplement correctly in terms of Has_Rep_Item.
8215 2014-07-17 Thomas Quinot <quinot@adacore.com>
8217 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
8218 Start examining the tree at the node passed to
8219 Establish_Transient_Scope (not its parent).
8220 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8221 The access type for the variable storing the reference to
8222 the call must be declared and frozen prior to establishing a
8224 * exp_ch9.adb: Minor reformatting.
8226 2014-07-17 Pascal Obry <obry@adacore.com>
8228 * s-os_lib.ads: Minor comment update.
8230 2014-07-17 Tristan Gingold <gingold@adacore.com>
8232 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
8234 * socket.c: Remove #warning to avoid warning.
8235 * expect.c: Indent some preprocessor directives to clarify
8236 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
8238 * env.c: Fix indentation. Port to PikeOS.
8239 * gsocket.h: Port to PikeOS. Remove #warning.
8240 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
8241 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
8242 of stubbed __gnat_setup_parent_communication.
8243 * adaint.c: Port to PikeOS. Reindent some preprocessor
8244 directives to clarify nested if. Fix indentation. Add missing
8247 2014-07-17 Robert Dewar <dewar@adacore.com>
8249 * sem_attr.adb: Minor reformatting.
8251 2014-07-17 Robert Dewar <dewar@adacore.com>
8253 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
8255 2014-07-17 Ed Schonberg <schonberg@adacore.com>
8257 * sem_case.adb (Check_Choice_Set): If the case expression is the
8258 expression in a predicate, do not recheck coverage against itself,
8259 to prevent spurious errors.
8260 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
8261 expression comes from an aspect specification, to prevent spurious
8262 errors when expression is a case expression in a predicate.
8264 2014-07-17 Pascal Obry <obry@adacore.com>
8266 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
8267 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
8269 2014-07-17 Vincent Celier <celier@adacore.com>
8271 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
8272 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
8273 the usage for an erroneous invocation of a gnat tool.
8275 2014-07-16 Vincent Celier <celier@adacore.com>
8277 * gnatls.adb: Get the target parameters only if -nostdinc was
8280 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8282 * checks.adb (Insert_Valid_Check): If the expression is a packed
8283 component of a modular type of the right size the data is always
8284 valid. This os particularly useful if the component is part of
8285 a volatile variable.
8287 2014-07-16 Robert Dewar <dewar@adacore.com>
8289 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
8291 2014-07-16 Thomas Quinot <quinot@adacore.com>
8293 * exp_ch7.ads: Minor documentation fix.
8295 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8297 * sem_ch3.adb (Find_Type_Name): Diagnose properly
8298 a private extension completion that is an interface definition
8299 with an interface list.
8301 2014-07-16 Arnaud Charlet <charlet@adacore.com>
8303 * gnatls.adb (Gnatls): Code clean ups.
8305 2014-07-16 Thomas Quinot <quinot@adacore.com>
8307 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
8308 * sem.adb (Analyze): Handle N_Compound_Statement.
8309 * sprint.adb (Sprint_Node_Actual): Ditto.
8310 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
8311 procedure to handle N_Compound_Statement.
8312 * exp_aggr.adb (Collect_Initialization_Statements):
8313 Use a proper compound statement node, instead of a bogus
8314 expression-with-actions with a NULL statement as its expression,
8315 to wrap collected initialization statements.
8316 * freeze.ads, freeze.adb
8317 (Explode_Initialization_Compound_Statement): New public procedure,
8318 lifted from Freeze_Entity.
8319 (Freeze_Entity): When freezing
8320 an object with captured initialization statements and without
8321 delayed freezing, explode compount statement.
8322 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
8323 case that used to handle bogus EWAs with NULL statement as
8325 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
8326 delayed freezing and captured initialization statements, explode
8329 2014-07-16 Gary Dismukes <dismukes@adacore.com>
8331 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
8333 2014-07-16 Doug Rupp <rupp@adacore.com>
8335 * s-interr-hwint.adb: Casing error on parameter.
8337 2014-07-16 Pascal Obry <obry@adacore.com>
8339 * Makefile.rtl: Add g-rewdat.o dependencies in
8340 GNATRTL_NONTASKING_OBJS.
8342 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8344 * sem_case.adb: Code clean up.
8346 2014-07-16 Vincent Celier <celier@adacore.com>
8348 * make.adb: Do not read gnat.adc when gnatmake is invoked
8351 2014-07-16 Pascal Obry <obry@adacore.com>
8353 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
8354 implementation of GNAT.Rewrite_Data.
8356 2014-07-16 Vincent Celier <celier@adacore.com>
8358 * gnatls.adb (Normalize): New function.
8359 (Gnatls): Get the target parameters. On targets other than VMS,
8360 normalize the path names in the source search path, the object search
8361 path and the project search path.
8363 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8365 * sem_case.adb: Avoid self-checking of case expressions in
8368 2014-07-16 Robert Dewar <dewar@adacore.com>
8370 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
8373 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
8375 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
8377 2014-07-16 Ben Brosgol <brosgol@adacore.com>
8379 * gnat_ugn.texi: Fix typo.
8381 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8383 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
8384 expression if it is the specification of a subtype predicate:
8385 it will be expanded when the return statement is analyzed, or
8386 when a static predicate is transformed into a static expression
8387 for evaluation by the front-end.
8388 * sem_ch13.adb (Get_RList): If the expression for a static
8389 predicate is a case expression, extract the alternatives of the
8390 branches with a True value to create the required statically
8391 evaluable expression.
8393 2014-07-16 Thomas Quinot <quinot@adacore.com>
8395 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
8396 expression, not the location of the aspect, for all generated
8397 code, so that in particular the call to raise_assert_failure
8398 gets the sloc of the associated condition.
8400 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
8401 Set an explicit End_Label on the handled sequence of statements
8402 for the _Postconditions procedure so that the implicit return
8403 statement does not erroneously get associated with code generated
8404 for the last condition in postconditions.
8406 2014-07-16 Thomas Quinot <quinot@adacore.com>
8408 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
8409 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
8410 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
8413 2014-07-16 Robert Dewar <dewar@adacore.com>
8415 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
8416 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
8417 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
8419 * par-ch4.adb (At_Start_Of_Attribute): New function
8420 (P_Simple_Expression): Better msg for bad attribute prefix.
8421 * scans.ads: Minor reformatting.
8423 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8425 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
8426 static constant, check that in belongs to the corresponding index
8427 subtype, to produce the proer warning when expansion is disabled.
8429 2014-07-16 Robert Dewar <dewar@adacore.com>
8431 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
8432 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
8433 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
8434 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
8435 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
8437 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
8438 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
8441 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
8443 * exp_ch7.adb (Process_Declarations): Reinstate the check on
8444 a hook object to ensure that the related transient declaration
8446 * exp_util.adb (Is_Aliased): Do not consider expresison with
8447 actions as a special context.
8448 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
8449 ensure that the related transient declaration is finalizable.
8451 2014-07-16 Robert Dewar <dewar@adacore.com>
8453 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
8454 * snames.ads-tmpl: Add Allocation_Check to list of check names.
8455 * types.ads: Add Allocation_Check to list of check names.
8457 2014-07-16 Thomas Quinot <quinot@adacore.com>
8459 * sem_util.adb (Enter_Name): replace bogus test for presence of
8460 Corresponding_Remote_Type with correct test on Ekind.
8461 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
8462 of calls to Corresponding_ Remote_Type (documentation fix).
8464 2014-07-16 Robert Dewar <dewar@adacore.com>
8466 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
8467 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
8469 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
8470 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
8472 2014-07-16 Robert Dewar <dewar@adacore.com>
8474 * gnat_ugn.texi: Document binder switch -Ra.
8475 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
8477 * opt.ads (List_Closure_All): New switch.
8478 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
8481 2014-07-16 Ben Brosgol <brosgol@adacore.com>
8483 * gnat_rm.texi: Minor edits, to make case consistent in names
8484 of types and fields.
8486 2014-07-16 Robert Dewar <dewar@adacore.com>
8488 * gnat_rm.texi: Document erroneous mixing of thin pointers and
8490 * gnat_ugn.texi: Add note on size of access types about thin
8491 pointers and the use of attribute Unrestricted_Access.
8493 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8495 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
8496 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
8497 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
8498 machinery to detect tampering on bounded vectors.
8500 2014-07-16 Robert Dewar <dewar@adacore.com>
8502 * gnat_rm.texi: Document that leading/trailing asterisks are
8503 now implied for the pattern match string for pragma Warnings
8504 and Warning_As_Error.
8505 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
8506 (Analyze_Pragma, case Warning_As_Error): Call
8507 Acquire_Warning_Match_String.
8508 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
8510 2014-07-16 Bob Duff <duff@adacore.com>
8512 * gnat_ugn.texi: Document need for project file
8513 for --incremental switch for gnat2xml.
8515 2014-07-16 Robert Dewar <dewar@adacore.com>
8517 * gnat_rm.texi: Fix example of non-packable components in packed
8520 2014-07-16 Robert Dewar <dewar@adacore.com>
8522 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
8523 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
8524 upper case in exception messages.
8526 2014-07-16 Robert Dewar <dewar@adacore.com>
8528 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
8529 is renamed Has_Same_Storage.
8530 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
8531 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
8534 2014-07-16 Robert Dewar <dewar@adacore.com>
8536 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
8537 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
8539 2014-07-16 Robert Dewar <dewar@adacore.com>
8541 * gnat_ugn.texi: Add note that integrated
8542 preprocessing cannot be applied to configuration pragma files.
8544 2014-07-16 Yannick Moy <moy@adacore.com>
8546 * sem_attr.adb (Analyze_Attribute/cases Pred
8547 and Succ): Always enable range check on fixed-point types if
8548 not suppressed for the type.
8550 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
8552 * sem_util.adb (State_Has_Enabled_Property):
8553 Account for an external property denoted by an others choice.
8555 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
8557 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
8558 * exp_ch7.adb (Process_Declarations): There is no need to check
8559 that a transient object being hooked is controlled as it would
8560 not have been hooked in the first place.
8561 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
8562 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
8563 (Is_Aliased): A renaming of a transient controlled object is
8564 not considered aliasing when it occurs within an expression
8566 (Requires_Cleanup_Actions): There is no need to
8567 check that a transient object being hooked is controlled as it
8568 would not have been hooked in the first place.
8569 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
8571 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
8573 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
8574 the outer level of routine Analyze_Aspect_Specifications. Ensure
8575 that the corresponding pragmas of aspects Initial_Condition and
8576 Initializes are inserted after pragma SPARK_Mode.
8578 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8580 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
8581 properly a choice list with more than one choice, where each
8582 is an aggregate denoting a sequence of array indices for a
8583 multidimentional array. For SPARK use.
8585 2014-07-16 Vadim Godunko <godunko@adacore.com>
8587 * a-coinho-shared.adb (Adjust): Create
8588 copy of internal shared object and element when source container
8591 (Query_Element): Likewise.
8592 (Update_Element): Likewise.
8593 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
8594 to get reference for empty holder.
8595 (Reference): Likewise.
8597 2014-07-16 Thomas Quinot <quinot@adacore.com>
8599 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
8600 from Process_Transient_Oject.
8601 * exp_ch4.ads: Ditto.
8602 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
8603 declaration as an action on the topmost enclosing expression,
8604 not on a possibly conditional subexpreession.
8606 2014-07-16 Vadim Godunko <godunko@adacore.com>
8608 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
8609 Fix parameter mode of Update_Element.
8611 2014-07-16 Robert Dewar <dewar@adacore.com>
8613 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
8616 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8618 * a-cohase.ads: Type Iterator must be controlled, so that the
8619 tampering bit is properly set through an iteration.
8620 * a-cohase.adb: Add Finalize operation for type Iterator.
8622 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8624 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
8627 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8629 * a-coinho-shared.adb: Fix spurious accessibility check.
8631 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8633 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
8635 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8638 * gnat_rm.texi: Fix errors with makeinfo 5.1.
8640 2014-06-14 Arnaud Charlet <charlet@adacore.com>
8643 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
8645 2014-06-13 Yannick Moy <moy@adacore.com>
8647 * exp_attr.adb: Fix typo in comment.
8648 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
8649 checking in GNATprove_Mode.
8651 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8653 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
8655 2014-06-13 Robert Dewar <dewar@adacore.com>
8657 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
8660 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8662 * sem_prag.adb (Analyze_Pragma): Add local
8663 variable Missing_Parentheses. Emit an error when a state
8664 declaration with options appears without parentheses. Add a
8665 guard to prevent a bogus error when a state declaration may be
8666 interpreted as an option if a previous declaration with options
8667 was not parenthesized.
8669 2014-06-13 Robert Dewar <dewar@adacore.com>
8671 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
8672 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
8673 * checks.ads (Alignment_Warnings_Record): New type.
8674 (Alignment_Warnings): New table
8675 (Validate_Alignment_Check_Warnings): New procedure.
8676 * errout.adb (Delete_Warning_And_Continuations): New procedure
8677 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
8678 Warnings_Treated_As_Errors (Finalize): Minor reformatting
8679 * errout.ads (Warning_Msg): New variable
8680 (Delete_Warning_And_Continuations): New procedure
8681 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
8682 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
8684 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8686 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
8688 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8690 * errout.adb (SPARK_Msg_N): New routine.
8691 (SPARK_Msg_NE): New routine.
8692 * errout.ads Add a section on SPARK-related error routines.
8693 (SPARK_Msg_N): New routine.
8694 (SPARK_Msg_NE): New routine.
8695 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
8696 pragma Abstract_State is always inserted after SPARK_Mode.
8697 (Insert_After_SPARK_Mode): New routine.
8698 * sem_prag.adb (Analyze_Abstract_State,
8699 Analyze_Constituent, Analyze_External_Property,
8700 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
8701 Analyze_Global_List, Analyze_Initialization_Item,
8702 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
8703 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
8704 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
8705 Analyze_Refined_Global_In_Decl_Part,
8706 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
8707 Check_Aspect_Specification_Order, Check_Constituent_Usage,
8708 Check_Declaration_Order, Check_Dependency_Clause,
8709 Check_Duplicate_Mode, Check_Duplicate_Option,
8710 Check_Duplicate_Property, Check_External_Properties,
8711 Check_External_Property, Check_Function_Return,
8712 Check_Matching_Constituent, Check_Matching_State,
8713 Check_Mode_Restriction_In_Enclosing_Context,
8714 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
8715 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
8716 Has_Extra_Parentheses, Inconsistent_Mode_Error,
8717 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
8718 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
8719 Report_Unrefined_States, Report_Unused_Constituents,
8720 Report_Unused_States, Role_Error, Usage_Error):
8721 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
8722 to report semantic errors only when SPARK_Mode is on.
8723 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
8724 pragma Depends explicitly, this is now done by the analysis.
8725 (Analyze_Global_In_Decl_List): Do not check the syntax of
8726 pragma Global explicitly, this is now done by the analysis.
8727 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
8728 pragma Initializes explicitly, this is now done by the analysis.
8729 (Analyze_Part_Of): Do not check the syntax of the encapsulating
8730 state, this is now done by the analysis.
8731 (Analyze_Pragma): Do
8732 not check the syntax of a state declaration, this is now done
8734 (Analyze_Refined_Depends_In_Decl_Part): Do not
8735 check the syntax of pragma Refined_Depends explicitly, this is now
8736 done by the analysis.
8737 (Analyze_Refined_Global_In_Decl_Part): Do
8738 not check the syntax of pragma Refined_Global explicitly, this is
8739 now done by the analysis.
8740 (Analyze_Refined_State_In_Decl_Part):
8741 Do not check the syntax of pragma Refined_State explicitly, this
8742 is now done by the analysis.
8743 (Check_Dependence_List_Syntax): Removed.
8744 (Check_Global_List_Syntax): Removed.
8745 (Check_Initialization_List_Syntax): Removed.
8746 (Check_Item_Syntax): Removed.
8747 (Check_Missing_Part_Of): Do not consider items from an instance.
8748 (Check_Refinement_List_Syntax): Removed.
8749 (Check_State_Declaration_Syntax): Removed.
8750 (Collect_Global_List): Do not raise Program_Error when the input is
8752 (Process_Global_List): Do not raise Program_Error when the input
8754 * sem_ch13.adb: Minor reformatting.
8756 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8758 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
8759 that is an interface definition with an interface list.
8760 (Process_Full_View): Move error message on missmatched interfaces
8761 between views to the declaration of full view, for clarity.
8762 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
8765 2014-06-13 Robert Dewar <dewar@adacore.com>
8767 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
8770 2014-06-13 Robert Dewar <dewar@adacore.com>
8772 * makeutl.adb: Minor reformatting.
8774 2014-06-13 Gail Schenker <schenker@adacore.com>
8776 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
8777 associated flag (d.z), no longer needed.
8779 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8781 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
8782 Export aspects, do not check whether a corresponding Convention
8783 aspect has been specified. Convention is optional in Ada2012,
8784 and defaults to Convention_Ada.
8786 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
8788 * checks.adb (Apply_Address_Clause_Check): Only issue the new
8789 warning if the propagation warning is issued.
8791 2014-06-13 Thomas Quinot <quinot@adacore.com>
8793 * exp_ch4.adb: Minor reformatting.
8795 2014-06-13 Robert Dewar <dewar@adacore.com>
8797 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
8798 Handle float range check case (Expand_N_Attribute_Reference,
8799 case Succ): Handle float range check case.
8800 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
8803 2014-06-13 Vincent Celier <celier@adacore.com>
8805 * makeutl.ads (Compute_Builder_Switches): Change name of
8806 parameter Root_Environment to Env.
8807 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
8808 Env parameter of procedure Get_Or_Create_Configuration_File.
8809 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
8810 of new parameter Env.
8811 * prj-conf.ads (Locate_Runtime): New parameter Env of type
8812 Prj.Tree.Environment.
8814 2014-06-13 Robert Dewar <dewar@adacore.com>
8816 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
8818 2014-06-13 Robert Dewar <dewar@adacore.com>
8820 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
8822 * sem_attr.adb: Minor code reformatting and simplification.
8823 * checks.adb: Fix minor typo.
8825 2014-06-13 Emmanuel Briot <briot@adacore.com>
8827 * g-comlin.adb (Get_Argument): fix expansion
8828 of command line arguments (e.g. "*.adb") when using a custom
8829 parser. The parser was not passed to the recursive call, and
8830 thus we were trying to do the expansion on the default command
8833 2014-06-13 Thomas Quinot <quinot@adacore.com>
8835 * exp_ch9.adb: Minor reformatting.
8837 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8839 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
8840 To determine whether the attribute should be expanded, examine
8841 whether the enclosing postcondition pragma is to be checked,
8842 rather than using the internal flag Assertions_Enabled.
8844 2014-06-13 Ben Brosgol <brosgol@adacore.com>
8846 * gnat_rm.texi: Minor fixes.
8847 * gnat_ugn.texi: Added a missing "@itemize".
8849 2014-06-13 Robert Dewar <dewar@adacore.com>
8851 * debug.adb: Remove -gnatd.1 flag documentation.
8852 * layout.adb (Layout_Type): Remove special handling of size
8853 for anonymous access type.
8854 * sem_ch3.adb (Replace_Type): Remove special handling of size
8855 for anonymous access type.
8857 2014-06-13 Robert Dewar <dewar@adacore.com>
8859 * debug.adb: Document debug flag -gnatd.1.
8860 * layout.adb (Layout_Type): Size change for anonymous access
8861 types under -gnatd.1.
8862 * sem_ch3.adb (Replace_Type): Size change for anonymous access
8863 types under -gnatd.1.
8865 2014-06-13 Robert Dewar <dewar@adacore.com>
8867 * layout.adb (Layout_Type): Anonymous access types designating
8868 unconstrained arrays are always thin pointers.
8869 * sem_ch3.adb (Replace_Type): Anonymous access types designating
8870 unconstrained arrays are always thin pointers.
8872 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8874 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
8875 to resolve the prefix of an attribute that is an entity name
8876 and may be a parameterless call. Minor code reorganization.
8878 2014-06-13 Robert Dewar <dewar@adacore.com>
8880 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
8882 * opt.ads (Compiler_Unit): New flag.
8883 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
8884 for null statement sequence (not allowed in compiler unit).
8885 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
8887 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
8889 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
8890 Check_Compiler_Unit.
8891 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
8892 Check_Compiler_Unit (this construct is not allowed in compiler
8894 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
8895 Set Opt.Compiler_Unit.
8897 2014-06-13 Geert Bosch <bosch@adacore.com>
8899 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
8900 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
8901 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
8903 2014-06-13 Robert Dewar <dewar@adacore.com>
8905 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
8907 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8909 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
8910 types in SPARK as it is poorly placed and poorly formulated. The
8911 check was flagging ALL volatile entities as illegal in SPARK.
8912 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
8913 types as illegal in SPARK.
8915 2014-06-13 Robert Dewar <dewar@adacore.com>
8917 * sem_cat.adb: Minor reformatting.
8919 2014-06-13 Yannick Moy <moy@adacore.com>
8921 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
8923 2014-06-13 Arnaud Charlet <charlet@adacore.com>
8925 * gnat_rm.texi: Add detail on SPARK_05 restriction.
8927 2014-06-13 Bob Duff <duff@adacore.com>
8929 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
8930 Add assertions requiring the secondary stack to be initialized.
8931 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
8932 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
8933 secondary stack is initialized before calling Init_Tasking_Soft_Links,
8934 by adding pragmas Elaborate_Body.
8936 2014-06-13 Thomas Quinot <quinot@adacore.com>
8938 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
8939 kludge disabling new legality check.
8941 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8943 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
8945 (Freeze_Type): Volatile types are now illegal in SPARK.
8947 2014-06-13 Robert Dewar <dewar@adacore.com>
8949 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
8950 * gnat_rm.texi: Document aspect Thread_Local_Storage.
8952 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8954 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
8955 value is a temporary that renames an aggregate is legal in a
8956 preelaborated unit. Illegalities, if any will be detected in
8957 the aggregate components.
8959 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8961 * einfo.ads: Minor reformatting an comment expansion.
8963 2014-06-13 Robert Dewar <dewar@adacore.com>
8965 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
8967 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
8969 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
8970 * sem_warn.adb: Minor reformatting.
8972 2014-06-13 Doug Rupp <rupp@adacore.com>
8974 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
8977 2014-06-13 Yannick Moy <moy@adacore.com>
8979 * sem_warn.adb (Check_Unset_References): Take
8980 case of Refined_Post into account in Within_Postcondition check.
8982 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8984 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
8987 2014-06-13 Yannick Moy <moy@adacore.com>
8989 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
8990 Aspect_Export): Consider that variables may be set outside the program.
8992 2014-06-13 Robert Dewar <dewar@adacore.com>
8994 * back_end.adb (Make_Id): New function.
8995 (Make_SC): New function.
8996 (Set_RND): New procedure.
8997 * back_end.ads (Make_Id): New function.
8998 (Make_SC): New function.
8999 (Set_RND): New procedure.
9000 * einfo.ads: Minor comment updates.
9001 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
9002 * gnat1drv.adb (Gnat1drv): New calling sequence for
9003 Get_Target_Parameters.
9004 (Gnat1drv): Move Atree.Initialize here from Frontend.
9005 * targparm.adb (Get_Target_Parameters): New calling
9006 sequence (Get_Target_Parameters): Handle pragma Restriction
9008 * targparm.ads (Get_Target_Parameters): New calling sequence.
9010 2014-06-13 Gary Dismukes <dismukes@adacore.com>
9012 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
9013 loop if the pragma does not come from source, so that an implicit
9014 pragma Import only applies to the first declaration, avoiding
9015 possible conflicts with earlier explicit and implicit declarations
9016 due to multiple Provide_Shift_Operators pragmas.
9017 (Set_Imported): Remove previous fix that bypassed pragma duplication
9019 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
9020 of Provide_Shift_Operators.
9022 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
9024 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
9025 string pointer directly to set_decl_section_name.
9027 2014-06-11 Robert Dewar <dewar@adacore.com>
9029 * sem_ch13.adb: Minor reformatting.
9031 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
9033 * sem_prag.adb (Check_Clause_Syntax): Add new
9034 local variable Outputs. Account for the case where multiple
9035 output items appear as an aggregate.
9037 2014-06-11 Robert Dewar <dewar@adacore.com>
9039 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9042 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9044 * einfo.ads: Minor reformatting.
9046 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
9048 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9049 new variable First_Node. Update the position after all insertions have
9050 taken place to First_Node.
9052 2014-06-11 Robert Dewar <dewar@adacore.com>
9054 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9055 * layout.adb (Layout_Type): Remove test of -gnatd.1.
9057 2014-06-11 Robert Dewar <dewar@adacore.com>
9059 * sem_ch13.adb: Minor reformatting.
9061 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
9063 * sem_prag.adb (Check_Clause_Syntax): Add new
9064 local variable Outputs. Account for the case where multiple
9065 output items appear as an aggregate.
9067 2014-06-11 Robert Dewar <dewar@adacore.com>
9069 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
9072 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9074 * einfo.ads: Minor reformatting.
9076 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
9078 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
9079 new variable First_Node. Update the position after all insertions have
9080 taken place to First_Node.
9082 2014-06-11 Robert Dewar <dewar@adacore.com>
9084 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
9085 * layout.adb (Layout_Type): Remove test of -gnatd.1.
9087 2014-06-11 Thomas Quinot <quinot@adacore.com>
9089 * freeze.ads: Minor reformatting.
9090 * checks.adb (Determine_Range): Do not attempt to determine
9091 the range of a deferred constant whose full view has not been
9093 * sem_res.adb (Resolve): Remove undesirable guard against
9094 resolving expressions from expression functions.
9096 2014-06-11 Robert Dewar <dewar@adacore.com>
9098 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
9100 * layout.adb (Layout_Type): Make anonymous access types for
9101 subprogram formal types and return types always thin. For now
9102 only enabled if -gnatd.1 set.
9104 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9106 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9107 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
9108 subprogram must be a null procedure.
9110 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
9112 * sem_prag.adb (Analyze_Input_Item): Allow formal
9113 parameters to appear as input_items in an initialization_list
9114 of pragma Initializes. Encapsulation now applies to states and
9115 variables only (as it should). Add RM references to key errors.
9116 * sem_prag.adb (Set_Imported): Suppress errors
9117 about preceding Imports when the pragma does not come from source,
9118 which can happen through use of pragma Provide_Shift_Operators.
9120 2014-06-11 Thomas Quinot <quinot@adacore.com>
9122 * sem_ch3.adb: Minor reformatting.
9123 * einfo.ads (Full_View): Minor comment update.
9125 2014-06-11 Robert Dewar <dewar@adacore.com>
9127 * einfo.adb (Is_Independent): New flag.
9128 * einfo.ads (Is_Independent): New flag.
9129 (Has_Independent_Components): Clean up and fix comments.
9130 * sem_prag.adb (Fix_Error): Deal with changing argument
9131 [of] to entity [for].
9132 (Analyze_Pragma, case Independent): Set Is_Independent flag
9133 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
9134 in all components of specified record.
9136 2014-06-11 Thomas Quinot <quinot@adacore.com>
9138 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
9139 Set proper Etype on bounds of dummy type created for analysis
9142 2014-06-11 Robert Dewar <dewar@adacore.com>
9144 * debug.adb: Minor comment fix (add missing section of dot
9147 2014-06-11 Robert Dewar <dewar@adacore.com>
9149 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
9150 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
9151 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
9152 * errout.adb (Output_Messages): Avoid duplicate output for
9153 library level instance.
9154 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
9155 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
9156 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
9157 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
9158 accomodate largest modulus value.
9159 * gnat_ugn.texi: Minor updates.
9161 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9163 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
9164 load body of generic package or its parent, if body is optional
9165 and the unit does not require a body.
9167 2014-06-11 Robert Dewar <dewar@adacore.com>
9169 * gnat_rm.texi: Document System.Unsigned_Types.
9170 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
9171 * s-unstyp.ads: Update comments (this is now user available unit).
9173 2014-06-11 Robert Dewar <dewar@adacore.com>
9175 * make.adb, sem_res.adb: Minor reformatting.
9177 2014-06-11 Thomas Quinot <quinot@adacore.com>
9179 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
9180 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
9181 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
9182 Preelaborate_05 to just Preelaborate in runtime units, and similarly
9183 change Pure_05 to just Pure.
9185 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9187 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
9188 analysis if error has been posted on subprogram body.
9190 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9192 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
9193 rule given in RM 13.1 (8/1) for operational attributes to stream
9194 attributes: the attribute must apply to a first subtype. Fixes
9195 missing errors in ACATS test bdd2004.
9197 2014-06-11 Robert Dewar <dewar@adacore.com>
9199 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
9200 record type if restriction No_Implicit_Conditionals is active.
9201 (Expand_N_Object_Declaration): Don't allow default initialization
9202 for variant record type if restriction No_Implicit_Condition is active.
9203 (Build_Variant_Record_Equality): Don't build for variant
9204 record type if restriction No_Implicit_Conditionals is active.
9205 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
9206 No_Implicit_Conditionals.
9207 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
9209 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
9211 * i-cstrin.ads: Update comments.
9213 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9215 * sem_res.adb (Resolve_Selected_Component): Handle properly a
9216 selected component whose prefix is overloaded, when none of the
9217 interpretations matches the expected type.
9219 2014-06-11 Bob Duff <duff@adacore.com>
9221 * make.adb (Wait_For_Available_Slot): Give a more
9222 informative error message; if the ALI file is not found, print
9223 the full path of what it's looking for.
9225 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
9227 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
9228 option to specify the result file encoding.
9230 2014-06-11 Robert Dewar <dewar@adacore.com>
9232 * errout.ads, sem_ch12.adb: Minor reformatting.
9233 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
9234 * lib-xref.adb: Minor reformatting.
9235 * restrict.adb: Minor code reorganization (put routines in
9238 2014-06-11 Yannick Moy <moy@adacore.com>
9240 * einfo.ads: Minor typo in comment
9242 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9244 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
9245 formal private types and private type extensions, to indicate
9246 variable in a generic unit whose uninitialized use suggest that
9247 actual type should be fully initialized.
9248 Needs_Initialized_Actual: removed, functionaity replaced by
9250 * lib-xref.adb (Generate_Reference): Generate a reference for
9251 variables of a formal type when the unit is not the main unit,
9252 to enable appropriate warnings in an instance.
9253 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
9254 of variable in a generic unit that suggests that actual type
9255 should be full initialized.
9256 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
9257 and do not emot warning, which now only appears in an instance.
9259 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
9261 * gnat_ugn.texi: Fix minor typo.
9263 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
9265 * sem_ch3.adb Add with and use clause for Sem_Ch10.
9266 (Analyze_Declarations): Code reformatting. Analyze the contract
9267 of a subprogram body stub at the end of the declarative region.
9268 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
9269 now a variable. Do not process the body if its contract is not
9270 available. Account for subprogram body stubs when extracting
9271 the corresponding spec.
9272 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
9274 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
9276 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
9277 Account for subprogram body stubs when extracting the
9279 (Analyze_Global_In_Decl_List):
9280 Account for subprogram body stubs when extracting the
9282 (Analyze_Refined_Depends_In_Decl_Part):
9283 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
9284 of the related body. Spec_Is now a variable. Account for
9285 subprogram body stubs when extracting the corresponding spec.
9286 (Analyze_Refined_Global_In_Decl_Part): Use
9287 Find_Related_Subprogram_Or_Body to retrieve the declaration
9288 of the related body. Spec_Is now a variable. Account for
9289 subprogram body stubs when extracting the corresponding spec.
9290 (Collect_Subprogram_Inputs_Output): Account for subprogram body
9291 stubs when extracting the corresponding spec.
9293 2014-06-11 Vincent Celier <celier@adacore.com>
9295 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
9298 2014-06-11 Robert Dewar <dewar@adacore.com>
9300 * debug.adb: Add debug flag -gnatd.q.
9301 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
9303 * styleg.adb (Check_Xtra_Parens): Message should be a style
9305 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
9306 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
9307 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
9308 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
9310 2014-06-11 Ben Brosgol <brosgol@adacore.com>
9312 * gnat_rm.texi: Revised chapter on Implementation Defined
9315 2014-06-11 Geert Bosch <bosch@adacore.com>
9317 * s-exctab.adb: avoid race conditions in exception registration.
9319 2014-06-11 Robert Dewar <dewar@adacore.com>
9321 * errout.adb (Warn_Insertion): New function.
9322 (Error_Msg): Use Warn_Insertion and Prescan_Message.
9323 (Error_Msg_Internal): Set Info field of error object.
9324 (Error_Msg_NEL): Use Prescan_Message.
9325 (Set_Msg_Text): Don't store info: at start of message.
9326 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
9327 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
9328 * errout.ads: Document new ?$? and >$> insertion sequences
9329 Document use of "(style)" and "info: "
9330 * erroutc.adb (dmsg): Print several missing fields
9331 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
9332 Deal with new tagging of info messages
9333 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
9334 Add field Info (Prescan_Message): New procedure, this procedure
9335 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
9336 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
9337 sem_elab.adb: Follow new rules for info message (info belongs
9338 only at the start of a message, and only in the first message,
9339 not in any of the continuations).
9340 * gnat_ugn.texi: Document full set of warning tags.
9342 2014-06-11 Gary Dismukes <dismukes@adacore.com>
9344 * sem_util.adb: Minor typo fix.
9346 2014-06-11 Ed Schonberg <schonberg@adacore.com>
9348 * sem_warn.adb (Check_References): Do not emit spurious warnings
9349 on uninitialzed variable of a formal private type if variable
9352 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
9354 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
9355 set_decl_section_name accessor.
9357 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9359 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9360 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9361 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9363 2014-05-21 Robert Dewar <dewar@adacore.com>
9365 * layout.adb: Minor reformatting.
9366 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
9369 2014-05-21 Robert Dewar <dewar@adacore.com>
9371 * restrict.ads (Implementation_Restriction): Add entry for
9373 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
9374 Ada.[Wide_[Wide_]Text_IO.
9375 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
9376 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
9377 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
9378 Wide_Wide_Value if restriction No_Fixed_IO is set.
9379 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
9381 2014-05-21 Robert Dewar <dewar@adacore.com>
9383 * gnatcmd.adb: Minor error msg changes (no upper case letter
9385 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
9388 2014-05-21 Robert Dewar <dewar@adacore.com>
9390 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
9391 via generic formals.
9392 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
9395 2014-05-21 Thomas Quinot <quinot@adacore.com>
9397 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
9398 more accurately describe that this subprogram needs to come into
9399 play also in cases where no byte swapping is involved, because
9400 it also takes care of some required shifts (left-justification
9403 2014-05-21 Thomas Quinot <quinot@adacore.com>
9405 * freeze.adb (Check_Component_Storage_Order): Indicate whether
9406 a Scalar_Storage_Order attribute definition is present for the
9408 (Freeze_Record_Type): Suppress junk warnings
9409 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
9412 2014-05-21 Robert Dewar <dewar@adacore.com>
9414 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
9415 to Kill_Elaboration_Checks.
9417 2014-05-21 Gary Dismukes <dismukes@adacore.com>
9419 * layout.adb (Assoc_Add): Suppress the optimization of the (E
9420 - C1) + C2 case, when the expression type is unsigned and C1 <
9421 C2, to avoid creating a negative literal when folding.
9423 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
9425 * freeze.adb (Freeze_Record_Type): Update the use of
9427 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
9429 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
9430 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
9431 of Is_SPARK_Volatile.
9432 (Analyze_Loop_Parameter_Specification):
9433 Update the use of Is_SPARK_Volatile.
9434 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
9435 formal parameter when its type is volatile.
9436 * sem_prag.adb (Analyze_Global_Item): Update the use of
9438 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
9439 determines whether an entity is a volatile source SPARK object.
9440 * sem_util.adb (Has_Enabled_Property): Accout for external
9441 properties being set on objects other than abstract states
9442 and variables. An example would be a formal parameter.
9443 (Is_SPARK_Volatile): New routine.
9444 (Is_SPARK_Volatile_Object):
9445 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
9446 when checking entities and/or types.
9447 * sem_util.ads (Is_SPARK_Volatile): New routine.
9449 2014-05-21 Robert Dewar <dewar@adacore.com>
9451 * sem_warn.adb: Minor fix to warning messages (use ?? instead
9454 2014-05-21 Vincent Celier <celier@adacore.com>
9456 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
9457 switch --version and --help.
9459 2014-05-21 Robert Dewar <dewar@adacore.com>
9461 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
9463 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9465 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
9466 iterator variable when the domain of iteration is a formal
9467 container and this is an element iterator.
9469 2014-05-21 Bob Duff <duff@adacore.com>
9471 * sem_ch12.adb: Minor reformatting.
9473 2014-05-21 Robert Dewar <dewar@adacore.com>
9475 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
9477 2014-05-21 Robert Dewar <dewar@adacore.com>
9479 * sem_elab.adb: Minor reformatting.
9480 * s-taprop.ads: Minor comment fix.
9481 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
9482 Kill_Elaboration_Checks.
9483 * errout.adb, erroutc.adb: Minor reformatting.
9485 2014-05-21 Thomas Quinot <quinot@adacore.com>
9487 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
9488 component. No byte swapping occurs, but this procedure also takes
9489 care of appropriately justifying the argument.
9491 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
9493 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
9495 (Analyze_Subprogram_Body_Helper): Move the
9496 analysis of aspect specifications and the processing of the
9497 subprogram body contract after inlining has taken place.
9498 (Diagnose_Misplaced_Aspect_Specifications): Removed.
9500 2014-05-21 Javier Miranda <miranda@adacore.com>
9502 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
9504 2014-05-21 Robert Dewar <dewar@adacore.com>
9506 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
9507 continuations any more.
9509 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9511 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
9512 present in formal_Private_Definitions and on private extension
9513 declarations of a formal derived type. Set when the use of the
9514 formal type in a generic suggests that the actual should be a
9515 fully initialized type.
9516 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
9517 to indicate that an entity of a generic type has default
9518 initialization, and that the corresponing actual type in any
9519 subsequent instantiation should be fully initialized.
9520 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
9521 to emit a warning if the actual for a generic type on which
9522 Needs_Initialized_Actual is set is not a fully initialized type.
9524 2014-05-21 Robert Dewar <dewar@adacore.com>
9526 * sem_elab.adb, prj-dect.adb: Minor reformatting.
9528 2014-05-21 Robert Dewar <dewar@adacore.com>
9530 * erroutc.ads: Minor comment addition.
9532 2014-05-21 Robert Dewar <dewar@adacore.com>
9534 * errout.ads: Add documentation for use of >*> tag.
9535 * restrict.adb: Make sure we use >*> tag for restriction warnings.
9537 2014-05-21 Gary Dismukes <dismukes@adacore.com>
9539 * debug.adb: Add case of illegal overriding_indicator for a
9540 protected subprogram body to description of -gnatd.E switch.
9541 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
9542 for cases of giving overriding_indicators on protected subprogram
9543 bodies, but change this to a warning if -gnatd.E is enabled. No
9544 longer give a style warning about missing indicators on protected
9547 2014-05-21 Robert Dewar <dewar@adacore.com>
9549 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
9550 sem_elab.ads: Minor reformatting.
9551 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
9554 2014-05-21 Pascal Obry <obry@adacore.com>
9556 * prj-dect.adb: Allow package Install in aggregate project.
9558 2014-05-21 Robert Dewar <dewar@adacore.com>
9560 * sem_ch13.adb (Analyze_Aspect_Specifications):
9561 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
9562 * sem_prag.adb: Minor comment improvements.
9564 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9566 * sem_ch12.adb (Install_Body): When checking whether freezing of
9567 instantiation must be delayed, verify that the common enclosing
9568 subprogram to generic and instance is in fact an overloadable
9571 2014-05-21 Vincent Celier <celier@adacore.com>
9573 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
9574 mains with the same name and fail if there is more than one.
9575 * prj.ads, prj.adb (Find_All_Sources): New function
9577 2014-05-21 Robert Dewar <dewar@adacore.com>
9579 * sem_ch13.adb: Minor reformatting.
9580 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
9581 * sem_prag.adb: Minor error message improvement.
9583 2014-05-21 Yannick Moy <moy@adacore.com>
9585 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
9586 (Enclosing_Subprogram_Or_Package): Only return a library-level
9589 2014-05-21 Javier Miranda <miranda@adacore.com>
9591 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
9592 to the full view of the parent type when processing a derived type
9593 which is the full view of a private type not defined in a generic
9594 unit which is derived from a private type with discriminants
9595 whose full view is a non-tagged record type.
9597 2014-05-21 Javier Miranda <miranda@adacore.com>
9599 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
9600 Complete previous patch.
9602 2014-05-21 Thomas Quinot <quinot@adacore.com>
9605 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
9606 Provide a behaviour more consistent with underlying datagram
9607 socket: do not attempt to loop over Send_Socket/Receive_Socket
9608 iterating along the buffer.
9610 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
9612 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
9613 or a tagged type is not labelled as volatile. Ensure that a
9614 non-volatile type has no volatile components.
9615 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
9616 Obj_Typ. Code reformatting. Ensure that a discriminated or
9617 tagged object is not labelled as volatile.
9618 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
9619 pragma Volatile applies to a full type declaration or an object
9620 declaration when SPARK mode is on.
9622 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
9624 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
9625 providing options needed for compiling the argument source for
9626 the situation when a project file can be used as a tool parameter.
9628 2014-05-21 Gary Dismukes <dismukes@adacore.com>
9630 * gnat_rm.texi: Minor typo fix.
9632 2014-05-21 Robert Dewar <dewar@adacore.com>
9634 * stand.adb (Tree_Read): Read missing entities.
9635 (Tree_Write): Write missing entities.
9637 2014-05-21 Ben Brosgol <brosgol@adacore.com>
9639 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
9640 section in gnatmetric chapter.
9642 2014-05-21 Robert Dewar <dewar@adacore.com>
9644 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
9645 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
9646 post-call copy write back (see detailed comment in code).
9647 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
9649 * tbuild.ads: Minor reformatting.
9651 2014-05-21 Robert Dewar <dewar@adacore.com>
9653 * stand.ads: Add warning about adding new entities and
9654 Tree_Read/Tree_Write.
9656 2014-05-21 Robert Dewar <dewar@adacore.com>
9658 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
9659 references to restricted entities within the units in which they
9662 2014-05-21 Robert Dewar <dewar@adacore.com>
9664 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
9665 simplify the needed test, and also deal with failure to catch
9666 situations with non-standard names.
9667 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
9668 (Source_File_Is_Subunit): Removed, no longer used.
9670 2014-05-21 Javier Miranda <miranda@adacore.com>
9673 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
9674 renaming of an access to interface object there is no need to
9675 generate extra code to reference the tag.
9677 2014-05-21 Robert Dewar <dewar@adacore.com>
9679 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
9680 Warnings (Off, string).
9682 2014-05-21 Robert Dewar <dewar@adacore.com>
9684 * osint.adb: Fix three error messages to say invalid instead
9686 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
9687 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
9688 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
9690 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9692 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
9693 sem_ch9.ads: Move discriminant manipulation routines for analysis of
9694 aspect specifications from sem_ch9 to sem_ch13, where they belong.
9696 2014-05-21 Robert Dewar <dewar@adacore.com>
9698 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
9699 Clearly document -gnatyg (GNAT style switches).
9700 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
9701 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
9702 available for VMS after all.
9703 * warnsw.adb: Reorganize to eliminate duplicated code
9704 (Restore_Warnings): Add a couple of missing entries
9705 (Save_Warnings): Add a couple of missing entries.
9706 * warnsw.ads: Add missing entries to Warning_Record (not clear
9707 what the impact is).
9709 2014-05-21 Robert Dewar <dewar@adacore.com>
9711 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
9713 * errout.ads: Document ?*? (restriction warning) insertion.
9714 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
9716 * erroutc.ads: Document use of * for restriction warning tag.
9717 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
9719 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9721 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
9722 make discriminants immediately visible when analyzing an aspect
9723 of a subtype declaration.
9724 (Uninstall_Discriminants): Do not apply to the entity in a
9725 subtype declaration.
9727 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9729 * sem_util.adb: Code clean up.
9731 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
9733 * gnat_ugn.texi: Document -Werror.
9735 2014-05-21 Bob Duff <duff@adacore.com>
9737 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
9738 This was returning False if the Object is a constant view. Fix
9739 it to return True in that case, because it might be a view of
9741 (Has_Discriminant_Dependent_Constraint): Fix latent
9742 bug; this function was crashing when passed a discriminant.
9744 2014-05-21 Robert Dewar <dewar@adacore.com>
9746 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
9747 * s-arit64.adb: Minor code reorganization.
9748 * sem_prag.adb: Minor comment fix (remove erroneous use of the
9751 2014-05-21 Robert Dewar <dewar@adacore.com>
9753 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
9754 computing new table size.
9756 2014-05-21 Robert Dewar <dewar@adacore.com>
9758 * einfo.ads: Minor reformatting.
9759 * ceinfo.adb: Deal with slight format change of einfo.ads.
9761 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9763 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
9764 implementation of the SPARK 2014 rule concerning private child
9767 2014-05-21 Vincent Celier <celier@adacore.com>
9769 * makeusg.adb: Add switch -d to usage.
9771 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9773 * sem_util.adb (Find_Actual): If an actual that is the prefix
9774 of an enclosing prefixed call has been rewritten, use Nkind
9775 and Sloc to identify the corresponding formal, when handling
9776 deferred references.
9778 2014-05-21 Robert Dewar <dewar@adacore.com>
9780 * debug.adb: Document -gnatd.z switch.
9781 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
9783 2014-05-21 Robert Dewar <dewar@adacore.com>
9785 * einfo.ads (Can_Never_Be_Null): Minor comment update.
9786 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
9787 error message change.
9788 * s-arit64.adb ("abs"): New function. Use expression functions
9789 for the simple conversions and arithmetic.
9791 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9793 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
9794 set function_start_locus.
9796 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9798 * utils.c (gnat_write_global_declarations): Adjust the flags put on
9801 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9803 * gcc-interface/decl.c (change_qualified_type): New static function.
9804 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
9805 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
9806 <E_Array_Subtype>: Likewise.
9807 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
9808 (gnat_to_gnu_component_type): Likewise.
9809 (gnat_to_gnu_param): Likewise.
9811 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9813 * fe.h (Set_Present_Expr): Move around.
9814 (End_Location): New macro.
9815 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
9817 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9819 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
9820 lieu of more verbose construct.
9821 * gcc-interface/trans.c (Call_to_gnu): Likewise.
9822 (gnat_to_gnu): Likewise. Remove obsolete code.
9824 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
9827 consider that regular packed arrays can never be superflat.
9829 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9831 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
9833 * gcc-interface/decl.c (annotate_value): Adjust.
9834 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
9835 (push_range_check_info): Likewise.
9836 (Loop_Statement_to_gnu): Likewise.
9837 (Subprogram_Body_to_gnu): Likewise.
9838 (Compilation_Unit_to_gnu): Likewise.
9839 (start_stmt_group): Likewise.
9840 * gcc-interface/utils.c (init_gnat_utils): Likewise.
9841 (gnat_pushlevel): Likewise.
9842 (maybe_pad_type): Likewise.
9844 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
9846 * seh_init.c: Fix copyright year.
9848 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9850 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
9851 are defined. Move include windows.h before system.h.
9852 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
9853 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
9855 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
9857 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
9858 to the appropriate type.
9859 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
9860 (pos_to_constructor): Likewise.
9862 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
9864 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
9866 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9867 Mike Stump <mikestump@comcast.net>
9868 Richard Sandiford <rdsandiford@googlemail.com>
9870 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
9871 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
9872 (annotate_value): Use wide-int interfaces.
9873 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
9875 2014-04-28 Richard Henderson <rth@redhat.com>
9877 * gcc-interface/Makefile.in: Support aarch64-linux.
9879 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
9881 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
9882 add 'Suffix' parameter and adjust comment.
9883 (Get_External_Name_With_Suffix): Delete.
9884 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
9885 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
9887 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
9888 Call Get_External_Name instead of Get_External_Name_With_Suffix.
9889 (Get_Secondary_DT_External_Name): Likewise.
9890 * exp_cg.adb (Write_Call_Info): Likewise.
9891 * exp_disp.adb (Export_DT): Likewise.
9892 (Import_DT): Likewise.
9893 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
9894 parameter with False default.
9895 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
9896 * types.h (Fat_Pointer): Rename into...
9897 (String_Pointer): ...this. Add comment on interfacing rules.
9898 * fe.h (Compiler_Abort): Adjust for above renaming.
9899 (Error_Msg_N): Likewise.
9900 (Error_Msg_NE): Likewise.
9901 (Get_External_Name): Likewise. Add third parameter.
9902 (Get_External_Name_With_Suffix): Delete.
9903 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
9904 (create_concat_name): Adjust call to Get_External_Name, remove call to
9905 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
9906 * gcc-interface/trans.c (post_error): Likewise.
9907 (post_error_ne): Likewise.
9908 * gcc-interface/misc.c (internal_error_function): Likewise.
9910 2014-04-28 Richard Biener <rguenther@suse.de>
9913 * gcc-interface/utils.c: Define flag_isoc11.
9915 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
9917 * gnatvsn.ads (Library_Version): Bump to 4.10.
9919 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
9922 2014-04-22 Richard Henderson <rth@redhat.com>
9924 * gcc-interface/Makefile.in: Support aarch64-linux.
9926 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
9928 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9929 (Error_Msg_N): Likewise.
9930 (Error_Msg_NE): Likewise.
9931 (Get_External_Name_With_Suffix): Likewise.
9932 * types.h (Fat_Pointer): Delete.
9933 (String_Pointer): New type.
9934 (DECLARE_STRING_POINTER): New macro.
9935 * gcc-interface/decl.c (create_concat_name): Adjust.
9936 * gcc-interface/trans.c (post_error): Likewise.
9937 (post_error_ne): Likewise.
9938 * gcc-interface/misc.c (internal_error_function): Likewise.
9940 2014-04-22 Richard Henderson <rth@redhat.com>
9942 * gcc-interface/Makefile.in: Support aarch64-linux.
9944 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
9945 (__gnat_alternate_stack): Enable for all linux except ia64.
9947 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
9949 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9950 (Error_Msg_N): Likewise.
9951 (Error_Msg_NE): Likewise.
9952 (Get_External_Name_With_Suffix): Likewise.
9953 * types.h (Fat_Pointer): Delete.
9954 (String_Pointer): New type.
9955 (DECLARE_STRING_POINTER): New macro.
9956 * gcc-interface/decl.c (create_concat_name): Adjust.
9957 * gcc-interface/trans.c (post_error): Likewise.
9958 (post_error_ne): Likewise.
9959 * gcc-interface/misc.c (internal_error_function): Likewise.
9961 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9962 Pierre-Marie de Rodat <derodat@adacore.com>
9964 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
9965 scalar constant instead of a reference for renaming of scalar literal.
9966 Do not create a new object for constant renaming except for a function
9967 call. Make sure a VAR_DECL is created for the renaming pointer.
9968 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
9969 (fold_constant_decl_in_expr): New function.
9970 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
9971 For a constant renaming, try to fold a constant DECL in the result.
9972 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
9973 (Identifier_to_gnu): Reference the renamed object of constant renaming
9975 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
9976 invalidate constant renaming pointers.
9978 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9980 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
9981 (build_vector_type_for_size): New function.
9982 (build_vector_type_for_array): Likewise.
9983 (unchecked_convert): Build an intermediate vector type to convert
9984 from a generic array type to a vector type.
9985 (handle_vector_size_attribute): Reimplement.
9986 (handle_vector_type_attribute): Likewise.
9988 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9990 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
9991 Is_OK_Static_Expression in lieu of Is_Static_Expression to
9992 detect valid arguments.
9994 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9996 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
9998 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
10000 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
10001 (components_to_record): Likewise.
10002 * gcc-interface/utils.c (make_aligning_type): Likewise.
10003 (maybe_pad_type): Likewise.
10004 (finish_record_type): Likewise.
10005 (rest_of_record_type_compilation): Likewise.
10007 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
10009 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
10010 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
10012 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
10013 hint for Loop_Optimize.
10014 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
10015 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10016 with new Ivdep hint.
10017 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
10018 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
10019 with new Ivdep hint.
10020 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
10022 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
10023 Robert Dewar <dewar@adacore.com>
10025 * opt.ads (Suppress_Back_Annotation): Remove as unused.
10026 * fe.h (Back_Annotate_Rep_Info): Likewise.
10027 (Global_Discard_Names): Likewise.
10028 (List_Representation_Info): Declare.
10029 * types.h (Uint_Minus_1): Likewise.
10030 * repinfo.ads: Document back-annotation change.
10031 * gcc-interface/gigi.h (init_gnat_decl): Declare.
10032 (destroy_gnat_decl): Likewise.
10033 * gcc-interface/decl.c (annotate_value): Do not create the cache of
10034 annotated values here but...
10035 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
10037 (init_gnat_decl): ...here instead. New function.
10038 (destroy_gnat_decl): Likewise.
10039 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
10040 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
10042 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
10044 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
10045 offset for the field, if any.
10047 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
10048 Svante Signell <svante.signell@gmail.com>
10052 * s-osinte-x32.adb: New file.
10053 * s-linux.ads (Time): New section.
10054 * s-linux-alpha.ads (Time): Likewise.
10055 * s-linux-android.ads (Time: Likewise.
10056 * s-linux-hppa.ads (Time): Likewise.
10057 * s-linux-mipsel.ads (Time): Likewise.
10058 * s-linux-sparc.ads (Time): Likewise.
10059 * s-linux-x32.ads (Time): Likewise.
10060 * s-osprim-x32.ads (timespec): Adjust.
10062 (To_Timespec): Likewise.
10063 * s-osinte-linux.ads (Time): Define local subtypes for those defined
10065 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
10066 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
10067 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
10068 * s-osinte-solaris-posix.ads (timespec): Likewise.
10069 * s-osinte-posix.adb (To_Timespec): Likewise.
10070 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
10072 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
10075 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
10076 * s-linux-android.ads: New file.
10077 * s-intman-android.adb: Likewise.
10078 * s-osinte-android.ads: Adjust.
10079 * sigtramp-armdroid.c: Likewise.
10080 * sigtramp.h: Add Android support.
10082 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
10084 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
10086 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
10089 * system-linux-alpha.ads: Adjust for Ada 2005.
10090 * system-linux-mips.ads: Likewise.
10091 * system-linux-mips64el.ads: Likewise.
10092 * system-linux-mipsel.ads: Likewise.
10093 * system-linux-s390.ads: Likewise.
10094 * system-linux-s390x.ads: Likewise.
10095 * system-linux-sparc.ads: Likewise.
10096 * system-linux-sparcv9.ads: Likewise.
10097 * system-rtems.ads: Likewise.
10098 * system-vxworks-arm.ads: Likewise.
10100 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
10103 * gcc-interface/Makefile.in (target_cpu_default): Revert
10106 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
10109 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
10110 it to set the RM size. Use directly 'size' for the Esize.
10111 (Create_Back_End_Float_Types): Adjust call to above.
10112 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
10113 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
10114 (Write_Target_Dependent_Values): Adjust comment.
10115 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
10117 (Write_Target_Dependent_Values): Write the precision in lieu of size.
10118 (Initialization): Read the precision in lieu of size and compute the
10119 size from the precision and the alignment.
10120 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
10121 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
10122 types for vector modes, pass the size in addition to the precision.
10124 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
10126 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
10128 2014-03-07 Doug Rupp <rupp@adacore.com>
10131 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
10132 (Support_64_Bit_Divides): Removed, no longer used.
10133 (ZCX_By_Default): Enabled.
10135 2014-02-25 Doug Rupp <rupp@adacore.com>
10137 * gcc-interface/Makefile.in (arm-linux):
10138 (EH_MECHANISM): Use ARM unwinder (-arm)
10139 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
10141 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
10142 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
10143 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
10144 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
10145 Add dependencies for sigtramp-armvxw.o.
10147 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
10149 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
10151 2014-02-25 Robert Dewar <dewar@adacore.com>
10153 * rtsfind.adb (Is_RTE): Protect against entity with no scope
10154 field (previously this call blew up on the Standard entity).
10155 * sem_attr.adb (Analyze_Attribute, case Access): Remove
10156 test for No_Abort_Statements, this is now handled in
10157 Set_Entity_With_Checks.
10158 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
10159 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
10160 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
10161 Set_Entity_With_Checks.
10162 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
10163 Add checks for No_Abort_Statements.
10165 2014-02-25 Robert Dewar <dewar@adacore.com>
10167 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
10168 Check_Restriction is OK.
10170 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10172 * sem_ch3.adb (Process_Full_View): Better error message when
10173 the full view of a private type without discriminants is an
10174 unconstrained type.
10175 * sem_ch7.adb (Uninstall_Declarations): Ditto.
10177 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
10179 * sigtramp-armvxw.c: Also restore r0.
10181 2014-02-25 Robert Dewar <dewar@adacore.com>
10183 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
10184 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
10185 set unconditionally.
10186 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
10187 any more (Output_Msg_Text): Rewritten with new convention on
10188 output of warnings that are treated as errors.
10189 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
10191 * gnat_rm.texi: Updates to documentation on pragma
10193 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
10194 set Warning_Doc_Switch.
10195 * lib-writ.ads: Add documentation note on ALI file generation
10197 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
10199 * sem_attr.adb (Resolve_Attribute, case Access):
10200 Abort_Task'Access violates the No_Abort_Statements restriction.
10201 * sem_res.adb (Resolve_Call): Check restriction
10202 No_Abort_Statements for call to Abort_Task or a renaming of it.
10204 2014-02-25 Robert Dewar <dewar@adacore.com>
10206 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
10207 type name as index.
10208 * lib.ads: Minor reformatting.
10209 * einfo.ads: Minor reformatting.
10211 2014-02-25 Doug Rupp <rupp@adacore.com>
10213 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
10214 use Short_Descriptor(S) as the argument passing mechanism.
10216 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
10218 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
10220 2014-02-25 Robert Dewar <dewar@adacore.com>
10222 * atree.ads (Warnings_Treated_As_Errors): New variable.
10223 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
10224 error object (Initialize): Initialize Warnings_As_Errors_Count
10225 (Write_Error_Summary): Include count of warnings treated as errors.
10226 * erroutc.adb (Warning_Treated_As_Error): New function.
10227 (Matches): Function moved to outer level of package.
10228 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
10229 (Warning_Treated_As_Error): New function.
10230 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
10231 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
10232 * opt.ads (Config_Switches_Type): Add entry for
10233 Warnings_As_Errors_Count.
10234 (Warnings_As_Errors_Count): New variable.
10235 (Warnings_As_Errors): New array.
10236 * par-prag.adb: Add dummy entry for Warning_As_Error.
10237 * sem_prag.adb (Analyze_Pragma): Implement new pragma
10239 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
10241 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
10243 * sigtramp.h: Fix minor inaccuracy.
10245 2014-02-25 Ben Brosgol <brosgol@adacore.com>
10247 * gnat_ugn.texi: Added description of kill command.
10249 2014-02-25 Robert Dewar <dewar@adacore.com>
10251 * gnat_rm.texi (Address_Clauses): Add a section discussing the
10252 problem of address clauses causing unexpected initialization,
10253 including the effect of Initialize_Scalars.
10255 2014-02-25 Robert Dewar <dewar@adacore.com>
10257 * errout.adb: Various changes for better msgs for anonmous access
10259 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
10261 (Buffer_Remove): Version with character argument.
10262 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
10263 of mismatching conventions for access-to-subprogram case.
10264 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
10265 access types in record.
10266 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
10267 types, including in records.
10269 2014-02-25 Doug Rupp <rupp@adacore.com>
10271 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
10272 enhancements and corrections.
10274 2014-02-25 Robert Dewar <dewar@adacore.com>
10276 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
10278 2014-02-25 Robert Dewar <dewar@adacore.com>
10280 * gnat_rm.texi: First set of documentation additions for
10281 predefined RM units.
10282 * checks.adb: Minor reformatting.
10283 * sem_elab.adb (Check_Task_Activation): Minor fix to error
10285 * sem_util.adb: Minor reformatting.
10287 2014-02-25 Arnaud Charlet <charlet@adacore.com>
10289 * usage.adb (Usage): Add help on -gnateC.
10290 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
10291 * opt.ads (Generate_CodePeer_Messages): New flag.
10292 * gnat_ugn.texi: Document new switch -gnateC.
10294 2014-02-25 Ben Brosgol <brosgol@adacore.com>
10296 * gnat_rm.texi: Corrected minor typos in Implementation Defined
10298 * opt.ads: Minor reformatting.
10300 2014-02-25 Robert Dewar <dewar@adacore.com>
10302 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
10303 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
10304 of -gnatel/-gnateL.
10305 * opt.ads (Warn_Info_Messages): New flag.
10306 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
10308 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
10310 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
10311 * usage.adb: Add documentation of -gnatel/-gnateL Update
10312 documentation of -gnatwl/-gnatwL.
10313 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
10314 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
10316 2014-02-25 Robert Dewar <dewar@adacore.com>
10318 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
10319 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
10320 * interfac.ads: Minor code reorganization (add pragma
10321 Compiler_Unit_Warning).
10322 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
10323 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
10324 Has_Shift_Operator flag.
10325 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
10326 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
10327 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
10328 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
10329 Add entry for Name_Amount.
10330 * checks.adb (Selected_Range_Checks): When checking for a null
10331 range, make sure we use the base type, and not the subtype for
10332 deciding a range is null.
10333 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
10334 for suspicious loop bound which is outside the range of the
10336 * gnat_ugn.texi: Add documentation section "Determining the
10337 Chosen Elaboration Order"
10338 * sem_ch13.adb (UC_Entry): Add field Act_Unit
10339 (Validate_Unchecked_Conversion): Store Act_Unit
10340 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
10341 * treepr.adb: Minor reformatting.
10343 2014-02-25 Arnaud Charlet <charlet@adacore.com>
10345 * usage.adb: Minor: fix typo.
10347 2014-02-25 Robert Dewar <dewar@adacore.com>
10349 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
10350 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
10351 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
10352 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
10353 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
10354 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
10355 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
10356 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
10357 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
10358 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
10359 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
10360 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
10361 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
10362 Compiler_Unit_Warning, change Compiler_Unit everywhere to
10363 Compiler_Unit_Warning.
10365 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
10367 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
10368 in ASIS mode aggregates that are used as aspect definitions.
10370 2014-02-25 Robert Dewar <dewar@adacore.com>
10372 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
10375 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10377 * freeze.adb (Freeze_Entity): If the return type of a function
10378 is a limited view, and the non-limited view has not been seen yet,
10379 defer freezing to some later point.
10381 2014-02-25 Robert Dewar <dewar@adacore.com>
10383 * sem_ch3.adb: Minor reformatting.
10385 2014-02-25 Robert Dewar <dewar@adacore.com>
10387 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
10388 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
10389 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
10390 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
10391 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
10392 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
10393 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
10394 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
10395 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
10396 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
10397 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
10398 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
10399 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
10400 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
10401 snames.ads-tmpl: Change Compiler_Unit everywhere to
10402 Compiler_Unit_Warning.
10404 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
10406 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
10407 (Collect_Body_Postconditions_In_Decls): New routine.
10408 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
10409 postcondition aspects or pragmas that appear on a subprogram
10411 (Collect_Spec_Preconditions): Factor out code. Handle
10412 precondition aspects or pragmas that appear on a subprogram
10414 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
10415 aspects that apply to a subprogram body stub is no longer delayed,
10416 the aspects are analyzed on the spot.
10417 (SPARK_Aspect_Error):
10418 Aspects that apply to a subprogram declaration cannot appear in
10420 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
10421 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
10422 is now a local variable. Code cleanup. Analysis related to
10423 the aspects of a subprogram body stub is now carried out by
10424 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
10425 and/or pragmas of a subprogram body stub to the proper body
10426 as this is no longer needed. Do not analyze the aspects of a
10427 subprogram stub when the corresponding source unit is missing.
10428 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
10430 (Analyze_Task_Body_Stub): Flag the illegal use of
10432 (Optional_Subunit): Add local variable Unum.
10433 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
10434 pragma when it applies to a subprogram body stub.
10435 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
10436 Depends and Global can now apply to a subprogram body stub as
10437 long as it acts as its own spec.
10438 (Analyze_Refined_Pragma):
10439 Code reformatting. Refinement pragmas cannot apply to a subunit.
10441 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
10443 * einfo.ads Update the usage of flag
10444 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
10445 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
10446 now starts with the letter 'C'. This makes reading expanded
10448 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
10449 Iter_Loop. Signal that an Ada 2012 iterator loop requires
10450 secondary stack management when creating a transient scope for
10451 an element reference.
10452 * exp_util.adb (Process_Statements_For_Controlled_Objects):
10453 When wrapping the statements of a loop, pass the E_Loop entity
10454 to the wrapping machinery.
10455 (Wrap_Statements_In_Block): Add
10456 formal parameter Scop along with comment on usage. Add local
10457 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
10458 block as requiring secondary stack management when the block is
10459 created inside an Ada 2012 iterator loop. This ensures that any
10460 reference objects are reclaimed on each iteration of the loop.
10461 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
10462 tasked with the handling of container iterators as requiring
10463 secondary stack management. This ensures that iterators are
10464 reclaimed when the loop terminates or is exited in any fashion.
10465 * sem_util.adb (Add_Block_Identifier): New routine.
10466 (Find_Enclosing_Iterator_Loop): New routine.
10467 * sem_util.ads (Add_Block_Identifier): New routine.
10468 (Find_Enclosing_Iterator_Loop): New routine.
10470 2014-02-25 Robert Dewar <dewar@adacore.com>
10472 * sinfo.ads: Minor reformatting.
10474 2014-02-25 Tristan Gingold <gingold@adacore.com>
10476 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
10478 2014-02-25 Pascal Obry <obry@adacore.com>
10480 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
10482 2014-02-25 Tristan Gingold <gingold@adacore.com>
10484 * sem_ch10.adb: Minor comment fix.
10486 2014-02-25 Bob Duff <duff@adacore.com>
10488 * s-tasdeb.adb: Misc cleanup of this package,
10489 including printing addresses in hexadecimal.
10490 (Write): Fix minor bug when taking 'Address of an empty string.
10492 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10494 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
10495 public child unit when it does not refer to the abstract state
10496 of a public ancestor.
10498 2014-02-25 Yannick Moy <moy@adacore.com>
10500 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
10501 Validity_Checks in GNATprove and CodePeer modes.
10503 2014-02-25 Pascal Obry <obry@adacore.com>
10505 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
10506 Artifacts attribute.
10508 2014-02-25 Yannick Moy <moy@adacore.com>
10510 * sem_prag.adb: Minor reformatting to get consistent messages.
10512 2014-02-25 Robert Dewar <dewar@adacore.com>
10514 * checks.adb: Minor reformatting.
10515 * sinfo.ads (Do_Range_Check): Document that this flag is never
10516 passed to the back end.
10518 2014-02-25 Yannick Moy <moy@adacore.com>
10520 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
10521 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
10523 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
10525 * sem_res.adb (Appears_In_Check): New routine.
10526 (Resolve_Entity_Name): Remove local variables Prev and
10527 Usage_OK. Par is now a constant. Remove the parent chain traversal
10528 as the placement of a volatile object with enabled property
10529 Async_Writers and/or Effective_Reads must appear immediately
10530 within a legal construct.
10532 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
10534 * checks.adb (Apply_Selected_Range_Checks):
10535 Alphabetize local constants and variables. Add comments.
10536 Always insert a range check that requires runtime evaluation into
10539 2014-02-25 Robert Dewar <dewar@adacore.com>
10541 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
10543 2014-02-25 Bob Duff <duff@adacore.com>
10545 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
10546 iterations while waiting for independent tasks to terminate;
10547 if an independent task does not terminate, we do not want to
10548 hang here. In that case, the thread will be terminated when the
10550 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
10552 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10554 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
10555 used to perform pre-analysis of the expression for SPARK
10556 aspects that have a non-standard syntax, such as GLobal and
10557 Initializes. The procedure applies to the original expression
10558 in an aspect specification, prior to the analysis of the
10559 corresponding pragma, in order to provide semantic information
10560 for ASIS navigation purposes.
10561 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
10562 Call new subprogram.
10564 2014-02-25 Yannick Moy <moy@adacore.com>
10566 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
10568 2014-02-25 Doug Rupp <rupp@adacore.com>
10570 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
10571 (__gnat_adjust_context_for_raise): Bump the PC by 2.
10573 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10575 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
10576 misplaced IS, add a statement sequence to improper body only if
10577 one has not been parsed already.
10579 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10581 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
10582 mismatch when multidimensional array is updated with a single
10585 2014-02-25 Yannick Moy <moy@adacore.com>
10587 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
10588 sem_ch6.adb: Mark most references to SPARK RM in error messages
10591 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10593 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
10594 appears in a list of basic declarations, complete the tree with
10595 an empty statement list, to prevent cascaded errors and crashes
10596 if semantic analysis is attempted.
10598 2014-02-24 Thomas Quinot <quinot@adacore.com>
10600 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
10602 * erroutc.adb: Minor reformatting.
10604 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10606 * sem_prag.adb (Check_Clause_Syntax): Account
10607 for a solitary input item in a dependency list.
10609 2014-02-24 Yannick Moy <moy@adacore.com>
10611 * gnat1drv.adb (Adjust_Global_Switches): Do not
10612 use validity checks at all in GNATprove_Mode.
10614 2014-02-24 Robert Dewar <dewar@adacore.com>
10616 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
10617 atree.adb, atree.ads: Minor reformatting.
10619 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10621 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
10622 global and dependence refinement when SPARK_Mode is off.
10623 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
10624 state refinement when SPARK_Mode is off.
10625 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
10626 variable Decl. Insert the generated pragma for Refined_State
10627 after a potential pragma SPARK_Mode.
10628 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
10629 constant Deps. Remove local variable Expr. Check the syntax
10630 of pragma Depends when SPARK_Mode is off. Factor out the
10631 processing for extra parenthesis around individual clauses.
10632 (Analyze_Global_In_Decl_List): Items is now a constant. Check
10633 the syntax of pragma Global when SPARK_Mode is off.
10634 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
10635 Initializes when SPARK_Mode is off.
10636 (Analyze_Part_Of): Check
10637 the syntax of the encapsulating state when SPARK_Mode is off.
10638 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
10639 SPARK_Mode is off. Move the declaration order check with respect
10640 to pragma Initializes to the end of the processing. Do not verify
10641 the declaration order for pragma Initial_Condition when SPARK_Mode
10642 is off. Do not complain about a useless package refinement when
10644 (Analyze_Refined_Depends_In_Decl_Part): Refs
10645 is now a constant. Check the syntax of pragma Refined_Depends
10646 when SPARK_Mode is off.
10647 (Analyze_Refined_Global_In_Decl_Part):
10648 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
10649 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
10650 Refined_State when SPARK_Mode is off.
10651 (Check_Dependence_List_Syntax): New routine.
10652 (Check_Global_List_Syntax): New routine.
10653 (Check_Initialization_List_Syntax): New routine.
10654 (Check_Item_Syntax): New routine.
10655 (Check_State_Declaration_Syntax): New routine.
10656 (Check_Refinement_List_Syntax): New routine.
10657 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
10659 2014-02-24 Robert Dewar <dewar@adacore.com>
10661 * a-tags.adb, s-os_lib.adb: Minor reformatting.
10663 2014-02-24 Thomas Quinot <quinot@adacore.com>
10665 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
10666 strerror message, not just numeric errno value.
10668 2014-02-24 Doug Rupp <rupp@adacore.com>
10670 * raise-gcc.c (exception_class_eq): Make endian neutral.
10672 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10674 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
10675 flag, and reset Etype and Analyzed attributes unconditionally
10676 when copying a tree that may be partly analyzed.
10677 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
10678 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
10679 within a subprogram body and applies to it, remove it from the
10680 body before making a copy of it, to prevent spurious errors when
10681 analyzing the copied body.
10683 2014-02-24 Thomas Quinot <quinot@adacore.com>
10685 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
10686 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
10687 vxWorks.h has been included. Also ensure that file attributes
10688 related definitions are output even in cases where socket support
10690 * a-tags.adb: Code clean up.
10691 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
10692 instead of -I to add the main ada source directory to the header
10693 search path, in order to avoid conflict between our own "types.h"
10694 and VxWork's <types.h>.
10696 2014-02-24 Robert Dewar <dewar@adacore.com>
10698 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
10699 * debug.adb: Remove documentation of -gnatd.X, no longer used.
10700 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
10702 2014-02-24 Bob Duff <duff@adacore.com>
10704 * gnat_ugn.texi: Improve documentation of gnatpp.
10706 2014-02-24 Thomas Quinot <quinot@adacore.com>
10708 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
10709 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
10710 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
10711 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
10712 a chars_ptr, because on Windows this is a renaming of
10713 Socket_Error_Message.
10715 2014-02-24 Robert Dewar <dewar@adacore.com>
10717 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
10718 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
10719 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
10722 2014-02-24 Thomas Quinot <quinot@adacore.com>
10724 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
10725 that the source directory containing s-oscons-tmplt.c is on the
10726 include path, so that all internal header files are available.
10728 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10730 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
10731 domain of iteration is an attribute reference 'Old, this is an
10732 Ada 2012 iterator and the loop must be rewritten as such.
10734 2014-02-24 Thomas Quinot <quinot@adacore.com>
10736 * s-fileio.adb (Errno_Message): Remove, use shared version from
10738 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
10739 * g-stseme (Socket_Error_Message): Reimplement in terms of new
10741 * g-socthi.ads, g-socthi.adb: Change profile of
10742 Socket_Error_Message to return String to allow the above.
10743 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
10744 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
10745 * g-socthi-vxworks.ads: Update to account for the above profile
10747 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
10748 * s-crtl.ads (strncpy): New procedure.
10749 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
10750 Use import from s-crtl.
10751 * a-envvar.adb, osint.adb: Use imports of C runtime functions
10752 from s-crtl instead of re-importing locally.
10754 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10756 * sem_prag.adb (Analyze_Global_Item): Emit the
10757 variable related checks concerning volatile objects only when
10760 2014-02-24 Robert Dewar <dewar@adacore.com>
10762 * sem_ch5.adb (Analyze_Iterator_Specification): use
10763 Error_Msg_Ada_2012_Feature.
10765 2014-02-24 Jose Ruiz <ruiz@adacore.com>
10767 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
10768 No_Local_Timing_Events and No_Specific_Termination_Handlers
10769 must be set, according to the Ravenscar profile definition
10772 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10774 * sem_ch6.adb (Analyze_Expression_Function): If this is a
10775 completion, freeze return type and its designated type if needed.
10777 2014-02-24 Thomas Quinot <quinot@adacore.com>
10779 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10780 'Address): When moving initialization statements to a freeze
10781 entity, keep them under a single node (i.e. do not unwrap
10782 expressions with actions), and set the Initialization_Statements
10783 attribute again so that processing of a later pragma Import can
10786 2014-02-24 Claire Dross <dross@adacore.com>
10788 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
10789 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
10790 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
10791 Left/Right to First_To_Previous/Current_To_Last.
10793 2014-02-24 Thomas Quinot <quinot@adacore.com>
10795 * adaint.h (struct file_attributes): New component "error"
10796 (__gnat_error_attributes): Accessor for the above.
10797 * adaint.c (__gnat_error_attributes): New subprogram
10798 (__gnat_stat): Fix returned value (expect errno value)
10799 (__gnat_stat_to_attr): Add management of error component (set to
10800 stat errno value, except for missing files where it is set to 0,
10801 and exists is set to 0).
10802 * osint.ads (File_Attributes_Size): Update per change above,
10803 also clarify documentation.
10804 * s-filatt.ads: New file, binding to file attributes related
10806 * Makefile.rtl (s-filatt): New runtime unit.
10807 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
10808 to library function if not available on target).
10809 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
10810 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
10811 SIZEOF_struct_dirent_alloc): New constants.
10812 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
10813 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
10814 Perform appropriate error checking if stat fails (do not just
10815 ignore existing files if stat fails)
10816 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
10819 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10821 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
10822 the use of volatile objects as global items in a function to
10823 the variable related checks section.
10824 * sem_util.adb (Async_Readers_Enabled): Directly call
10825 Has_Enabled_Property.
10826 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
10827 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
10828 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
10829 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
10830 Update the comment on usage. State_Has_Enabled_Property how handles
10831 the original logic of the routine. Add processing for variables.
10832 (State_Has_Enabled_Property): New routine.
10833 (Variable_Has_Enabled_Property): New routine.
10835 2014-02-24 Robert Dewar <dewar@adacore.com>
10837 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
10838 Minor reformatting.
10839 * atree.ads, atree.adb (Node35): New function.
10840 (Set_Node35): New procedure.
10841 * debug.adb: Define new debug flag -gnatd.X.
10842 * einfo.ads, einfo.adb (Import_Pragma): New field.
10843 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
10844 really active yet, has to be activated with -gnatd.X.
10845 * sem_prag.adb (Set_Imported): Set new Import_Pragma
10846 field (Set_Imported): Don't set Is_Public (see
10847 Freeze.Wrap_Imported_Subprogram)
10848 * par-ch3.adb (P_Component_List): Handle unexpected null component.
10850 2014-02-24 Yannick Moy <moy@adacore.com>
10852 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
10853 * gnat_rm.texi: Correct documentation of attribute Update.
10855 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10857 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
10858 iterator in older versions of Ada.
10860 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10862 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
10863 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
10865 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10867 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
10868 indexed_components that are instances of Ada 2012 container
10869 indexing operations. Analysis and resolution of such nodes
10870 is performed on the attribute, and the original source is
10871 preserved for ASIS operations. If expansion is enabled, the
10872 indexed component is replaced by the value of this attribute,
10873 which is in a call to an Indexing aspect, in most case wrapped
10874 in a dereference operation.
10875 * sem_ch4.adb (Analyze_Indexed_Component): Create
10876 Generalized_Indexing attribute when appropriate.
10877 (Analyze_Call): If prefix is not overloadable and has an indexing
10878 aspect, transform into an indexed component so it can be analyzed
10879 as a potential container indexing.
10880 (Analyze_Expression): If node is an indexed component with a
10881 Generalized_ Indexing, do not re-analyze.
10882 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
10883 of an indexed_component that has been transformed into a container
10884 indexing operation.
10885 (Resolve_Indexed_Component): Call the above when required.
10886 (Resolve): Do not insert an explicit dereference operation on
10887 an indexed_component whose type has an implicit dereference:
10888 the operation is inserted when resolving the related
10889 Generalized_Indexing.
10891 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
10893 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
10896 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10898 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
10900 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
10901 Merge the expected and available mode errors.
10902 (Report_Unused_Constituents): Remove leading spaces in error messages.
10903 (Report_Unused_States): Remove leading spaces in error messages.
10905 2014-02-24 Thomas Quinot <quinot@adacore.com>
10907 * par_sco.adb (Traverse_One): Refine categorization of statement
10910 2014-02-24 Robert Dewar <dewar@adacore.com>
10912 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
10913 Pure_05, Pure_12 and Preelaborate_05.
10914 * gnat_rm.texi: Update accordingly.
10915 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
10916 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
10917 Recognize one argument form of these pragmas only in GNAT mode
10920 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10922 * s-dimmks.ads: Replace symbol for temperature, previously the
10923 Greek letter Theta, by the ASCII @ sign.
10924 * s-diflio.ads: ditto.
10926 2014-02-24 Robert Dewar <dewar@adacore.com>
10928 * exp_ch4.adb: Minor code reorganization (use OR for boolean
10930 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
10932 2014-02-24 Ben Brosgol <brosgol@adacore.com>
10934 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
10935 so that references to gnatmem and ASIS tools do not appear in the FSF
10936 edition of the GNAT User's Guide.
10938 2014-02-24 Yannick Moy <moy@adacore.com>
10940 * freeze.adb (Freeze_Entity): Do not issue warning
10941 for pre/post being ignored on imported subprogram in GNATprove
10944 2014-02-24 Robert Dewar <dewar@adacore.com>
10946 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
10947 stand.ads, sem_eval.adb: Minor reformatting.
10949 2014-02-24 Yannick Moy <moy@adacore.com>
10951 * sem_prag.adb: Minor rewording in error message.
10953 2014-02-24 Johannes Kanig <kanig@adacore.com>
10955 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
10956 GNATprove_mode, gnat2why doesn't need nor use these types.
10958 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10960 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
10961 target, in the case of signed integer exponentiation that uses a
10962 run-time routine, always select the Exp_* versions, since overflow
10963 checking is automatically done by AAMP arithmetic instructions.
10965 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10967 * sem_ch13.adb (Analyze_Aspect_Specifications):
10968 When the related context is a package instace, insert pragma
10969 Abstract_State after all internally-generated renamings related
10970 to the instance "header".
10972 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10974 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
10976 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
10977 call to an abstract subprogram is legal if it appears in a
10978 pre/postcondition of another abstract operation.
10980 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
10982 * gnat_ugn.texi: Misc updates.
10984 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10986 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
10988 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10990 * layout.adb (Layout_Variant_Record): Instantiate
10991 Generic_Check_Choices and call Check_Choices before calling
10992 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
10993 set to prevent generating incorrect discriminant-checking
10994 functions for 'others' variants (functions that unconditionally
10995 return True rather than accounting for the values covered by the
10997 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
10998 Formal_Derived_Matching.
10999 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
11000 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
11001 Formal_Derived_Matching formal to Subtypes_Statically_Match.
11002 (Subtypes_Statically_Match): Suppress the Object_Size matching
11003 test in the case where Formal_Derived_Matching is True.
11004 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
11005 True for Formal_Derived_Matching_Formal on the call to
11006 Subtypes_Statically_Compatible.
11008 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
11010 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
11012 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
11014 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
11015 Look through a conversion between original and packable version to get
11017 (build_component_ref): Rework comment and fix formatting.
11019 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
11021 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
11022 project-specific options.
11024 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11026 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
11027 not Constraint_Error.
11028 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
11029 * sem_ch5.adb: Code clean up.
11031 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
11033 * sem_prag.adb (Usage_Error): Remove local
11034 constant Typ. Remove the specialized diagnostics for unconstrained
11035 or tagged items as those are not part of the explicit input set
11036 of the related subprogram and should not be flagged.
11038 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11040 * sem_attr.adb: Add guard to preserve all errors.
11042 2014-02-20 Vincent Celier <celier@adacore.com>
11044 * switch-m.adb (Normalize_Compiler_Switches): Take into account
11045 switches that are recorded in ALI files: -gnateA, -gnateE,
11046 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
11048 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11050 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
11051 of an element iterator form over a formal container with an
11053 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
11054 to create declaration and loop statements for both forms of
11055 container iterators.
11056 (Expand_Formal_Container_Element_Iterator): New procedure
11057 to handle loops of the form "for E of C" when C is a formal
11059 (Expand_Formal_Container_Iterator): Code cleanup.
11061 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
11063 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
11064 (Analyze_Contract_Case): Remove the use of
11065 "may". Replace "aspect Contract_Cases" to avoid categorization
11066 of aspect vs pragma.
11067 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
11068 (Analyze_Global_Item): Remove
11069 the use of "formal", specify the subprogram. Split the
11070 error message about a state with visible refinement into
11071 two. Remove the use of "global" from "volatile global item".
11072 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
11074 (Analyze_Input_Output): Update the call to
11075 Check_Mode. Specify the duplicated item. Reword the error
11076 message concerning an input of a null output list. Use "\"
11077 for error message continuation.
11078 (Analyze_Part_Of): Remove
11079 the use of "may". Use "\" for error message continuation.
11080 (Analyze_Refined_Depends_In_Decl_Part): Update the error
11081 message concerning a useless refinement to match the format
11083 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
11084 concerning a useless refinement.
11085 (Analyze_Refinement_Clause): Use "\" for error message continuation.
11086 (Check_Constituent_Usage): Use "\" for error message continuation.
11087 (Check_Dependency_Clause): Use "\" for error message continuation.
11088 (Check_Matching_Constituent): Use "\" for error message continuation.
11089 (Check_Missing_Part_Of): Use "\" for error message continuation.
11090 (Check_Mode): Renamed to
11091 Check_Role. Update the comment on usage. Redo the error reporting
11093 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
11094 message continuation.
11095 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
11096 with comment on usage. Update all occurrences of Is_Input and Is_Output.
11097 (Inconsistent_Mode_Error): Use "\" for error message continuation.
11098 (Input_Match): Use "\" for error message continuation.
11099 (Role_Error): New routine.
11100 (Set_Convention_From_Pragma): Use "\" for error message continuation.
11101 (Usage_Error): Add local variable Error_Msg. Build specialized error
11102 message showcasing the offending item kind. Redo the diagnostics for
11103 unconstrained types.
11105 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11107 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
11108 to determine whether a type is a container type, rather than
11109 examining only its type declaration, so that subtypes and derived
11110 types are handled properly.
11112 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
11114 * gnat_ugn.texi: gnatmetric: add description of project-specific
11117 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11119 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
11120 all choices in an association for a record type have the same
11121 type, as is done for record aggregates.
11123 2014-02-20 Robert Dewar <dewar@adacore.com>
11125 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
11126 Unmodified rather than Warnings (Off). Make comments
11127 uniform in the four affected units.
11129 2014-02-20 Robert Dewar <dewar@adacore.com>
11131 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
11132 Object_Size): For non-scalar types allow any value that is a
11134 * gnat_rm.texi: Document Object_Size for composites more clearly.
11136 2014-02-20 Yannick Moy <moy@adacore.com>
11138 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
11140 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11142 * stand.ads: Raise_Type: new predefined entity, used as the type
11143 of a Raise_Expression prior to resolution.
11144 * cstand.adb: Build entity for Raise_Type.
11145 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
11146 initial type of the node.
11147 * sem_type.adb (Covers): Raise_Type is compatible with all
11149 * sem_res.adb (Resolve): Remove special handling of Any_Type on
11150 Raise_Expression nodes.
11151 (Resolve_Raise_Expression): Signal ambiguity if the type of the
11152 context is still Raise_Type.
11154 2014-02-20 Robert Dewar <dewar@adacore.com>
11156 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
11157 mismatching predicates.
11158 * sem_ch6.adb (Check_Conformance): Give better messages on
11159 predicate mismatch.
11160 * sem_eval.adb (Predicates_Match): Move to spec.
11161 * sem_eval.ads (Predicates_Match): Moved here from body.
11163 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11165 * a-cbmutr.adb: Use default value in Insert_Child.
11167 2014-02-20 Vincent Celier <celier@adacore.com>
11169 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
11170 Stringt.Initialize in all project aware tools.
11172 2014-02-20 Doug Rupp <rupp@adacore.com>
11174 * gnat_ugn.texi: Document gnatbind -X option.
11175 * vms_data.ads: Minor warnings documentation reformatting.
11177 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11179 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
11180 procedure for a base type.
11182 2014-02-20 Robert Dewar <dewar@adacore.com>
11184 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
11185 expression with type info.
11186 * sem_ch13.adb: Minor reformatting.
11187 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
11188 False if predicates do not match on the two types.
11190 2014-02-20 Arnaud Charlet <charlet@adacore.com>
11192 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
11193 In Relaxed_RM_Semantics mode, allow any static integer value,
11194 for compatibility with other compilers.
11196 2014-02-20 Vincent Celier <celier@adacore.com>
11198 * errutil.adb (Initialize): Properly initialize entry in table
11199 Warnings when warnings are suppressed.
11201 2014-02-20 Robert Dewar <dewar@adacore.com>
11203 * s-os_lib.ads: Add warning about non-portability of Rename_File.
11204 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
11205 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
11206 * gnat_ugn.texi: Document no warnings on junk variable names.
11207 * layout.adb: Minor code reorganization (use Ekind_In).
11208 * stringt.adb: Move initialization of Null_String_Id to Initialize
11211 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11213 * sem_ch13.adb: Initialize optional Element_Id.
11215 2014-02-20 Robert Dewar <dewar@adacore.com>
11217 * s-os_lib.ads (Rename_File): Minor commment addition.
11219 2014-02-20 Thomas Quinot <quinot@adacore.com>
11221 * einfo.ads: Minor reformatting.
11223 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
11225 * aspects.adb (Exchange_Aspects): New routine.
11226 * aspects.ads (Exchange_Aspects): New routine.
11227 * atree.adb (Rewrite): Do not check whether the save node has
11228 aspects as it never will, instead check the node about to be clobbered.
11229 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
11230 entities of generic packages.
11231 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
11232 pointer of an aspect specification list after rewriting takes place.
11233 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
11234 specifications of the generic template and the copy used for analysis.
11235 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
11236 the aspect specifications of the generic template and the
11237 copy used for analysis.
11238 (Analyze_Package_Instantiation): Propagate the aspect specifications
11239 from the generic template to the instantiation.
11240 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
11241 specifications from the generic template to the instantiation.
11242 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
11243 Abstract_State, Initializes and Initial_Condition when they
11244 apply to a package instantiation.
11246 2014-02-20 Robert Dewar <dewar@adacore.com>
11248 * stringt.adb: Add call to Initialize in package initialization.
11250 2014-02-20 Robert Dewar <dewar@adacore.com>
11252 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
11253 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
11254 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
11255 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
11258 2014-02-20 Bob Duff <duff@adacore.com>
11260 * s-os_lib.ads: Minor: Remove incorrect comment.
11262 2014-02-20 Robert Dewar <dewar@adacore.com>
11264 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
11266 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11268 * a-cborma.adb (Assign): When creating a node without a specified
11269 element, insert an uninitialized element in the map, because
11270 the instance may provide an element type with a default
11271 initialization, e.g a scalar with a Default_Value aspect.
11272 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
11273 (Insert): In the version without explicit element, provide an
11274 uninitialized element, as above.
11275 * a-cbdlli.adb (Append): In the version without explicit element,
11276 provide an uninitalized element, as above.
11277 (Allocate): Remove unused version.
11279 2014-02-20 Robert Dewar <dewar@adacore.com>
11281 * sem_elab.adb: Minor code reorganization (use Nkind_In).
11282 * stringt.adb: Remove temporary pragma Warnings (Off).
11283 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
11286 2014-02-20 Matthew Heaney <heaney@adacore.com>
11288 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
11291 2014-02-20 Ed Schonberg <schonberg@adacore.com>
11293 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
11294 properly the cursor type for subsequent volatile testing in SPARK
11295 mode, when domain is a formal container with an Iterabe aspect.
11297 2014-02-20 Robert Dewar <dewar@adacore.com>
11299 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
11300 (Set_Specific_Warning_Off): Add Reason argument.
11301 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
11302 (Set_Specific_Warning_Off): Add Reason argument.
11303 * erroutc.adb (Warnings_Entry): Add Reason field
11304 (Specific_Warning_Entry): Add Reason field.
11305 (Warnings_Suppressed): return String_Id for Reason.
11306 (Warning_Specifically_Suppressed): return String_Id for Reason.
11307 * erroutc.ads (Warnings_Entry): Add Reason field.
11308 (Specific_Warning_Entry): Add Reason field.
11309 (Set_Specific_Warning_Off): Add Reason argument.
11310 (Set_Warnings_Mode_Off): Add Reason argument.
11311 (Warnings_Suppressed): return String_Id for Reason.
11312 (Warning_Specifically_Suppressed): return String_Id for Reason.
11313 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
11314 (Warning_Specifically_Suppressed): returns String_Id for Reason
11315 * gnat_rm.texi: Document that Warning parameter is string literal
11316 or a concatenation of string literals.
11317 * par-prag.adb: New handling for Reason argument.
11318 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
11319 for Reason argument.
11320 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
11321 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
11322 * stringt.adb: Set Null_String_Id.
11323 * stringt.ads (Null_String_Id): New constant.
11325 2014-02-20 Robert Dewar <dewar@adacore.com>
11327 * einfo.ads: Minor comment addition: Etype of package is
11328 Standard_Void_Type.
11329 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
11330 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
11331 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
11332 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
11333 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
11334 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11335 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
11336 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
11337 Replace all calls with calls to New_Occurrence_Of.
11339 2014-02-20 Robert Dewar <dewar@adacore.com>
11341 * par-util.adb (Ignore, case of right paren): Make this a
11344 2014-02-19 Robert Dewar <dewar@adacore.com>
11346 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
11347 * debug.adb: Remove -gnatd.X switch, no longer used.
11348 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
11351 2014-02-19 Bob Duff <duff@adacore.com>
11353 * g-socket.ads: Minor: Correct some comments.
11355 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11357 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
11359 2014-02-19 Arnaud Charlet <charlet@adacore.com>
11361 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
11362 an error on out of range priorities if Relaxed_RM_Semantics.
11363 * sem_prag.adb (Analyze_Pragma): Ditto.
11365 2014-02-19 Bob Duff <duff@adacore.com>
11367 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
11368 where F denotes the renaming of an enumeration literal, and
11369 issue a specialized error message.
11371 2014-02-19 Matthew Heaney <heaney@adacore.com>
11373 * a-chtgop.ads (Checked_Index): New operation.
11374 (Next): Changed mode of hash table.
11375 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
11376 (Generic_Read, Reserve_Capacity): Ditto.
11377 (Generic_Equal): Detect tampering.
11378 (Next): Changed mode of hash table, detect tampering.
11379 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
11381 (Find): Changed mode of hash table.
11382 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
11383 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
11385 (Find): Changed mode of hash table, check for tampering.
11386 (Generic_Replace_Element): Check for tampering.
11387 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
11388 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
11389 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
11391 (Find, Generic_Replace_Element): Check for tampering.
11392 * a-chtgbo.ads (Checked_Index): New operation.
11393 * a-chtgbo.adb (Checked_Index): New operation
11394 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
11395 (Generic_Read, Next): Ditto.
11396 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
11397 table (Difference, Intersection): Use variable view of
11398 source, detect tampering (Find, Is_Subset, Overlap): Use
11399 variable view of container (Symmetric_Difference, Union):
11400 Detect tampering (Vet): Use Checked_Index to detect tampering
11401 (Constant_Reference, Element, Find): Use variable view of
11403 (Update_Element_Preserving_Key): Detect tampering.
11404 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
11406 (Is_Subset): Ditto.
11407 (Equivalent_Sets, Overlap): Use Node's Next component.
11408 (Vet): Use Checked_Index to detect tampering.
11409 (Constant_Reference, Element, Find): Use variable view of container.
11410 (Update_Element_Preserving_Key): Detect tampering.
11411 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
11412 Element, Find): Use variable view of container.
11413 (Reference): Rename hash table component.
11414 (Vet): Use Checked_Index to detect tampering.
11416 2014-02-19 Arnaud Charlet <charlet@adacore.com>
11418 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
11421 2014-02-19 Thomas Quinot <quinot@adacore.com>
11423 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
11424 against calls without Def_Id.
11426 2014-02-19 Claire Dross <dross@adacore.com>
11428 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11429 a-cofove.ads: Add global annotations to subprograms.
11431 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11433 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
11434 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
11435 Initial_Condition no longer requires the presence of pragma
11436 Initialized. Do not try to diagnose whether all variables mentioned in
11437 pragma Initializes also appear in Initial_Condition.
11438 (Collect_Variables): Removed.
11439 (Match_Variable): Removed.
11440 (Match_Variables): Removed.
11441 (Report_Unused_Variables): Removed.
11443 2014-02-19 Thomas Quinot <quinot@adacore.com>
11445 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
11447 2014-02-19 Robert Dewar <dewar@adacore.com>
11449 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
11452 2014-02-19 Vincent Celier <celier@adacore.com>
11454 * prj-part.adb (Parse_Single_Project): Use the fully resolved
11455 project path, with all symbolic links resolved, to check if the
11456 same project is imported with a different unresolved path.
11457 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
11458 changed to Resolved_Path to reflect that all symbolic links
11461 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11463 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
11464 from sem_ch13, for use elsewhere.
11465 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
11466 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
11467 cursor type on the loop variable when the iteration is over o
11470 2014-02-19 Vincent Celier <celier@adacore.com>
11472 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
11473 for an empty Target (Check_Target): Never fail when an empty
11474 target is declared in the configuration project.
11476 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11478 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
11479 the pragma comes fron a predicate aspect and the context is a
11480 record declaration within the scope that declares the type.
11482 2014-02-19 Robert Dewar <dewar@adacore.com>
11484 * gnat_rm.texi: Minor clarifications.
11485 * expander.adb, sem_aggr.adb: Add comments.
11487 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11489 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
11490 applies to a subprogram body, the name is the current scope,
11491 rather than being declared in the current scope.
11492 (Analyze_Pragma, case No_Return): Handle properly a No_Return
11493 aspect applied to a subprogram body.
11495 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11497 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
11498 of overloaded subprograms, and fix bug in handling of primitive
11501 2014-02-19 Pascal Obry <obry@adacore.com>
11503 * s-os_lib.adb: Minor reformatting.
11505 2014-02-19 Yannick Moy <moy@adacore.com>
11507 * expander.adb (Expand): Do nothing inside generics.
11508 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
11511 2014-02-19 Yannick Moy <moy@adacore.com>
11513 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
11515 2014-02-19 Robert Dewar <dewar@adacore.com>
11517 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
11518 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
11521 2014-02-19 Claire Dross <dross@adacore.com>
11523 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11524 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
11526 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11528 * sem_ch3.adb (Analyze_Declarations): Analyze
11529 a package contract at the end of the private declarations (if
11530 applicable), otherwise analyze it and the end of the visible
11533 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11535 * style.adb (Missing_Overriding): If subprogram is an
11536 instantiation, place warning on the instance node itself,
11537 without mention of the original generic. Do not emit message
11538 if explicit Ada version is older than the introduction of the
11539 overriding indicator.
11541 2014-02-19 Yannick Moy <moy@adacore.com>
11543 * gnat_rm.texi: Doc clarifications.
11545 2014-02-19 Yannick Moy <moy@adacore.com>
11547 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
11550 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11552 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
11553 specified First primitive, rather than by name.
11554 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
11555 and extend error checking for missing primitives and incorrect
11558 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11560 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
11561 errors when a Synchronization aspect on an overriding protected
11562 operation does not match the given aspect on the overridden
11563 operation of an ancestor interface.
11565 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11567 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
11568 (Check_Loop_Pragma_Placement): Update
11569 comment on usage. Remove local variables Orig_Stmt and
11570 Within_Same_Sequence. Check that the current Loop_Invariant or
11571 Loop_Variant pragma is grouped together with other such pragmas.
11572 (Is_Loop_Pragma): New routine.
11573 (Prev_In_Loop): Removed.
11575 2014-02-19 Robert Dewar <dewar@adacore.com>
11577 * par-ch6.adb (P_Return): For extended return, end column lines
11579 * par.adb: Minor documentation clarification.
11581 2014-02-19 Yannick Moy <moy@adacore.com>
11583 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
11584 that Loop_Invariant and Loop_Variant appear consecutively.
11585 * gnat_rm.texi Update documentation of Loop_Invariant and
11586 Loop_Variant pragmas.
11588 2014-02-19 Robert Dewar <dewar@adacore.com>
11590 * debug.adb: Document -gnatd.X.
11591 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
11593 (Check_Then_Column): Ditto.
11594 * styleg.adb (Check_Then): Allow THEN on line after IF.
11595 (Check_Then): Check THEN placement under control of -gnatd.X
11596 * styleg.ads (Check_Then): Now called even if THEN is not first
11598 * stylesw.ads (Style_Check_If_Then_Layout): Document new
11600 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
11602 2014-02-19 Robert Dewar <dewar@adacore.com>
11604 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
11605 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
11606 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
11607 vms_conv.adb: Fix bad layout of IF statements
11609 2014-02-19 Robert Dewar <dewar@adacore.com>
11611 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
11613 2014-02-19 Robert Dewar <dewar@adacore.com>
11615 * exp_util.adb: Update comments.
11617 2014-02-19 Doug Rupp <rupp@adacore.com>
11619 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
11620 * init.c (__gl_float_format): [VMS] New global.
11621 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
11622 representation in effect.
11624 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11626 * exp_ch6.adb Add with and use clause for Exp_Prag.
11627 (Expand_Contract_Cases): Relocated to Exp_Prag.
11628 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
11629 * exp_prag.adb Add with and use clauses for Checks and Validsw.
11630 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
11631 structure of the expanded code to showcase the evaluation of
11632 attribute 'Old prefixes. Add local variable Old_Evals. Expand
11633 any attribute 'Old references found within a consequence. Add
11634 circuitry to evaluate the prefixes of attribute 'Old that
11635 belong to a selected consequence.
11636 (Expand_Old_In_Consequence): New routine.
11637 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
11638 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
11639 potentially unevaluated prefix is always evaluated.
11641 2014-02-19 Robert Dewar <dewar@adacore.com>
11643 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
11644 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
11645 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
11646 handling for the case of Modify_Tree_For_C, this approach did
11648 * exp_util.adb (Matching_Standard_Type): New function
11649 (Side_Effect_Free): New top level functions (from
11650 Remove_Side_Effects).
11651 * exp_util.ads (Side_Effect_Free): New top level functions
11653 * sinfo.ads: Minor comment updates.
11655 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11657 * exp_ch6.adb (Expand_Simple_Function_Return): If return
11658 type is unconstrained and uses the secondary stack, mark the
11659 enclosing function accordingly, to ensure that the value is not
11660 prematurely removed.
11662 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11664 * par.adb Alphabetize the routines in Par.Sync.
11665 (Resync_Past_Malformed_Aspect): New routine.
11666 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
11667 variables. Code and comment reformatting. Detect missing
11668 parentheses on aspects [Refined_]Global and [Refined_]Depends
11669 with a non-null definition.
11670 * par-sync.adb: Alphabetize all routines in this separate unit.
11671 (Resync_Past_Malformed_Aspect): New routine.
11673 2014-02-19 Robert Dewar <dewar@adacore.com>
11675 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
11676 if Esize values do not match.
11678 2014-02-19 Yannick Moy <moy@adacore.com>
11680 * sinfo.ads: Minor comment update.
11682 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11684 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
11686 2014-02-19 Thomas Quinot <quinot@adacore.com>
11688 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
11689 that has the No_Ctrl_Actions flag is a suitable node to be
11690 wrapped if the assigned expression has no finalization actions.
11691 * sem_eval.adb (Eval_Entity_Name): For a compile time known
11692 boolean value, mark the corresponding condition SCO as constant.
11694 2014-02-19 Robert Dewar <dewar@adacore.com>
11696 * exp_util.adb: Minor reformatting.
11697 * exp_util.ads (Matching_Standard_Type): New function.
11698 * exp_ch7.adb: Minor reformatting.
11700 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11702 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
11703 to find declaration for Cursor, to handle properly the case of
11704 a discriminated iterable type.
11706 2014-02-19 Vincent Celier <celier@adacore.com>
11708 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
11709 imported library projects with the library ALI dirs, when setting
11711 * prj-env.ads (Ada_Objects_Path): Correct comments about
11712 argument Including_Libraries.
11714 2014-02-19 Gary Dismukes <dismukes@adacore.com>
11716 * gnat_rm.texi: Minor spelling fixes.
11718 2014-02-19 Doug Rupp <rupp@adacore.com>
11720 * init.c: Remove unneeded code.
11721 * fe.h (Float_Format): New macro
11722 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
11724 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11726 * sem_prag.adb (Check_Refined_Global_Item):
11727 A state or variable acts as a constituent only it is part of an
11728 encapsulating state and the state has visible refinement.
11730 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11732 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
11733 postcondition for a function when the expression does not mention
11734 'Result but the function has in-out parameters.
11736 2014-02-19 Robert Dewar <dewar@adacore.com>
11738 * gnat_rm.texi: Add documentation on Value_Size forcing biased
11741 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11743 * lib-xref.ads Remove the small table of letter and symbol usage as we
11746 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11748 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
11749 messages depending on the offending misplaced aspect specifications.
11750 (Diagnose_Misplaced_Aspect_Specifications): New routine.
11752 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11754 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
11755 for iterable aspect primitives.
11756 (Resolve_Iterable_Operation): Use expected signature of iterable
11757 aspect to resolve primitive when overloading is present.
11758 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
11759 (Check_Signature): Removed.
11761 2014-02-19 Yannick Moy <moy@adacore.com>
11763 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
11764 subunit in GNATprove_Mode.
11765 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
11767 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11769 * lib-xref.ads Alphabetize the contents of table
11770 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
11771 for E_Abstract_State. List all letters and symbols in use.
11772 * sem_prag.adb (Analyze_Abstract_State): Update all calls
11773 to Create_Abstract_State to reflect the new signature.
11774 (Create_Abstract_State): Change subprogram profile and update
11775 the comment on usage. Use the proper location of the state
11776 declaration when creating a new abstract state entity. Do not
11777 generate an external name, but simply reuse the name coming from
11778 the state declaration.
11780 2014-02-19 Robert Dewar <dewar@adacore.com>
11782 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
11783 declarations get properly inserted in Modify_Tree_For_C mode.
11784 * sinfo.ads: Minor comment addition.
11786 2014-02-19 Robert Dewar <dewar@adacore.com>
11788 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
11789 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
11791 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11793 * style.adb (Missing_Overriding): Warning does not apply in
11794 language versions prior to Ada 2005.
11795 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
11796 * sem_attr.adb: Add Attribute_Iterable where needed.
11797 * exp_attr.adb: ditto.
11798 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
11799 handle loops and quantified expressions over types that have an
11800 iterable aspect. Called from Expand_Iterator_Loop.
11801 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
11802 with Iterable aspect.
11803 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
11804 subprograms specified in the Iterable aspect have the proper
11805 signature involving container and cursor.
11806 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
11807 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
11808 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
11809 New procedure to retrieve one of the primitives First, Last,
11810 or Has_Element, from the value of the iterable aspect of a
11812 (Is_Container_Element): Predicate to recognize expressions
11813 that denote an element of one of the predefined containers,
11814 for possible optimization. This subprogram is not currently
11815 used, pending ARG discussions on the legality of the proposed
11816 optimization. Worth preserving for eventual use.
11817 (Is_Iterator): Recognize formal container types.
11818 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
11820 2014-02-19 Robert Dewar <dewar@adacore.com>
11822 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
11823 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
11824 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
11825 declarations from list of actions.
11826 * output.ads, output.adb (Delete_Last_Char): New procedure.
11827 * sinfo.ads: Document handling of Mod and expression with actions
11828 in Modify_Tree_For_C mode.
11830 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11832 * par-ch9.adb (P_Task): Add a null statement to produce a
11833 well-formed task body when due to a previous syntax error the
11834 statement list is empty.
11836 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11838 * sem_prag.adb (Check_Dependency_Clause): Account
11839 for the case where a state with a non-null refinement matches a
11840 null output list. Comment reformatting.
11841 (Inputs_Match): Copy a solitary input to avoid an assertion failure
11842 when trying to match the same input in multiple clauses.
11844 2014-02-19 Gary Dismukes <dismukes@adacore.com>
11846 * sem_attr.adb: Minor typo fix.
11848 2014-02-18 Robert Dewar <dewar@adacore.com>
11850 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
11851 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
11852 (Create_Standard): Create new unsigned types.
11853 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
11854 mode (Expand_N_Reference): Removed, problematic and not needed
11856 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
11857 not needed for now.
11858 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
11859 * expander.adb: Remove call to Expand_N_Reference (problematic,
11860 and not needed now).
11861 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
11862 * stand.adb: Read and write unsigned type entities.
11863 * stand.ads: Add new unsigned types.
11865 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
11867 * sem_ch4.adb (Analyze_Call): Do not mark a function call
11868 as being inside an assertion expression as the flag is now removed.
11869 (Check_Ghost_Subprogram_Call): Do not query the
11870 In_Assertion_Expression flag as it is now removed, instead use
11871 a predicate function.
11872 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
11873 In_Assertion_Expression flag as it is now removed, instead use
11874 a predicate function.
11875 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
11876 * sem_util.adb Add with and use clause for Sem_Prag.
11877 (In_Assertion_Expression_Pragma): New routine.
11878 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
11879 * sinfo.adb (In_Assertion_Expression): Removed.
11880 (Set_In_Assertion_Expression): Removed.
11881 * sinfo.ads Remove flag In_Assertion_Expression along with its
11883 (In_Assertion_Expression): Removed along with
11884 pragma Inline. (Set_In_Assertion_Expression): Removed along
11885 with pragma Inline.
11887 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
11889 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
11890 used together with '-r', '-rf' or '-rnb' options.
11892 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
11894 * sem_attr.adb (Analyze_Attribute): Comment
11895 and code reformatting. Use separate routines to check the
11896 legality of attribute 'Old in certain pragmas. Verify
11897 the use of 'Old, 'Result and locally declared entities
11898 within the prefix of 'Old.
11899 (Check_References_In_Prefix): New routine.
11900 (Check_Use_In_Contract_Cases): New routine.
11901 (Check_Use_In_Test_Case): New routine.
11903 2014-02-18 Vincent Celier <celier@adacore.com>
11905 * sem_aux.adb (Is_By_Reference_Type): For each components of
11906 a record type, check also if the component is volatile as it
11907 may have an aspect that makes it volatile. If it is, then the
11908 record type is a by reference type.
11910 2014-02-18 Robert Dewar <dewar@adacore.com>
11912 * exp_attr.adb: Minor reformatting.
11913 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
11914 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
11915 as another case where we don't generate N_Reference nodes for
11917 * expander.adb (Expand): Add call to Expand_N_Reference.
11919 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11921 * sem_prag.adb (Analyze_Refined_Pragma): Remove
11922 local variable Pack_Spec. Refinement pragmas may now apply to
11923 bodies of both visible and private subprograms.
11925 2014-02-06 Robert Dewar <dewar@adacore.com>
11927 * exp_attr.adb (Expand_Loop_Entry_Attribute):
11928 Minor change (Attr => N) (Expand_Pred_Succ): New name
11929 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
11930 Max): Expand into if expression if Modify_Tree_For_C mode.
11931 (Expand_N_Attribute_Reference, case Min): ditto
11932 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
11935 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11937 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
11938 predicate check if this is an internal declaration with
11939 No_Initialization set, as for an expanded aggregate component.
11941 2014-02-06 Doug Rupp <rupp@adacore.com>
11943 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
11944 conditions with severity of "SUCCESS" or "INFORMATIONAL".
11946 2014-02-06 Yannick Moy <moy@adacore.com>
11948 * sem_prag.adb (Analyze_Pragma): Analyze pragma
11949 Debug rewritten node before rewriting it as a null statement in
11952 2014-02-06 Robert Dewar <dewar@adacore.com>
11954 * sem_attr.adb (Min_Max): New procedure.
11955 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
11958 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
11960 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
11963 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11965 * sem_prag.adb (Analyze_Abstract_State): Update
11966 all calls to Create_Abstract_State to pass the proper state
11968 (Create_Abstract_State): Add new formal parameter
11969 State_Decl along with comment on usage. Establish a link between
11970 the abstract state entity and the state declaration.
11972 2014-02-06 Robert Dewar <dewar@adacore.com>
11974 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
11975 comparison of unordered enumeration type.
11976 (Analyze_Attribute, case Max): Check for improper comparison of
11977 unordered enumeration type.
11978 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
11980 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
11981 Moved here from Sem_Res.
11983 2014-02-06 Robert Dewar <dewar@adacore.com>
11985 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
11988 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11990 * sem_ch6.adb (Process_Formals): Error message reformatting.
11992 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11994 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
11995 variable Spec. Do not inherit the null indicator from the
11996 subprogram body when generating the spec.
11998 2014-02-06 Robert Dewar <dewar@adacore.com>
12000 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
12003 2014-02-06 Ed Schonberg <schonberg@adacore.com>
12005 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
12006 when the function has a foreign convention, but not if only the
12007 limited return type has such a convention.
12009 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12011 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
12012 variable Spec. Comment reformatting. Use Copy_Separate_Tree
12013 rather than New_Copy_Tree when building the corresponding
12014 subprogram declaration.
12016 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12018 * sem_prag.adb (Analyze_Global_Item): Remove
12019 the mode-related checks on abstract states with enabled external
12021 (Property_Error): Removed.
12023 2014-02-06 Javier Miranda <miranda@adacore.com>
12025 * lib-xref.adb (Generate_Reference): When
12026 generating the reference to the first private entity take care
12027 of handling swapped entities.
12029 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
12031 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12034 2014-02-06 Robert Dewar <dewar@adacore.com>
12036 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
12037 than the word size when operating in Modify_Tree_For_C mode.
12038 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
12040 2014-02-06 Robert Dewar <dewar@adacore.com>
12042 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
12043 compare is case insensitive.
12044 * gnat_rm.texi: Document that string compare for Warnings Off
12045 is now case insensitive.
12047 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
12049 * gnat_rm.texi: Small wording tweak.
12051 2014-02-06 Pascal Obry <obry@adacore.com>
12053 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
12054 and Included_Artifact_Patterns attribute definitions.
12056 2014-02-06 Yannick Moy <moy@adacore.com>
12058 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
12059 SPARK_Mode pragma component for all subprograms, including stubs.
12061 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12063 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
12064 the configuration options of the enclosing context in a
12066 (Analyze_Subprogram_Body_Stub): Maintain the
12067 configuration options of the enclosing context in a stack-like
12070 2014-02-06 Robert Dewar <dewar@adacore.com>
12072 * debug.adb: -gnatd.u sets Modify_Tree_For C
12073 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
12074 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
12075 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
12076 * exp_intr.adb (Expand_Shift): Call expander so we do
12077 Modify_Tree_For_C expansions.
12078 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12081 2014-02-06 Fedor Rybin <frybin@adacore.com>
12083 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
12084 after the phase 1 of the processing of each aggregated project
12085 to get access to project trees of aggregated projects.
12086 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
12087 If specified, On_New_Tree_Loaded is called after each aggregated
12088 project has been processed succesfully.
12089 (Process): new parameter On_New_Tree_Loaded.
12090 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
12091 callback added after processing of each aggregated project.
12092 (Recursive_Process): new parameter On_New_Tree_Loaded.
12093 (Process): new parameter On_New_Tree_Loaded.
12094 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
12095 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
12096 On_New_Tree_Loaded.
12097 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
12098 On_New_Tree_Loaded.
12100 2014-02-06 Bob Duff <duff@adacore.com>
12102 * gnat_ugn.texi: Implement --insert-blank-lines and
12103 --preserve-blank-lines switches.
12105 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
12107 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
12110 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
12112 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
12113 of the pragma on individual objects.
12115 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12117 * einfo.adb Node29 is now used as BIP_Initialization_Call.
12118 (BIP_Initialization_Call): New routine.
12119 (Set_BIP_Initialization_Call): New routine.
12120 (Write_Field29_Name): Add an entry for constants and variables.
12121 * einfo.ads Add new attribute BIP_Initialization_Call and update
12122 its usage in nodes.
12123 (BIP_Initialization_Call): New routine along with pragma Inline.
12124 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
12125 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
12126 Add local declaration Res_Decl. Capture the build-in-place
12127 initialization call when the related object declaration has
12128 created a transient block.
12129 * exp_ch7.adb (Process_Transient_Objects): Add local variable
12130 Fin_Insrt. Recognize a scenario where an object declaration acts
12131 as a transient context and is initialized by a build-in-place
12134 2014-02-06 Pascal Obry <obry@adacore.com>
12136 * prj-util.adb (For_Interface_Sources): Fix handling of required
12137 bodies for aggregate libs.
12139 2014-02-06 Robert Dewar <dewar@adacore.com>
12141 * nlists.ads: Minor comment clarifications.
12143 2014-02-06 Robert Dewar <dewar@adacore.com>
12145 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
12147 * opt.ads (Modify_Tree_For_C): New flag.
12148 * output.ads, output.adb (Last_Char): New function.
12150 2014-02-06 Pascal Obry <obry@adacore.com>
12152 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
12153 share/gpr for cross-builds.
12155 2014-02-06 Robert Dewar <dewar@adacore.com>
12157 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
12158 Minor reformatting and code clean ups.
12160 2014-02-06 Pascal Obry <obry@adacore.com>
12162 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
12163 * prj.ads: Minor typo fix in comment.
12165 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12167 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
12168 local variable Expr. Flag clauses with extra parenthesis as this
12169 is not allowed by the syntax of the pragma. Code reformatting.
12171 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12173 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
12174 variables. Rename variabme Tnn to Temp. Do not create a temporary
12175 if assertions are disabled. Find enclosing routine _Postconditions
12176 and insert the temporary that captures the value of the prefix
12177 before the routine.
12178 * exp_ch6.adb (Build_Postconditions_Procedure):
12179 Insert the generated _Postconditions routine
12180 before the first source declaration of the related
12182 (Insert_After_Last_Declaration): Removed.
12183 (Insert_Before_First_Source_Declaration): New routine.
12185 2014-02-06 Ed Schonberg <schonberg@adacore.com>
12187 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
12188 Utility to determine whether current expansion is for the body
12189 of a predefined primitive operation.
12190 (Make_Predicate_Check): Use Within_Internal_Subpgram
12191 * checks.adb (Apply_Predicate_Check): Use
12192 Within_Internal_Subprogram
12193 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
12195 2014-02-06 Pascal Obry <obry@adacore.com>
12197 * prj.ads, prj-util.adb: Minor reformatting.
12199 2014-02-06 Ed Schonberg <schonberg@adacore.com>
12201 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
12202 Take into account the Split_PPC flag to ensure that conjuncts
12203 in a composite postcondition aspect are tested in source order.
12205 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12207 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
12209 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
12210 illegal use of SPARK_Mode.
12211 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
12212 * sem_prag.adb (Analyze_Pragma): Code reformatting.
12213 * sem_util.adb Add with and use clause for Aspects.
12214 (Check_SPARK_Mode_In_Generic): New routine.
12215 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
12217 2014-02-06 Thomas Quinot <quinot@adacore.com>
12219 * a-calend.adb (Formatting_Operations.Split): Ensure that
12220 Time_Error is raised for invalid time values.
12222 2014-02-06 Arnaud Charlet <charlet@adacore.com>
12224 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
12227 2014-02-06 Robert Dewar <dewar@adacore.com>
12229 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
12230 * exp_ch3.adb (Build_Dcheck_Function): Set
12231 Is_Discriminant_Check_Function.
12233 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12235 * exp_ch7.adb (Is_Subprogram_Call): Inspect
12236 the original tree in certain cases where a construct has been
12237 factored out and replaced by a reference to a temporary.
12239 2014-02-06 Ed Schonberg <schonberg@adacore.com>
12241 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
12242 parameters when propagating predicate function to full view.
12243 (Find_Type_Of_Object): Freeze base type of object type to catch
12244 premature use of discriminated private type without a full view.
12246 2014-02-06 Robert Dewar <dewar@adacore.com>
12248 * sprint.adb: Minor reformatting.
12250 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12252 * exp_ch4.adb (Process_Transient_Object): Add local variable
12253 Temp_Ins. When the transient object is initialized by an
12254 aggregate, the hook must capture the object after the last
12255 component assignment takes place.
12256 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
12257 routine Is_Subprogram_Call.
12258 (Is_Subprogram_Call): Inspect an
12259 aggregate that has been heavily expanded for subprogram calls.
12260 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
12261 and Temp_Ins. Remove the nested declare block and adjust the
12262 indentation. When the transient object is initialized by an
12263 aggregate, the hook must capture the object after the last
12264 component assignment takes place.
12266 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12268 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
12269 external states with enabled properties that do not match the
12271 (Property_Error): New routine.
12272 * sem_res.adb (Property_Error): New routine.
12273 (Resolve_Actuals): Detect illegal uses of external variables with
12274 enabled properties in procedure calls that do not match the mode of
12275 the corresponding formal parameter.
12277 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
12279 * sem_util.adb (Has_Enabled_Property): Rename
12280 formal parameter Prop_Nam to Property. Update the comment on usage
12281 and all occurrences in the body. Add local variable Prop_Nam. When
12282 inspecting a property with an expression, the property name
12283 appears as the first choice of the component association.
12285 2014-02-04 Robert Dewar <dewar@adacore.com>
12287 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
12289 2014-02-04 Gary Dismukes <dismukes@adacore.com>
12291 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
12292 for consistency with other messages.
12294 2014-02-04 Ed Schonberg <schonberg@adacore.com>
12296 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
12297 iterator, indicate that the element is a constant if the container
12298 type does not have a variable indexing aspect.
12299 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
12300 marked as constant, do not reset its Ekind, to ensure that
12301 container elements in an element loop are not modified if the
12302 container (e.g. a hashed set) only has a constant indexing aspect.
12304 2014-02-04 Arnaud Charlet <charlet@adacore.com>
12306 * g-souinf.ads: Subprograms in this unit are actually not pure.
12307 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
12308 * einfo.ads (Is_Pure): Update doc to match implementation.
12310 2014-02-04 Gary Dismukes <dismukes@adacore.com>
12312 * exp_ch13.adb: Minor spelling fix.
12314 2014-02-04 Robert Dewar <dewar@adacore.com>
12316 * opt.ads: Minor comment update.
12318 2014-02-04 Robert Dewar <dewar@adacore.com>
12320 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
12321 instead of Replace.
12323 2014-02-04 Ed Schonberg <schonberg@adacore.com>
12325 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
12326 on null expressions if component type is non-null, when the
12327 corresponding association covers an empty range of index values.
12329 2014-02-04 Robert Dewar <dewar@adacore.com>
12331 * sinfo.ads: Further comments on N_Expression_With_Actions node.
12333 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
12335 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
12336 variables Out_Items and Ref_Global. Remove local constant
12337 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
12338 and D8. Remove the useless collection of global items as this
12339 was a leftover from an earlier version of the routine. Move
12340 several routines out to avoid deep nesting and indentation.
12341 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
12342 parameter Do_Checks to Post_Errors. Update the comment on usage.
12343 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
12344 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
12345 to Post_Errors. Update the comment on usage. Account for the
12346 case where a self referential state may have a null input_list.
12347 (Is_Self_Referential): New routine.
12349 2014-02-04 Ed Schonberg <schonberg@adacore.com>
12351 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
12352 entity renames an expression, as in the case of an object of
12353 an unconstrained type initialized by a function call, defer the
12354 rewriting of the expression to the expander.
12355 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
12356 'Alignment): If the entity renames an expression, introduce
12357 temporary to capture value, and rewrite original declaration to
12360 2014-02-04 Gary Dismukes <dismukes@adacore.com>
12362 * g-comlin.adb: Minor typo fix.
12364 2014-02-04 Ed Schonberg <schonberg@adacore.com>
12366 * freeze.adb (Freeze_All): Types derived from a formal
12367 access_to_classwide type do not have a finalization master.
12369 2014-02-04 Robert Dewar <dewar@adacore.com>
12371 * sprint.adb: Minor reformatting.
12373 2014-02-04 Robert Dewar <dewar@adacore.com>
12375 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
12376 cases where Actions is a null list.
12377 * sinfo.ads (N_Expression_With_Actions): Actions can be
12378 temporarily empty during semantic analysis, but must be non-empty
12379 in the final expanded tree.
12381 2014-01-31 Robert Dewar <dewar@adacore.com>
12383 * exp_ch9.adb: Minor reformatting.
12385 2014-01-31 Emmanuel Briot <briot@adacore.com>
12387 * g-comlin.adb (Set_Command_Line): Take the switches
12388 configuration from the Command_Line_Config.
12390 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
12392 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
12395 2014-01-31 Vincent Celier <celier@adacore.com>
12397 * projects.texi: Add more documentation about others used as an
12398 index in indexed attributes.
12400 2014-01-31 Robert Dewar <dewar@adacore.com>
12402 * gnat_ugn.texi: Minor update.
12403 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
12404 * exp_util.adb: Minor reformatting.
12406 2014-01-31 Ed Schonberg <schonberg@adacore.com>
12408 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
12409 depends on data that is not private to the protected object,
12410 and potentially modifiable in unsynchronized fashion.
12412 2014-01-31 Yannick Moy <moy@adacore.com>
12414 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
12417 2014-01-31 Robert Dewar <dewar@adacore.com>
12419 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
12420 for Unknown_Package.
12421 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
12423 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
12425 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
12426 the logic that generates a runtime check to determine the
12427 controlled status of the object about to be allocated or
12428 deallocated. Class-wide types now always use a runtime check
12429 even if they appear as generic actuals.
12430 (Find_Object): Detect
12431 a special case that involves interface class-wide types because
12432 the object appears as a complex expression.
12434 2014-01-31 Ed Schonberg <schonberg@adacore.com>
12436 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
12437 subprogram with an incomplete untagged formals on the list of
12438 private dependents, to verify that the type is properly completed
12439 in the private part.
12440 * sem_attr.adb: Code clean up.
12442 2014-01-31 Robert Dewar <dewar@adacore.com>
12444 * exp_ch6.adb: Minor reformatting.
12446 2014-01-31 Vincent Celier <celier@adacore.com>
12448 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
12449 when Pkg is unknown.
12451 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
12453 * sem_res.adb (Resolve_Entity_Name): Comment
12454 reformatting. Allow volatile objects in various generated checks.
12456 2014-01-31 Ed Schonberg <schonberg@adacore.com>
12458 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
12459 component association, set the etype of the identifier, for
12462 2014-01-31 Ed Schonberg <schonberg@adacore.com>
12464 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
12465 declared in a package, not checks can apply to the subprogram.
12467 2014-01-31 Robert Dewar <dewar@adacore.com>
12469 * erroutc.adb (Validate_Specific_Warnings): Warnings are
12470 controlled -gnatw.W.
12471 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
12472 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
12474 2014-01-31 Arnaud Charlet <charlet@adacore.com>
12476 * exp_disp.adb: Update comments.
12478 2014-01-31 Yannick Moy <moy@adacore.com>
12480 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
12481 Save_Global_References): Guard access to expression in aspect.
12483 2014-01-31 Yannick Moy <moy@adacore.com>
12485 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
12486 Issue an error when the pragma is applied to a generic unit,
12487 a generic declaration, or inside a generic.
12489 2014-01-31 Yannick Moy <moy@adacore.com>
12491 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
12494 2014-01-31 Robert Dewar <dewar@adacore.com>
12496 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
12499 2014-01-31 Tristan Gingold <gingold@adacore.com>
12501 * exp_disp.adb: Add a historic note.
12503 2014-01-31 Robert Dewar <dewar@adacore.com>
12505 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
12506 Process_Deferred_References.
12508 2014-01-31 Yannick Moy <moy@adacore.com>
12510 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
12511 ineffective pragma Warnings(Off) in GNATprove_Mode.
12513 2014-01-31 Bob Duff <duff@adacore.com>
12515 * s-taskin.ads: Minor comment fix.
12516 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
12517 just direct dependents. If this is actually an abort, each task
12518 will take care of aborting its dependents, so all dependents will
12519 get aborted, as before. However, when this is called the second
12520 time from Vulnerable_Complete_Master "for convenience" (i.e. to
12521 kill off tasks waiting at terminate alternatives), aborting
12522 indirect dependents is wrong, because it causes some unrelated
12523 tasks to get aborted.
12525 2014-01-31 Robert Dewar <dewar@adacore.com>
12527 * sem_ch4.adb: Minor reformatting.
12529 2014-01-31 Robert Dewar <dewar@adacore.com>
12531 * exp_ch2.adb: New calling sequence for Is_LHS.
12532 * frontend.adb: Add call to Process_Deferred_References.
12533 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
12534 (Deferred_References): New table.
12535 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
12537 (Find_Expanded_Name): Ditto.
12538 * sem_res.adb: New calling sequence for Is_LHS.
12539 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
12540 * sem_warn.adb: Call Process_Deferred_References before issuing
12543 2014-01-31 Tristan Gingold <gingold@adacore.com>
12545 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
12546 use of System_Tasking_Protected_Objects_Single_Entry.
12547 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
12548 of Protected_Single_Entry_Call.
12549 (Expand_N_Timed_Entry_Call): Remove single_entry case.
12550 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
12552 (Make_Disp_Timed_Select_Body): Likewise.
12553 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
12554 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
12556 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
12557 (Wait_For_Completion_With_Timeout): Remove.
12558 (Protected_Single_Entry_Call): Remove Mode parameter
12559 (always Simple_Call).
12560 (Service_Entry): Remove Self_Id constant (not used anymore).
12561 (Timed_Protected_Single_Entry_Call): Remove.
12562 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
12563 (Protected_Single_Entry_Call): Remove Mode parameter.
12565 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12567 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
12568 * einfo.ads (Get_Pragma): Update the comment on special pragmas
12569 handled by this routine.
12570 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
12571 to the contract of the related subprogram body.
12572 * sem_util.adb (Add_Contract_Item): Handle the insertion of
12573 pragma Refined_Post into the contract of a subprogram body.
12574 * sinfo.ads Update the documentation of node N_Contract.
12575 * sem_res.adb (Resolve_Entity_Name): Add a guard
12576 to detect abstract states and variables only when checking the
12577 SPARK 2014 rules concerning volatile object placement.
12579 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12581 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
12582 null is compatible with any access type.
12584 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12586 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
12587 placement is not in a package.
12589 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12591 * sem_util.adb (Has_Enabled_Property): Compare the character field of
12594 2014-01-29 Robert Dewar <dewar@adacore.com>
12596 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
12597 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
12598 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
12600 2014-01-29 Robert Dewar <dewar@adacore.com>
12602 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
12603 * sem_warn.adb (Check_References): Suppress warnings if inside
12604 Initial_Condition pragma.
12606 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12608 * sem_prag.adb (Check_Missing_Part_Of): List all values of
12609 State_Space_Kind for readability reasons. Do not emit an error on
12610 a private item when the enclosing package lacks aspect/pragma
12611 Abstract_State. Do not emit an error on a private package
12612 instantiation when the corresponding generic template lacks
12614 (Has_Visible_State): New routine.
12615 * sem_util.adb (Find_Placement_In_State_Space): The visible
12616 declarations of any kind of child units in general act as proper
12617 placement location.
12619 2014-01-29 Robert Dewar <dewar@adacore.com>
12621 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
12622 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
12623 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
12624 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
12625 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
12626 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
12627 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
12628 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
12629 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
12630 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
12631 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
12632 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
12633 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
12634 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
12635 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
12636 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
12637 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
12638 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
12639 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
12640 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
12641 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
12642 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
12643 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
12644 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
12645 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
12646 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
12647 s-regpat.adb, s-secsta.adb, s-stalib.ads,
12648 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
12649 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
12650 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
12651 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
12652 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
12654 2014-01-29 Robert Dewar <dewar@adacore.com>
12656 * expander.adb: Minor reformatting.
12658 2014-01-29 Javier Miranda <miranda@adacore.com>
12660 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
12663 2014-01-29 Javier Miranda <miranda@adacore.com>
12665 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
12666 that checks if an interface types defines the predefined "="
12667 function because the compiler was erroneously not generating the
12668 predefined "=" primitive as soon as the name of some interface
12669 primitive is "=" (formals were not checked).
12671 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12673 * expander.adb (Expander): In GNATprove mode, do not process
12674 transient scopes: they are in general not created in this mode,
12675 and an attempt to examine them will lead to constraint errors when
12676 processing configuration pragmas that have analyzable expressions.
12678 2014-01-29 Vincent Celier <celier@adacore.com>
12680 * clean.adb (Gnatclean): Fail if main project is an aggregate
12681 project or if there is an aggregate library project in the
12683 * gnatcmd.adb: Fail if the main project is an aggregate project
12684 or if there is an aggegate library project in the project tree.
12685 * make.adb (Initialize): : Fail if main project is an aggregate
12686 project or if there is an aggregate library project in the
12688 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
12689 * prj-makr.adb (Initialize): Fail if the main project is an
12690 aggregate project or an aggregate library project.
12692 2014-01-29 Vincent Celier <celier@adacore.com>
12694 * prj-part.adb (Check_Import_Aggregate): New procedure
12695 to check if an imported project is an aggregate project.
12696 (Parse_Single_Project): Call Check_Import_Aggregate
12697 * projects.texi: Document that aggregate projects cannot be
12698 extended or imported.
12700 2014-01-29 Robert Dewar <dewar@adacore.com>
12702 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
12703 reformatting and code clean up.
12704 * gnat_ugn.texi: Add documentation section on Atomic Variables
12707 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12709 * einfo.adb Flag264 is now unused.
12710 (Has_Body_References): Removed.
12711 (Set_Has_Body_References): Removed.
12712 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
12713 * einfo.ads Update the comment on usage of attribute
12714 Body_References. Remove attribute Has_Body_References and its
12716 (Has_Body_References): Removed along with pragma Inline.
12717 (Set_Has_Body_References): Removed along with pragma Inline.
12718 * sem_prag.adb (Analyze_Global_Item): Move the call to
12719 Record_Possible_Body_Reference in the state related checks
12720 section. Add a comment intended function.
12721 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
12722 in the state related checks section. Add a comment intended function.
12723 (Analyze_Refinement_Clause): Cleanup the illegal body reference
12724 reporting. Add a comment on timing of error reporting.
12725 (Record_Possible_Body_Reference): Reimplement the routine.
12727 2014-01-29 Vincent Celier <celier@adacore.com>
12729 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
12730 unit-based languages.
12731 (Mains.Complete_Mains.Do_Complete): Use the source file project
12732 tree when calling Find_File_Add_Extension. Use the correct
12733 project name when reporting an error.
12735 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12737 * aspects.adb Add an entry for aspect Part_Of in table
12739 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
12740 Aspect_Argument, Aspect_Names and Aspect_Delay.
12741 * atree.h Define Elist9.
12742 * atree.adb (Elist9): New routine.
12743 (Set_Elist9): New routine.
12744 * atree.ads (Elist9): New routine.
12745 (Set_Elist9): New routine.
12746 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
12747 the list of node usage. Remove Refined_State from the list of
12749 (Encapsulating_State): New routine.
12751 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
12752 (Refined_State): Removed.
12753 (Set_Encapsulating_State): New routine.
12754 (Set_Part_Of_Constituents): New routine.
12755 (Set_Refined_State): Removed.
12756 (Write_Field9_Name): Add an entry
12757 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
12758 Encapsulating_State. Remove the entry for Refined_State.
12759 * einfo.ads Add new attributes Encapsulating_State
12760 and Part_Of_Constituents alond with their usage in
12761 entities. Remove attribute Refined_State along with its
12763 (Encapsulating_State): New routine and
12764 pragma Inline. (Get_Pragma): Update the comment on usage.
12765 (Part_Of_Constituents): New routine and pragma Inline.
12766 (Refined_State): Removed along with pragma Inline.
12767 (Set_Encapsulating_State): New routine and pragma Inline.
12768 (Set_Part_Of_Constituents): New routine and pragma Inline.
12769 (Set_Refined_State): Removed along with pragma Inline.
12770 * par-prag.adb Pragma Part_Of does not need any special processing
12772 * sem_ch3.adb (Analyze_Declarations): Remove local variables
12773 Body_Id and Prag. Call separate routines to analyze the
12774 contract of a package [body].
12775 (Analyze_Object_Contract):
12776 Update the comment on usage. Remove local variables
12777 Items and Nam. Use Get_Pragma rather than traversing the
12778 classification list. Verify whether the lack of indicator
12779 Part_Of agrees with the placement of the variable in state space.
12780 (Analyze_Object_Declaration): Initialize the encapsulating state
12781 of a variable. (Requires_State_Refinement): Moved to sem_util.
12782 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
12783 (Analyze_Package_Contract): New routine.
12784 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
12785 (Analyze_Package_Contract): New routine.
12786 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
12787 state and Part_Of constituents.
12788 * sem_ch13.adb (Analyze_Aspect_Specifications):
12789 Add processing for aspect Part_Of. Update all
12790 calls to Decorate_Delayed_Aspect_And_Pragma.
12791 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
12792 not need any special processing at freeze time.
12793 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
12794 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
12795 update the associated comment.
12796 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
12797 (Analyze_Abstract_State): Add new global variable State_Id. Remove
12798 local constants Errors and Loc. Remove local variables Is_Null
12799 and State_Nam. Create the entity of the abstract state on the
12800 spot, before all remaining checks are performed. Verify that a
12801 missing Part_Of option agrees with the placement of the abstract
12802 state within the state space.
12803 (Analyze_Depends_In_Decl_Part):
12804 Add new global variables Constits_Seen and States_Seen. Check
12805 that a state and a corresponding constituent do not appear
12806 in pragma [Refined_]Depends.
12807 (Analyze_Global_In_Decl_Part):
12808 Add new global variables Constits_Seen and States_Seen. Check
12809 that a state and a corresponding constituent do not appear
12810 in pragma [Refined_]Global.
12811 (Analyze_Global_Item):
12812 Remove the now obsolete code that deals with Part_Of.
12813 Add the entity of the global item to the list of processed
12814 items. (Analyze_Initializes_In_Decl_Part): Add new global
12815 variables Constits_Seen and States_Seen. Check that a state
12816 and a corresponding constituent do not appear in pragma
12818 (Analyze_Initialization_Item): Add the entity
12819 of the initialization item to the list of processed items.
12820 (Analyze_Input_Item): Add the entity of the initialization
12821 item to the list of processed items.
12822 (Analyze_Input_Output):
12823 Remove the now obsolete code that deals with Part_Of. Add the
12824 entity of the input/output to the list of processed items.
12825 (Analyze_Part_Of): New routine.
12826 (Analyze_Part_Of_Option): Remove
12827 local constant Par_State. Add local constant Encaps and local
12828 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
12829 the option. Turn the related state into a Part_Of constituent
12830 if the option is legal.
12831 (Analyze_Pragma): Add processing
12832 for pragma Part_Of.
12833 (Analyze_Refined_State_In_Decl_Part):
12834 Remove global constants Pack_Body and Spec_Id. Remove
12835 global variables Abstr_States and Hidden_States. Add new
12836 global variables Available_States, Body_Id, Body_States and
12837 Spec_Id. Add new local constant Body_Decl. Reimplement the
12838 logic that extracts the states available for refinement from
12839 the related package and the body hidden states of the said
12841 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
12842 (Check_Applicable_Policy): Alphabetize body.
12843 (Check_Dependency_Clause): Replace Refined_State
12844 with Encapsulating_State.
12845 (Check_Matching_Constituent):
12846 Reimplement the logic that determines whether an item is a valid
12847 / invalid constituent of the current refined state. Return when
12848 a construct does not denote a valid abstract state. Extract the
12849 list of Part_Of constituents for further analysis. Check that all
12850 Part_Of constituents of a state have been used in its refinement.
12851 (Check_Matching_State): Update the comment on usage. Operate
12852 on the list of available states.
12853 (Check_Missing_Part_Of): New routine.
12854 (Check_Refined_Global_Item): Replace Refined_State
12855 with Encapsulating_State.
12856 (Check_State_And_Constituent_Use): New routine.
12857 (Create_Abstract_State): New routine.
12858 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
12859 (Is_Part_Of): Removed.
12860 (Collect_Body_States): New routine.
12861 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
12862 (Collect_Hidden_States): Removed.
12863 (Report_Unrefined_States): Change the profile of the procedure along
12864 with the comment on usage.
12865 (Report_Unused_Constituents): New routine.
12866 (Report_Unused_Hidden_States): Removed.
12867 (Report_Unused_States): New routine.
12868 * sem_prag.ads (Check_Missing_Part_Of): New routine.
12869 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
12870 appear in the classification pragmas of a package instantiation
12872 (Find_Placement_In_State_Space): New routine.
12873 (Is_Child): Removed.
12874 (Is_Child_Or_Sibling): Remove formal
12875 parameter Private_Child. Remove the private child checks.
12876 (Requires_State_Refinement): Moved from sem_ch3.
12877 * sem_util.ads Add new type State_Space_Kind along with
12878 comment on its usage and values.
12879 (Add_Contract_Item): Update the comment on usage.
12880 (Find_Body_Discriminal): Alphabetize spec.
12881 (Find_Placement_In_State_Space): New routine.
12882 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
12883 and update the comment on usage.
12884 (Requires_State_Refinement): Moved from sem_ch3.
12885 * sinfo.ads: Update the documentation of N_Contract.
12886 * snames.ads-tmpl The predefined name for Part_Of is now used
12887 to denote a pragma. Add Pragma_Id for Part_Of.
12889 2014-01-29 Emmanuel Briot <briot@adacore.com>
12891 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
12893 (Dump): New subprogram.
12895 2014-01-29 Tristan Gingold <gingold@adacore.com>
12897 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
12898 Expand_Entry_Declaration to factorize code.
12900 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12902 * checks.adb: minor clarification.
12903 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
12904 search for primitive operations to the entities that immediately
12905 follow the type declaration.
12907 2014-01-29 Tristan Gingold <gingold@adacore.com>
12909 * exp_ch9.adb (Build_Protected_Entry): Do not call
12910 Complete_Entry_Body anymore.
12911 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
12912 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
12914 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
12916 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
12917 string when the Name input bigger than allowed. Adapt the function
12920 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12922 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
12923 if expression is within a case_expression of if_expression.
12925 2014-01-29 Robert Dewar <dewar@adacore.com>
12927 * exp_ch9.adb, inline.ads: Minor reformatting.
12929 2014-01-29 Tristan Gingold <gingold@adacore.com>
12931 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
12933 2014-01-29 Yannick Moy <moy@adacore.com>
12935 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
12936 SPARK_Mode_Pragma components to be able to analyze generic
12938 * sem_ch12.adb (Analyze_Package_Instantiation,
12939 Inline_Instance_Body, Need_Subprogram_Instance_Body,
12940 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
12941 for future analysis of the instance.
12942 (Instantiate_Package_Body,
12943 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
12944 from instantiation to analyze the instance.
12946 2014-01-29 Robert Dewar <dewar@adacore.com>
12948 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
12951 2014-01-29 Yannick Moy <moy@adacore.com>
12953 * gnat_rm.texi: Update description of SPARK_Mode pragma.
12955 2014-01-29 Tristan Gingold <gingold@adacore.com>
12957 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
12959 2014-01-29 Thomas Quinot <quinot@adacore.com>
12961 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
12963 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12965 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
12966 resulting string is an internal entity. and thus requires no
12967 initialization. This is relevant when Initialize_ Scalars is
12968 enabled, because the resultant spurious initialization may lead to
12969 secondary stack anomalies that produce a mangled name for a task.
12971 2014-01-29 Yannick Moy <moy@adacore.com>
12973 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
12974 not inherited from spec anymore. Check consistency
12975 rules after processing of declarations.
12976 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
12977 from spec anymore. Check consistency rules after processing of
12979 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
12981 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
12984 2014-01-27 Robert Dewar <dewar@adacore.com>
12986 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
12988 (Resolve_Range): Add type name/location to unordered msg.
12990 2014-01-27 Claire Dross <dross@adacore.com>
12992 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
12993 Capacity) is only called with Capacity >= Length (Source) and
12994 Capacity in Capacity_Range.
12995 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
12996 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
12997 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
12998 in the code is this is not the case.
13000 2014-01-27 Thomas Quinot <quinot@adacore.com>
13002 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
13003 selected component in an instance where the component of the
13004 actual is not visibile at instantiation.
13006 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13008 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
13009 has a dynamic predicate, generate freeze node for Actual_Subtype
13010 at once, because the declaration of the corresponding predicate
13011 function will make reference to it.
13013 2014-01-27 Tristan Gingold <gingold@adacore.com>
13015 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
13017 2014-01-27 Robert Dewar <dewar@adacore.com>
13019 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
13020 for 2**X optimization.
13022 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13024 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
13025 explicitly whether value is in range of Character, because the
13026 library is typically compiled with range checks disabled, and
13027 we cannot rely on the implicit check on the argument of 'Val.
13029 2014-01-27 Vincent Celier <celier@adacore.com>
13031 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
13032 not the Target to itself.
13034 2014-01-27 Robert Dewar <dewar@adacore.com>
13036 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
13037 changes to avoid incorrect use of unordered enum types.
13039 2014-01-27 Thomas Quinot <quinot@adacore.com>
13041 * sem_ch4.adb: Minor reformatting.
13043 2014-01-27 Robert Dewar <dewar@adacore.com>
13045 * scn.adb (Check_End_Of_Line): Removed.
13046 (Error_Long_Line): Removed.
13047 (Determine_License): Use versions of above routines from Scanner.
13048 * scng.adb (Check_End_Of_Line): Moved to spec.
13049 (Error_Long_Line): Removed, no longer used.
13050 * scng.ads (Check_End_Of_Line): Moved here from body.
13052 2014-01-27 Tristan Gingold <gingold@adacore.com>
13054 * exp_ch7.adb (Build_Cleanup_Statements): Call
13055 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
13056 for protected body.
13057 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
13058 Remove Service_Name variable.
13059 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
13060 factorize code from the above subprograms.
13061 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
13063 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
13065 * einfo.adb (Has_Option): Reimplemented.
13066 * sem_prag.adb (Analyze_Refinement_Clause): Add global
13067 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
13068 External_Constit_Seen and State. Add local variables Body_Ref,
13069 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
13070 avoid a cumbersome while pool. Verify the legality of an external
13071 state and relevant properties.
13072 (Check_External_Property): New routine.
13073 (Check_Matching_State): Remove parameter profile
13074 and update comment on usage.
13075 (Collect_Constituent): Store the
13076 relevant external property of a constituent.
13077 * sem_util.adb (Async_Readers_Enabled): Update the call to
13078 Has_Enabled_Property.
13079 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
13080 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
13081 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
13082 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
13083 Update comment on usage. Reimplement the logic to recognize the various
13084 formats of properties.
13086 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13088 * par-ch5.adb: Minor reformatting.
13090 2014-01-27 Tristan Gingold <gingold@adacore.com>
13092 * s-tposen.ads: Harmonize style and comments.
13094 2014-01-27 Vincent Celier <celier@adacore.com>
13096 * projects.texi: Document that shared library projects, by
13097 default, cannot import projects that are not shared library
13100 2014-01-27 Robert Dewar <dewar@adacore.com>
13102 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
13105 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13107 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
13108 any other exception is raised.
13109 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
13110 still necessary to perform a conversion in order to remove overlong
13113 2014-01-27 Robert Dewar <dewar@adacore.com>
13115 * exp_smem.adb: Minor reformatting.
13117 2014-01-27 Thomas Quinot <quinot@adacore.com>
13119 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
13121 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13123 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
13124 nodes for operands to the original node for the call, to preserve
13125 Original_Node pointers within the resolved operands, given that
13126 they may have been rewritten as well. Previous approach copied
13127 the operands into a new tree and lost those pointers.
13129 2014-01-27 Claire Dross <dross@adacore.com>
13132 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
13134 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13136 * sem_util.adb (Check_Internal_Protected_Use): A call through
13137 an anonymous access parameter of the current protected function
13138 is not a potential modification of the current object.
13140 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13142 * a-cobove.adb (Reserve_Capacity): Procedure raises
13143 Capacity_Error, not Constraint_Error, when request cannot be
13146 2014-01-27 Vincent Celier <celier@adacore.com>
13148 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
13149 not the Target to itself.
13151 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13153 * exp_ch4.adb (Expand_Concatenate): If the target of the
13154 concatenation is a library-level entity, always use the off-line
13155 version of concatenation, regardless of optimization level. This
13156 is space-efficient, and prevents linking problems when some
13157 units are compiled with different optimization levels.
13159 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13161 * sem_ch5.adb: Code clean up.
13163 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13165 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
13166 when an array or container iterator includes a subtype indication,
13167 which is only legal in an element iterator.
13169 2014-01-27 Thomas Quinot <quinot@adacore.com>
13171 * exp_ch7.adb: Minor reformatting.
13173 2014-01-27 Robert Dewar <dewar@adacore.com>
13175 * opt.adb (SPARK_Mode): Default for library units is None rather
13177 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
13179 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
13181 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
13183 2014-01-27 Robert Dewar <dewar@adacore.com>
13185 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
13186 Suspicious_Labels table if we have identifier; followed by loop
13188 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
13189 * par.adb (Suspicious_Labels): New table.
13191 2014-01-27 Robert Dewar <dewar@adacore.com>
13193 * exp_aggr.adb (Check_Bounds): Reason is range check, not
13196 2014-01-27 Yannick Moy <moy@adacore.com>
13198 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
13200 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
13202 (Add_SPARK_Xrefs): Include references to constants.
13203 * spark_xrefs.ads Document new character 'c' for references to
13206 2014-01-27 Thomas Quinot <quinot@adacore.com>
13208 * exp_smem.adb (Add_Write_After): For a function call, insert write as
13209 an after action in a transient scope.
13211 2014-01-27 Thomas Quinot <quinot@adacore.com>
13213 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
13214 to a shared variable as an OUT formal in a call to an init proc,
13215 the 'Read call must be emitted after, not before, the call.
13217 2014-01-27 Robert Dewar <dewar@adacore.com>
13219 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
13221 2014-01-27 Robert Dewar <dewar@adacore.com>
13223 * a-wichha.adb (Character_Set_Version): Change to output proper
13226 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
13228 * einfo.adb (Is_Input_Only_State): Removed.
13229 (Is_Non_Volatile_State): Removed.
13230 (Is_Output_State): Removed.
13231 * einfo.ads (Is_Input_Only_State): Remove attribute and
13232 subprogram. Update related entity.
13233 (Is_Non_Volatile_State):
13234 Remove attribute and subprogram. Update related entity.
13235 (Is_Output_State): Removed attribute and subprogram. Update
13237 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
13239 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
13240 an object, not just variables.
13241 (Analyze_Object_Contract): New routine.
13242 (Analyze_Variable_Contract): Removed.
13243 (Process_Discriminants): Detect an illegal use of volatile
13244 discriminant in SPARK mode.
13245 * sem_ch5.adb (Analyze_Iterator_Specification):
13246 Detect an illegal use of volatile loop variable.
13247 (Analyze_Loop_Parameter_Specification): Detect an illegal use
13248 of volatile loop variable.
13249 * sem_ch6.adb (Process_Formals): Update the volatile object
13250 detection. Detect an illegal formal of mode IN OUT or OUT in
13251 SPARK mode. Enhance the error messages with references.
13252 * sem_ch12.adb (Instantiate_Object): Update the volatile object
13253 detection. Enhance the error messages with references.
13254 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
13255 messages with references.
13256 (Analyze_Contract_Case): Enhance the error messages with references.
13257 (Analyze_External_Property): Call Check_Duplicate_Property to process
13258 an external property.
13259 (Analyze_External_Property_In_Decl_Part): New routine.
13260 (Analyze_External_State_In_Decl_Part): Removed.
13261 (Analyze_Global_Item): Detect an illegal
13262 use of a volatile constant. Detect an illegal use
13263 of a variable with enabled Effective_Reads. Enhance
13264 the error messages with references. Remove obsolete
13265 checks concerning Input_Only and Output_Only states.
13266 (Analyze_Initialization_Item): Enhance the error messages
13268 (Analyze_Initializes_In_Decl_Part): Do not
13269 collect the states and variables when the initialization list
13271 (Analyze_Input_Item): Enhance the error messages with references.
13272 (Analyze_Input_Output): Enhance the error messages with references.
13273 (Analyze_Pragma): Enhance the error messages with references.
13274 (Analyze_Refinement_Clause): Code reformatting.
13275 (Analyze_Refined_Depends_In_Decl_Part):
13276 Rename global variable Global to Reg_Global and update all
13277 occurrences. Add local variables D7 and D8. Update the error
13278 messages with references. Update the call to Collect_Global_Items.
13279 (Analyze_Refined_Global_In_Decl_Part): Add local variables
13280 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
13281 the call to Collect_Global_Items. Account for a Proof_In state
13282 in null / useless refinement checks. Verify the coverage of
13284 (Check_Dependency_Clause): Remove local variable
13285 Out_Constits. Remove the retrieval and removal of constituents
13286 for an Output_Only state. Remove the reporting of unused
13287 Output_Only state constituents.
13288 (Check_Duplicate_Mode): Enhance
13289 the error message with a reference.
13290 (Check_Duplicate_Property): New routine.
13291 (Check_Duplicate_Option): Enhance the error message with a reference.
13292 (Check_External_Properties): Enhance the error message with a reference.
13293 (Check_Function_Return): Enhance the error message with a reference.
13294 (Check_In_Out_States): Update
13295 comment on usage. Add a specialized error message for Proof_In
13296 constituents. Enhance the error message with a reference.
13297 (Check_Input_States): Update comment on usage. Account for
13298 possible Proof_In constituents. Enhance the error message
13300 (Check_Matching_Constituent): Enhance the error message with a
13302 (Check_Matching_State): Enchance the error message with a reference.
13303 (Check_Mode): Add local variable From_Global. Update the call to
13304 Find_Mode. Emit more precise error messages concerning extra items
13305 (Check_Mode_Restriction_In_Enclosing_Context): Consider
13306 pragma Refined_Global. Enhance the error message with a
13308 (Check_Mode_Restriction_In_Function): Enhance the error message with
13310 (Check_Output_States): Update comment on usage. Add local variable
13311 Posted. Account for possible Proof_In constituents. Produce a detailed
13312 list of missing constituents.
13313 (Check_Proof_In_States): New routine.
13314 (Check_Refined_Global_Item): Handle Proof_In
13315 constituents. Enchance the error message with a reference.
13316 (Collect_Global_Items): Add formal parameters Proof_In_Items
13317 and Has_Proof_In_State. Update the comment on usage. Account
13318 for Proof_In items.
13319 (Create_Or_Modify_Clause): Enchance
13320 the error message with a reference.
13322 formal parameter From_Global. Update the comment on usage.
13323 Detect when the mode is governed by pragma [Refined_]Global.
13324 (Output_Constituents): Removed.
13325 (Report_Extra_Constituents):
13326 Report extra Proof_In constituents.
13327 (Report_Unused_Constituents): Removed.
13328 (Usage_Error): Code reformatting. Enhance the error
13329 messages with reference.
13330 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
13331 (Analyze_External_State_In_Decl_Part): Removed.
13332 * sem_res.adb (Resolve_Actuals): Update the volatile object
13333 detection. Enhance the error message with a reference.
13334 (Resolve_Entity_Name): Update the volatile object
13335 detection. Enhance the error message with a reference.
13336 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
13337 (Is_SPARK_Volatile_Object): New routine.
13338 (Has_Volatile_Component): New routine.
13339 * sem_util.ads (Is_Delegate): Alphabetized.
13340 (Is_SPARK_Volatile_Object): New routine.
13341 (Has_Volatile_Component): New routine.
13342 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
13344 2014-01-27 Ed Schonberg <schonberg@adacore.com>
13346 * sem_attr.adb: Resolve fully prefix of 'Update.
13348 2014-01-27 Ben Brosgol <brosgol@adacore.com>
13350 * gnat_rm.texi: Minor clarifications.
13352 2014-01-27 Robert Dewar <dewar@adacore.com>
13354 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
13355 about call that is generated as part of an Initial_Condition
13357 * sem_prag.adb: Minor spelling correction.
13359 2014-01-27 Robert Dewar <dewar@adacore.com>
13361 * sem_prag.adb (Set_Convention_From_Pragma): Check that
13362 convention Ghost can only apply to functions.
13363 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
13365 2014-01-27 Robert Dewar <dewar@adacore.com>
13367 * gnat_ugn.texi: Add Short_Enums to documentation of
13370 2014-01-27 Robert Dewar <dewar@adacore.com>
13372 * sem_prag.adb (Analyze_Input_Item): Correct check for input
13373 item in same package.
13374 * sem_util.ads, sem_util.adb (Within_Scope): New function.
13376 2014-01-26 Arnaud Charlet <charlet@adacore.com>
13378 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
13379 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
13380 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
13381 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
13384 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
13386 * gcc-interface/Makefile.in: Fix oversight.
13388 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
13390 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
13391 conversion from a thin pointer with a shifted value.
13392 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
13393 read-only flag from the values onto the result.
13394 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
13396 2014-01-25 Tristan Gingold <gingold@adacore.com>
13398 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
13399 for E_Variable with a pragma Linker_Section.
13401 2014-01-25 Robert Dewar <dewar@adacore.com>
13403 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
13404 with Default_Value aspect is passed in by copy.
13406 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
13408 * set_targ.adb: Set Short_Enums.
13409 * gcc-interface/lang.opt (fshort-enums): New option.
13410 * gcc-interface/misc.c (gnat_handle_option): Handle it.
13411 (gnat_post_options): Do not modify the global settings.
13413 2014-01-24 Robert Dewar <dewar@adacore.com>
13415 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
13417 (Random_Decimal_Fixed): New generic function.
13418 * s-rannum.ads: Minor comment clarifications.
13420 2014-01-24 Robert Dewar <dewar@adacore.com>
13422 * back_end.adb: Remove Short_Enums handling (handled in
13423 Ttypes/Get_Targ now) Minor added comments.
13424 * freeze.adb: Change name Short_Enums_On_Target to
13425 Target_Short_Enums.
13426 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
13427 * opt.ads: Minor comment updates.
13428 * sem_ch13.adb: Change name Short_Enums_On_Target to
13429 Target_Short_Enums.
13430 * set_targ.adb: Set Short_Enums from gcc back end.
13431 * set_targ.ads (Short_Enums): New variable.
13432 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
13433 Ttypes/Get_Targ now).
13434 * ttypes.ads (Target_Short_Enums): New constant boolean switch
13436 2014-01-24 Pascal Obry <obry@adacore.com>
13438 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
13440 2014-01-24 Gary Dismukes <dismukes@adacore.com>
13442 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
13443 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
13446 2014-01-24 Robert Dewar <dewar@adacore.com>
13448 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
13450 2014-01-24 Vincent Celier <celier@adacore.com>
13452 * prj.adb (Add_Aggregated_Project): Do not add a project in
13453 the list if it is already there.
13455 2014-01-24 Yannick Moy <moy@adacore.com>
13457 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
13458 Correct the search for a subrogram declaration to which a pragma is
13461 2014-01-24 Bob Duff <duff@adacore.com>
13463 * gnat_ugn.texi: Document --decimal-grouping and
13464 --based-grouping switches in gnatpp.
13466 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13468 * sinfo.ads: Documentation update.
13470 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13472 * sem_ch3.adb (Constant_Redeclaration): New declaration is
13473 illegal if previous one has an initial expression that is an
13474 aggregate expanded into assignments.
13476 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13478 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
13479 code reorganization to remove spurious warning on a loop with
13480 an array element iterator that has a null range.
13482 2014-01-24 Vincent Celier <celier@adacore.com>
13484 * make.adb (Binding_Phase): When setting the Ada paths, use
13485 the library ALI dir, not the object dir in libraries.
13487 2014-01-24 Yannick Moy <moy@adacore.com>
13489 * sinfo.ads: Add documentation of check flag fields.
13491 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13493 * sem_res.adb (Resolve_Actuals): If an actual is a view
13494 conversion of a discriminated object, and the formal type is
13495 discriminated and constrained, apply a discriminant check to
13498 2014-01-24 Robert Dewar <dewar@adacore.com>
13500 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
13502 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13504 * sem_ch3.adb (Analyze_Declarations): At the end of an
13505 appropriate declarative part, call Freeze_All from the first
13506 declaration in the scope, not from the first unfrozen one. This
13507 is necessary to apply visibility checks to entities with delayed
13508 aspects. Otherwise, in the presence of instantiations and cleanups
13509 that they may generate, the delayed aspects may be analyzed too
13510 late and produce spurious visibility errors.
13511 * sem_attr.adb: Place etype on range.
13512 * sem_ch6.adb: Documentation expression functions.
13514 2014-01-24 Robert Dewar <dewar@adacore.com>
13516 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
13517 terminology in compiler).
13519 2014-01-24 Robert Dewar <dewar@adacore.com>
13521 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
13522 categories, now that Ada 95 supports raise expressions.
13524 2014-01-24 Robert Dewar <dewar@adacore.com>
13526 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
13527 Short_Enums_On_Target.
13528 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
13530 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
13532 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13534 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
13535 indication is given explicity, check that it matches the array
13536 component type or the container element type of the domain
13539 2014-01-24 Tristan Gingold <gingold@adacore.com>
13541 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
13542 * gcc-interface/misc.c (flag_short_enums): Declare.
13543 (gnat_post_options): Set it.
13545 2014-01-24 Vincent Celier <celier@adacore.com>
13547 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
13548 to cache the result when Including_Libraries is False.
13549 * prj-env.ads (Ada_Objects_Path): Update documentation
13550 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
13551 (Get_Object_Directory): Return the Library_Ali_Dir only when
13552 when Including_Libraries is True.
13553 * prj.ads (Get_Object_Directory): Fix and complete documentation
13554 (Project_Data): New component Ada_Objects_Path_No_Libs
13556 2014-01-24 Robert Dewar <dewar@adacore.com>
13558 * checks.adb (Expr_Known_Valid): Result of fpt operator never
13561 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
13563 * back_end.adb: Minor fix in comment.
13565 2014-01-24 Javier Miranda <miranda@adacore.com>
13567 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
13568 required to report the error in case of task types.
13570 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13572 * sem_attr.adb: Additional index checking.
13574 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13576 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
13577 expressions in each component association, and for records note
13578 the entity in each association choice, for subsequent resolution.
13579 (Resolve_Attribute, case 'Update): Complete resolution of
13580 expressions in each component association.
13582 2014-01-24 Robert Dewar <dewar@adacore.com>
13584 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
13585 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
13586 leading to wrong handling of SPARK_Mode for library units).
13588 2014-01-24 Robert Dewar <dewar@adacore.com>
13590 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
13591 on generic instances (do not consider them to be internally
13594 2014-01-24 Doug Rupp <rupp@adacore.com>
13596 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
13597 vice pthread_sigmask.
13599 2014-01-24 Vincent Celier <celier@adacore.com>
13601 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
13604 2014-01-24 Vincent Celier <celier@adacore.com>
13606 * prj-ext.adb (Add): Do not output anything when Silent is True,
13607 whatever the verbosity. When Source is From_External_Attribute,
13608 set the corresponding environment variable if it is not already set.
13609 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
13611 * prj-proc.adb (Process_Expression_For_Associative_Array):
13612 For attribute External, call Prj.Ext.Add with Silent set to
13613 True for the child environment, to avoid useless output in non
13616 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13618 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
13619 range given by a subtype indication, and force evaluation of
13620 the bounds, as for a simple range.
13621 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
13622 of bounds of slice for various kinds of discrete ranges.
13623 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
13624 Evaluate_Slice_Bounds.
13626 2014-01-24 Bob Duff <duff@adacore.com>
13628 * s-taskin.ads (Activator): Make this Atomic, because
13629 Activation_Is_Complete reads it, and that can be called
13630 from any task. Previously, this component was only
13631 modified by the activator before activation, and by
13632 Self after activation.
13633 * a-taside.ads, a-taside.adb (Environment_Task,
13634 Activation_Is_Complete): Implement these missing functions.
13636 2014-01-24 Doug Rupp <rupp@adacore.com>
13638 * init.c: Add a handler section for Android.
13640 2014-01-24 Arnaud Charlet <charlet@adacore.com>
13642 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
13644 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13646 * sem_ch4.adb (Operator_Check): If one operand is a
13647 Raise_Expression, set its type to that of the other operand.
13648 * sem_res.adb (Resolve_Raise_Expression): new procedure.
13649 (Resolve_Actuals): For an actual that is a Raise_Expression,
13650 set the type to that of the formal.
13651 * sem_type.adb (Find_Unique_Type): If one of the operands is a
13652 Raise_Expression, return type of the other operand.
13654 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13656 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
13657 component of the record has a type with a default aspect, and
13658 the corresponding aggregate component is initiaized with a box,
13659 use the default value in the rewritten aggregate.
13661 2014-01-24 Tristan Gingold <gingold@adacore.com>
13663 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
13664 s-interr-sigaction.adb,
13665 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
13666 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
13667 to the call to Install_Restricted_Handlers.
13669 2014-01-24 Emmanuel Briot <briot@adacore.com>
13671 * prj-nmsc.adb (Check_File): Add protection when the source is
13672 not fully initialized.
13674 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13676 * sem_util.adb (Is_Post_State): In a postcondition, a selected
13677 component that denotes an implicit dereference is a reference
13678 to the post state of the subprogram.
13680 2014-01-24 Robert Dewar <dewar@adacore.com>
13682 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
13683 for generated subprograms.
13684 (Analyze_Subprogram_Specification): Ditto.
13686 2014-01-24 Vincent Celier <celier@adacore.com>
13688 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
13689 attributes in package Builder of aggregate and aggregate library
13691 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
13692 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
13693 Remove parameters. Change error message from "... externally
13694 build library ..." to "... externally built project ...".
13695 (Process_Naming_Scheme.Check): Do not do any check in aggregate
13696 project, as attribute Library_Dir and Library_Name have already
13697 been detected as forbidden.
13699 2014-01-24 Vincent Celier <celier@adacore.com>
13701 * prj-env.adb (Find_Project): If cached project path is not in
13702 project directory, look in current directory first and use cached
13703 project path only if project is not found in project directory.
13705 2014-01-24 Robert Dewar <dewar@adacore.com>
13707 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
13709 2014-01-24 Vincent Celier <celier@adacore.com>
13711 * projects.texi: Document that aggregate projects are only
13712 supported by gprbuild, but not by gnatmake. Document that the
13713 only attribute Switches in package Binder of aggregate projects
13714 will be ignored if its index is not others. Document that
13715 attribute Global_Config_File is allowed in package Binder of
13716 aggregate projects.
13718 2014-01-24 Robert Dewar <dewar@adacore.com>
13720 * sem_prag.adb: Minor code reorganization.
13721 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
13723 2014-01-24 Pascal Obry <obry@adacore.com>
13725 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
13726 attribute definition.
13728 2014-01-24 Vincent Celier <celier@adacore.com>
13730 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
13731 in the Queue the same source (same path, same multi-source index)
13732 from the same project file, to avoid compiling several times
13735 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
13737 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
13738 (Has_Gigi_Rep_Item): Likewise.
13739 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
13740 Has_Gigi_Rep_Item for objects.
13741 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
13742 (prepend_one_attribute): ...this.
13743 (prepend_one_attribute_pragma): New function extracted from...
13744 (prepend_attributes): ...here. Swap the parameters for consistency.
13745 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
13746 prepend_attributes.
13747 <object>: Deal with a pragma Linker_Section on a constant
13748 or variable. <E_Function>: Deal with a pragma Linker_Section
13750 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
13752 2014-01-24 Vincent Celier <celier@adacore.com>
13754 * opt.ads: Minor comment update.
13756 2014-01-24 Robert Dewar <dewar@adacore.com>
13758 * sem_prag.adb (Analyze_Input_Output): Add missing error check
13760 * sem_util.adb (Is_Refined_State): Add defense against junk
13763 2014-01-24 Pascal Obry <obry@adacore.com>
13765 * projects.texi: Removes Build_Slaves attribute documentation.
13767 2014-01-23 Robert Dewar <dewar@adacore.com>
13769 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
13772 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13774 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
13775 applies to expressions that come from source.
13776 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
13778 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
13779 rule regarding potentially unevaluated expressions, to prefix
13782 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13784 * exp_util.adb (Make_Invqriant_Call): If type of expression is
13785 a private extension, get invariant from base type.
13787 2014-01-23 Robert Dewar <dewar@adacore.com>
13789 * sem_util.adb, sem_attr.adb: Minor reformatting.
13791 2014-01-23 Robert Dewar <dewar@adacore.com>
13793 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
13794 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
13795 * sem.adb (Semantics): Remove save/restore of
13796 SPARK_Mode[_Pragma]. Not needed since already done in
13797 Save/Restore_Opt_Config_Switches.
13799 2014-01-23 Robert Dewar <dewar@adacore.com>
13801 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
13802 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
13803 Linker_Section enhancements.
13805 2014-01-23 Tristan Gingold <gingold@adacore.com>
13807 * gnat_rm.texi: Minor editing.
13809 2014-01-23 Robert Dewar <dewar@adacore.com>
13811 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
13812 with'ed internal units.
13813 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
13815 2014-01-23 Javier Miranda <miranda@adacore.com>
13817 * lib-xref.adb (Generate_Reference): As part of processing the
13818 "end-of-spec" reference generate an extra reference to the first
13819 private entity of the package.
13820 * xr_tabls.adb (Add_Reference): No action needed for the extra
13821 'E' reference associated; similar to the processing of the
13824 2014-01-23 Bob Duff <duff@adacore.com>
13826 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
13828 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13830 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
13831 predicate to implement rule given in 6.1.1 (20/3).
13832 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
13833 'Old in a postcondition, if it is potentially unevaluated and
13834 it is not an entity name.
13836 2014-01-23 Bob Duff <duff@adacore.com>
13838 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
13840 2014-01-23 Robert Dewar <dewar@adacore.com>
13842 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
13845 2014-01-23 Bob Duff <duff@adacore.com>
13847 * g-dynhta.ads: Minor comment fix.
13849 2014-01-23 Yannick Moy <moy@adacore.com>
13851 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
13852 from spec on body only when not already inherited on spec. Set
13853 SPARK_Mode from context on body without previous spec. *
13854 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
13855 library-level entities. Correct retrieval of entity from
13856 declaration, for cases where the declaration is not a unit.
13857 * sem_ch12.adb (Instantiate_Object): Avoid
13858 calling Is_Volatile_Object on an empty node.
13860 2014-01-23 Robert Dewar <dewar@adacore.com>
13862 * gnatlink.adb (Gnatlink): Check for suspicious executable file
13865 2014-01-23 Robert Dewar <dewar@adacore.com>
13867 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
13868 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
13869 style errors in instances.
13870 * g-dynhta.ads (Static_HTable): Comment updates.
13872 2014-01-23 Vincent Celier <celier@adacore.com>
13874 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
13875 to find a configuration project file when Config_File_Name is
13876 No_Configuration_File.
13877 * prj-conf.ads (No_Configuration_File): New constant String.
13878 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
13879 with Config_File_Name set to No_Configuration_File, so that
13880 no existing configuration project file will be used, and the
13881 configuration project will be only created in memory when
13882 Add_Default_GNAT_Naming_Scheme is called.
13883 * projects.texi: Minor reformatting.
13885 2014-01-23 Vincent Celier <celier@adacore.com>
13887 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
13888 a config project file if On_Load_Config is not null.
13889 * prj-pars.adb: Minor comment changes.
13891 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13893 * lib-xref.adb (Output_References): Output progenitors of
13894 synchronized tagged types, for source navigation.
13896 2014-01-23 Robert Dewar <dewar@adacore.com>
13898 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
13899 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
13900 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
13902 2014-01-23 Emmanuel Briot <briot@adacore.com>
13904 * prj-conf.adb (Get_Or_Create_Configuration_File): call
13905 On_Load_Config later.
13907 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
13909 * sem_ch3.adb (Analyze_Declarations): Do not
13910 generate the spec of the late primitive in ASIS mode. Add two
13911 comments to explain the special cases when the expansion is
13914 2014-01-23 Robert Dewar <dewar@adacore.com>
13916 * sem_util.adb (Note_Possible_Modification): Fix error of
13917 misbehaving for implicit dereference cases in -gnatc mode.
13919 2014-01-23 Emmanuel Briot <briot@adacore.com>
13921 * prj-pars.adb: Minor reformatting.
13923 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13925 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
13926 body generated for an expression function within a protected body
13927 needs a set of renaming declarations if the expression function
13930 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13932 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
13933 list interface progenitor of a tagged concurrent type, for better
13936 2014-01-22 Robert Dewar <dewar@adacore.com>
13938 * lib.adb (In_Extended_Main_Code_Unit): Return False for
13940 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
13941 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
13942 treatment of Slocs No_Location and Standard_Location.
13943 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
13944 check for entity with Standard_Location Sloc, rather than relying
13945 on Lib routines to do that.
13946 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
13947 that a call cannot occur before a later occuring body within
13950 2014-01-22 Thomas Quinot <quinot@adacore.com>
13952 * rtsfind.adb: Update comment.
13954 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
13956 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
13957 * sem_ch3.adb (Analyze_Declarations): Add local variable
13958 Body_Seen. Generate the spec of a late controlled
13959 primitive body that is about to freeze its related type.
13960 (Handle_Late_Controlled_Primitive): New routine.
13962 2014-01-22 Robert Dewar <dewar@adacore.com>
13964 * a-stream.adb: Minor reformatting.
13966 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13968 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
13969 sub-procedure Declared_In_Actual to handle properly the visibility
13970 of actuals in actual packages, that are themselves actuals to a
13971 actual package of the current instance. This mimics properly the
13972 visibility of formals of formal packages declared with a box,
13973 within the corresponding generic unit.
13975 2014-01-22 Robert Dewar <dewar@adacore.com>
13977 * checks.adb: Do not assume that a volatile variable is valid.
13979 2014-01-22 Thomas Quinot <quinot@adacore.com>
13981 * g-catiio.ads (Image, Value): Clarify that these functions
13982 operate in the local time zone. Minor documentation update.
13984 2014-01-22 Thomas Quinot <quinot@adacore.com>
13986 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
13988 2014-01-22 Robert Dewar <dewar@adacore.com>
13990 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
13991 Moved to sem_aux.adb.
13993 2014-01-22 Robert Dewar <dewar@adacore.com>
13995 * vms_data.ads: Minor reformatting.
13997 2014-01-22 Robert Dewar <dewar@adacore.com>
13999 * debug.adb: Document messages affected by -gnatd.E including
14000 the new ones that relate to late definition of equality.
14001 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
14002 debug flag -gnatd.E is set, then generate warnings rather than
14004 (Check_Untagged_Equality): In earlier versions of Ada,
14005 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
14007 2014-01-22 Robert Dewar <dewar@adacore.com>
14009 * sem_prag.adb (Usage_Error): Output additional messages for
14010 unconstrained OUT parameters lacking an input dependency.
14012 2014-01-22 Robert Dewar <dewar@adacore.com>
14014 * sem_ch4.adb: Minor reformatting.
14016 2014-01-22 Robert Dewar <dewar@adacore.com>
14018 * restrict.ads: Minor reformatting.
14019 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
14020 forbids a call from within a subprogram to the same subprogram.
14022 2014-01-22 Thomas Quinot <quinot@adacore.com>
14024 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
14025 stream attributes for Stream_Element_Array.
14026 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
14027 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
14028 defined in the current scope.
14030 2014-01-22 Robert Dewar <dewar@adacore.com>
14032 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
14034 2014-01-22 Thomas Quinot <quinot@adacore.com>
14036 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
14038 2014-01-22 Thomas Quinot <quinot@adacore.com>
14040 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
14041 declaration initialized with a function call, whose type
14042 has variable size, need to remove side effects so that the
14043 initialization expression becomes a dereference of a temporary
14044 reference to the function result.
14046 2014-01-22 Yannick Moy <moy@adacore.com>
14048 * errout.adb (Initialize): Remove trick to add dummy entry
14050 * erroutc.adb (Set_Warnings_Mode_Off,
14051 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
14052 command line switch.
14053 * opt.ads (Warning_Mode): Document behavior
14054 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
14056 2014-01-22 Robert Dewar <dewar@adacore.com>
14058 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
14060 2014-01-22 Robert Dewar <dewar@adacore.com>
14062 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
14063 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
14064 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
14065 case Storage_Size): call Check_Pool_Size_Clash.
14067 2014-01-22 Robert Dewar <dewar@adacore.com>
14069 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
14070 sem_eval.ads: Minor reformatting.
14072 2014-01-22 Thomas Quinot <quinot@adacore.com>
14074 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
14075 Any_Composite to prevent cascaded errors.
14077 2014-01-22 Yannick Moy <moy@adacore.com>
14079 * errout.adb (Initialize): Do not insert special entry in Warnings
14080 table in GNATprove_Mode.
14081 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
14083 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
14086 2014-01-22 Robert Dewar <dewar@adacore.com>
14088 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
14091 2014-01-22 Robert Dewar <dewar@adacore.com>
14093 * snames.ads-tmpl: Update header.
14095 2014-01-22 Thomas Quinot <quinot@adacore.com>
14097 * exp_util.adb (Insert_Actions): When inserting actions on a
14098 short circuit operator that has already been analyzed, do not park
14099 actions in node; instead introduce an N_Expression_With_Actions
14100 and insert actions immediately.
14101 Add guard for unexpected case of climbing up through statement
14102 in Actions list of an N_Expression_With_Actions.
14103 * sem_elab.adb (Insert_Elab_Check): Remove complex
14104 specialized circuitry for the case where the context is already
14105 analyzed, as it is not needed and introduces irregularities in
14106 finalization. Instead rely on the above change to Insert_Actions
14107 to ensure that late insertion on short circuit operators works
14110 2014-01-22 Ed Schonberg <schonberg@adacore.com>
14112 * sem_ch4.adb (Operator_Check): Improve error message when an
14113 operand of concatenation is an access type.
14115 2014-01-22 Thomas Quinot <quinot@adacore.com>
14117 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
14120 2014-01-22 Ed Schonberg <schonberg@adacore.com>
14122 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
14123 of an expanded name in a proper body, whose prefix is a package
14124 in the context of the proper body, when there is a homonym of
14125 the package declared in the parent unit.
14127 2014-01-22 Robert Dewar <dewar@adacore.com>
14129 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
14130 msg if errors found.
14131 (Check_One_Unit): Same change.
14133 2014-01-22 Robert Dewar <dewar@adacore.com>
14135 * ug_words: Add missing/wrong entries for VMS warning switches.
14136 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
14138 2014-01-22 Jerome Guitton <guitton@adacore.com>
14140 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
14143 2014-01-22 Robert Dewar <dewar@adacore.com>
14145 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
14147 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
14149 * gcc-interface/Makefile.in: Minor fixes.
14151 2014-01-21 Robert Dewar <dewar@adacore.com>
14153 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
14154 * par-ch5.adb (P_Condition): New version with expression prescanned.
14155 * par.adb (P_Condition): New version with expression prescanned.
14157 2014-01-21 Robert Dewar <dewar@adacore.com>
14159 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
14160 if Address is not a private type.
14161 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14162 Ignore pragma if System.Address is not a private type.
14164 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14166 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
14167 uninitialized value.
14169 2014-01-21 Thomas Quinot <quinot@adacore.com>
14171 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
14173 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14175 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
14176 the value of Assertions_Enabled flag when compiling an instance of
14177 an internal unit. This facilitates the use of pre/postconditions
14178 in generic internal units, such as the new elementary function
14181 2014-01-21 Robert Dewar <dewar@adacore.com>
14183 * exp_aggr.adb: Minor reformatting.
14184 * sem_attr.adb: Minor reformatting.
14185 * sem_res.adb: Minor comment addition.
14186 * einfo.adb: Minor comment updates.
14187 * freeze.adb: Minor reformatting and code reorganization.
14189 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14191 * par-ch4.adb (P_If_Expression): Handle more gracefully an
14192 elsif clause that does not have an else part.
14194 2014-01-21 Robert Dewar <dewar@adacore.com>
14196 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
14197 * gcc-interface/Makefile.in: clean up target pairs.
14199 2014-01-21 Pascal Obry <obry@adacore.com>
14201 * projects.texi: Minor typo fix.
14203 2014-01-21 Thomas Quinot <quinot@adacore.com>
14205 * freeze.adb (Check_Component_Storage_Order): If a record type
14206 has an explicit Scalar_Storage_Order attribute definition clause,
14207 reject any component that itself is of a composite type and does
14210 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14212 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
14213 can be used to generate proper cross-reference information for
14214 the parent units of proper bodies.
14216 2014-01-21 Thomas Quinot <quinot@adacore.com>
14218 * exp_pakd.adb (Expand_Packed_Element_Set,
14219 Expand_Packed_Element_Reference): No byte swapping required in
14220 the front-end for the case of a reverse storage order array,
14221 as this is now handled uniformly in the back-end. However we
14222 still need to swap back an extracted element if it is itself a
14223 nested composite with reverse storage order.
14225 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
14227 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
14228 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
14231 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14233 * gnat_ugn.texi: Minor updates.
14235 2014-01-21 Thomas Quinot <quinot@adacore.com>
14237 * exp_pakd.adb: Update comment, minor reformatting.
14239 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
14241 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
14242 object check when SPARK_Mode is on.
14243 * sem_ch6.adb (Process_Formals): Trigger the volatile object
14244 check when SPARK_Mode is on.
14245 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
14246 check when SPARK_Mode is on.
14247 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
14248 corresponding pragma of aspect SPARK_Mode in the visible
14249 declarations of a package declaration.
14250 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
14251 check when SPARK_Mode is on.
14252 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
14253 check when SPARK_Mode is on.
14254 (Resolve_Entity_Name): Trigger
14255 the volatile object check when SPARK_Mode is on.
14257 2014-01-21 Robert Dewar <dewar@adacore.com>
14259 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
14260 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
14262 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14264 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
14265 object is declared, it is rewritten as a renaming of an dynamic
14266 expression that wraps the initial value. The renaming declaration
14267 is first given an internal name, to prevent collisions with the
14268 entity already declared, and then the name is modified to reflect
14269 the original one. the modification of the name must preserve
14270 the source location of the original, to prevent spurious errors
14271 when compiling with style checks if the declaration involves
14272 more than one entity.
14274 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
14276 * aspects.adb Add entries for Async_Readers, Async_Writers,
14277 Effective_Reads and Effective_Writes in table Canonical_Aspect.
14278 * aspects.ads Add entries for Async_Readers, Async_Writers,
14279 Effective_Reads and Effective_Writes in tables Aspect_Id,
14280 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
14281 * atree.adb (Ekind_In): New version with 8 parameters.
14282 (Node34): New routine.
14283 (Set_Node34): New routine.
14284 * atree.ads (Ekind_In): New version with 8 parameters.
14285 (Node34): New routine.
14286 (Set_Node34): New routine.
14287 * einfo.adb Contract is now Node34.
14288 (Contract): Update the assertion and node usage.
14289 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
14290 Effective_Reads and Effective_Writes.
14291 (Set_Contract): Update the assertion and node usage.
14292 (Write_Field24_Name): Remove the output for a contract.
14293 (Write_Field34_Name): Add output for a contract.
14294 * einfo.ads Contract is now Node34. Update the comment on
14295 attribute usage and related node structures.
14296 (Get_Pragma): Update the comment on usage.
14297 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
14298 Effective_Reads and Effective_Writes do not require special
14299 processing by the parser.
14300 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
14301 (Analyze_Declarations): Analyze the contract of a variable at
14302 the end of the declarative region.
14303 (Analyze_Object_Declaration): Create a contract for a variable.
14304 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
14305 of classification pragmas.
14306 (Process_Formals): Detect an illegal
14307 use of a volatile object as a formal in a function.
14308 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
14309 a volatile object as an actual in generic instantiation.
14310 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
14311 Effective_Reads and Effective_Writes in table Sig_Flags.
14312 (Analyze_External_State_In_Decl_Part): New routine.
14313 (Analyze_Global_Item): Detect an illegal use of a volatile object
14314 as a global item of a function.
14315 (Analyze_Pragma): Reimplement
14316 pragma Abstract_State. Add support for pragmas Async_Readers,
14317 Async_Writers, Effective_Reads and Effective_Writes.
14318 (Check_External_Properties): New routine.
14319 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
14320 (Check_External_Properties): New routine.
14321 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
14322 volatile object as an actual in a call.
14323 (Resolve_Entity_Name):
14324 Add local variables Par, Prev and Usage_OK. Detect illegal
14325 contexts of volatile objects.
14326 * sem_util.adb (Add_Contract_Item): Add support for
14327 pragmas associated with the contract of a variable.
14328 (Async_Readers_Enabled): New routine.
14329 (Async_Writers_Enabled): New routine.
14330 (Effective_Reads_Enabled): New routine.
14331 (Effective_Writes_Enabled): New routine.
14332 (Has_Enabled_Property):
14334 (Is_Unchecked_Conversion_Instance): New routine.
14335 (Is_Volatile_Object): Add support for entities that may denote
14337 * sem_util.ads (Add_Contract_Item): Update the
14339 (Async_Readers_Enabled): New routine.
14340 (Async_Writers_Enabled): New routine.
14341 (Effective_Reads_Enabled): New routine.
14342 (Effective_Writes_Enabled): New routine.
14343 (Is_Unchecked_Conversion_Instance): New routine.
14344 * sinfo.ads Update the comment on the structure of N_Contract.
14345 * snames.ads-tmpl Add predefined names for Async_Readers,
14346 Async_Writers, Effective_Reads and Effective_Writes. Add
14347 pragma ids for Async_Readers, Async_Writers, Effective_Reads
14348 and Effective_Writes.
14350 2014-01-21 Robert Dewar <dewar@adacore.com>
14352 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
14353 * sem_eval.adb (Compile_Time_Known_Value): Remove special
14354 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
14355 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
14356 (Test_Foldable): Add CRT_Safe parameter
14357 * sem_eval.ads (Compile_Time_Known_Value): Remove special
14358 handling of CRT mode.
14359 (CRT_Safe_Compile_Time_Known_Value): New function.
14361 2014-01-21 Robert Dewar <dewar@adacore.com>
14363 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
14364 with pragma or aspect that applies to package spec or subprogram
14367 2014-01-21 Robert Dewar <dewar@adacore.com>
14369 * exp_aggr.adb: Minor reformatting.
14371 2014-01-21 Johannes Kanig <kanig@adacore.com>
14373 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
14375 2014-01-21 Bob Duff <duff@adacore.com>
14377 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
14379 2014-01-21 Steve Baird <baird@adacore.com>
14381 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
14383 2014-01-21 Vincent Celier <celier@adacore.com>
14385 * prj-part.adb (Parse_Single_Project): Accept to extend a project
14386 if it has only be imported by an project being extended. When a
14387 project that has only been imported by a project being extended
14388 is imported by another project that is not being extended,
14389 reset the previous indication, so that it will be an error if
14390 this project is extended later.
14391 * prj-tree.adb (Create_Project): Include component From_Extended
14392 in table Projects_HT
14393 * prj-tree.ads (Project_Name_And_Node): New Boolean component
14396 2014-01-21 Robert Dewar <dewar@adacore.com>
14398 * atree.ads, atree.adb: Add Node33 and Set_Node33.
14399 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
14400 New field (SPARK_Pragma_Inherited): New flag
14401 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
14403 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
14404 * opt.ads (SPARK_Mode_Pragma): New global variable.
14405 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
14406 * sem_ch3.adb: Use new SPARK_Mode data structures.
14407 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
14408 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
14409 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
14410 (Pop_Scope): Restore SPARK_Mode_Pragma.
14411 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
14412 new data structures.
14414 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14416 * back_end.adb: Undo previous change, not needed. Minor reformatting.
14418 2014-01-21 Thomas Quinot <quinot@adacore.com>
14420 * exp_ch5.adb: Fix comment.
14421 * switch-c.adb: Minor comment update.
14422 * exp_ch3.adb: Minor reformatting.
14424 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14426 * back_end.adb (Scan_Compiler_Arguments): Do not store object
14427 filename in gnatprove mode.
14429 2014-01-21 Thomas Quinot <quinot@adacore.com>
14431 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
14432 suppresses usage of primitive _assign for tagged types).
14433 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
14434 No_Ctrl_Actions for a tagged type that does not require
14435 finalization, as we want to disable usage of _assign (which
14436 may cause undesirable discriminant checks on an uninitialized,
14439 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14441 * sem_prag.adb: Reject invariant'class on completion.
14443 2014-01-21 Javier Miranda <miranda@adacore.com>
14445 * exp_ch3.adb (Build_Init_Procedure): For
14446 derivations of interfaces, do not move the the initialization
14447 of the _parent field since such assignment is not generated.
14449 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14451 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
14452 with the operator it renames if we are within an expression of
14453 a pre/postcondition, because the expression will be reanalyzed
14454 at a later point, and the analysis of the renaming may affect
14455 the visibility of the operator when in an instance.
14457 2014-01-21 Robert Dewar <dewar@adacore.com>
14459 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
14460 Add this flag to type conversion nodes and assignment nodes.
14461 * treepr.adb: Deal properly with Flag 1,2,3.
14462 * treeprs.adt: Minor comment update.
14464 2014-01-21 Robert Dewar <dewar@adacore.com>
14466 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
14468 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
14469 parameter, completely rewrite spec.
14471 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14473 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
14474 instance that is inlined, it may have been rewritten as a wrapper
14475 package. In that case the unit that must be made visible is the
14476 related instance of the package.
14478 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14480 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
14481 previous change in codepeer mode.
14483 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14485 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
14486 call to Abort_Undefer, as expected by the runtime.
14487 * s-tasren.adb (Local_Complete_Rendezvous): Replace
14488 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
14489 deferred at this point. Update comments.
14491 2014-01-21 Thomas Quinot <quinot@adacore.com>
14493 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
14495 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14497 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
14500 2014-01-21 Robert Dewar <dewar@adacore.com>
14502 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
14504 2014-01-21 Thomas Quinot <quinot@adacore.com>
14506 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
14507 this is value is used in Node_Id arithmetic operations.
14508 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
14509 instead of hard-coded unrolled code.
14511 2014-01-21 Yannick Moy <moy@adacore.com>
14513 * gnat1drv.adb: Minor code cleanup, removing useless code.
14515 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14517 * opt.ads (SPARK_Switches_File_Name): New.
14518 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
14519 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
14520 * gnat_ugn.texi: Document -gnates.
14522 2014-01-21 Yannick Moy <moy@adacore.com>
14524 * errout.adb (Special_Msg_Delete): Update comment. Remove
14525 special case for GNATprove which should not ignore mismatch
14526 in sizes for representation clauses.
14527 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
14528 which should not ignore pragma Pack.
14530 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14532 * sem_ch4.adb: Code clean up.
14534 2014-01-21 Steve Baird <baird@adacore.com>
14536 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
14538 2014-01-21 Robert Dewar <dewar@adacore.com>
14540 * gcc-interface/gigi.h: Get Flags array address.
14541 * gcc-interface/trans.c: Acquire Flags array address.
14542 * atree.adb: Add support for Flags array and Flag0,1,2,3.
14543 * atree.ads: Add support for Flags array and Flag0,1,2,3.
14544 * atree.h: Add support for Flags array and Flag0,1,2,3.
14545 * back_end.adb: Pass Flags array address to gigi.
14547 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14549 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
14550 reference to generated body so that legality checks on stream
14551 attributes are properly applied. If type is tagged and already
14552 frozen, insert generated body at the point of the renaming
14555 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14557 * sem_ch12.adb: Code clean up.
14558 * sem_ch8.adb: Minor reformatting
14560 2014-01-20 Robert Dewar <dewar@adacore.com>
14562 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
14563 converting warnings on inevitable exceptions to errors.
14564 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14565 converting warnings on inevitable exceptions to errors.
14566 * opt.adb (SPARK_Mode_Config): Handled like other config flags
14567 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
14568 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
14569 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
14570 New flag (Config_Switches_Type): Add SPARK_Mode field
14571 * sem.adb: Minor code reorganization (remove unnecessary with)
14572 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
14573 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14574 converting warnings on inevitable exceptions to errors.
14575 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14576 converting warnings on inevitable exceptions to errors.
14577 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
14578 converting warnings on inevitable exceptions to errors.
14579 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14580 converting warnings on inevitable exceptions to errors.
14581 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
14582 from spec if needed
14583 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
14584 from spec if needed
14585 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
14587 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
14588 converting warnings on inevitable exceptions to errors.
14589 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
14590 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
14591 of Get_SPARK_Mode_Id
14592 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
14593 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
14594 converting warnings on inevitable exceptions to errors.
14595 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
14596 converting warnings on inevitable exceptions to errors.
14597 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
14600 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14602 * sem_ch13.adb: Add semantic information to rewritten type
14605 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14607 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
14608 are of a type with unknown discriminants, convert both to the
14609 underlying view of the type, so that the proper constraint check
14610 can be applied to the right-hand side.
14612 2014-01-20 Robert Dewar <dewar@adacore.com>
14614 * atree.adb (Copy_Node): Fix failure to copy last component
14615 (Exchange_Entities): Fix failure to exchange last entity
14617 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14619 * sem_ch12.adb: Code clean up.
14621 2014-01-20 Robert Dewar <dewar@adacore.com>
14623 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
14625 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14627 * sem_ch4.adb (Analyze_Quantified_Expression): If after
14628 pre-analysis the loop parameter specification has been
14629 rewritten as a iterator specification, propagate the change to
14630 the quantified expression, for ASIS navigtion needs.
14632 2014-01-20 Vincent Celier <celier@adacore.com>
14634 * par-ch10.adb: Minor error message change: escape [ and ].
14636 2014-01-20 Robert Dewar <dewar@adacore.com>
14638 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
14639 * errout.adb: Implement [ and ] insertion characters.
14640 * errout.ads: Document new [ and ] insertion characters.
14641 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
14642 addition of ??? comment.
14643 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
14644 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
14645 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
14646 Make warnings on exceptions into errors in GNATprove mode.
14647 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
14650 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14652 * sem_ch13.adb: Code clean up.
14654 2014-01-20 Robert Dewar <dewar@adacore.com>
14656 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
14658 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
14659 error in GNATprove mode.
14661 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14663 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
14664 reference 'Old takes no parameters, and thus can appear as a
14667 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14669 * exp_aggr.adb: Fix minor typos.
14671 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14673 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
14674 instance the attribute is legal, and its value is determined
14675 statically if the type has no discriminants. This choice is
14676 more useful than rechecking the legality rule in the instance,
14677 is consistent with older usage, and is also consistent with all
14680 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14682 * sem_cat.adb (Validate_Static_Object_Name): Change error into
14683 warning in Relaxed_Semantic_Mode.
14685 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14687 * sem_attr.adb: Code and comments cleanup.
14689 2014-01-20 Yannick Moy <moy@adacore.com>
14691 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
14692 * errout.adb (Compilation_Errors): Remove special handling in
14694 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
14695 removed debug flags.
14696 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
14697 Global, Initial_Condition, Initializes and Refined_State pragmas and
14699 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
14700 SPARK_Strict_Mode): Remove global flags.
14701 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
14702 always performed now, on packages declaring a null state.
14703 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
14704 at providing pedantic mode for bounds of integer types.
14705 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
14706 "some" quantified expression now issued under control of -gnatw.t,
14707 like the other warning on unused bound variable.
14708 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
14710 (Analyze_Pragma): Remove tests for SPARK 2014
14711 pragmas, not officially allowed by GNAT.
14713 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14715 * sem_prag.adb (Analyze_Pragma): Ensure that
14716 the sole argument of pragmas Abstract_State, Contract_Cases,
14717 Depends, Global and Initializes in in aggregate form.
14718 (Analyze_Refined_Pragma): Ensure that the sole argument of
14719 pragmas Refined_Depends, Refined_Global and Refined_State is in
14721 (Ensure_Aggregate_Form): New routine.
14723 2014-01-20 Doug Rupp <rupp@adacore.com>
14725 * sem_attr.adb (Analyze_Attribute): case
14726 Attribute_Constrained => treat all prefixes as legal for Declib
14729 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14731 * sem_prag.adb (Check_Mode): Reimplement the routine.
14732 (Find_Mode): New routine.
14734 2014-01-20 Robert Dewar <dewar@adacore.com>
14736 * sem_ch4.adb (Operator_Check): Handle additional
14737 Allow_Integer_Address cases.
14739 2014-01-20 Robert Dewar <dewar@adacore.com>
14741 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
14742 allowed if address is non-private, no longer true.
14743 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14744 Remove check for address being private, causes difficulty when
14745 pragma used in gnat.adc file and is not needed, since we guard
14746 this in Address_Integer_Convert_OK.
14747 * exp_ch7.adb: Minor reformatting.
14748 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
14750 2014-01-20 Robert Dewar <dewar@adacore.com>
14752 * checks.adb (Apply_Range_Check): Remove gnatprove special
14753 casing of exponentiation.
14754 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
14755 operand for integer case to check range against Natural.
14757 2014-01-20 Robert Dewar <dewar@adacore.com>
14759 * s-tataat.adb: Minor reformatting.
14761 2014-01-20 Robert Dewar <dewar@adacore.com>
14763 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
14764 entities, and also fix documentation to remove mention of visible
14765 integer type, since this is not what the implementation does.
14766 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
14767 entities, and also fix documentation to remove mention of visible
14768 integer type, since this is not what the implementation does.
14769 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
14771 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
14772 case for parameter type check.
14773 * sem_res.adb (Resolve): Use new function
14774 Address_Integer_Convert_OK.
14775 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
14776 reformatting throughout.
14777 * sem_util.adb (Address_Integer_Convert_OK): New function.
14778 * sem_util.ads: Minor reformatting (put specs in alpha order)
14779 (Address_Integer_Convert_OK): New function.
14781 2014-01-20 Thomas Quinot <quinot@adacore.com>
14783 * exp_ch7.adb (Wrap_Transient_Expression):
14784 Insertion extra conditional expression only if
14785 Opt.Suppress_Control_Flow_Optimizations is set.
14787 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14789 * s-tataat.adb (Initialize_Attributes): Abort might already be
14790 deferred in Create_Task.
14792 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14794 * checks.adb (Apply_Scalar_Range_Check): Flag
14795 the exponent as requiring a range check when the expression is
14798 2014-01-20 Fedor Rybin <frybin@adacore.com>
14800 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
14802 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14804 * sem_util.adb (Default_Initialization): New routine.
14805 * sem_util.ads: Add new type Default_Initialization_Kind.
14806 (Default_Initialization): New routine.
14808 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14810 * sem_prag.adb (Check_Mode): Correct all error
14811 message logic dealing with in/in out parameters that may appear
14812 as inputs or have a self reference.
14814 2014-01-20 Robert Dewar <dewar@adacore.com>
14816 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
14817 * sem_res.adb (Resolve): Fix error causing infinite loop for
14818 integer used as address. Allow addresses as integers.
14820 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14822 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
14824 2014-01-20 Bob Duff <duff@adacore.com>
14826 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
14827 error when "use all" is not followed by "type".
14829 2014-01-20 Bob Duff <duff@adacore.com>
14831 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
14834 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14836 * checks.adb (Apply_Address_Clause_Check): If there is an
14837 alignment check on the expression in an address clause, and there
14838 is no local exception propagation, add an additional explanatory
14839 message to clarify the cause of previous warning.
14841 2014-01-20 Robert Dewar <dewar@adacore.com>
14843 * exp_ch7.adb: Minor reformatting.
14844 * opt.ads: Minor comment updates.
14845 * sem.adb: Minor name change Is_Main_Unit =>
14846 Is_Main_Unit_Or_Main_Unit_Spec.
14847 * sem_ch6.adb: Minor reformatting and code reorganization.
14849 2014-01-20 Bob Duff <duff@adacore.com>
14851 * gnat_ugn.texi: Update gnatpp switches.
14853 2014-01-20 Thomas Quinot <quinot@adacore.com>
14855 * exp_ch9.adb: Minor comment edit.
14857 2014-01-20 Robert Dewar <dewar@adacore.com>
14859 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
14860 only if System.Address is a private type.
14861 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
14862 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14863 Allowed only if type System.Address is private, since otherwise
14865 * sem_res.adb: Fix failure to properly Analyze unchecked
14866 conversions that were introduced by Allow_Integer_Address.
14867 * switch-c.adb: Remove -gnates switch.
14868 * usage.adb: Remove -gnates switch.
14869 * gnat_ugn.texi: Remove documentation of -gnates flag.
14871 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14873 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
14874 resolve expression to perform proper name capture.
14876 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14878 * sem.adb (Semantics): When saving/restoring configuration
14879 switches, the spec of a pre- defined unit that is the main unit
14880 must be treated as a predefined unit as well.
14882 2014-01-20 Thomas Quinot <quinot@adacore.com>
14884 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
14885 expression, insert an extra conditional expression when saving
14886 the value of the expression, for the benefit of control flow
14887 graph based coverage analysis.
14888 * exp_ch3.adb: Minor reformatting.
14890 2014-01-20 Robert Dewar <dewar@adacore.com>
14892 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
14893 * gnat_rm.texi: Document pragma Allow_Integer_Address.
14894 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
14895 * opt.ads: New flag Allow_Integer_Address.
14896 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
14897 * sem_ch5.adb: Minor reformatting.
14898 * sem_prag.adb: Implement pragma Allow_Integer_Address.
14899 * sem_res.adb (Resolve): Allow integer address value if
14901 * sem_util.adb: Minor reformatting.
14902 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
14903 * switch-c.adb: Recognize flag -gnates.
14904 * usage.adb: Document flag -gnates.
14906 2014-01-20 Thomas Quinot <quinot@adacore.com>
14908 * s-tadeca.adb: Fix minor typos in comment.
14910 2014-01-20 Pascal Obry <obry@adacore.com>
14912 * s-win32.ads (FreeLibrary): New import.
14914 2014-01-20 Robert Dewar <dewar@adacore.com>
14916 * sem_res.adb, sem_cat.adb: Minor reformatting.
14917 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
14918 assigning to OUT parameters for the current subprogram scope.
14919 * exp_ch4.adb: Minor reformatting.
14921 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14923 * exp_ch4.adb (Process_Transient_Object,
14924 Find_Enclosing_Contexts): If the top-level if-expression that
14925 generated the transient object is an actual in a call, the proper
14926 Hook_Context is a construct enclosing the call.
14927 * einfo.ads: Indicate that Related_Expression is used to link a
14928 loop variable to the container expression over which the loop
14930 (Analyze_Iterator_Specification): Set the Related_Expression of
14931 the loop variable in a container element iterator.
14932 (Note_Possible_Modification): If the variable is the loop
14933 variable in a container element iterator, indicate that the
14934 enclosing container is also modified.
14936 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14938 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
14940 2014-01-20 Robert Dewar <dewar@adacore.com>
14942 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
14943 Minor reformatting and code clean up.
14945 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14947 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
14948 of objects of private type if Relaxed_RM_Semantics.
14950 2014-01-20 Claire Dross <dross@adacore.com>
14952 * a-cofove.ads (Vector): Capacity discriminant
14953 should be in range of the index.
14955 2014-01-20 Thomas Quinot <quinot@adacore.com>
14957 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
14958 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
14959 possible difference between epoch of Ada.Calendar clock and Ada
14960 real-time/tasking clock.
14961 * s-taprop-posix.adb: Minor comment fix.
14963 2014-01-20 Doug Rupp <rupp@adacore.com>
14965 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
14967 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14969 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
14970 checks on the prefix of attribute 'Old.
14971 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
14972 generation of validity checks on a range that belongs to the
14973 iteration scheme of a quantified expression.
14974 * sem_ch5.adb (One_Bound): Suppress the generation of validity
14975 checks on a bound that belongs to the iteration scheme of a
14976 quantified expression, generate the check in all other cases.
14978 2014-01-20 Bob Duff <duff@adacore.com>
14980 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
14982 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14984 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
14985 interpretations that do not come from other predefined units,
14986 to prevent spurious ambiguities in the presence of user-defined
14987 operators in the context of (an instance of) a predefined unit.
14989 2014-01-20 Robert Dewar <dewar@adacore.com>
14991 * gnat_rm.texi: Document that Loop_Variant is included in
14992 Statement_Assertions.
14993 * sem_prag.adb (Check_Kind): Add Loop_Variant to
14994 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
14995 to Statement_Assertions.
14997 2014-01-20 Doug Rupp <rupp@adacore.com>
14999 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
15000 for errno ENOENT from RTP on NFS mounted file system.
15002 2014-01-20 Ed Schonberg <schonberg@adacore.com>
15004 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
15005 examine code that does not come from source. The check does not
15006 apply to code generated for constraint checks, and such code may
15007 generate spurious error messages when compiled with expansion
15008 disabled (as in a generic unit) because side effects may not
15010 2) Make error messages more explicit: indicate the component
15011 of the construct whose value is indeterminate because of a
15012 call to a function with in-out parameter in another component,
15013 when there is no mandated order of execution between the two
15014 components (actuals, aggregate components, alternatives).
15016 2014-01-20 Robert Dewar <dewar@adacore.com>
15018 * gnat_rm.texi: Minor cleanup.
15020 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15022 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
15023 can now apply to a refined postcondition.
15024 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
15025 variable Result_Seen. Add variables Case_Prag, Post_Prag,
15026 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
15027 whether postconditions and/or constract-cases mention attribute
15028 'Result and introduce a post-state when applied to functions.
15029 (Check_Result_And_Post_State): Removed.
15030 * sem_prag.adb (Analyze_Pragma): Add local variable
15031 Result_Seen. Verify that the expression of pragma Refined_Post
15032 mentions attribute 'Result and introduces a post-state.
15033 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
15035 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15037 * exp_ch7.adb (Is_Subprogram_Call): New routine.
15038 (Process_Transient_Objects): Make variable Must_Hook global with
15039 respect to all locally declared subprograms. Search the context
15040 for at least one subprogram call.
15041 (Requires_Hooking): Removed.
15043 2014-01-20 Claire Dross <dross@adacore.com>
15045 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
15046 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
15047 External_Axiomatization);
15049 2014-01-20 Robert Dewar <dewar@adacore.com>
15051 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
15052 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
15053 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
15054 Allow Loop_Entry to be used in these pragmas if they appear in
15055 an appropriate context.
15056 (Placement_Error): Specialize error
15057 message for pragma Assert[_And_Cut] or pragma Assume containing
15058 Loop_Entry attribute.
15059 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
15060 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
15061 and code clean ups.
15063 2014-01-20 Robert Dewar <dewar@adacore.com>
15065 * gnat1drv.adb: Minor comment update.
15067 2014-01-20 Tristan Gingold <gingold@adacore.com>
15069 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
15070 variables, comment out unused code.
15071 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
15072 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
15073 * s-excmac-arm.ads: New file.
15075 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15077 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
15078 Drange and Index_Typ. Remove the circuitry which creates a
15079 range check to compare the index type of the array against the
15081 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
15082 the circuitry which creates a range check to handle a
15083 discrete_range denoted by a subtype indication.
15085 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
15087 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
15088 nodes to get the original sloc range.
15090 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15092 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
15093 entity of a [library level] package.
15095 2014-01-20 Tristan Gingold <gingold@adacore.com>
15097 * raise-gcc.c (exception_class_eq): New function.
15098 (is_handled_by): Use it to compare exception classes.
15099 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
15100 be called to return URC_CONTINUE_UNWIND.
15101 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
15102 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
15104 2014-01-20 Robert Dewar <dewar@adacore.com>
15106 * opt.ads: Minor comment update.
15108 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15110 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
15111 constants to the "Local variables" area. Add new constant D. Add
15112 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
15113 to Pref_Typ and update all occurrences. Add circuitry to extract
15114 the discrete_range and the index type and build a range check.
15116 2014-01-20 Arnaud Charlet <charlet@adacore.com>
15118 * gnat1drv.adb (Adjust_Global_Switches): Enable
15119 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
15122 2014-01-20 Thomas Quinot <quinot@adacore.com>
15124 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
15126 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15128 * sem_ch13.adb (Analyze_Aspect_Specifications):
15129 When aspect SPARK_Mode appears on a package body, insert the
15130 generated pragma at the top of the body declarations.
15132 2014-01-20 Robert Dewar <dewar@adacore.com>
15134 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
15135 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
15136 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
15137 sem_ch8.adb, exp_dist.adb: Minor reformatting.
15139 2014-01-20 Yannick Moy <moy@adacore.com>
15141 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
15144 2014-01-20 Pascal Obry <obry@adacore.com>
15146 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
15148 * g-arrspl.adb: Adapt all routine to this new implementation.
15149 (Set): Copy the Slice_Set definition before reusing it.
15151 2014-01-20 Arnaud Charlet <charlet@adacore.com>
15153 * sem_prag.adb (Process_Import_Or_Interface): In
15154 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
15155 (Analyze_Pragma): Ditto for pragma Export.
15156 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
15159 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15161 * einfo.ads: E_Abstract_State is now part of the entities that
15162 can be overloaded. Update type Overloadable_Kind to reflect the
15163 inclusion of abstract states.
15164 * sem_ch6.adb (New_Overloaded_Entity): A function can now
15165 overload an abstract state.
15166 * sem_prag.adb (Analyze_Constituent): Handle the overloading
15167 of states by functions. Use Entity_Of to obtain the entity of
15168 a constituent. (Analyze_Global_Item): Handle the overloading of
15169 states by functions.
15170 (Analyze_Initialization_Item): Handle the
15171 overloading of states by functions. Use Entity_Of to obtain the
15173 (Analyze_Input_Item): Handle the overloading
15174 of states by functions. Use Entity_Of to obtain the entity of an item.
15175 (Analyze_Input_Output): Handle the overloading of states by functions.
15176 (Analyze_Refinement_Clause): Handle the overloading
15177 of states by functions. Use Entity_Of to obtain the entity of an item.
15178 (Appears_In): Use Entity_Of to obtain the entity of an element.
15179 (Check_Usage): Use Entity_Of to obtain the entity of
15180 an item. Add a guard to prevent a crash due to a previous error.
15181 (Resolve_State): New routine.
15183 2014-01-20 Yannick Moy <moy@adacore.com>
15185 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
15186 opt.ads: Minor comments updates.
15188 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
15190 * einfo.adb (Non_Limited_View): Applies to abstract states.
15191 (Set_From_Limited_With): Applies to abstract states.
15192 (Set_Non_Limited_View): Applies to abstract states.
15193 (Write_Field17): Output the non-limited view of an abstract state.
15194 * einfo.ads: Update the comment on usage and occurrences in
15195 nodes for attributes From_Limited_With and Non_Limited_View.
15196 * sem_aux.adb (Available_View): This routine can now handle
15198 * sem_aux.ads (Available_View): This routine can now handle
15199 abstract states. Update the comment on usage.
15200 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
15201 of states and variables.
15202 (In_Pragmas_Depends_Or_Global): New routine.
15203 * sem_ch10.adb (Build_Limited_Views): Implement
15204 abstract (limited) views of variables and states.
15205 (Build_Shadow_Entity): This routine is now a procedure. Add
15206 formal parameter Shadow. Update the comment on usage. Add
15207 context-specific decoration for states and variables.
15208 (Decorate_State): New routine. (Decorate_Variable): New routine.
15209 (Find_And_Process_States): New routine.
15210 (Process_Declarations): Renamed to Process_Declarations_And_States.
15211 (Process_Declarations_And_States): Add formal parameters
15212 Pack and Create_Abstract_Views. Update the comment on usage.
15213 (Process_States): New routine.
15214 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
15215 views of states and variables. Match the abstract view of a state
15216 against its corresponding non-abstract view.
15217 (Is_Matching_Input):
15218 Handle abstract views of states and variables. Match the abstract
15219 view of a state against its corresponding non-abstract view.
15220 (Process_Global_Item): Handle abstract views of states and
15223 2014-01-20 Bob Duff <duff@adacore.com>
15225 * sem_ch10.adb (Expand_With_Clause): Don't
15226 recurse on the prefix if the current with-ed name refers to a
15227 package that renames its own parent, eg "package P.Q renames P;".
15229 2014-01-20 Yannick Moy <moy@adacore.com>
15231 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
15232 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
15233 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
15234 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
15235 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
15238 2014-01-20 Yannick Moy <moy@adacore.com>
15240 * sinfo.ads Update documentation of GNATprove mode.
15242 2014-01-20 Yannick Moy <moy@adacore.com>
15244 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
15245 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
15246 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
15247 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
15249 * sem_ch13.adb: Remove blank.
15250 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
15251 subprograms by alias for renamings, not for inherited primitive
15253 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
15255 (Remove_Side_Effects): Apply the removal in
15256 GNATprove mode, for the full analysis of expressions.
15257 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
15259 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
15260 save/restore actions for Expander_Active flag in GNATprove mode,
15261 similar to what is done in ASIS mode.
15262 * frontend.adb (Frontend): Generic bodies are instantiated in
15264 * gnat1drv.adb (Adjust_Global_Switches): Set operating
15265 mode to Check_Semantics in GNATprove mode, although a light
15266 expansion is still performed.
15267 (Gnat1drv): Set Back_End_Mode to
15268 Declarations_Only in GNATprove mode, and later on special case
15269 the GNATprove mode to continue analysis anyway.
15270 * lib-writ.adb (Write_ALI): Always generate ALI files in
15272 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
15274 (SPARK_Mode): Renamed as GNATprove_Mode.
15275 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
15276 tree in GNATprove_Mode.
15277 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
15278 body in GNATprove mode.
15279 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
15281 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
15282 Make sure side effects are removed in GNATprove mode.
15284 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
15286 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
15287 for aliased objects with an unconstrained nominal subtype.
15288 * gcc-interface/trans.c (Call_to_gnu): Likewise.
15289 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
15290 <case N_Op_Minus>: Remove useless code.
15291 (Exception_Handler_to_gnu_zcx): Minor tweaks.
15293 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
15295 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
15296 Tidy up. For a subtype with discriminants and variant part, if a
15297 variant is statically selected and the fields all have a constant
15298 position, put them in order of increasing position. Likewise if
15299 no variant part but representation clause is present.
15300 * gcc-interface/utils.c (make_packable_type): Robustify.
15301 (maybe_pad_type): Use local variable and tidy up condition. If no
15302 alignment is specified, use the original one.
15303 (create_type_stub_decl): Minor tweak.
15304 (convert) <case VECTOR_CST>: Fix typo.
15305 <case CONSTRUCTOR>: Deal with padding types around the same type.
15306 Do not punt on missing fields.
15307 (unchecked_convert): Call finish_record_type to lay out the special
15308 record types made for conversions from/to problematic integer types.
15309 Bump the alignment of CONSTRUCTORs before converting them to a more
15312 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
15314 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
15315 obsolete code for type_annotate_only mode, simplify code and slightly
15316 improve wording of comments.
15318 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
15321 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
15322 as intermediate type.
15323 (UI_To_gnu): Likewise.
15325 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
15327 * gnatvsn.ads (Current_Year): Bump to 2014.
15329 2014-01-02 Tobias Burnus <burnus@net-b.de>
15331 * gnat_ugn.texi: Bump @copying's copyright year.
15333 Copyright (C) 2014 Free Software Foundation, Inc.
15335 Copying and distribution of this file, with or without modification,
15336 are permitted in any medium without royalty provided the copyright
15337 notice and this notice are preserved.