1 2014-10-31 Vasiliy Fofanov <fofanov@adacore.com>
3 * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
4 Normalized_Pathname doesn't inhibit the custom Selected_Target
6 * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
7 Automatically_Generated is correctly set after the first call
8 to Process_Project_And_Apply_Config and not modified after the
11 2014-10-31 Yannick Moy <moy@adacore.com>
13 * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
15 * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
16 vectors, suitable for use in client SPARK code, also more
17 efficient than the standard vectors.
18 * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
19 are used to define formal indefinite vectors in terms of formal
21 * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
22 definite vectors, similar to the API of the new indefinite ones. A
23 new formal parameter of the generic unit called Bounded allows
24 to define growable vectors that use dynamic allocation.
26 2014-10-31 Vincent Celier <celier@adacore.com>
28 * prj-conf.adb (Look_For_Project_Paths): New procedure
29 (Parse_Project_And_Apply_Config): Initially, parse the project
30 files ignoring missing withs. If there are missing withs, extend
31 the project path with directories rooted at the compiler roots,
32 including directories rooted at the runtime roots, if there are
33 non default runtimes, in the PATH orser.
34 * prj-env.adb (Initialize_Default_Project_Path): Do not add
35 any directory from the prefix if the target is "-".
36 * prj-part.adb (Parse): Initialize the tables, as Parse may be
37 call several times by gprbuild.
38 * prj.adb (Update_Ignore_Missing_With): New procedure.
40 2014-10-31 Ed Schonberg <schonberg@adacore.com>
42 * sem_aux.adb (First_Stored_Discriminant,
43 Has_Completely_Hidden_Discriminant): When scanning the list of
44 discriminants to locate possibly hidden (inherited) discriminants,
45 ignore itypes that may appear in the entity list, when an access
46 discriminants is constrained by an access attribute reference.
48 2014-10-31 Javier Miranda <miranda@adacore.com>
50 * freeze.adb (Freeze_Record_Type): Add missing
51 check to verify that all the primitives of an interface type
52 are abstract or null procedures.
54 2014-10-31 Vincent Celier <celier@adacore.com>
56 * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
57 redirects standard output and standard error to two different files.
59 2014-10-31 Bob Duff <duff@adacore.com>
61 * makeutl.ads: Minor comment fix.
63 2014-10-31 Arnaud Charlet <charlet@adacore.com>
65 * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
66 Memory_Size): Use Standard'Word_Size so that the value can be changed
67 via a target configuration file.
69 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
71 * exp_ch4.adb: Minor tweak.
73 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
75 * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
77 (Must_Inline_Subp): Delete.
78 * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
80 2014-10-31 Ed Schonberg <schonberg@adacore.com>
82 * freeze.adb (Freeze_Entity): A default_pool does not apply to
83 internal access types generated for 'access references.
84 * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
85 not null it must designate a variable.
87 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
89 * inline.adb: Minor reformatting.
91 2014-10-31 Ed Schonberg <schonberg@adacore.com>
93 * sem_ch3.adb (Build_Derived_Private_Type): If the derived
94 type has access discriminants, create itype references for their
95 anonymous types, so that they are elaborated before the generated
96 bodies for the primitive operations of the type.
98 2014-10-31 Tristan Gingold <gingold@adacore.com>
100 * prj-conf.adb (Locate_Runtime): Remove procedure.
102 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
104 * inline.adb (Has_Excluded_Declaration): With back-end inlining,
105 only return true for nested packages.
106 (Cannot_Inline): Issue errors/warnings whatever the optimization level
107 for back-end inlining and remove assertion.
109 2014-10-31 Sergey Rybin <rybin@adacore.com frybin>
111 * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
112 the desired order of '*' and '/' operations to avoid overflow.
114 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
116 * exp_ch6.adb (Do_Inline): Remove unreachable code.
117 (Do_Inline_Always): Likewise.
119 2014-10-31 Vincent Celier <celier@adacore.com>
121 * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
122 when library has no Ada interfaces and Library_Standalone is
125 2014-10-31 Arnaud Charlet <charlet@adacore.com>
127 * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
128 on address clauses in CodePeer mode.
130 2014-10-31 Javier Miranda <miranda@adacore.com>
132 * inline.adb (Expand_Inlined_Call): Do not skip
133 inlining of calls to subprogram renamings.
135 2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
137 * sem_res.adb (Resolve_Entity_Name): Account for
138 the case where the immediate parent of a reference to an entity
139 is a parameter association.
141 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
143 * inline.adb (Check_And_Split_Unconstrained_Function): Do not
144 test for the presence of nested subprograms.
146 2014-10-31 Ed Schonberg <schonberg@adacore.com>
148 * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
149 * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
150 Default_Storage_Pool.
152 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
154 * sem_ch6.adb: Remove obsolete comment.
156 2014-10-31 Olivier Hainque <hainque@adacore.com>
158 * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
159 of 4si, as pixels are short.
161 2014-10-31 Ed Schonberg <schonberg@adacore.com>
163 * sem_res.adb (Resolve_Call): Do not reject a call to a protected
164 operation in the spec of a protected type, when the call appears
165 in a pre/postcondition for another protected operation.
167 2014-10-31 Tristan Gingold <gingold@adacore.com>
169 * prj-conf.adb: Locate_Runtime: Always search the runtime in
172 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
174 * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
175 change to use correct idiom for back-end inlining.
177 2014-10-31 Ed Schonberg <schonberg@adacore.com>
179 * freeze.adb (Freeze_Record_Type): Do not check component size
180 if its type is generic.
182 2014-10-31 Bob Duff <duff@adacore.com>
184 * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
186 2014-10-31 Ed Schonberg <schonberg@adacore.com>
188 * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
189 * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
190 indexing as well as function calls. b) If the context is a
191 selected component and whe are in an instance, remove entity from
192 selector name to force resolution of the node, so that explicit
193 dereferences can be generated in the instance if they were in
196 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
198 * inline.adb (Back_End_Cannot_Inline): Delete.
199 (Add_Inlined_Subprogram): Do not call it.
201 2014-10-31 Ed Schonberg <schonberg@adacore.com>
203 * exp_ch3.ads (Make_Tag_Assignment): New function, used to
204 re-initialize the tag in a tagged object declaration with
206 * exp_ch3.adb (Expand_N_Object_Declaration): Use
207 Make_Tag_Assignment to simplify code for a tagged object
209 * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
210 for the freeze node of an object.
211 * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
212 needed to extend Freeze_Actions for a tagged object declaration.
214 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
216 * gnat_ugn.texi: Further minor improvement to -flto entry.
218 2014-10-31 Gary Dismukes <dismukes@adacore.com>
220 * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
222 2014-10-30 Ed Schonberg <schonberg@adacore.com>
224 * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
226 2014-10-30 Ed Schonberg <schonberg@adacore.com>
228 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
229 indication is provided, check properly that it covers the element
230 type of of the container type.
232 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
234 * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
237 2014-10-30 Ed Schonberg <schonberg@adacore.com>
239 * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
240 Has_Following_Address_Clause so that it returns the address
241 clause if present, rather than a boolean value.
242 * sem_ch3.adb (Analyze_Object_Declaration): use
243 Following_Address_Clause.
244 * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
245 is initialized, insert tag assignment after object is frozen,
246 which may be after an address clause that follows the declaration.
248 2014-10-30 Tristan Gingold <gingold@adacore.com>
250 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
251 system-vxworks-arm.ads, system-freebsd-x86_64.ads,
252 system-linux-hppa.ads, system-linux-s390.ads,
253 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
254 system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
255 system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
256 system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
257 system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
258 system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
259 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
260 system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
261 system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
262 pragma No_Elaboration_Code_All.
264 2014-10-30 Eric Botcazou <ebotcazou@adacore.com>
266 * gnat_ugn.texi: Minor improvement to -flto entry.
268 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
270 * sem_util.adb (Inherit_Subprogram_Contract):
271 Add a guard to protect against enumeration literal overriding.
272 * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
273 Minor reformatting (add SPARK RM references).
275 2014-10-30 Robert Dewar <dewar@adacore.com>
277 * exp_dbug.adb, opt.ads: Minor reformatting.
279 2014-10-30 Yannick Moy <moy@adacore.com>
281 * inline.adb (Has_Single_Return_In_GNATprove_Mode):
282 Return False when return statement is inside one or more blocks.
284 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
286 * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
287 object declaration initialized by a function call that returns
288 an unconstrained result may be rewritted as a renaming of the
289 secondary stack result.
291 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
293 * aspects.adb: Add an entry for aspect Extensions_Visible in
294 table Canonical_Aspect.
295 * aspects.ads: Add entry for aspect Extensions_Visible in
296 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
297 Implementation_Defined_Aspect.
298 * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
299 the list of contract pragmas.
300 * par-prag.adb Pragma Extensions_Visible does not require special
301 processing from the parser.
302 * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
303 implicit class-wide conversion of a formal parameter
304 of a specific tagged type whose related subprogram is
305 subject to pragma Extensions_Visible with value "False".
306 (Check_Abstract_Overriding): Add various overriding checks
307 related to pragma Extensions_Visible.
309 A subprogram subject to pragma Extensions_Visible with value
310 False requires overriding if the subprogram has at least one
311 controlling OUT parameter.
312 (Is_EVF_Procedure): New routine.
313 * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
314 a specific tagged type whose related subprogram is subject to
315 pragma Extensions_Visible with value "False" cannot appear in
316 a class-wide conversion.
317 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
318 the assertion to account for pragma Extensions_Visible.
319 (Check_Overriding_Indicator): An overriding subprogram
320 inherits the contact of the overridden subprogram.
321 (New_Overloaded_Entity): An overriding subprogram inherits the
322 contact of the overridden subprogram.
323 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
324 for aspect Extensions_Visible.
325 (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
326 require special processing at the freeze point.
327 * sem_prag.adb Add an entry for pragma Extensions_Visible in
329 (Analyze_Pragma): Ensure that various SPARK
330 pragmas lack identifiers in their arguments. Add processing for
331 pragma Extensions_Visible.
332 (Chain_CTC): Code reformatting.
333 * sem_res.adb (Resolve_Actuals): A formal parameter of a
334 specific tagged type whose related subprogram is subject to
335 pragma Extensions_Visible with value "False" cannot act as an
336 actual in a subprogram with value "True".
337 * sem_util.adb (Add_Classification): New routine.
338 (Add_Contract_Item): Account for pragma Extensions_Visible. Code
340 (Add_Contract_Test_Case): New routine.
341 (Add_Pre_Post_Condition): New routine.
342 (Extensions_Visible_Status): New routine.
343 (Inherit_Subprogram_Contract): New routine.
344 (Is_EVF_Expression): New routine.
345 (Is_Specific_Tagged_Type): New routine.
346 * sem_util.ads Add type Extensions_Visible_Mode and document all values.
347 (Add_Contract_Item): Add pragma Extensions_Visible to the
349 (Inherit_Subprogram_Contract): New routine.
350 (Is_EVF_Expression): New routine.
351 (Is_Specific_Tagged_Type): New routine.
352 * sinfo.adb (Is_Inherited): New routine.
353 (Set_Is_Inherited): New routine.
354 * sinfo.ads Add flag Is_Inherited along with its usage in
356 (Is_Inherited): New routine along with pragma Inline.
357 (Set_Is_Inherited): New routine along with pragma Inline.
358 * snames.ads-tmpl: Add predefined name "Extensions_Visible"
359 and a new Pragma_Id for the pragma.
361 2014-10-30 Vincent Celier <celier@adacore.com>
363 * prj-proc.adb (Process_Case_Construction): Do not look for
364 the ultimate extending project for a case variable.
366 2014-10-30 Pierre-Marie Derodat <derodat@adacore.com>
368 * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
370 (gnat_encodings): Define a dummy variable for the AAMP back-end.
371 (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
372 for all discrete types whose bounds do not match size and do so
373 only for biased types when -fgnat-encodings=minimal.
374 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
375 parallel types when array bounds are constant while the lower bound is
376 not 1. Also stop generating them because the bound type is
377 larger than sizetype.
378 * gcc-interface/misc.c (gnat_encodings): New.
380 2014-10-30 Thomas Quinot <quinot@adacore.com>
382 * opt.adb (Set_Opt_Config_Switches): For an internal unit,
383 always reset Default_SSO to ' '.
385 2014-10-30 Thomas Quinot <quinot@adacore.com>
387 * freeze.adb (Freeze_Record_Type): Set SSO from default before
388 checking SSO consistency.
390 2014-10-30 Javier Miranda <miranda@adacore.com>
392 * inline.adb (Check_Package_Body_For_Inlining):
393 Cleanup this subprogram to implement exactly the behavior
394 documented in the spec.
396 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
398 * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
399 Update the position after all insertions have taken place.
401 2014-10-30 Ed Schonberg <schonberg@adacore.com>
403 * sem_prag.adb (Analyze_Pragma, case License): Do not perform
404 analysis of pragma arguments when in CodePeer mode, pragma has
405 different format on other compilers.
407 2014-10-30 Thomas Quinot <quinot@adacore.com>
409 * s-os_lib.adb: Minor reformatting.
411 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
413 * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
414 gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
415 Remove redundant enum from machine_mode.
417 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
419 * gcc-interface/trans.c: Adjust include files.
420 * gcc-interface/utils.c: Ditto.
422 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
424 * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
426 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
428 * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
429 support here instead of...
430 Do not set flag_delete_dead_exceptions to 1 unconditionally.
431 (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
432 (gnat_init_gcc_fp): ...here.
434 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
436 * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
438 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
440 * gcc-interface/utils.c (create_var_decl_1): For a variable declared
441 in the unit, set TREE_PUBLIC only if it has static storage duration.
443 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
445 * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
446 of derived packed array types to constrained subtypes only.
448 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
450 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
451 superfluous computation for the max size.
452 <E_Array_Subtype>: Likewise. Make sure that the max size calculation
453 does not overflow at compile time.
455 2014-10-23 Ed Schonberg <schonberg@adacore.com>
457 * sem_eval.adb (Check_Non_Static_Context): Do not set
458 Is_Machine_Number on a literal of a fixed-point type.
460 2014-10-23 Robert Dewar <dewar@adacore.com>
462 * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
464 2014-10-23 Pierre-Marie Derodat <derodat@adacore.com>
466 * exp_dbug.ads: Update ___XA parallel type specification.
468 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
470 * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
471 chain of the source type.
472 * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
473 reformatting of an error message.
474 * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
475 chain that has been inherited already.
477 2014-10-23 Ed Schonberg <schonberg@adacore.com>
479 * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
480 in generic context, and generate body in this case as well,
481 to simplify ASIS traversals on the construct.
483 2014-10-23 Ed Schonberg <schonberg@adacore.com>
485 * sem_ch4.adb (Complete_Object_Operation): Indicate that the
486 scope of the operation (s) is referenced, to prevent spurious
487 warnings about unused units.
489 2014-10-23 Johannes Kanig <kanig@adacore.com>
491 * errout.adb (Error_Msg_Internal): Copy check flag, increment
493 * erroutc.adb (Delete_Msg) adjust check msg count.
494 (Output_Msg_Text) handle check msg case (do nothing).
495 (Prescan_Message) recognize check messages with severity prefixes.
496 * errutil.adb (Error_Msg) handle check flag, adjust counter.
498 2014-10-23 Ed Schonberg <schonberg@adacore.com>
500 * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
501 type, check for the presence of discriminants in its parent type,
502 against the presence of discriminants in the context type.
504 2014-10-23 Tristan Gingold <gingold@adacore.com>
506 * adaint.c: __gnat_get_file_names_case_sensitive: Default is
509 2014-10-23 Arnaud Charlet <charlet@adacore.com>
511 * pprint.adb (Expression_Image): Add handling of quantifiers.
513 2014-10-23 Ed Schonberg <schonberg@adacore.com>
515 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
516 prefix is a source entity, generate a reference to it before
517 transformation, because rewritten node might not generate a
518 proper reference, leading to spurious warnings.
520 2014-10-23 Tristan Gingold <gingold@adacore.com>
522 * init.c: Fix thinko in previous patch.
524 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
526 * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
527 Inherit the rep chain of the implicit base type.
528 (Floating_Point_Type_Declaration): Inherit the rep chain of the
530 (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
532 (Signed_Integer_Type_Declaration): Inherit the rep chain of the
534 * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
536 2014-10-23 Pascal Obry <obry@adacore.com>
538 * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
539 view of the registry.
541 2014-10-23 Ed Schonberg <schonberg@adacore.com>
543 * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
544 return without expanding expression, to prevent subsequent crash.
545 * freeze.adb: better error message for illegal declaration.
547 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
549 * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
550 substring which represents the time zone on VxWorks.
552 2014-10-23 Vincent Celier <celier@adacore.com>
554 * gnatls.adb: If --RTS= was not used, check if there is a default
555 runtime. If there is none, in verbose mode, indicate that the
556 default runtime is not available and show only the current
557 directory in the source and the object search paths.
559 2014-10-23 Ed Schonberg <schonberg@adacore.com>
561 * sem_ch6.adb (Process_Formals): A thunk procedure with a
562 parameter of a limited view does not need a freeze node.
564 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
566 * sem_ch7.adb (Analyze_Package_Body_Helper):
567 The logic which hides local entities from external
568 visibility is now contained in routine Hide_Public_Entities.
569 (Hide_Public_Entities): New routine. Object and subprogram
570 renamings are now hidden from external visibility the same way
573 2014-10-23 Ed Schonberg <schonberg@adacore.com>
575 * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
576 does not require freezing, in particular if it denotes a generic
579 2014-10-23 Yannick Moy <moy@adacore.com>
581 * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
582 Disable analysis in GNATprove mode.
584 2014-10-23 Arnaud Charlet <charlet@adacore.com>
586 * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
588 2014-10-23 Arnaud Charlet <charlet@adacore.com>
590 * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
591 pragmas in codepeer mode.
593 2014-10-23 Gary Dismukes <dismukes@adacore.com>
595 * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
597 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
599 * sem_ch12.adb (Inline_Instance_Body): Alphabetize
600 local variables and constants. Add constants Save_SM and Save_SMP
601 to capture SPARK_Mode-related attributes. Compile the inlined
602 body with the SPARK_Mode of the enclosing context.
604 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
606 * sinfo.adb (Elaboration_Boolean): Removed.
607 (Set_Elaboration_Boolean): Removed.
608 * sinfo.ads Remove attribute Elaboration_Boolean along with its
610 (Elaboration_Boolean): Removed along with pragma Inline.
611 (Set_Elaboration_Boolean): Removed along with pragma Inline.
613 2014-10-23 Ed Schonberg <schonberg@adacore.com>
615 * sem_ch3.adb (Constant_Redeclaration): Make error message more
616 explicit on a deferred constant whose object_definition is an
619 2014-10-23 Vincent Celier <celier@adacore.com>
621 * gnatls.adb: Never call Targparm.Get_Target_Parameters.
623 2014-10-23 Ed Schonberg <schonberg@adacore.com>
625 * sem_ch6.adb (Analyze_Expression_Function): In a generic
626 context do not create a body, and only pre-analyze the expression,
627 which may include incomplete views.
629 2014-10-23 Robert Dewar <dewar@adacore.com>
631 * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
632 * sem_ch3.adb: Minor reformatting.
634 2014-10-23 Ed Schonberg <schonberg@adacore.com>
636 * sem_ch12.adb (Analyze_Associations): If an actual for a formal
637 object is a call to a parameterless expression function, add
638 the function to the list of actuals to freeze.
639 * freeze.adb (Check_Expression_Function): Create freeze nodes of
640 outer types that may be references in the body of the expression.
642 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
644 * exp_util.ads, checks.ads: Minor comment reformatting.
646 2014-10-23 Javier Miranda <miranda@adacore.com>
648 * sem_eval (Test_In_Range): Disable removal of range_check for
651 2014-10-23 Robert Dewar <dewar@adacore.com>
653 * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
654 messages, which got disabled when we unconditionally added an
655 asterisk at the start of the string.
657 2014-10-23 Vincent Celier <celier@adacore.com>
659 * gnatls.adb: Ensure that "gnatls -l" works even when there is
662 2014-10-23 Eric Botcazou <ebotcazou@adacore.com>
664 * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
665 untagged and has discriminants, build the implicit full view after
666 building the derived type. Capture original declaration and type
668 (Copy_And_Build): ...here.
669 * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
671 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
673 * checks.adb (Ensure_Valid): Update the subprogram
674 profile. Propagate the contex attributes to Insert_Valid_Check.
675 (Insert_Valid_Check): Update the subprogram profile. Propagate
676 the attributes of the context to Duplicate_Subexpr_No_Checks.
677 (Validity_Check_Range): Update the subprogram profile. Propagate
678 the context attribute to Ensure_Valid.
679 * checks.ads (Ensure_Valid): Update the subprogram profile
680 along with the comment on usage.
681 (Insert_Valid_Check): Update the subprogram profile along with the
683 (Validity_Check_Range): Update the subprogram profile along with
684 the comment on usage.
685 * exp_util.adb (Build_Temporary): New routine.
686 (Duplicate_Subexpr_No_Checks): Update the subprogram
687 profile. Propagate the attributes of the context to Remove_Side_Effects.
688 (Remove_Side_Effects): Update the subprogram profile. Update all calls
689 to Make_Temporary to invoke Build_Temporary.
690 * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
691 the subprogram profile along with the comment on usage.
692 (Remove_Side_Effects): Update the subprogram profile along with
693 the comment on usage.
694 * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
695 to the validity check machinery. Explain the reason for this
698 2014-10-23 Robert Dewar <dewar@adacore.com>
700 * a-strsea.adb: Minor reformatting.
702 2014-10-23 Thomas Quinot <quinot@adacore.com>
704 * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
705 units from consistency check.
706 * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
707 consistency check excludes run-time units.
709 2014-10-23 Ed Schonberg <schonberg@adacore.com>
711 * a-strsea.adb (Find_Token): Enable constraint checking in this
712 procedure, so that even when compiling with checks suppressed, as is
713 the case for the run-time, an exception is raised in this routine when
714 the input meets the conditions described in RM 2005 A.4.3 (68/1).
716 2014-10-20 Eric Botcazou <ebotcazou@adacore.com>
718 * sem_ch3.adb (Build_Derived_Private_Type): When the parent
719 is untagged and has discriminants, build the implicit full
720 view even if the derived type is a completion, and make it
721 the Underlying_Full_View of the type.
722 (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
724 (Build_Derived_Record_Type): Likewise.
726 2014-10-20 Ed Schonberg <schonberg@adacore.com>
728 * sem_ch13.adb: Add guard to convention setting.
730 2014-10-20 Robert Dewar <dewar@adacore.com>
732 * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
735 2014-10-20 Robert Dewar <dewar@adacore.com>
737 * par-prag.adb (Add_List_Pragma_Entry): New procedure.
738 * par.adb (P_Pragma): Document requirement to handle multiple calls.
740 2014-10-20 Robert Dewar <dewar@adacore.com>
742 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
743 Fix error of bad inheritance of this pragma from with'ed unit.
745 2014-10-20 Ed Schonberg <schonberg@adacore.com>
747 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
748 inherit convention from parent type, because the subtype may
749 have been declared on a partial view, prior to the pragma on
752 2014-10-20 Olivier Hainque <hainque@adacore.com>
753 Tristan Gingold <gingold@adacore.com>
755 * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
758 2014-10-20 Nicolas Roche <roche@adacore.com>
760 * gcc-interface/Make-lang.in: ensure that automatically generated
761 dependency are referencing generated gnatvsn rather than original
764 2014-10-20 Gary Dismukes <dismukes@adacore.com>
766 * gnat_ugn.texi: Minor reformatting.
767 * sem_ch3.adb: Minor reformatting.
769 2014-10-20 Vincent Celier <celier@adacore.com>
771 * prj-attr.adb: New project level attribute Runtime.
772 * prj-conf.adb (Get_Project_Runtimes): New procedure to get
773 the attributes Runtime declared in the main project, to use
774 in auto-configuration.
775 (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
776 * prj-proc.adb (Runtime_Defaults): New table to store
777 the default values of attributes Runtime (<language>).
778 (Set_Default_Runtime_For): New procedure to store the default
779 value of a Runtime (<language>) in table Runtime_Defaults.
780 (Expression): Use the value stored in table Runtime_Defaults as
781 the default for Runtime (<language>).
782 * prj-proc.ads (Set_Default_Runtime_For): New procedure.
783 * prj.ads (Attribute_Default_Value): New enumerated value
786 2014-10-20 Ed Schonberg <schonberg@adacore.com>
788 * sem_ch3.adb (Analyze_Object_Declaration): If the type is
789 an unconstrained unchecked_union type, rewrite declaration
790 as a renaming to prevent attempt to retrieve non- existent
791 discriminants from expression.
793 2014-10-20 Ed Schonberg <schonberg@adacore.com>
795 * gnat_ugn.texi: Minor reformatting.
797 2014-10-20 Tristan Gingold <gingold@adacore.com>
799 * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
801 * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
804 2014-10-20 Hristian Kirtchev <kirtchev@adacore.com>
806 * sem_attr.adb (Analyze_Attribute): Replace
807 variables CS and PS with Proc_Id and Subp_Id to better illustrate
808 their purpose. Account for the case where _Postconditions
809 has not been generated yet and the context is aspect/pragma
810 Refined_Post. In that scenario the expected prefix of attribute
811 'Result is the current scope.
813 2014-10-20 Robert Dewar <dewar@adacore.com>
815 * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
816 in middle of expression with logical operators.
818 2014-10-20 Robert Dewar <dewar@adacore.com>
820 * par-ch13.adb (Possible_Misspelled_Aspect): New function.
822 2014-10-20 Steve Baird <baird@adacore.com>
824 * pprint.adb: Improve Expression_Image function.
826 2014-10-20 Robert Dewar <dewar@adacore.com>
828 * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
829 * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
830 * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
831 * einfo.adb (No_Tagged_Streams_Pragma): New field.
832 * einfo.ads: Minor reformatting (reorder entries).
833 (No_Tagged_Streams_Pragma): New field.
834 * exp_ch3.adb: Minor comment update.
835 * opt.ads (No_Tagged_Streams): New variable.
836 * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
837 * sem.ads (Save_No_Tagged_Streams): New field in scope record.
838 * sem_attr.adb (Check_Stream_Attribute): Check stream ops
839 prohibited by No_Tagged_Streams.
840 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
841 No_Tagged_Streams_Pragma.
842 (Analyze_Subtype_Declaration): ditto.
843 (Build_Derived_Record_Type): ditto.
844 (Record_Type_Declaration): ditto.
845 * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
846 (Push_Scope): Save No_Tagged_Streams.
847 * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
850 2014-10-20 Robert Dewar <dewar@adacore.com>
852 * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
853 sem_ch13.adb: Minor reformatting.
855 2014-10-20 Javier Miranda <miranda@adacore.com>
857 * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
858 declaration of a class-wide limited object containing an
859 initializing expression into a renaming declaration. Required to
860 avoid passing such declaration to the backend and also to avoid
861 generating an extra copy.
863 2014-10-20 Eric Botcazou <ebotcazou@adacore.com>
865 * inline.adb (List_Inlining_Info): Minor tweaks.
866 (Add_Inlined_Body): Inline the enclosing package
867 if it is not internally generated, even if it doesn't come
870 2014-10-20 Ed Schonberg <schonberg@adacore.com>
872 * sem_ch4.adb (Process_Function_Call): If the first actual
873 denotes a discrete type, the mode must be interpreted as a slice
874 of an array returned by a parameterless call.
876 2014-10-20 Vasiliy Fofanov <fofanov@adacore.com>
878 * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
879 searching for runtime referenced by a simple name on a project path.
881 2014-10-20 Olivier Hainque <hainque@adacore.com>
883 * vxworks-x86-link.spec: New file.
884 * system-vxworks-x86.ads: Add pragma Linker_Options to link with
885 vxworks-x86-link.spec.
887 2014-10-20 Vincent Celier <celier@adacore.com>
889 * opt.ads (Origin_Of_Target): New type.
890 (Target_Origin): New variable.
891 * prj-conf.adb (Parse_Project_And_Apply_Config): Record
892 Target_Value and Target_Origin. If target was not specified
893 on the command line with --target=, check if attribute Target
894 is declared in the main project. If it is and it is not the
895 native target, parse again the projects so that 'Target get
896 the new value. Fail if the target has changed again. Invoke
897 Process_Project_And_Apply_Config with Do_Phase_1 set to False
898 is Process_Project_Tree_Phase_1 has already been invoked.
899 * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
900 parameter Do_Phase_1, defaulted to True.
901 * prj-proc.adb (Expression): Check the special values and
902 defaults for attribute Target.
904 2014-10-20 Ed Schonberg <schonberg@adacore.com>
906 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
907 the subprogram spec of the body in full, because it will be
908 reanalyzed when the declaration itself is analyzed; otherwise. a
909 formal may end up duplicated in the list of formals leading to
910 spurious conformance errors with an existing declaration.
912 2014-10-20 Ed Schonberg <schonberg@adacore.com>
914 * sem_ch13.adb: Improve error recovery on illegal aspect.
916 2014-10-20 Arnaud Charlet <charlet@adacore.com>
918 * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
919 Fix calling C APIs with no trailing NUL char by calling better
922 2014-10-20 Tristan Gingold <gingold@adacore.com>
924 * gnat_ugn.texi: Document that gdb users must be in group
925 _developer on mac os.
927 2014-10-20 Arnaud Charlet <charlet@adacore.com>
929 * a-tgdico.ads: Fix typo.
931 2014-10-20 Ed Schonberg <schonberg@adacore.com>
933 * exp_aggr.adb (Convert_To_Assignments): Do not create a
934 transient scope for a component whose type requires it, if the
935 context is an initialization procedure, because the target of
936 the assignment must be visible outside of the block.
938 2014-10-20 Tristan Gingold <gingold@adacore.com>
940 * tracebak.c: Define PC_ADJUST for arm-darwin.
941 * env.c: Remove darwin specific code.
942 * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
944 2014-10-20 Ed Schonberg <schonberg@adacore.com>
946 * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
947 is incomplete rather than private, and full type declaration
948 has aspects, analyze aspects on the full view rather than
949 the incomplete view, to prevent freezing anomalies with the
952 2014-10-17 Robert Dewar <dewar@adacore.com>
954 * exp_ch9.adb (Expand_N_Task_Body): Add defense against
956 * freeze.adb (Freeze_Entity): Add defense against checking null
958 * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
959 * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
961 * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
964 2014-10-17 Robert Dewar <dewar@adacore.com>
966 * prj-makr.adb: Minor reformatting.
968 2014-10-17 Robert Dewar <dewar@adacore.com>
970 * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
971 prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
973 2014-10-17 Ed Schonberg <schonberg@adacore.com>
975 * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
976 is enabled, code will be generated for some composite types
977 to initialize an object after its declaration. If there is
978 a subsequent Import pragma for the object, that code must be
979 removed as specified byw the semantics of the pragma, and to
980 prevent out-of-order elaboration issues in the back-end.
982 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
984 * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
985 wrapping mechanism under debug flag -gnatd.h.
986 * debug.adb: Claim debug switch -gnatd.h.
988 2014-10-17 Doug Rupp <rupp@adacore.com>
990 * gcc-interface/Makefile.in: Enable the socket runtime bits
993 2014-10-17 Ed Schonberg <schonberg@adacore.com>
995 * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
996 not perform the replacement on the expression for an inherited
997 class-wide invariant if in ASIS_Mode and the type reference is
998 already the prefix of a 'Class attribute reference: the expression
999 has already been preanalyzed and the replacement performed when
1000 first encountered on the declaration of the parent type.
1002 2014-10-17 Robert Dewar <dewar@adacore.com>
1004 * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
1007 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1009 * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
1010 subprogram from base type.
1011 * sem_ch7.adb (Analyze_Package_Specification): Build invariant
1012 subprogram for private type, not any of its subtypes.
1013 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
1014 of procedure entity, because a call to it may be generated in
1015 a client unit before the corresponding subprogram declaration
1018 2014-10-17 Vincent Celier <celier@adacore.com>
1020 * prj-nmsc.adb (Get_Directories): Do not create directories
1021 when a project is abstract.
1023 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1025 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1026 of iteration is given by an expression that is not an array type,
1027 verify that its type implements an iterator iterface.
1029 2014-10-17 Robert Dewar <dewar@adacore.com>
1031 * sem_attr.adb (Eval_Attribute): Ensure that attribute
1032 reference is not marked as being a static expression if the
1033 prefix evaluation raises CE.
1035 2014-10-17 Robert Dewar <dewar@adacore.com>
1037 * exp_pakd.adb: Move bit packed entity tables to spec.
1038 * exp_pakd.ads: Move bit packed entity tables here from body.
1039 * freeze.adb (Freeze_Array_Type): Check that packed array type
1041 * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
1042 Specialize messages using PRE_Id_Table.
1043 * uintp.ads, uintp.adb (UI_Image): New functional form.
1045 2014-10-17 Robert Dewar <dewar@adacore.com>
1047 * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
1048 * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
1050 * exp_ch3.adb (Default_Initialize_Object): Handle
1051 Suppress_Initialization.
1052 * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
1053 procedure (Expand_N_Pragma): Handle Suppress_Initialization
1054 (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
1055 (Undo_Initialization): New procedure.
1056 * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
1057 This is now allowed for E_Variable case.
1058 * gnat_rm.texi: Document new aspect Suppress_Initialization
1059 Suppress_Initialization aspect/pragma can apply to variable.
1060 * einfo.ads: Minor reformatting.
1062 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1064 * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
1066 2014-10-17 Robert Dewar <dewar@adacore.com>
1068 * cstand.adb (Create_Standard): Mark Short_Integer as
1069 implementation defined.
1070 * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
1071 compiler built with assertions for No_Implementation_Identifiers test.
1073 2014-10-17 Robert Dewar <dewar@adacore.com>
1075 * aspects.ads: Documentation fix, aspect Lock_Free does have a
1076 corresponding pragma.
1077 * gnat_rm.texi: Document implementation defined boolean aspects
1080 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1082 * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
1083 preserve semantic information on the invariant expression
1084 (typically a function call) because it may be inherited by a
1085 type extension in a different unit, and it cannot be resolved
1086 by visibility elsewhere because it may refer to local entities.
1088 2014-10-17 Robert Dewar <dewar@adacore.com>
1090 * gnat_rm.texi: Document that string literal can be used for
1091 pragma Warnings when operating in Ada 83 mode.
1093 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1095 * freeze.adb (Find_Aggregate_Component_Desig_Type): New
1096 subsidiary function to Freeze_ Expression, used to determine
1097 whether an aggregate for an array of access types also freezes the
1098 designated type, when some aggregate components are allocators.
1100 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1102 * a-strsea.adb (Find_Token): AI05-031 indicates that the
1103 procedure must raise Index_Error when Source is not empty and
1104 the From parameter is not within the range of the Source string.
1106 2014-10-17 Robert Dewar <dewar@adacore.com>
1108 * sem_prag.adb (Is_Static_String_Expression): Allow string
1109 literal in Ada 83 mode.
1111 2014-10-17 Vincent Celier <celier@adacore.com>
1113 * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
1114 not take into account any compiler command from package IDE.
1116 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1118 * sem_ch12.adb (Build_Function_Wrapper): The formals of the
1119 wrapper must have the same identifiers as those of the formal
1120 subprogram, because calls within the generic may use named
1123 2014-10-17 Robert Dewar <dewar@adacore.com>
1125 * sem_ch3.adb, a-strsea.adb: Minor reformatting.
1126 * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
1128 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1130 * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
1131 specfications from original type declaration to declaration of
1132 implicit base, because original node is rewritten as a subtype
1133 declaration on which type aspects do not belong.
1135 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1137 * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
1138 inherits the attributes related to pragma Default_Initial_Condition
1139 from its parent type.
1141 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1143 * a-strsea.adb (Index - versions with a From parameter):
1144 According to AI05-056, the Index functions with a From parameter
1145 return 0 if the source is an empty string.
1147 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1149 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
1150 the consistency checks in ASIS mode.
1152 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1154 * s-expmod.ads: Minor typo fix.
1156 2014-10-17 Robert Dewar <dewar@adacore.com>
1158 * sem_util.adb: Minor reformatting.
1160 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1162 * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
1163 actuals that are defaulted subprograms of the formal subprogram
1166 2014-10-17 Robert Dewar <dewar@adacore.com>
1168 * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
1169 implementation base type.
1170 * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
1171 operands are always expanded out into component comparisons.
1173 2014-10-17 Robert Dewar <dewar@adacore.com>
1175 * s-vallli.adb: Minor comment correction.
1176 * s-valuti.ads: Minor comment reformatting.
1178 2014-10-17 Robert Dewar <dewar@adacore.com>
1180 * gnat_rm.texi: Document System.Atomic_Counters.
1181 * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
1182 list of user- accessible units added as children of System.
1183 * s-atocou.ads: Update comment.
1185 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1187 * s-expmod.ads: Add comments.
1189 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1191 * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
1192 of all attributes related to pragma Default_Initial_Condition.
1193 (Build_Derived_Type): Propagation of all attributes related
1194 to pragma Default_Initial_Condition.
1195 (Process_Full_View): Account for the case where the full view derives
1196 from another private type and propagate the attributes related
1197 to pragma Default_Initial_Condition to the private view.
1198 (Propagate_Default_Init_Cond_Attributes): New routine.
1199 * sem_util.adb: Alphabetize various routines.
1200 (Build_Default_Init_Cond_Call): Use an unchecked type conversion
1201 when calling the default initial condition procedure of a private type.
1202 (Build_Default_Init_Cond_Procedure_Declaration): Prevent
1203 the generation of multiple default initial condition procedures.
1205 2014-10-17 Robert Dewar <dewar@adacore.com>
1207 * prj-conf.adb: Revert previous change.
1209 2014-10-17 Robert Dewar <dewar@adacore.com>
1211 * lib-writ.ads, s-valdec.ads: Minor reformatting.
1213 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1215 * sem_ch12.adb: Additional work on function wrappers.
1217 2014-10-17 Eric Botcazou <ebotcazou@adacore.com>
1219 * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
1220 on the renamed object of renamings.
1222 2014-10-17 Vincent Celier <celier@adacore.com>
1224 * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
1225 mode, always use the native target.
1227 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1229 * gcc-interface/misc.c: Adjust include files.
1231 2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
1232 Alan Modra <amodra@gmail.com>
1235 * uintp.adb (Vector_To_Uint): Move from here to...
1236 * uintp.ads (UI_Vector): Make public.
1237 (Vector_To_Uint): ...here.
1239 2014-10-10 Robert Dewar <dewar@adacore.com>
1241 * freeze.adb, sem_attr.adb: Minor reformatting.
1243 2014-10-10 Johannes Kanig <kanig@adacore.com>
1245 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
1246 a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
1249 2014-10-10 Vincent Celier <celier@adacore.com>
1251 * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
1252 any configuration switches from the project file.
1254 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1256 * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
1257 (Build_Function_Wrapper): New function, to construct a wrapper
1258 function for actuals that are functions with an arbitrary
1259 number of parameters. Used in GNATProve mode to simplify proof
1260 propagation in instantiations.
1262 2014-10-10 Robert Dewar <dewar@adacore.com>
1264 * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
1267 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1269 * sem_res.adb (Is_OK_Volatile_Context): Allow
1270 a volatile object reference to appear as the expression of a
1273 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1275 * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
1276 Aspect specification is legal on a local instantiation of a
1277 library-level generic unit.
1279 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1281 * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
1282 if inlining has been enabled via -gnatn and the target is not GCC.
1284 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1286 * freeze.adb (Freeze_Entity): Freezing a subprogram does
1287 not always freeze its profile. In particular, an attribute
1288 reference that takes the access type does not freeze the types
1291 2014-10-10 Robert Dewar <dewar@adacore.com>
1293 * errout.adb (Adjust_Name_Case): New procedure.
1294 (Set_Msg_Node): Use Adjust_Name_Case.
1295 * errout.ads (Adjust_Name_Case): New procedure.
1296 * exp_intr.adb (Add_Source_Info): Minor code reorganization
1298 (Write_Entity_Name): Use Errout.Adjust_Name_Case.
1299 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
1300 and fix up entries in Sig_Flags, and correct logical errors in
1302 * sprint.adb (Sprint_Node_Actual): Properly print string for
1305 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1307 * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
1308 anonymous array type with delayed aspects, defer freezing of
1309 type until object itself is frozen.
1310 * freeze.adb (Freeze_Entity): When freezing an object of an
1311 anonymous array type with delayed aspects, remove freeze node of
1312 object after freezing type, to prevent out-of-order elaboration
1313 in the back-end. The initialization call for the object has
1314 already been constructed when expanding the object declaration.
1316 2014-10-10 Robert Dewar <dewar@adacore.com>
1318 * exp_intr.adb (Write_Entity_Name): Moved to outer level
1319 (Write_Entity_Name): Properly handle operator names
1320 (Expand_Source_Info): New procedure.
1321 * exp_intr.ads (Add_Source_Info): New procedure.
1323 2014-10-10 Robert Dewar <dewar@adacore.com>
1325 * butil.ads: Minor reformatting.
1326 * sem_ch5.adb: Code clean up.
1328 2014-10-10 Robert Dewar <dewar@adacore.com>
1330 * exp_ch11.adb (Expand_N_Raise_Statement): Handle
1331 Prefix_Exception_Messages.
1332 * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
1333 * opt.ads: New flags Prefix_Exception_Message[_Config].
1334 * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
1335 * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
1336 * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
1337 * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
1339 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1341 * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
1342 raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
1344 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1346 * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
1347 contain pragmas generated for loop invariants and type predicates.
1348 Clarify use of this subprogram.
1350 2014-10-10 Yannick Moy <moy@adacore.com>
1352 * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
1354 * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
1357 2014-10-10 Vadim Godunko <godunko@adacore.com>
1359 * a-stwima.adb (To_Sequence): Compute size of result array.
1361 2014-10-10 Javier Miranda <miranda@adacore.com>
1363 * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
1364 sources of the example to avoid a warning when the Ada files are
1365 automatically generated by the binding generator.
1367 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1369 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
1370 Do_Range_Check on the expression of a record component
1371 association when needed, as is done for array components, when
1372 the corresponding type is a scalar type.
1374 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1376 * a-coinho-shared.adb: Minor typo fix.
1377 * prj-env.ads: Minor reformatting.
1379 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1381 * sem_res.adb (Resolve_String_Literal): Do not
1382 generate a string literal subtype for the default expression of
1383 a formal parameter in GNATprove mode.
1385 2014-10-10 Yannick Moy <moy@adacore.com>
1387 * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
1389 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1391 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
1392 declaration for loop parameter before rest of loop, and set
1393 entity kind to prevent assignments to it in the user code.
1394 * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
1395 loop parameter in an element iteration over o formal container.
1397 2014-10-10 Robert Dewar <dewar@adacore.com>
1399 * gnat_ugn.texi: Document use of user-level routines to handle
1400 e.g. col major arrays.
1402 2014-10-10 Doug Rupp <rupp@adacore.com>
1404 * s-osinte-android.adb: Fix misspelling.
1405 * gsocket.h: Tweak the Android quirks.
1407 2014-10-10 Robert Dewar <dewar@adacore.com>
1409 * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
1411 2014-10-10 Robert Dewar <dewar@adacore.com>
1413 * sem_ch13.adb: Minor code reorganization.
1415 2014-10-10 Pat Rogers <rogers@adacore.com>
1417 * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
1420 2014-10-10 Vadim Godunko <godunko@adacore.com>
1422 * a-coinho-shared.adb: Add minor comment.
1423 * a-stzmap.adb (To_Sequence): Compute size of result array.
1425 2014-10-10 Javier Miranda <miranda@adacore.com>
1427 * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
1428 if-stmt to match its current documentation.
1430 2014-10-10 Robert Dewar <dewar@adacore.com>
1432 * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
1433 freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
1434 sem_ch6.adb, sem_cat.adb, sem_disp.adb
1435 (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
1436 throughout where appropriate.
1438 2014-10-10 Bob Duff <duff@adacore.com>
1440 * a-coinho-shared.ads: Minor reformatting.
1441 * s-traceb.adb: Minor clean up.
1443 2014-10-10 Robert Dewar <dewar@adacore.com>
1445 * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
1446 * ali.ads (GNATprove_Mode): New component in ALI table.
1447 (GNATprove_Mode_Specified): New global.
1448 * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
1450 * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
1453 2014-10-10 Javier Miranda <miranda@adacore.com>
1455 * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
1456 (Build_Init_Statement): Ensure that statements
1457 associated with the parent components are located at the beginning
1458 of the returned list of statements.
1460 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1462 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
1463 view of a private type T that has a type invariant is a scalar
1464 or constrained array type, the base type created for the full
1465 view has the same type invariant.
1467 2014-10-10 Robert Dewar <dewar@adacore.com>
1469 * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
1472 2014-09-22 Eric Botcazou <ebotcazou@adacore.com>
1474 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
1475 * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
1477 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1479 * gcc-interface/Make-lang.in (check_acats_numbers0,
1480 check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
1481 check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
1482 check_acats_numbers, check_acats_subdirs): New variables.
1483 (check_acats_targets): Use $(check_acats_subdirs).
1484 (check-acats, check-acats%): Rewritten so that for parallelized
1485 testing each job runs all the chapters files, with
1486 GCC_RUNTEST_PARALLELIZE_DIR set in environment. Prepare the support
1487 directory sequentially and share it.
1488 (check-acats-subtargets): Always print just check-acats.
1490 2014-08-25 Martin Liska <mliska@suse.cz>
1492 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
1493 new cgraph interface.
1494 (gnat_write_global_declarations): Likewise.
1496 2014-08-13 Sylvestre Ledru <sylvestre@debian.org>
1498 * 9drpc.adb: Fix a typo
1499 * s-interr.ads: Likewise
1500 * s-taskin.ads: Likewise
1501 * s-traces.ads: Likewise
1502 * sysdep.c: Likewise
1504 2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
1506 * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
1507 * gsocket.h Add include of <unistd.h> on RTEMS.
1509 2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
1511 * s-osinte-rtems.adb: Correct formatting of line in license block.
1513 2014-08-04 Claire Dross <dross@adacore.com>
1515 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1516 For an instance, look at the scope before the generic parent.
1518 2014-08-04 Yannick Moy <moy@adacore.com>
1520 * lib-writ.ads: Update comments.
1521 * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
1522 parameters to filter inherited subprograms.
1524 2014-08-04 Robert Dewar <dewar@adacore.com>
1526 * gnat_rm.texi: Add section on use of address clause for memory
1529 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1531 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
1532 particular the subtype created for a generic actual, inherits
1533 invariant information from the base type.
1535 2014-08-04 Robert Dewar <dewar@adacore.com>
1537 * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
1538 * gnat_rm.texi: Add documentation for aspect Obsolescent.
1539 * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
1541 (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
1542 * s-osprim-mingw.adb: Minor reformatting.
1543 * sem_res.adb (Is_Atomic_Ref_With_Address): New function
1544 (Resolve_Indexed_Component): Rework warnings for non-atomic access
1545 (Resolve_Selected_Component): Add warnings for non-atomic access.
1547 2014-08-04 Doug Rupp <rupp@adacore.com>
1549 * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
1550 formal to long_long.
1551 * g-calend.ads (timeval): Bump up size to accomodate sec type.
1552 * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
1554 * s-osprim-posix.adb (timeval): Bump up size to accomodate
1556 (timeval_to_duration): Change sec formal to Long_Long_Integer
1557 * s-osinte-darwin.adb (timeval): Bump up
1558 size to accomodate new sec type.
1559 (timeval_to_duration): Change sec formal to long_long
1560 * s-osinte-android.adb: Likewise.
1561 * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
1562 sec formal from long to long long.
1564 2014-08-04 Robert Dewar <dewar@adacore.com>
1566 * sem_res.adb (Resolve_Qualified_Expression): Make sure
1567 Do_Range_Check flag gets set.
1569 2014-08-04 Robert Dewar <dewar@adacore.com>
1571 * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
1572 * exp_ch3.adb (Build_Array_Init_Proc): Use
1573 Is_Standard_String_Type.
1574 (Expand_Freeze_Array_Type): ditto.
1575 (Get_Simple_Init_Val): ditto.
1576 (Needs_Simple_Initialization): ditto.
1577 * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
1578 * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
1580 2014-08-04 Pascal Obry <obry@adacore.com>
1582 * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
1583 _stprintf which insert garbage into the wfull_path buffer.
1585 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1587 * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
1589 * fe.h: Minor reformatting.
1591 2014-08-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1593 * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
1595 2014-08-04 Robert Dewar <dewar@adacore.com>
1597 * par-ch13.adb (Get_Aspect_Specifications): Improve error
1598 recovery, fixing a -gnatQ bomb.
1600 2014-08-04 Yannick Moy <moy@adacore.com>
1602 * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
1603 do not generate two Itypes with the same name for an array
1605 * sinfo.ads: Expand doc on GNATprove mode.
1607 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1609 * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
1610 master and storage pool attributes on the root type of an
1611 anonymous access type.
1612 * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
1613 and storage pool attributes on the root type of an anonymous
1616 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1618 * exp_ch3.adb: Minor reformatting.
1619 * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
1620 * tracebak.c: Remove use of above files.
1621 * gcc-interface/Makefile.in: Update dependencies.
1623 2014-08-04 Pierre-Marie Derodat <derodat@adacore.com>
1625 * gcc-interface/utils.c (gnat_set_type_context): Also set the
1626 context for parallel types' TYPE_STUB_DECL. Do not change
1627 anything if the context is already set for them.
1628 (gnat_pushdecl): Update the comment for calls to
1629 gnat_set_type_context to mention parallel types.
1630 (add_parallel_type): When adding a context-less parallel type to
1631 a type that has a context, propagate the context from the latter
1633 (process_deferred_decl_context): Call gnat_set_type_context
1634 rather than manually setting the type context.
1635 (build_unc_object_type): Call gnat_set_type_context on the
1638 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1640 * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
1641 subtype indication and the case statement has only two choices,
1642 replace subtype indication with its range, because the resulting
1643 membership test cannot have a subtype indication as an operand.
1645 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1647 * exp_ch3.adb: Update comments, minor reformatting.
1649 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1651 * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
1652 the default initial condition procedures are build here.
1653 * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
1654 analyzed argument of pragma Default_Initial_Condition in some
1655 dummy code as GNATprove mode disables assertions, but still
1656 needs to see the argument.
1658 2014-08-04 Robert Dewar <dewar@adacore.com>
1660 * exp_ch6.adb, sem_util.adb: Minor reformatting.
1662 2014-08-04 Olivier Hainque <hainque@adacore.com>
1664 * a-comutr.ads: Set Root_Node_Type'Alignment to
1665 Standard'Maximum_Alignment, so that it is at least as large as
1666 the max default for Tree_Node_Type'Alignment.
1668 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1670 * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
1671 of the default initial condition procedure [body].
1672 * sem_ch3.adb (Analyze_Declarations): Create the bodies of
1673 all default initial condition procedures at the end of private
1674 declaration analysis.
1675 * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
1677 (Build_Default_Init_Cond_Procedure_Body): Merged in the
1678 processing of routine Build_Default_Init_Cond_Procedure_Bodies.
1679 * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
1681 (Build_Default_Init_Cond_Procedure_Body): Removed.
1683 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1685 * sem_elab.adb (Check_Elab_Call): Do not check a call to a
1687 * exp_ch6.adb (Expand_Call): Clarify handling of inserted
1690 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1692 * sem_prag.adb (Analyze_Pragma): Ensure that an
1693 internally generated spec for a stand alone body is recognized
1694 as a proper context for pragma SPARK_Mode.
1696 2014-08-04 Robert Dewar <dewar@adacore.com>
1698 * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
1700 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1702 * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
1703 when -gnatO has already been specified, for compatibility
1705 (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
1707 * g-expect.ads: Fix typo.
1709 2014-08-04 Thomas Quinot <quinot@adacore.com>
1711 * exp_ch4.adb (Insert_Dereference_Action): the actual Size
1712 must account for the bounds template if the designated type is
1713 an unconstrained array.
1715 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1717 * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
1718 SPARK_Mode in the body.
1719 * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
1720 way to verify the consistency of SPARK_Mode between a spec and
1722 * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
1723 to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1725 (Analyze_Subprogram_Instantiation): Remove the call to
1726 Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1728 * sem_prag.adb (Analyze_Pragma): Remove local variable
1729 Inst_Id. SPARK_Mode can no longer be applied to a package or
1730 subprogram instantiation.
1731 * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
1734 2014-08-04 Robert Dewar <dewar@adacore.com>
1736 * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
1738 2014-08-04 Yannick Moy <moy@adacore.com>
1740 * sem_ch3.adb (Derive_Type_Declaration,
1741 Process_Discriminants): Remove SPARK-specific legality checks.
1743 2014-08-04 Thomas Quinot <quinot@adacore.com>
1745 * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
1746 * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
1749 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1751 * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
1752 compatibility of SPARK_Mode between a spec and a body, use the
1753 SPARK_Mode of the public part.
1754 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
1755 the already available routine to exchange the aspects between
1756 the template and its copy. Analyze the aspects of copy to
1757 ensure that the corresponding pragmas perform their semantic
1758 effects. The partial analysis of aspects is no longer needed.
1759 (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
1761 (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
1763 * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
1764 instantiation which does not come from source.
1766 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1768 * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
1769 SPARK_Mode pragmas to the public and private part of the unit.
1770 * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
1771 type cannot have discriminants if the parent type already has
1773 (Process_Discriminants): Ensure that the type of a discriminant is
1775 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
1776 SPARK_Mode compatibility between a spec and a body can now be
1777 safely performed while processing a generic.
1778 * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
1779 SPARK_Mode compatibility between a spec and a body can now be
1780 safely performed while processing a generic.
1781 * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
1782 safely analyzed when processing a generic.
1784 2014-08-04 Nicolas Roche <roche@adacore.com>
1786 * g-dirope.adb: Minor reformating.
1788 2014-08-04 Robert Dewar <dewar@adacore.com>
1790 * sem_ch6.adb: Minor reformatting.
1792 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1794 * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
1795 Before normalizing these pragmas into a pragma Check, preanalyze
1796 the optional Message argument, (which is subsequently copied)
1797 so that it has the proper semantic information for ASIS use.
1798 * sem_case.adb: Initialize flag earlier.
1799 * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
1800 the full source path of a configuration file is requested.
1801 (Read_Source_File): Use Full_Name parameter..
1803 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1805 * opt.ads Alphabetize various global flags. New flag
1806 Ignore_Pragma_SPARK_Mode along with a comment on usage.
1807 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1808 Pragma SPARK_Mode is now allowed in generic units.
1809 (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
1810 between the SPARK_Mode of a spec and that of a body when inside
1812 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
1813 compatibility between the SPARK_Mode of a spec and that of a
1814 body when inside a generic.
1815 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1816 Pragma SPARK_Mode is now allowed in generic units.
1817 (Analyze_Package_Instantiation): Save and restore the value of
1818 flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
1819 the governing SPARK_Mode before analyzing the instance.
1820 (Analyze_Subprogram_Instantiation): Save and restore the value
1821 of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
1822 the governing SPARK_Mode before analyzing the instance.
1823 * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
1824 placement of a source pragma when inserting the generated pragma
1825 for aspect SPARK_Mode.
1826 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
1827 pragma SPARK_Mode to allow for generics and their respective
1829 * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
1830 (Set_Ignore_Pragma_SPARK_Mode): New routine.
1832 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
1834 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
1835 renaming discriminants in tagged types first.
1836 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
1837 the underlying type of the prefix.
1838 (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
1839 (process_freeze_entity): Reset the nodes of all the view of a type,
1842 2014-08-04 Doug Rupp <rupp@adacore.com>
1843 Olivier Hainque <hainque@adacore.com>
1845 * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
1846 and remove incorrect EH_MECHANISM macros.
1847 Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
1850 2014-08-04 Robert Dewar <dewar@adacore.com>
1852 * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
1853 of constructed 'Valid attribute in -gnatVa mode does not appear
1854 to come from source.
1855 * sem_attr.adb (Analyze_Access_Attribute): Don't set
1856 Never_Set_In_Source for non-source reference.
1857 * sem_util.adb: Minor reformatting.
1858 * sem_warn.adb (Check_References): Don't check Address_Taken,
1859 not necessary, see comment.
1861 2014-08-04 Robert Dewar <dewar@adacore.com>
1863 * sem_util.adb, sem_case.adb: Minor reformatting.
1865 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1867 * exp_ch9.adb (Extract_Entry): If the synchronized object is a
1868 limited view, replace with non-limited view, which is available
1869 at the point of an entry call.
1871 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1873 * exp_ch6.adb (Expand_Call): If the call is to a function in
1874 a run-time unit that is marked Inline_Always, we must suppress
1875 debugging information on it, so that the code that is eventually
1876 inlined will not affect debugging of the user program.
1878 2014-08-04 Robert Dewar <dewar@adacore.com>
1880 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
1883 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1885 * sem_prag.adb (Process_Import_Or_Interface): Handle properly
1886 an aspect Import that specifies a False value.
1888 2014-08-04 Robert Dewar <dewar@adacore.com>
1890 * gnat_rm.texi: Add section on aspect Invariant'Class.
1892 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1894 * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
1895 for better control of cascaded error messages when some choice
1896 in a case statement over a predicated type violates the given
1899 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1901 * sem_ch3.adb (Build_Derived_Type): Modify the
1902 inheritance of the rep chain to ensure that a non-tagged type's
1903 items are not clobbered during the inheritance.
1905 2014-08-04 Robert Dewar <dewar@adacore.com>
1907 * sem_ch3.adb, einfo.ads: Minor reformatting.
1909 2014-08-04 Yannick Moy <moy@adacore.com>
1911 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
1912 detection of subprograms that cannot be inlined in GNATprove mode.
1914 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1916 * einfo.adb: Add guard to Returns_Limited_View.
1918 2014-08-04 Jose Ruiz <ruiz@adacore.com>
1920 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
1921 the secondary stack to respect the alignments of the returned objects.
1923 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1925 * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
1926 on function entities whose return type is a limited view.
1927 * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
1928 where to place the freeze node for a function that returns the
1929 limited view of a type, when the function is called and frozen
1930 in a different unit.
1932 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
1934 * sem_ch3.adb (Build_Derived_Private_Type): Minor code
1937 2014-08-04 Robert Dewar <dewar@adacore.com>
1939 * gnat_ugn.texi: Clarify documentation on assertions.
1941 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1943 * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
1944 if a component association has a box initialization when the
1945 component type has no default initialization, either through an
1946 initial value, an aspect, or an implicit initialization procedure.
1948 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1950 * freeze.adb: Code clean up.
1952 2014-08-04 Thomas Quinot <quinot@adacore.com>
1954 * sem_ch5.adb: Minor reformatting.
1956 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1958 * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
1959 a function can return a limited view of a type declared
1960 elsewhere. In that case the function cannot be frozen at the end
1961 of its enclosing package. If its first use is in a different unit,
1962 it cannot be frozen there, but if the call is legal the full view
1963 of the return type is available and the subprogram can now be
1964 frozen. However the freeze node cannot be inserted at the point
1965 of call, but rather must go in the package holding the function,
1966 so that the backend can process it in the proper context.
1968 2014-08-04 Robert Dewar <dewar@adacore.com>
1970 * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
1972 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1974 * sem_ch4.adb (Operator_Check): Refine previous change.
1976 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1978 * sem_scil.ads: Improve comments.
1979 * sem_ch4.adb (Analyze_Equality_Op): Add support for
1980 Allow_Integer_Address (equality between Address and Integer).
1982 2014-08-04 Yannick Moy <moy@adacore.com>
1984 * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
1985 notation on untagged objects.
1986 * sem.ads: Update comment.
1987 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
1988 not inline subprograms declared in the visible part of a package.
1990 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1992 * exp_ch5.adb: minor reformatting.
1993 * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
1996 2014-08-04 Thomas Quinot <quinot@adacore.com>
1998 * s-fatgen.adb: Minor reformatting.
2000 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2002 * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
2005 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2007 * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
2008 the loop parameter for element iterators over containers and
2009 arrays, so that improper uses of it are detected in the loop
2010 body when expansion is disabled.
2011 * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
2012 generated cursor is that of the analyzed loop parameter.
2014 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2016 * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
2017 Flag_Decl. Do not analyze the declaration of the flag as it is
2018 not part of the tree yet, instead add it to the freeze actions
2021 2014-08-04 Robert Dewar <dewar@adacore.com>
2023 * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
2024 case of OUT and IN OUT parameter correctly (where Source_Typ is
2025 set), we were missing one case where a check must be applied.
2027 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2029 * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
2030 the generated code. Instead of hiding the renaming and using the
2031 wrapper as the proper association, have the subprogram renaming
2033 (Build_Spec): The entity of the wrapper is
2034 now derived from the entity of the related primitive.
2036 2014-08-04 Emmanuel Briot <briot@adacore.com>
2038 * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
2039 using non-capturing groups.
2041 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2043 * inline.adb (Build_Body_To_Inline): Remove Unmodified and
2044 related pragmas before copying the original body, to prevent
2045 spurious errors when the pragmas apply to formals that will not
2046 appear in the inlined body.
2048 2014-08-04 Robert Dewar <dewar@adacore.com>
2050 * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
2051 exp_ch3.adb: Minor reformatting.
2053 2014-08-04 Robert Dewar <dewar@adacore.com>
2055 * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
2057 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2059 * aspects.adb Add an entry in table Canonical_Aspect for
2060 Default_Initial_Condition.
2061 * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
2062 Aspect_Names and Aspect_Delay for Default_Initial_Condition.
2063 * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
2064 is now Is_Default_Init_Cond_ Procedure. Flag133 is now
2065 Has_Inherited_Default_Init_Cond.
2066 (Default_Init_Cond_Procedure): New routine.
2067 (Has_Default_Init_Cond): New routine.
2068 (Has_Inherited_Default_Init_Cond): New routine.
2069 (Is_Default_Init_Cond_Procedure): New routine.
2070 (Set_Default_Init_Cond_Procedure): New routine.
2071 (Set_Has_Default_Init_Cond): New routine.
2072 (Set_Has_Inherited_Default_Init_Cond): New routine.
2073 (Set_Is_Default_Init_Cond_Procedure): New routine.
2074 (Write_Entity_Flags): Output all the new flags.
2075 * einfo.ads New attributes Default_Init_Cond_Procedure,
2076 Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
2077 along with usage in nodes.
2078 (Default_Init_Cond_Procedure): New routine.
2079 (Has_Default_Init_Cond): New routine and pragma Inline.
2080 (Has_Inherited_Default_Init_Cond): New routine and
2082 (Is_Default_Init_Cond_Procedure): New routine and
2084 (Set_Default_Init_Cond_Procedure): New routine.
2085 (Set_Has_Default_Init_Cond): New routine and pragma Inline.
2086 (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
2087 (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
2088 * exp_ch3.adb (Expand_N_Object_Declaration): New constant
2089 Next_N. Generate a call to the default initial condition procedure
2090 if the object's type is subject to the pragma. (Freeze_Type):
2091 Generate the body of the default initial condition procedure or
2092 inherit the spec from a parent type.
2093 * exp_ch7.adb Add with and use clause for Exp_Prag.
2094 (Expand_Pragma_Initial_Condition): Removed.
2095 * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
2097 * par-prag.adb (Prag): Pragma Default_Initial_Condition does
2098 not need special treatment by the parser.
2099 * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
2100 attributes related to pragma Default_Initial_Condition to the
2102 (Process_Full_View): Propagate the attributes
2103 related to pragma Default_Initial_Condition to the full view.
2104 * sem_ch7.adb (Analyze_Package_Specification): Build the
2105 declaration of the default initial condition procedure for all
2106 types that qualify or inherit the one from the parent type.
2107 * sem_ch13.adb (Analyze_Aspect_Specifications):
2108 Add processing for aspect Default_Initial_Condition.
2109 (Check_Aspect_At_Freeze_Point): Aspect
2110 Default_Initial_Condition does not require delayed analysis.
2111 (Replace_Type_References_Generic): Moved to spec.
2112 * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
2113 * sem_prag.adb Add an entry in table Sif_Glags for
2114 Default_Initial_Condition.
2115 (Analyze_Pragma): Pragma
2116 Default_Initial_Condition is now part of assertion
2117 policy. Add processing for pragma Default_Initial_Condition.
2118 (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
2119 now recognized as a proper assertion policy.
2120 * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
2122 (Build_Default_Init_Cond_Procedure_Body): New routine.
2123 (Build_Default_Init_Cond_Procedure_Declaration): New routine.
2124 (Inherit_Default_Init_Cond_Procedure): New routine.
2125 * snames.ads-tmpl Add new predefined name and pragma id for
2126 Default_Initial_Condition.
2128 2014-08-04 Vincent Celier <celier@adacore.com>
2130 * prj-dect.adb (Parse_Case_Construction): It is no longer
2131 an error if the variable for a case construction is not
2132 typed, only if the variable value is not a single string. Call
2133 Parse_Choice_List and End_Case_Construction with the new parameter
2134 to indicate that the variable is typed.
2135 * prj-strt.adb (End_Case_Construction): Only check the labels
2136 if the variable is typed. If the variable is not typed,
2137 issue a warning when there is no "when others" allternative.
2138 (Parse_Choice_List): Manage the labels only if the variable
2140 * prj-strt.ads (End_Case_Construction): New Boolean parameter
2142 (Parse_Choice_List): Ditto.
2144 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2146 * sem_ch5.adb: Additional fix to Check_Predicate_Use.
2148 2014-08-04 Vincent Celier <celier@adacore.com>
2150 * projects.texi: Update documentation of case constructions with
2151 variables that are not typed.
2153 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2155 * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
2156 an Eliminated pragma, indicate that the wrapper is also to be
2157 eliminated, to prevent spurious errors when using gnatelim on
2158 programs that include box-initialization of equality operators
2159 (consequence of AI05-071)..
2161 2014-08-04 Robert Dewar <dewar@adacore.com>
2163 * checks.adb (Activate_Overflow_Check): Handle floating-point
2165 * checks.ads (Activate_Overflow_Check): Clarify handling of
2166 floating-point cases.
2167 * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
2168 flag if we generate an explicit overflow check (for
2169 Check_Float_Overflow mode).
2171 2014-08-04 Robert Dewar <dewar@adacore.com>
2173 * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
2174 prj-attr.adb, prj-attr.ads: Minor reformatting.
2176 2014-08-04 Yannick Moy <moy@adacore.com>
2178 * expander.adb (Expand): Always perform special
2179 expansion in GNATprove mode, even when doing pre-analysis.
2181 2014-08-04 Thomas Quinot <quinot@adacore.com>
2183 * repinfo.adb (List_Scalar_Storage_Order): List bit order if
2184 not default. Also list bit order if SSO is specified. Do not
2185 assume that bit order is always equal to scalar storage order.
2187 2014-08-04 Thomas Quinot <quinot@adacore.com>
2189 * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
2190 order to reverse SSO for a type that has an explicit native
2193 2014-08-04 Doug Rupp <rupp@adacore.com>
2195 * cal.c: Macro check for VxWorks7.
2196 * init.c (getpid): Likewise.
2197 * mkdir.c (__gnat_mkdir): Likewise.
2198 * sysdep.c (__gnat_is_file_not_found_error): Likewise.
2200 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2202 * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
2203 of an invariant check in the case where No_Initialization is set,
2204 since the object is uninitialized.
2206 2014-08-04 Thomas Quinot <quinot@adacore.com>
2208 * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
2209 name, in addition to a pragma name.
2210 * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
2211 Is_Pragma_Name): Adjust accordingly.
2212 * sem_attr.ads, sem_attr.adb, exp_attr.adb
2213 (Attribute_Default_Scalar_Storage_Order): Add handling of new
2215 * gnat_rm.texi: Document the above.
2217 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2219 * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
2220 mode for now, to revert to previous behavior.
2221 * checks.adb: Revert previous change, no longer needed.
2223 2014-08-04 Robert Dewar <dewar@adacore.com>
2225 * gnat1drv.adb (Adjust_Global_Switches): Don't set
2226 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2227 * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
2228 set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2229 * switch-c.adb (Scan_Front_End_Switches): Don't set
2230 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2232 2014-08-04 Vincent Celier <celier@adacore.com>
2234 * prj-attr.adb: Add new default indications for
2235 attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
2236 (Attribute_Default_Of): New function (Initialize): Set the
2237 default for those attributes that have one specified.
2238 * prj-attr.ads (Attribute_Data): New component Default.
2239 * prj-proc.adb (Expression): Take into account the new defaults
2240 for attributes Object_Dir, Exec_Dir and Source_Dirs.
2241 * prj-strt.adb (Attribute_Reference): Set the default for
2243 * prj-tree.ads, prj-tree.adb (Default_Of): New function.
2244 (Set_Default_Of): New procedure.
2245 * prj.adb (The_Dot_String): New global Name_Id variable,
2246 initialized in procedure Initialize.
2247 (Dot_String): New function
2248 (Initialize): Initialize The_Dot_String.
2249 (Reset): Create the string list Shared.Dot_String_List.
2250 * prj.ads (Attribute_Default_Value): New enumeration type.
2251 (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
2252 (Dot_String): New function.
2253 (Shared_Project_Tree_Data): New string list component Dot_String_List.
2254 * projects.texi: Document new defaults for attribute Object_Dir,
2255 Exec_Dir and Source_Dirs.
2257 2014-08-04 Robert Dewar <dewar@adacore.com>
2259 * sem_ch12.adb: Minor reformatting.
2261 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2263 * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
2264 expansion in CodePeer_Mode.
2265 (Selected_Range_Checks): Add handling of overflow checks in
2268 2014-08-04 Robert Dewar <dewar@adacore.com>
2270 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
2271 Remove special test for Float'First, no longer required.
2272 (Expand_N_Attribute_Reference, case Succ): Remove special test
2273 for Float'First, no longer required.
2274 * s-fatgen.adb (Pred): return infinity unchanged.
2277 2014-08-04 Claire Dross <dross@adacore.com>
2279 * sem_ch12.adb (Analyze_Associations): Defaults should only be
2280 used if there is no explicit match.
2281 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2282 Also check for pragma external_axiomatization on generic units.
2284 2014-08-04 Robert Dewar <dewar@adacore.com>
2286 * checks.adb (Activate_Overflow_Check): Remove
2287 Check_Float_Overflow processing.
2288 (Apply_Scalar_Range_Check): Ditto.
2289 (Generate_Range_Check): Ditto.
2290 * exp_ch4.adb (Expand_N_Op_Add): Add call to
2291 Check_Float_Op_Overflow.
2292 (Expand_N_Op_Divide): ditto.
2293 (Expand_N_Op_Multiply): ditto.
2294 (Expand_N_Op_Subtract): ditto.
2295 * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
2296 * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
2297 Do_Range_Check is set for floating-point case in -gnatc or
2299 (Analyze_Attribute, case Succ): Make sure
2300 Do_Range_Check is set for floating-point case in -gnatc or
2302 * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
2303 flag is set for real to integer conversion in GNATprove or
2306 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2308 * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
2309 the expression of an Import or Export aspect as type Boolean
2310 and require it to be static. Add ??? comment. Also, set the
2311 Is_Exported flag when appropriate.
2313 2014-08-04 Robert Dewar <dewar@adacore.com>
2315 * exp_ch4.adb: Minor reformatting.
2316 * exp_attr.adb: Minor reformatting.
2318 2014-08-04 Thomas Quinot <quinot@adacore.com>
2320 * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
2321 (Unaligned_Valid): Remove now unused subprogram.
2322 * exp_attr.adb (Expand_N_Attribute_Reference, case
2323 Attribute_Valid): If the prefix is in reverse SSO or potentially
2324 unaligned, copy it using a byte copy operation to a temporary
2326 * einfo.adb: Minor comment fix.
2328 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2330 * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
2332 2014-08-04 Robert Dewar <dewar@adacore.com>
2334 * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
2335 * s-fatgen.adb (Pred): Handle Float'First.
2336 (Succ): Handle Float'Last.
2338 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2340 * sem_util.adb (Is_Potentially_Unevaluated): If the original
2341 node of a parent node in the tree is a short-circuit operation,
2342 the node is potentially unevaluated.
2344 2014-08-04 Robert Dewar <dewar@adacore.com>
2346 * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
2347 conversion from a real type to an integer type.
2349 2014-08-04 Yannick Moy <moy@adacore.com>
2351 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
2352 sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
2353 exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
2354 sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
2355 SPARK_05 instead of SPARK.
2357 2014-08-04 Robert Dewar <dewar@adacore.com>
2359 * sem.ads: Minor reformatting.
2360 * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
2362 (Analyze_Aspect_Specifications, case Convention): Put External_Name
2363 before Link_Name when constructing pragma.
2365 2014-08-04 Yannick Moy <moy@adacore.com>
2367 * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
2368 to True during analysis of a default component expression.
2369 (Semantics): Save and restore In_Default_Expr around analysis.
2370 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
2371 Call new wrapper Preanalyze_Default_Expression.
2372 (Preanalyze_Default_Expression): New wrapper on
2373 Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
2374 * sem_res.adb (Resolve_Call): Mark calls inside default
2375 expressions as not inlined in GNATprove mode.
2377 2014-08-04 Robert Dewar <dewar@adacore.com>
2379 * exp_ch4.adb: Minor reformatting.
2381 2014-08-04 Olivier Hainque <hainque@adacore.com>
2383 * link.c: remove const on __gnat_objlist_file_supported for AIX
2385 2014-08-04 Robert Dewar <dewar@adacore.com>
2387 * sem_util.ads: Minor addition of comment.
2389 2014-08-04 Vincent Celier <celier@adacore.com>
2391 * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
2392 all projects, including aggregate and aggregate library projects.
2394 2014-08-04 Yannick Moy <moy@adacore.com>
2396 * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
2398 2014-08-04 Robert Dewar <dewar@adacore.com>
2400 * sem_eval.adb (Test_In_Range): Always in range for
2401 Is_Known_Valid target type, where input type has smaller or
2402 equal size and does not have biased rep.
2404 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2406 * sem_attr.adb (Eval_Attribute): Constrained is not treated as
2407 a static attribute, and the Static flag must not be set on it
2408 during resolution. It may be constant-folded during expansion,
2409 but if expansion is disabled it is not a static expression.
2411 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2413 * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
2414 referenced once resolution has taken place.
2416 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2418 * exp_ch4.adb (Expand_N_Type_Conversion): Don't
2419 compare access levels in the case where the target type is the
2420 anonymous type of an access discriminant, since the level of
2421 such types is defined based on context. Add comment.
2423 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2425 * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
2426 cases related to equality. Remove the special processing
2427 for dispatching abstract subprograms as it is not needed.
2428 (Interpretation_Error): Add a specialized error message for
2429 predefined operators.
2430 (Is_Intrinsic_Equality): New routine.
2431 (Is_Suitable_Candidate): New routine.
2433 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2435 * checks.adb: Minor comment reformatting.
2437 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2439 * restrict.adb (Check_Restriction): For checked max_parameter
2440 restrictions reset Violated flag, so that subsequent violations
2441 are properly detected.
2443 2014-08-04 Robert Dewar <dewar@adacore.com>
2445 * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
2447 (Process_Discriminants): Fix bad test of GNATprove mode
2449 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2451 * sem_ch12.adb (Instantiate_Formal_Subprogram):
2452 Move variable to their own section. Propagate the source
2453 location of a formal parameter to the corresponding formal of
2454 the subprogram renaming declaration. Code reformatting.
2456 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2458 * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
2460 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2462 * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
2463 if error already detected. We may reach this point in spite of
2464 previous errors when compiling with -gnatq, to force all possible
2465 errors (this is the usual ACATS mode).
2467 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2469 * checks.adb (Generate_Range_Check): For the case of converting
2470 a base type with a larger range to a smaller target subtype, only
2471 use unchecked conversions of bounds in the range check followed
2472 by conversion in the case where both types are discrete. In other
2473 cases, convert to the target base type and save in a temporary
2474 followed by the range check.
2475 (Convert_And_Check_Range): New procedure factoring code to save
2476 conversion to a temporary followed by a range check (called two
2477 places in Generate_Range_Check).
2478 * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
2479 check-in, to generate range checks for conversions between
2480 any floating-point types rather than limiting it to matching
2483 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2485 * gcc-interface/trans.c: Use hash_set instead of pointer_set.
2487 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2489 * restrict.adb (Update_Restrictions): For restrictions with a
2490 maximum parameter (e.g. number of protected entries in Ravenscar)
2491 do not compute the maximum of the violation over several objects,
2492 because the restriction is per-object.
2493 (Check_Restriction): After possible message, reset the value
2494 of of a checked max_parameter restriction to zero, to prevent
2496 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
2497 (sub)type to determine whether derived type should be on the
2498 list of private dependents of a type whose full view may become
2499 visible subsequently.
2501 2014-08-01 Olivier Hainque <hainque@adacore.com>
2503 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
2504 $(CXX) instead of ../../xg++ to feed CXX.
2505 (CXX_LFLAGS): Remove. Now unused as the proper flags
2506 are expected to be included in the CXX variable.
2508 2014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
2510 * gcc-interface/decl.c (elaborate_expression_1): Return the new
2511 variable when debug info is needed and the expression is not
2512 constant. Tag as external only new variables that are global.
2513 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
2514 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
2515 attributes for IN array parameters when their actual subtype
2517 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
2518 * gcc-interface/gigi.h (process_deferred_decl_context): New.
2519 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
2520 emit debug info for ignored global declarations.
2521 (struct deferred_decl_context_node,
2522 add_deferred_decl_context, add_deferred_type_context,
2523 compute_deferred_decl_context, defer_or_set_type_context,
2524 deferred_decl_context_queue, get_debug_scope,
2525 get_global_context, process_deferred_decl_context): New.
2526 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
2527 computation machinery to rely on the GNAT Scope attribute.
2529 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2531 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
2533 2014-08-01 Robert Dewar <dewar@adacore.com>
2535 * sem_ch8.adb, opt.ads Minor comment updates.
2537 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2539 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
2540 from the side effects removal machinery.
2541 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
2542 Renaming_Req. Update the nested call to Remove_Side_Effects.
2543 (Duplicate_Subexpr_No_Checks): Add formal parameter
2544 Renaming_Req. Update the nested call to Remove_Side_Effects.
2545 (Duplicate_Subexpr_Move_Checks): Add formal parameter
2546 Renaming_Req. Update the nested call to Remove_Side_Effects.
2547 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
2548 an object renaming declaration when the caller requests it.
2549 * exp_util.ads (Duplicate_Subexpr): Add formal
2550 parameter Renaming_Req. Update comment on usage.
2551 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
2552 (Duplicate_Subexpr_Move_Checks): Add formal parameter
2555 2014-08-01 Bob Duff <duff@adacore.com>
2557 * gnat_ugn.texi: Minor updates.
2559 2014-08-01 Robert Dewar <dewar@adacore.com>
2561 * atree.adb: Minor reformatting.
2563 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2565 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
2566 private extension, get stored constraint, if any, from full view.
2568 2014-08-01 Robert Dewar <dewar@adacore.com>
2570 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
2571 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
2572 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
2573 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
2574 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2575 Remove code for checking with's, now in sem_ch10.adb, set
2576 Opt.No_Elab_Code_All_Pragma.
2578 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2580 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
2581 access types as well and adjust the subtype mark if there are
2584 2014-08-01 Robert Dewar <dewar@adacore.com>
2586 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
2588 2014-08-01 Robert Dewar <dewar@adacore.com>
2590 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
2592 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2594 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
2595 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
2596 of the actuals in the case of untagged record types too.
2597 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
2598 full derivation of a derived private type, extracted from...
2599 (Copy_And_Build): In the case of record types and most
2600 enumeration types, copy the original declaration. Build the
2601 full derivation according to the approach extracted from...
2602 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
2603 to create the full derivation in all existing cases and also
2604 create it in the no-discriminants/discriminants case instead of
2605 deriving directly from the full view.
2606 (Is_Visible_Component): Remove obsolete code.
2607 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
2609 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2611 * fe.h (GNAT_Mode): New.
2612 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
2613 reverse SSO in GNAT mode.
2615 2014-08-01 Thomas Quinot <quinot@adacore.com>
2617 * freeze.adb: Minor reformatting.
2619 2014-08-01 Thomas Quinot <quinot@adacore.com>
2621 * exp_ch3.adb (Default_Initialize_Object): Do not generate
2622 default initialization for an imported object.
2624 2014-08-01 Olivier Hainque <hainque@adacore.com>
2626 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
2627 to the expected FARPROC type instead of void *.
2628 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
2629 other datastructures.
2630 (__gnat_file_time_name_attr): Adjust accordingly.
2631 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
2633 (__gnat_check_OWNER_ACL): Declare AccessMode
2634 parameter as ACCESS_MODE instead of DWORD, in line with callers
2636 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
2637 unused on win32. Correct cast of "args" on call to spawnvp.
2638 (add_handle): Cast realloc calls into their destination types.
2639 (win32_wait): Remove declaration and initialization of unused variable.
2640 (__gnat_locate_exec_on_path): Cast alloca calls
2641 into their destination types.
2642 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
2643 their destination types.
2645 2014-08-01 Gary Dismukes <dismukes@adacore.com>
2647 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
2648 range checks for conversions between floating-point subtypes
2649 when the target and source types are the same.
2651 2014-08-01 Robert Dewar <dewar@adacore.com>
2653 * exp_aggr.adb: Minor reformatting.
2655 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2657 * sem_ch13.adb (Check_Indexing_Functions): Initialize
2660 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2662 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
2663 ALI file before we call the backend (so that gnat2why can append
2666 2014-08-01 Thomas Quinot <quinot@adacore.com>
2668 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
2669 Expand_Packed_Element_Reference): Pass additional Rev_SSO
2670 parameter indicating whether the packed array type has reverse
2671 scalar storage order to the s-pack* Set/Get routines.
2672 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
2673 indicating reverse scalar storage order.
2675 2014-08-01 Robert Dewar <dewar@adacore.com>
2677 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
2678 for initial component value in -gnatc or GNATprove mode.
2679 (Process_Discriminants): Same fix for default discriminant values.
2680 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
2683 2014-08-01 Robert Dewar <dewar@adacore.com>
2685 * sinfo.ads: Minor comment clarification.
2687 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2689 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
2690 reformatting. Store the generated pragma Import in the related
2691 subprogram as routine Wrap_Imported_Subprogram will need it later.
2692 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
2693 a private type with discriminants is considered to fall in the
2694 category of unconstrained or tagged items.
2696 2014-08-01 Arnaud charlet <charlet@adacore.com>
2698 * s-os_lib.adb (Open_Append): New functions to open a file for
2699 appending. This binds to the already existing (but not used)
2701 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
2702 to open a file for appending.
2703 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
2704 to open the ALI file for appending.
2706 2014-08-01 Robert Dewar <dewar@adacore.com>
2708 * sem_ch8.adb: Minor reformatting.
2710 2014-08-01 Yannick Moy <moy@adacore.com>
2712 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
2713 pragmas from aspects, which need to be inserted in proper order.
2715 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2717 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
2718 Handle properly a type extension that constrains a discriminated
2719 derived type that renames other discriminants of an ancestor.
2721 2014-08-01 Thomas Quinot <quinot@adacore.com>
2723 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
2724 s-pack25.adb: Fix minor inconsistencies and typos.
2726 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2728 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
2729 globals and move certain variables to the "local
2730 variable" section. Call Build_Class_Wide_Wrapper when
2731 renaming a default actual subprogram with a class-wide actual.
2732 (Build_Class_Wide_Wrapper): New routine.
2733 (Check_Class_Wide_Actual): Removed.
2734 (Find_Renamed_Entity): Code reformatting.
2735 (Has_Class_Wide_Actual): Alphabetize. Change the
2736 logic of the predicate as the renamed name may not necessarely
2737 denote the correct subprogram.
2739 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2741 * sem_ch7.adb: Fix minor oversight in condition.
2743 2014-08-01 Bob Duff <duff@adacore.com>
2745 * projects.texi: Minor documentation improvements.
2747 2014-08-01 Robert Dewar <dewar@adacore.com>
2749 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
2750 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
2751 * lib-load.adb: Initialize No_Elab_Code_All field.
2752 * lib-writ.adb: Initialize No_Elab_Code_All.
2753 * lib.ads, lib.adb: New field No_Elab_Code_All.
2754 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
2755 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
2757 * sem_ch10.adb (Analyze_Context): Processing for
2758 No_Elaboration_Code_All removed.
2759 (Generate_Parent_References): Moved to Sem_Util.
2760 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
2761 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
2763 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
2764 * targparm.adb: Minor comment updates Add comments on ignoring
2765 pragma No_Elaboration_Code_All.
2767 2014-08-01 Nicolas Roche <roche@adacore.com>
2769 * adaint.c (__gnat_set_close_on_exec): Ensure that
2770 we can unset "close_on_exec" flag.
2772 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2774 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
2775 the parameter specs of the wrapper program for a primitive operation
2776 of a synchronized type that implements an interface, copy the
2777 null_exclusion indicator as well.
2779 2014-08-01 Robert Dewar <dewar@adacore.com>
2781 * sem_eval.ads: Minor reformatting.
2783 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2785 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
2786 to go down the chain of private derivations.
2787 * freeze.adb (Freeze_Entity): Fix typo in comment.
2789 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2791 * sem_ch3.adb (Access_Type_Declaration): If designated type is
2792 a limited view, create a master entity (as is already done for
2793 class-wide types) in case the full view designates a type that
2795 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
2796 and the designated type is a limited view, use the non-limited
2799 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2801 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
2802 (DECL_FUNCTION_STUB): Likewise.
2803 (SET_DECL_FUNCTION_STUB): Likewise.
2804 (DECL_PARM_ALT_TYPE): Likewise.
2805 (SET_DECL_PARM_ALT_TYPE): Likewise.
2806 (TYPE_VAX_FLOATING_POINT_P): Delete.
2807 (TYPE_DIGITS_VALUE): Likewise.
2808 (SET_TYPE_DIGITS_VALUE): Likewise.
2809 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
2810 (malloc32_decl): Delete.
2811 (build_vms_descriptor): Likewise.
2812 (build_vms_descriptor32): Likewise.
2813 (fill_vms_descriptor): Likewise.
2814 (convert_vms_descriptor): Likewise.
2815 (TARGET_ABI_OPEN_VMS): Likewise.
2816 (TARGET_MALLOC64): Likewise.
2817 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
2818 (gnat_to_gnu_entity): Call it to add the original type as a parallel
2819 type to the implementation type of a packed array type.
2820 <E_Procedure>: Remove now obsolete kludge.
2821 <E_Exception>: Delete obsolete comment.
2822 <object>: Small tweak.
2823 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
2824 for the descriptor passing mechanism.
2825 (gnat_to_gnu_param): Likewise.
2826 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
2827 (gnat_print_type): Adjust.
2828 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
2829 (vms_builtin_establish_handler_decl): Delete.
2830 (gnat_vms_condition_handler_decl): Likewise.
2831 (establish_gnat_vms_condition_handler): Likewise.
2832 (build_function_stub): Likewise.
2833 (Subprogram_Body_to_gnu): Do not call above functions.
2834 (Call_to_gnu): Remove support for the descriptor passing mechanism.
2835 * gcc-interface/utils.c (make_descriptor_field): Delete.
2836 (build_vms_descriptor32): Likewise.
2837 (build_vms_descriptor): Likewise.
2838 (fill_vms_descriptor): Likewise.
2839 (convert_vms_descriptor64): Likewise.
2840 (convert_vms_descriptor32): Likewise.
2841 (convert_vms_descriptor): Likewise.
2842 * gcc-interface/utils.c (unchecked_convert): Likewise.
2843 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
2845 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2847 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
2848 type and get_unpadded_type for the longest FP type.
2849 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
2850 (convert_with_check): Adjust formatting and remove FIXME.
2852 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2854 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2855 Do not convert the RM bounds to the base type.
2856 (E_Floating_Point_Subtype): Likewise.
2857 (E_Array_Subtype): Convert the bounds to the base type.
2858 * gcc-interface/trans.c (get_type_length): New function.
2859 (Attribute_to_gnu) <Range_Length>: Call it.
2861 (Loop_Statement_to_gnu): Convert the bounds to the base type.
2862 (gnat_to_gnu) <N_In>: Likewise.
2863 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
2864 bounds to the base type.
2865 (create_range_type): Likewise.
2866 (convert): Convert the bounds to the base type for biased types.
2867 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
2870 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2872 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
2873 incorrect implicit type derivation.
2874 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
2877 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2879 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
2880 prefix of attribute Loop_Entry.
2881 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
2882 Loop_Variant with respect to an enclosing loop (if any).
2883 (Contains_Loop_Entry): Update the parameter profile and all
2884 calls to this routine.
2885 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
2886 for the corresponding body before determining the nature of the
2887 ultimate alias's declarative node.
2889 2014-08-01 Robert Dewar <dewar@adacore.com>
2891 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
2893 2014-08-01 Robert Dewar <dewar@adacore.com>
2895 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
2896 constraint error node since it is a list member.
2898 2014-08-01 Robert Dewar <dewar@adacore.com>
2900 * sem_warn.adb: Minor reformatting.
2902 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2904 * einfo.adb (Underlying_Type): Return the underlying full view
2905 of a private type if present.
2906 * freeze.adb (Freeze_Entity):
2907 Build a single freeze node for partial, full and underlying full
2909 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
2910 missing guard before the access to the Underlying_Full_View.
2911 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
2912 full view if present.
2913 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
2915 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2917 * sem_res.adb (Resolve_Entry_Call): When an entry has
2918 preconditions, the entry call is wrapped in a procedure call
2919 that incorporates the precondition checks. To prevent a double
2920 expansion, with possible duplication of extra formals, that
2921 procedure call must only be pre-analyzed and resolved. Expansion
2922 takes place upon return to the caller Resolve_Call.
2924 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2926 * sem_res.adb (Resolve_Call): Do not perform
2927 GNATprove-specific inlining while within a generic.
2929 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2931 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
2932 case expression with incompatible alternatives, when the first
2933 alternative is overloaded.
2935 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2937 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
2938 to create the name of the parameterless call, rather than
2939 New_Copy, to preserve the tree structure when the name is a
2940 complex expression, e.g. a selected component that denotes a
2941 protected operation, whose prefix is itself a selected component.
2943 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2945 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
2946 Unit_Declaration_Node to retrieve body when inlining, to handle
2947 properly subprogram child units.
2949 2014-08-01 Robert Dewar <dewar@adacore.com>
2951 * sem_attr.adb: Minor reformatting.
2953 2014-08-01 Vincent Celier <celier@adacore.com>
2955 * debug.adb: Minor documentation addition for -dn switch.
2957 2014-08-01 Robert Dewar <dewar@adacore.com>
2959 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
2960 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
2961 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
2962 In several places, use the Is_OK version as suggested by the spec.
2964 2014-08-01 Vincent Celier <celier@adacore.com>
2966 * gnatcmd.adb: Revert last change which was not correct.
2968 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2970 * freeze.adb (Find_Constant): Ensure that the constant being
2971 inspected is still an object declaration (i.e. not a renaming).
2973 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2975 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
2976 An attribute_reference to Loop_Entry denotes an iterator
2977 specification: its prefix is an object, as is the case for 'Old.
2978 b) If the domain of iteration is an expression whose type has
2979 the Iterable aspect defined, this is an iterator specification.
2981 2014-08-01 Robert Dewar <dewar@adacore.com>
2983 * gnatcmd.adb: Minor reformatting.
2985 2014-08-01 Robert Dewar <dewar@adacore.com>
2987 * atree.ads (Info_Messages): New counter.
2988 * err_vars.ads: Minor comment update.
2989 * errout.adb (Delete_Warning_And_Continuations): Deal
2990 with new Info_Messages counter.
2991 (Error_Msg_Internal): ditto.
2992 (Delete_Warning): ditto.
2993 (Initialize): ditto.
2994 (Write_Error_Summary): ditto.
2995 (Output_Messages): ditto.
2996 (To_Be_Removed): ditto.
2997 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
2998 (Compilation_Errors): ditto.
2999 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
3001 (Initialize): ditto.
3002 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
3003 * gnat_ugn.texi: Document that -gnatwe does not affect info
3006 2014-08-01 Robert Dewar <dewar@adacore.com>
3008 * debug.adb: Document debug switch -gnatd.Z.
3009 * sem.adb (Semantics): Force expansion on in no or configurable
3012 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3014 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
3015 unchecked conversion denotes an iterator specification. Such a
3016 conversion will be inserted in the context of an inlined call
3017 when needed, and its argument is always an object.
3019 2014-08-01 Robert Dewar <dewar@adacore.com>
3021 * make.adb, makeutl.ads: Minor reformatting.
3022 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
3025 2014-08-01 Tristan Gingold <gingold@adacore.com>
3027 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
3029 2014-08-01 Javier Miranda <miranda@adacore.com>
3031 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
3033 * debug.adb: Updating documentation.
3034 * exp_ch6.adb (Expand_Call): Remove assertion.
3036 2014-08-01 Robert Dewar <dewar@adacore.com>
3038 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
3039 sem_res.adb: Minor reformatting.
3041 2014-08-01 Vincent Celier <celier@adacore.com>
3043 * make.adb (Initialize): Set Keep_Temporary_Files to True when
3045 * makeusg.adb: Add line for new switch --keep-temp-files.
3046 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
3047 * opt.ads (Keep_Temporary_Files): Document that it is also used
3048 by gnatmake and gprbuild.
3049 * switch-m.adb: Recognize new switch --keep-temp-files.
3051 2014-08-01 Tristan Gingold <gingold@adacore.com>
3053 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
3054 * exp_ch9.adb (Make_Task_Create_Call): ... here.
3056 2014-08-01 Vincent Celier <celier@adacore.com>
3058 * gnat1drv.adb: Do not try to get the target parameters when
3059 invoked with -gnats.
3061 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3063 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
3064 declaration subject to No_Initialization.
3066 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3068 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
3069 is a subtype with dynamic predicates, or a non-static subtype
3071 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
3072 expression if subtype has a dynamic predicate.
3073 (Constrain_Index): Reject subtype indication if subtype mark
3075 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
3076 (Make_Index): If index is a subtype indication, itype inhereits
3077 predicate flags for subsequent testing.
3078 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
3079 procedure Check_Predicate_Use, to reject illegal uses of domains
3080 of iteration that have dynamic predicates.
3081 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
3082 indication to which a predicate applies.
3083 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
3084 prevent cascaded errors when subtype is invalid.
3086 2014-08-01 Robert Dewar <dewar@adacore.com>
3088 * sem_ch10.adb: Minor reformatting.
3090 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3092 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
3093 because either type may be a subtype of the other.
3095 2014-08-01 Vincent Celier <celier@adacore.com>
3097 * makeusg.adb: Add documentation for debug switch -dn.
3099 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3101 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
3102 expression with standard operator and type, for pretty-printing
3103 use, when in ASIS_Mode. When generating code dimensional analysis
3104 is not involved and dimension expressions are handled statically,
3105 and other operators are resolved in the usual way.
3107 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3109 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
3110 Parent_Subtype in ASIS mode, leads to several failures.
3111 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
3112 if the prefix is a type extension, check whether component is
3113 declared in the parent type, possibly in a parent unit. Needed
3114 in ASIS mode when Parent_Subtype is not set.
3116 2014-08-01 Robert Dewar <dewar@adacore.com>
3118 * sem_prag.adb: Minor reformatting.
3119 * s-regpat.adb: Minor reformatting.
3120 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
3121 Treat_As_Volatile on constants.
3123 2014-08-01 Tristan Gingold <gingold@adacore.com>
3125 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
3127 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3129 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
3130 warning on a with_clause created for the renaming of a parent
3131 unit in an explicit with_clause.
3133 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3135 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
3136 Set Is_Imported flag at once, to simplify subsequent legality
3137 checks. Reject the aspect on an object whose declaration has an
3138 explicit initial value.
3139 * sem_prag.adb (Process_Import_Or_Interface): Use original node
3140 to check legality of an initial value for an imported entity.
3141 Set Is_Imported flag in case of error to prevent cascaded errors.
3142 Do not set the Is_Imported flag if the pragma comes from an
3143 aspect, because it is already done when analyzing the aspect.
3145 2014-08-01 Emmanuel Briot <briot@adacore.com>
3147 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
3149 2014-08-01 Robert Dewar <dewar@adacore.com>
3151 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
3154 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3156 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
3157 checks when the related variable comes from source.
3158 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
3159 when the related actual parameter comes from source. Update comment.
3160 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
3161 type of an array of pointers when the designated type is
3162 class-wide and its root type is the record being currently frozen.
3164 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3166 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
3167 of renaming declaration created for domain of iteration.
3168 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
3169 for error messages on aggregates whose index subtypes have
3170 predicates. The new placement avoids posting messages on previous
3171 subtype declarations rather than on the aggregate itself.
3172 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
3173 Add_Dispatching_Operation, to handle properly the overriding of
3174 the predefined operations on controlled types, when the partial
3175 view of a type is not visibly controlled.
3177 2014-08-01 Ben Brosgol <brosgol@adacore.com>
3179 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
3182 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3184 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
3185 assertion check as the attribute is defined for all entities.
3186 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
3187 check as the attribute is defined for all entities.
3188 * einfo.ads Update the documentation of attribute
3189 Is_Hidden_Non_Overridden_Subprogram.
3190 * sem_ch7.adb (Install_Package_Entity): No need to check the
3191 entity kind of the Id.
3192 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
3193 usage. Ensure that the homographs are of the same entity kind
3194 and not fully conformant.
3195 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
3197 2014-08-01 Robert Dewar <dewar@adacore.com>
3199 * inline.adb: Minor code reorganization.
3200 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
3202 2014-08-01 Robert Dewar <dewar@adacore.com>
3204 * inline.adb, s-os_lib.ads: Minor reformatting.
3206 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3208 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
3209 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
3212 2014-08-01 Yannick Moy <moy@adacore.com>
3214 * inline.adb (Cannot_Inline): Issue info message instead of
3215 warning for subprograms not inlined in GNATprove mode.
3216 * sem_res.adb (Resolve_Call): Take body into account for deciding
3217 whether subprogram can be inlined in GNATprove mode or not.
3219 2014-08-01 Claire Dross <dross@adacore.com>
3221 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
3222 of Get_First_Parent_With_External_Axiomatization_For_Entity for
3224 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
3225 for parameters of packages with external axiomatization.
3227 2014-08-01 Robert Dewar <dewar@adacore.com>
3229 * sem_res.adb: Minor comment addition.
3231 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3233 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
3234 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
3236 * s-os_lib.ads: Minor reformatting.
3238 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3240 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
3241 completely previous code since only GCC back-ends are prepared
3242 to handle e.g. 'Machine attribute.
3243 * targparm.adb, targparm.ads: Remove remaining refs and
3244 handling of OpenVMS_On_Target, VAX_Float_On_Target and
3245 RTX_RTSS_Kernel_Module_On_Target.
3246 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
3249 2014-08-01 Robert Dewar <dewar@adacore.com>
3251 * exp_dist.adb, exp_attr.adb: Minor reformatting.
3252 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
3253 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
3254 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
3255 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
3256 improper use of shall.
3258 2014-08-01 Robert Dewar <dewar@adacore.com>
3260 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
3261 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
3262 exp_ch3.adb: Minor reformatting & code reorganization.
3264 2014-08-01 Robert Dewar <dewar@adacore.com>
3266 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
3267 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
3268 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
3269 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
3270 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
3272 * gcc-interface/decl.c, gcc-interface/Makefile.in,
3273 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
3275 2014-08-01 Pascal Obry <obry@adacore.com>
3277 * s-os_lib.ads: Rename File_Size to Large_File_Size.
3279 2014-08-01 Robert Dewar <dewar@adacore.com>
3281 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
3282 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
3283 a-numaux-libc-x86.ads: Fix bad package header comments.
3284 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
3285 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
3286 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
3287 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
3288 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
3289 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
3290 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
3291 s-os_lib.adb: Remove VMS-specific code.
3293 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3295 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
3296 previous state in CodePeer_Mode.
3298 2014-08-01 Robert Dewar <dewar@adacore.com>
3300 * hostparm.ads: Put back definition of OpenVMS as False to aid
3301 the transition process.
3302 * sem_ch7.adb: Minor reformatting.
3303 * prj-env.adb: Minor code fix.
3304 * gnat_rm.texi: Complete previous change.
3305 * sem_ch3.adb: Minor reformatting.
3306 * sem_ch6.adb: Minor reformatting.
3307 * sem_elab.adb: Minor reformatting.
3308 * exp_strm.adb: Complete previous change.
3310 2014-08-01 Vincent Celier <celier@adacore.com>
3312 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
3313 warning when a constant is unreferenced and its type has pragma
3314 Unreferenced_Objects.
3316 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3318 * einfo.adb: Flag2 is now known as
3319 Is_Hidden_Non_Overridden_Subprogram.
3320 (Is_Hidden_Non_Overridden_Subprogram): New routine.
3321 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
3322 (Write_Entity_Fields): Output Flag2.
3323 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
3324 along with occurrences in entities.
3325 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
3326 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
3328 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
3329 declared non-overriden homographs into visibility.
3330 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
3331 implicitly declared non-overriden homographs.
3332 (Hide_Non_Overridden_Subprograms): New routine.
3334 2014-08-01 Robert Dewar <dewar@adacore.com>
3336 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
3338 * prj-conf.adb: Minor reformatting.
3339 * xr_tabls.adb (Read_File): Restore code which was enabled on
3340 non VMS platforms before.
3341 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
3342 * sem_ch5.adb: Minor reformatting.
3343 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
3344 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
3345 Remove VMS-specific code.
3347 2014-08-01 Vincent Celier <celier@adacore.com>
3349 * make.adb (Await_Compile): Remove loop that was only needed
3352 2014-08-01 Robert Dewar <dewar@adacore.com>
3354 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
3355 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
3356 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
3357 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
3358 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
3359 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
3360 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
3361 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
3362 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
3363 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
3364 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
3365 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
3366 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
3367 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
3368 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
3369 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
3370 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
3371 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
3372 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
3373 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
3374 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
3375 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
3376 specific code and comments.
3378 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3380 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
3381 Check_Reverse_Iteration, to verify the legality of the Reverse
3382 indicator on various container types, and to detect illegal
3383 reverse iterations on containers that only supoort forward
3386 2014-08-01 Vincent Celier <celier@adacore.com>
3388 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
3389 procedure GNATCmd the relevant declarations from packages VMS_Cmds
3391 * gnatcmd.ads: Update comments to remove any trace of VMS
3393 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3395 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
3396 defaulted actual that is an operator, before building wrapper
3397 for it in GNATprove mode. Restrict construction of wrapper to
3398 actuals that are operators.
3400 2014-08-01 Vincent Celier <celier@adacore.com>
3402 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
3403 specific packages no longer needed.
3405 2014-08-01 Pascal Obry <obry@adacore.com>
3407 * s-os_lib.ads (System.CRTL): Move with clause to body.
3408 (File_Size): New type.
3409 (File_Length64): Use it.
3410 (File_Length): Restore previous spec returning a Long_Integer.
3411 * s-os_lib.adb (System.CRTL): Move with clause here.
3413 2014-08-01 Vincent Celier <celier@adacore.com>
3415 * mlib-prj.adb: Update comments to remove any mention of VMS.
3417 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3419 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
3420 xgnatugn.adb and ug_words.
3422 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3424 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
3425 expansion can be avoid for Machine, Model and Rounding.
3426 (Is_Inline_Floating_Point_Attribute): Return true for Machine
3427 & Model, as well as Rounding if wrapped in a conversion to an
3429 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
3430 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
3431 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
3432 * gcc-interface/misc.c (enumerate_modes): Compute it.
3433 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
3434 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
3436 (Attribute_to_gnu) <Attr_Model>: New case.
3437 <Attr_Machine>): Likewise.
3438 (convert_with_check): Test
3439 fp_arith_may_widen variable.
3441 2014-08-01 Pascal Obry <obry@adacore.com>
3443 * adaint.h (GNAT_FOPEN): New definition for Windows.
3444 (GNAT_OPEN): Likewise.
3445 (GNAT_STAT): Likewise.
3446 (GNAT_FSTAT): Likewise.
3447 (GNAT_LSTAT): Likewise.
3448 (GNAT_STRUCT_STAT): Likewise.
3449 * adaint.c (__gnat_stat): Fix computation of file size for
3452 2014-08-01 Vincent Celier <celier@adacore.com>
3454 * Makefile.rtl: Minor comment update.
3456 2014-08-01 Vincent Celier <celier@adacore.com>
3458 * Make-generated.in: Remove dependencies for vms-help.
3460 2014-08-01 Gary Dismukes <dismukes@adacore.com>
3462 * makeutl.ads, opt.ads: Minor grammar fixes.
3463 * makeutl.adb: Minor code reorganization.
3465 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3467 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
3468 gnatsym.adb: Remove gnatsym (VMS only tool).
3470 2014-08-01 Ben Brosgol <brosgol@adacore.com>
3472 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
3473 conditionalization from gnat_ugn.texi and projects.texi, and updated
3474 (considerably simplified) xgnatugn.adb, to be removed soon.
3476 2014-08-01 Vincent Celier <celier@adacore.com>
3478 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
3479 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
3480 instead of Debug.Debug_Flag_S.
3481 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
3482 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
3484 * makeutl.ads (No_Exit_Message_Option): New constant string
3485 for switch --no-exit-message.
3486 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
3487 * switch-m.adb (Scan_Make_Switches): Recognize new switch
3490 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3492 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
3493 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
3495 2014-08-01 Javier Miranda <miranda@adacore.com>
3497 * inline.ads (Inlined_Calls, Backend_Calls,
3498 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
3499 moved to inline.adb (Cannot_Inline): Update documentation.
3500 (Check_And_Build_Body_To_Inline): Renamed.
3501 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3502 * inline.adb (Check_Inlining_Restrictions): New local variable.
3503 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
3504 Backend_Not_Inlined_Subps): Declarations moved here
3505 from inline.ads (Number_Of_Statements): Removed.
3506 (Remove_Pragmas): Avoid duplicated version of this subprogram.
3507 (Build_Body_To_Inline): Code cleanup.
3508 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
3509 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
3510 (Check_Body_To_Inline): Removed.
3511 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
3512 (Has_Excluded_Declaration): No action if not
3513 Check_Inlining_Restrictions.
3514 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
3515 (Initialize): Initialize the lists of inlined calls and subprograms.
3516 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3517 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
3518 to Check_And_Build_Body_To_Inline since it has been renamed as
3519 Check_And_Split_Unconstrained_Function
3520 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
3522 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
3524 2014-08-01 Vincent Celier <celier@adacore.com>
3526 * debug.adb: Add documentation for new debug switch -ds.
3527 * make.adb (List_Bad_Compilations): Do not issue any message
3528 when switch -ds is specified.
3529 * makeutl.adb (Fail_Program): Do not issue any message when
3531 (Finish_Program): Ditto.
3533 2014-08-01 Robert Dewar <dewar@adacore.com>
3535 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
3536 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
3537 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
3538 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
3539 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
3540 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
3541 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
3542 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
3543 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
3544 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
3545 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
3546 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
3547 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
3548 s-tratas.ads: Minor fix to copyright notices.
3550 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3552 * sinfo.ads: Remove long obsolete comment.
3553 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3555 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
3556 * sem_ch3.adb: Minor reformatting.
3558 2014-08-01 Pascal Obry <obry@adacore.com>
3560 * cstreams.c: Only enable large file support on know supported
3561 platforms. Add missing defines/includes.
3563 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3565 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
3566 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
3567 on generic units that contain constructs that forbid subtypes
3569 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
3570 Inherit flags indicating the presence of predicates in subtype
3571 declarations with and without constraints.
3572 (Inherit_Predicate_Flags): Utility for the above.
3573 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
3574 indicate that the actual cannot have predicates, and preserve
3575 warning. In an instance, report error if actual has predicates
3576 and the construct appears in a package declaration.
3577 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
3578 for an actual with predicates, if the corresponding formal
3579 carries No_Predicate_On_Actual or (in the case of a loop)
3580 No_Dynamic_Predicate_On_Actual.
3581 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
3582 Static_Predicate function if the type is non-static (in the
3583 presence of previous errors),
3584 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
3585 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
3586 generic contract on actuals that cannot have predicates.
3588 2014-08-01 Pascal Obry <obry@adacore.com>
3590 * a-direct.adb (C_Size): Returns an int64.
3591 * osint.adb (System.CRTL): New with clause.
3592 (File_Length.Internal): Returns an int64.
3593 * s-os_lib.ads (File_Length): Returns an int64.
3595 2014-08-01 Robert Dewar <dewar@adacore.com>
3597 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
3598 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
3599 osint.adb, krunch.adb: Minor reformatting.
3601 2014-08-01 Robert Dewar <dewar@adacore.com>
3603 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
3604 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
3605 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
3606 Remove VMS-specific code.
3607 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
3609 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3611 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
3612 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
3613 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
3614 mlib.ads, tempdir.adb: Remove VMS handling.
3616 2014-08-01 Pascal Obry <obry@adacore.com>
3618 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
3619 (__gnat_named_file_length): Likewise.
3620 (__gnat_file_length_attr): Likewise.
3621 * a-direct.adb (C_Size): Use size_t as returned type.
3622 * osint.adb (File_Length): Adjust spec for Internal routine
3624 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
3625 (System.CRTL): With claused moved to spec.
3626 * s-os_lib.ads (System.CRTL): With clause moved to here.
3628 2014-08-01 Pascal Obry <obry@adacore.com>
3630 * adaint.h, adaint.c (__gnat_open): Added.
3631 * s-crtl.ads (open): Import __gnat_open for large file support.
3633 2014-08-01 Robert Dewar <dewar@adacore.com>
3635 * sem_case.adb (Dup_Choice): Improve message for integer constants.
3637 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3639 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
3641 2014-08-01 Pascal Obry <obry@adacore.com>
3643 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
3644 * adaint.c (GNAT_OPEN): Uses new macro where needed.
3646 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
3648 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
3650 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
3651 * gcc-interface/gigi.h: Update comment.
3653 2014-07-31 Javier Miranda <miranda@adacore.com>
3655 * debug.adb Remove documentation of -gnatd.k (no longer needed).
3656 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
3657 * inline.ads (Backend_Inlined_Subps): New
3658 Elist. (Backend_Not_Inlined_Subps): New Elist.
3659 (Has_Excluded_Declaration): Declaration previously located in
3660 * inline.adb (Has_Excluded_Statement): Declaration previously
3661 located in inline.adb
3662 * inline.adb (Has_Single_Return): Moved out of
3663 Build_Body_To_Inline to avoid having duplicated code.
3664 (Number_Of_Statements): New subprogram.
3665 (Register_Backend_Inlined_Subprogram): New subprogram.
3666 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
3667 (Add_Inlined_Subprogram): Register backend inlined subprograms and
3668 also register subprograms that cannot be inlined by the backend.
3669 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
3670 to avoid having duplicated code. Replace occurrences of
3671 Debug_Flag_Dot_K by Back_End_Inlining.
3672 * sem_res.adb (Resolve_Call): Code cleanup.
3673 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
3674 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
3675 (List_Inlining_Info): Add listing of subprograms passed to the
3676 backend and listing of subprograms that cannot be inlined by
3678 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
3679 Debug_Flag_Dot_K by Back_End_Inlining.
3681 2014-07-31 Robert Dewar <dewar@adacore.com>
3683 * nlists.ads: Minor code fix (remove unwise Inline for
3686 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3688 * einfo.adb: Remove VMS specific code.
3689 * exp_attr.adb: Remove VAX specific code.
3690 * set_targ.adb: Remove handling of VAX_Float.
3691 * sem_vfpt.adb: Remove references to Vax_Native.
3692 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
3694 2014-07-31 Robert Dewar <dewar@adacore.com>
3696 * sem_ch4.adb: Minor reformatting.
3698 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3700 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
3701 to VMS. Misc clean ups.
3702 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
3704 2014-07-31 Robert Dewar <dewar@adacore.com>
3706 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
3707 exp_prag.adb, frontend.adb, interfac.ads,
3708 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
3709 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
3710 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
3711 snames.ads-tmpl: Remove obsolete VMS-specific code.
3713 2014-07-31 Robert Dewar <dewar@adacore.com>
3715 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
3717 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3719 * a-intnam-linux.ads: Minor: update obsolete comments.
3720 * s-taasde.adb: Minor: fix comment header.
3722 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3724 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
3725 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
3726 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
3727 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
3728 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
3729 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
3730 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
3731 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
3732 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
3733 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
3734 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
3735 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
3736 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
3737 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
3738 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
3739 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
3740 * namet.h (Is_Non_Ada_Error): Remove.
3742 2014-07-31 Robert Dewar <dewar@adacore.com>
3744 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
3747 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
3749 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
3750 which demonstrates the expansion of while loops subject to
3751 attribute 'Loop_Entry. The condition of a while loop along with
3752 related condition actions is now wrapped in a function. Instead
3753 of repeating the condition, the expansion now calls the function.
3755 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3757 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
3758 error when reporting of missing values in a case statement for
3759 a type with a static predicate.
3760 (Check_Choices): Reject a choice given by a subtype to which a
3761 Dynamic_Predicate applies.
3762 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
3763 Has_Dynamic_Predicate_Aspect flag from parent.
3765 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3767 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
3768 cannot apply to a subtype of an incomplete type.
3769 (Is_Static_Choice): Treat an Others_Clause as static. The
3770 staticness of the expression and of the range are checked
3773 2014-07-31 Pascal Obry <obry@adacore.com>
3775 * adaint.h (__gnat_ftell64): Added.
3776 (__gnat_fseek64): Added.
3778 * cstreams.c (__int64): Removed.
3780 2014-07-31 Pascal Obry <obry@adacore.com>
3782 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
3783 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
3784 (ftell64): Always returns a 64bit value.
3785 * cstreams.c (int64): New definition.
3786 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
3787 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
3788 uses ftello() on UNIX.
3789 (__gnat_fseek64): Offset is always a 64bit value. The
3790 implementation now uses fseeko() on UNIX.
3791 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
3792 always use fseek64 to set the offset.
3793 (Size): Simplify code, always use fseek64/ftell64.
3794 * s-direio.ads (Count): Now an int64.
3795 * g-socket.ads (Vector_Element): Adjust definition for Length
3796 to be a size_t. This matches the C definition and avoid using
3797 a 64bit integer on 32bit platforms now that Count is always 64bit.
3798 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
3799 (C_Recvmsg): Change some conversion to account for change in
3801 (C_Sendmsg): Likewise.
3803 2014-07-31 Robert Dewar <dewar@adacore.com>
3805 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
3806 * debug.adb: Remove documentation of -gnatdm flag.
3807 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
3810 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3812 * lib-writ.adb (Write_Unit_Information): Fix case where U =
3815 2014-07-31 Claire Dross <dross@adacore.com>
3817 * exp_util.adb, exp_util.ads
3818 (Get_First_Parent_With_External_Axiomatization_For_Entity):
3819 New routine to find the first parent of an entity with
3820 a pragma Annotate (GNATprove, External_Axiomatization).
3821 (Has_Annotate_Pragma_For_External_Axiomatization): New function
3822 to check if a package has a pragma Annotate (GNATprove,
3823 External_Axiomatization).
3824 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
3825 flag on the entity for the declaration created for a formal
3826 subprogram in an instance. This is a renaming declaration,
3827 or in GNATprove_Mode the declaration of an expression function
3828 that captures the axiomatization of the actual.
3829 * sem_ch6.adb (Analyze_Expression_Function): For a
3830 Generic_Actual_Subprogram, place body immediately after the
3831 declaration because it may be used in a subsequent declaration
3833 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
3834 the actual is a function, not an operator. Handle functions with
3835 one and two parameters and binary and unary operators.
3837 2014-07-31 Pascal Obry <obry@adacore.com>
3839 * cstreams.c (__gnat_is_regular_file_fd): Removed.
3840 * adaint.c (__gnat_is_regular_file_fd): Added.
3842 2014-07-31 Robert Dewar <dewar@adacore.com>
3844 * exp_strm.adb: Minor reformatting.
3846 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3848 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
3849 Analyze_Associations, to create a wrapper around operators that
3850 are actuals to formal subprograms. This is done in GNATProve
3851 mode in order to propagate the contracts of the operators to
3852 the body of the instance.
3854 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3856 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
3857 legal if within an aspect specification for a generic subprogram.
3859 2014-07-31 Javier Miranda <miranda@adacore.com>
3861 * gnat1drv.adb (Back_End_Inlining): Set to false if
3862 Suppress_All_Inlining is set.
3863 * debug.adb: Adding documentation for -gnatd.z.
3864 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
3865 processing to -gnatn1 for calls to Inline_Always routines.
3866 (Add_Inlined_Subprogram): Remove previous patch.
3868 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3870 * sem_ch13.adb (Check_One_Function): Apply properly the static
3871 semantic rules for indexing aspects and the functions they denote.
3873 2014-07-31 Javier Miranda <miranda@adacore.com>
3875 * debug.adb: Complete documentation of -gnatd.z.
3877 2014-07-31 Bob Duff <duff@adacore.com>
3879 * gnat_ugn.texi: Minor doc fixes.
3881 2014-07-31 Robert Dewar <dewar@adacore.com>
3883 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
3886 2014-07-31 Tristan Gingold <gingold@adacore.com>
3888 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
3889 (Packed_Bytes1): Make component aliased.
3891 2014-07-31 Robert Dewar <dewar@adacore.com>
3893 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
3895 2014-07-31 Robert Dewar <dewar@adacore.com>
3897 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
3900 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
3902 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
3903 on array references here, now done more selectively in trans.c.
3905 2014-07-31 Doug Rupp <rupp@adacore.com>
3907 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
3909 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
3911 * sem_util.adb (Is_Effectively_Volatile): New routine.
3913 2014-07-31 Fedor Rybin <frybin@adacore.com>
3915 * gnat_ugn.texi: Document --test-duration option for gnattest.
3917 2014-07-31 Javier Miranda <miranda@adacore.com>
3918 Eric Botcazou <ebotcazou@adacore.com>
3920 * opt.ads (Back_End_Inlining): New variable which controls
3921 activation of inlining by back-end expansion.
3922 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
3923 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
3924 the body to be inlined by the frontend if Back_End_Inlining
3926 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
3927 (Expand_Call): If backend inlining is enabled let the backend to
3928 handle inlined subprograms.
3929 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
3930 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
3931 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
3932 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
3934 * debug.adb Document -gnatd.z
3935 * fe.h Import Back_End_Inlining variable.
3936 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
3937 enabled then declare attribute "always inline"
3938 * gcc-interface/decl.c, gcc-interface/trans.c,
3939 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
3941 2014-07-31 Robert Dewar <dewar@adacore.com>
3943 * a-ngelfu.ads: Minor comment fix.
3945 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
3947 * freeze.adb (Freeze_Record_Type): Replace all calls to
3948 Is_SPARK_Volatile with Is_Effectively_Volatile and update
3950 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
3951 Replace all calls to Is_SPARK_Volatile with
3952 Is_Effectively_Volatile and update related comments.
3953 * sem_ch5.adb (Analyze_Iterator_Specification,
3954 Analyze_Loop_Parameter_Specification): Replace all calls to
3955 Is_SPARK_Volatile with Is_Effectively_Volatile and update
3957 * sem_ch6.adb (Process_Formals): Replace all calls to
3958 Is_SPARK_Volatile with Is_Effectively_Volatile and update
3960 * sem_ch12.adb (Instantiate_Object): Replace the call to
3961 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
3962 and update related comment.
3963 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
3964 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
3965 with Is_Effectively_Volatile and update related comments.
3966 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
3967 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
3968 update related comments.
3969 * sem_util.adb (Has_Enabled_Property,
3970 Variable_Has_Enabled_Property): Replace all calls
3971 to Is_SPARK_Volatile with Is_Effectively_Volatile and
3972 update related comments.
3973 (Is_Effectively_Volatile): New routine.
3974 (Is_Effectively_Volatile_Object): New routine.
3975 (Is_SPARK_Volatile): Removed.
3976 (Is_SPARK_Volatile_Object): Removed.
3977 * sem_util.ads (Is_Effectively_Volatile): New routine.
3978 (Is_Effectively_Volatile_Object): New routine.
3979 (Is_SPARK_Volatile): Removed.
3980 (Is_SPARK_Volatile_Object): Removed.
3982 2014-07-31 Pascal Obry <obry@adacore.com>
3984 * s-fileio.adb (Open): Make sure a shared file gets inserted into
3985 the global list atomically. This ensures that the file descriptor
3986 won't be freed because another tasks is closing the file.
3988 2014-07-31 Robert Dewar <dewar@adacore.com>
3990 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
3991 generation of _FIRST and _LAST variables even in GNATprove_Mode.
3992 * gnat_ugn.texi: Minor editing.
3993 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
3994 aggregate is marked Comes_From_Source if argument is CFS.
3996 2014-07-31 Pascal Obry <obry@adacore.com>
3998 * s-fileio.adb: Remove obsolete comment.
4000 2014-07-31 Vincent Celier <celier@adacore.com>
4002 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
4003 overriding keyword before function to avoid error when compiler
4004 is called with -gnatyO (check overriding indicators).
4006 2014-07-31 Tucker Taft <taft@adacore.com>
4008 * gnat_ugn.texi: Add a paragraph pointing the reader
4009 to the "plugins" example.
4011 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4013 * freeze.adb (Freeze_Expression): Document the
4014 purpose of the parent chain traversal.
4016 2014-07-31 Robert Dewar <dewar@adacore.com>
4018 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
4019 unconstrained fpt ops.
4021 2014-07-31 Pascal Obry <obry@adacore.com>
4023 * s-fileio.adb (Open): Make sure a shared file gets inserted into
4024 the global list atomically. This ensures that the file descriptor
4025 won't be freed because another tasks is closing the file.
4027 2014-07-31 Vincent Celier <celier@adacore.com>
4029 * projects.texi: Minor spelling error fix.
4031 2014-07-31 Robert Dewar <dewar@adacore.com>
4033 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
4034 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
4036 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
4037 * restrict.adb (Process_Restriction_Synonyms): Add handling
4038 of No_Elaboration_Code_All.
4039 * restrict.ads (Process_Restriction_Synonyms): Now handles
4040 No_Elaboration_Code_All.
4041 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
4042 No_Elaboration_Code_All.
4043 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4044 Handle setting of No_Elab_Code in unit information. Handle
4045 No_Elaboration_Code_All.
4046 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
4048 (Name_No_Elaboration_Code_All): New name for pragma processing.
4050 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4052 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4053 types with a null range and use the Esize of the component
4054 instead of its RM_Size to identify appropriate values.
4056 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4058 * freeze.adb Add with and use clause for Aspects.
4059 (Freeze_Expression): Emit an error when a volatile constant lacks
4060 Boolean aspect Import.
4061 (Has_Boolean_Aspect_Import): New routine.
4063 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4065 * exp_util.adb: Minor reformatting.
4067 2014-07-31 Vincent Celier <celier@adacore.com>
4069 * errutil.adb (Error_Msg): Make sure that all components of
4070 the error message object are initialized.
4072 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4074 * sem_ch4.adb (Try_Container_Indexing): If the container type is
4075 class-wide, use specific type to locate iteration primitives.
4076 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
4077 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
4078 Minor error message reformating.
4079 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
4080 aspect for a derived type.
4082 2014-07-31 Robert Dewar <dewar@adacore.com>
4084 * debug.adb: Document debug flag d.X.
4086 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4088 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
4089 * sem_util.adb (Find_Specific_Type): If type is untagged private,
4090 retrieve full view so that primitive operations can be located.
4091 * exp_disp.adb Move Find_Specific_Type to sem_util.
4092 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
4093 Find_Specific_Type to locate primitive equality.
4094 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
4095 type does not require initialization.
4096 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
4097 body all visibility is established, and the enclosing package
4098 declarations must not be installed.
4100 2014-07-31 Yannick Moy <moy@adacore.com>
4102 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
4103 Make subprogram public.
4105 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4107 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
4108 predicate Discriminated_Size, to distinguish between private
4109 components that depend on discriminants from those whose size
4110 depends on some other non-static expression.
4112 2014-07-31 Nicolas Setton <setton@adacore.com>
4114 * g-exptty.adb (Close): Fix binding to Waitpid: use the
4117 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4119 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
4120 in a discrete range, when 'range was probably intended.
4122 2014-07-31 Robert Dewar <dewar@adacore.com>
4124 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
4126 2014-07-31 Robert Dewar <dewar@adacore.com>
4128 * frontend.adb: Minor reformatting.
4129 * sem.adb: Minor reformatting.
4130 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
4131 identifiers on rewrite.
4132 * par.adb: Minor comment updates.
4133 * a-ngelfu.adb (Cos): Minor simplification.
4134 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
4135 and recovery for bad aspect.
4136 * exp_ch3.adb: Code clean up.
4137 * sem_util.ads: Minor comment correction.
4138 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
4139 * sem_ch3.adb: Code clean up.
4140 * binderr.ads: Minor comment correction.
4142 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4144 * exp_disp.adb (Expand_Interface_Conversion): A call whose
4145 prefix is a static conversion to an interface type that is not
4146 class-wide is not dispatching.
4148 2014-07-31 Robert Dewar <dewar@adacore.com>
4150 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
4151 s-traceb-mastop.adb: Minor reformatting.
4153 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4155 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
4156 expansion, to handle properly visibility of selected components
4159 2014-07-31 Robert Dewar <dewar@adacore.com>
4161 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
4162 * par-ch2.adb (P_Pragma): Set Inside_Depends.
4163 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
4164 Check_Unary_Plus_Or_Minus.
4165 * scans.ads (Inside_Depends): New flag.
4166 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
4167 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
4168 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4169 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
4170 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
4171 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
4172 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4174 2014-07-31 Javier Miranda <miranda@adacore.com>
4176 * s-vaflop.adb Move the body of function T_To_G before
4177 T_To_D. Required for frontend inlining.
4178 * inline.adb (Has_Excluded_Contract): New subprogram used to
4179 check if a subprogram inlined by the frontend has contracts
4180 which cannot be inlined.
4182 2014-07-31 Bob Duff <duff@adacore.com>
4184 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
4185 (Call_Chain): Add 1 to number of frames to skip, to account for
4186 the fact that there's one more frame on the stack.
4187 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
4189 2014-07-31 Robert Dewar <dewar@adacore.com>
4191 * checks.adb (Enable_Overflow_Check): More precise setting of
4192 Do_Overflow_Check flag for division.
4194 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4196 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
4197 array types with implementation type.
4199 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4201 * sem_ch10.adb (Process_State): Remove local variable Name. Add
4202 local variable Decl. Partially declare an abstract state by
4203 generating an entity and storing it in the state declaration.
4204 * sem_prag.adb (Create_Abstract_State): Fully declare a
4205 semi-declared abstract state.
4207 2014-07-31 Robert Dewar <dewar@adacore.com>
4209 * prj-nmsc.adb: Minor reformatting.
4211 2014-07-31 Bob Duff <duff@adacore.com>
4213 * s-tasdeb.adb (System.Tasking.Debug): Remove
4214 all usage of the secondary stack from this package.
4216 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4218 * freeze.adb (Freeze_Expression): Update the loop in charge
4219 of finding a proper insertion place for freeze nodes to handle
4220 N_Expression_With_Actions nodes.
4222 2014-07-31 Robert Dewar <dewar@adacore.com>
4224 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
4227 2014-07-31 Pascal Obry <obry@adacore.com>
4229 * prj-nmsc.adb: Minor reformatting.
4231 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4233 * sem_util.adb (Has_Preelaborable_Initialization): Check that
4234 type is tagged before checking whether a user-defined Initialize
4235 procedure is present.
4237 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4239 * a-ngelfu.ads (Sqrt): Augment postcondition.
4241 2014-07-31 Pascal Obry <obry@adacore.com>
4243 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
4244 directory and ALI directory must be different than all object
4245 and library directories of aggregated projects.
4247 2014-07-31 Vincent Celier <celier@adacore.com>
4249 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
4250 to package body, as it is not called from outside. Remove argument
4251 Project_Tree, no longer used. When runtime cannot be found,
4252 call Raise_Invalid_Config instead of failing the program.
4254 2014-07-31 Robert Dewar <dewar@adacore.com>
4256 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
4258 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
4261 2014-07-31 Robert Dewar <dewar@adacore.com>
4263 * gnat_ugn.texi: Document new switch -gnato0.
4264 * sem_ch3.ads: Minor reformatting.
4265 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
4266 (we do not want overflow checks when incrementing elaboration
4268 * einfo.ads: Minor reformatting.
4270 2014-07-31 Robert Dewar <dewar@adacore.com>
4272 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
4273 * s-arit64.adb: Minor reformatting.
4275 2014-07-31 Robert Dewar <dewar@adacore.com>
4277 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
4278 checking is enabled except in GNAT_Mode.
4279 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
4280 (suppress overflow checks).
4282 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4284 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
4285 invariant procedure for an internally generated subtype that is
4286 created for an object of a class-wide type.
4288 2014-07-31 Vincent Celier <celier@adacore.com>
4290 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
4292 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4294 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
4295 exp_disp.adb: Minor reformatting.
4297 2014-07-31 Robert Dewar <dewar@adacore.com>
4299 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
4300 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
4301 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
4304 2014-07-31 Robert Dewar <dewar@adacore.com>
4306 * sem_ch13.adb: Minor reformatting.
4308 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4310 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
4311 is an unchecked_union, warn that invariants will not be checked
4312 on components that have them.
4314 2014-07-31 Robert Dewar <dewar@adacore.com>
4316 * freeze.adb (Freeze_Entity): Check for error of
4317 Type_Invariant'Class applied to a untagged type.
4318 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
4319 as null body, so that we perform error checks even if expansion
4322 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4324 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
4325 is already present, nothing to do.
4326 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
4327 component, check whether the access type has an invariant before
4328 checking the designated type.
4329 (Build_Record_Invariant_Proc): Change suffix of generated
4330 name to prevent ambiguity when record type has invariants
4331 in addition to those of components, and two subprograms are
4332 constructed. Consistent with handling of array types.
4333 (Insert_Component_Invariant_Checks): Build invariant procedure
4334 body when one has not been created yet, in the case of composite
4335 types that are completions and whose full declarations carry
4338 2014-07-30 Thomas Quinot <quinot@adacore.com>
4340 * gnat_rm.texi: Minor doc fixes.
4342 2014-07-30 Robert Dewar <dewar@adacore.com>
4344 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
4346 2014-07-30 Vincent Celier <celier@adacore.com>
4348 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
4350 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
4351 message to report that a directory cannot be created, to avoid
4352 processing of the directory path that may contains special
4353 insertion characters.
4355 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4357 * a-crdlli.ads: Place declaration of Empty_List after full type
4358 declaration for Curosr, to prevent freezing error.
4360 2014-07-30 Robert Dewar <dewar@adacore.com>
4362 * get_targ.adb: Minor code reorganization.
4363 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
4366 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4368 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
4369 not Program_Error, when attempting to remove an element not in
4370 the set. This is the given semantics for all set containers.
4372 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4374 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
4375 element is not present in tree return rather than violating
4376 an assertion. Constraint_Error will be raised in the caller if
4377 element is not in the container.
4379 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4381 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
4382 (elab body): Add provision for default target config file.
4383 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
4385 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4387 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
4388 when attempting to remove an element not in the set. This is
4389 the given semantics for all set containers.
4390 * a-cborse.adb (Delete): Attempt removal first, to check for
4391 tampering, before checking whether this is an attempt to
4392 delete a non-existing element, and in fthe latter case raise
4395 2014-07-30 Vincent Celier <celier@adacore.com>
4397 * prj-proc.adb (Recursive_Process): Do not create a new
4398 Project_Id if the project is already in the list of projects of
4401 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4403 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
4404 whose type is an incomplete formal type.
4405 (Analyze_Return_Type): Reject a return type that is an untagged
4406 imcomplete formal type.
4407 (Process_Formals): Reject a formal parameter whose type is an
4408 untagged formal incomplete type.
4409 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
4410 an untagged formal incomplete type.
4412 2014-07-30 Robert Dewar <dewar@adacore.com>
4414 * gnat_ugn.texi: Minor spelling correction.
4415 * makeutl.adb: Minor code reorganization.
4416 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4418 2014-07-30 Robert Dewar <dewar@adacore.com>
4420 * einfo.ads (Has_Unchecked_Union): Document that this is used
4421 to check for illegal Valid_Scalars attribute references.
4422 * exp_attr.adb (Build_Record_VS_Func): New function
4423 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
4425 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
4426 Unchecked_Union Add note on 'Valid_Scalars generating a lot
4428 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
4429 error on attempt to apply Valid_Scalars to Unchecked_Union type.
4431 2014-07-30 Steve Baird <baird@adacore.com>
4433 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
4434 of A(I..J)(K) in CodePeer_Mode.
4436 2014-07-30 Ben Brosgol <brosgol@adacore.com>
4438 * gnat_ugn.texi: Fix typo.
4440 2014-07-30 Thomas Quinot <quinot@adacore.com>
4442 * lib-writ.ads: document format change.
4444 2014-07-30 Pascal Obry <obry@adacore.com>
4446 * prj-util.adb (For_Interface_Sources): Do not
4447 include sources from withed externally built projects.
4449 2014-07-30 Robert Dewar <dewar@adacore.com>
4451 * lib.adb: Minor reformatting.
4452 * prj-util.adb: Minor reformatting.
4454 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4456 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
4457 that depends on discriminants, and which is given by an others
4458 clause, create an explicit subtype with the discriminant values
4459 of the enclosing aggregate, because the backend cannot otherwise
4460 retrieve the actual bounds of the array.
4462 2014-07-30 Fedor Rybin <frybin@adacore.com>
4464 * gnat_ugn.texi: Improve gnattest documentation.
4466 2014-07-30 Pascal Obry <obry@adacore.com>
4468 * makeutl.adb (Insert_Project_Sources): Properly handle sources
4469 that are aggregated. We want to include sources not only part
4470 of libraries but also if part of an aggregated project from an
4472 * prj.adb (For_Project_And_Aggregated_Context): Properly check
4473 state of root project.
4475 2014-07-30 Thomas Quinot <quinot@adacore.com>
4477 * lib-load.ads: Minor reformatting.
4478 * sinfo.ads (Library_Unit): Update comment.
4479 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
4480 is redundant. Instead used the pragma Node_Id directly as the
4483 2014-07-30 Thomas Quinot <quinot@adacore.com>
4485 * lib.adb (Store_Note): Store only notes that do not come from
4486 an instance, and that are in the extended main source unit.
4487 * lib-writ (Write_Unit_Information): Annotations from subunits
4488 must be emitted along with those for the main unit, and they
4489 must carry a specific file name.
4490 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
4491 Unit_Id for the source file containing the pragma, as in the
4492 case of annotations from subunits we might not have a readily
4494 * ali.adb (Scan_ALI): Account for above change in data structure.
4496 2014-07-30 Vincent Celier <celier@adacore.com>
4498 * makeutl.adb (Insert_Project_Sources): When the library project
4499 is an aggregate Stand-Alone Library, insert in the queue the
4500 Ada interface units, with Closure set to True;
4502 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4504 * sem_util.adb: Fix minor typo.
4505 * makeutl.adb: Minor reformatting.
4507 2014-07-30 Robert Dewar <dewar@adacore.com>
4509 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
4511 2014-07-30 Yannick Moy <moy@adacore.com>
4513 * checks.ads: Fix typo in comment.
4515 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
4517 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
4518 entities that materialize range bounds, if any.
4520 2014-07-30 Vincent Celier <celier@adacore.com>
4522 * projects.texi: Minor spelling fix.
4524 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4526 * checks.adb (Make_Bignum_Block): Use the new secondary stack
4527 build routines to manage the mark.
4528 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
4529 Use the new secodary stack build routines to manage the mark.
4530 (Insert_Actions_In_Scope_Around): Add new formal parameter
4531 Manage_SS along with comment on its usage. Code and comment
4532 reformatting. Mark and release the secondary stack when the
4533 context warrants it.
4534 (Make_Transient_Block): Update the call
4535 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
4536 (Wrap_Transient_Declaration): Remove local variable
4537 Uses_SS. Ensure that the secondary stack is marked and released
4538 when the related object declaration appears in a library level
4539 package or package body. Code and comment reformatting.
4540 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
4541 (Build_SS_Release_Call): New routine.
4543 2014-07-30 Steve Baird <baird@adacore.com>
4545 * exp_attr.adb: Revert previous change, not needed after all.
4547 2014-07-30 Vincent Celier <celier@adacore.com>
4549 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
4550 Closure => True for interfaces of Stand-Alone Libraries.
4551 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
4552 Boolean component Closure, defaulted to False.
4554 2014-07-30 Yannick Moy <moy@adacore.com>
4556 * sem_res.adb: Fix typo in error message.
4558 2014-07-30 Robert Dewar <dewar@adacore.com>
4560 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
4561 as name suffixes rather than L/H for subtype bounds.
4562 * tbuild.ads: Minor comment improvements and fixes
4563 (Make_External_Name): Document that suffix can start with an
4566 2014-07-30 Bob Duff <duff@adacore.com>
4568 * gnat_ugn.texi: Document --rep-clauses switch.
4570 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4572 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
4573 Default_Component_Value can only be specified for scalar type or
4574 arrays of scalar types respectively. This legality check must
4575 be performed at the point the aspect is analyzed, in order to
4576 reject aspect specifications that apply to a partial view.
4578 2014-07-30 Thomas Quinot <quinot@adacore.com>
4580 * freeze.adb: Minor reformatting.
4582 2014-07-30 Robert Dewar <dewar@adacore.com>
4584 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
4587 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4589 * freeze.adb (Check_Expression_Function): At the freeze point
4590 of an expression function, verify that the expression in the
4591 function does not contain references to any deferred constants
4592 that have no completion yet.
4593 (Freeze_Expression, Freeze_Before): call
4594 Check_Expression_Function.
4595 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
4596 * a-ciorse.adb: Add Adjust and Finalize routines for
4597 Reference_Control_Type. Use it in the construction of Reference
4598 and Constant_Reference values.
4600 2014-07-30 Robert Dewar <dewar@adacore.com>
4602 * exp_aggr.adb: Update comments.
4603 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
4606 2014-07-30 Robert Dewar <dewar@adacore.com>
4608 * cstand.adb (New_Standard_Entity): New version takes name
4609 string to call Make_Name.
4610 (Create_Standard): Use this routine to set name before setting other
4613 2014-07-30 Robert Dewar <dewar@adacore.com>
4615 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
4617 (Expand_Attribute, case Last): Ditto.
4618 * exp_ch3.adb (Constrain_Index): New calling sequence for
4619 Process_Range_Expr_In_Decl.
4620 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
4622 * sem_ch3.adb (Constrain_Index): New calling sequence for
4623 Process_Range_Expr_In_Decl.
4624 (Set_Scalar_Range_For_Subtype): ditto.
4625 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
4627 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
4628 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
4629 types if we are not assuming no invalid values.
4631 2014-07-30 Robert Dewar <dewar@adacore.com>
4633 * clean.adb: Minor reformatting.
4634 * opt.ads: Minor fix to incorrect comment.
4636 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4638 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
4639 subprogram, used by bounded hashed sets, to delete a node at
4640 a given index, whose element may have been improperly updated
4641 through a Reference_Preserving key.
4642 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
4643 * a-cbhase.adb: Add Adjust and Finalize routines for
4644 Reference_Control_Type.
4645 (Delete, Insert): Raise Program_Error, not Constraint_Error,
4646 when operation is illegal.
4647 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
4648 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
4649 private with_clause for Ada.Finalization.
4650 * a-cbmutr.adb: Add Adjust and Finalize routines for
4651 Reference_Control_Type. Use it in the construction of Reference
4652 and Constant_Reference values.
4654 2014-07-30 Robert Dewar <dewar@adacore.com>
4656 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
4658 2014-07-30 Pascal Obry <obry@adacore.com>
4660 * clean.adb (Clean_Project): Properly check for directory
4661 existence before trying to enter it.
4663 2014-07-30 Robert Dewar <dewar@adacore.com>
4665 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
4667 2014-07-30 Robert Dewar <dewar@adacore.com>
4669 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
4670 missing semicolon after name.
4672 2014-07-30 Pascal Obry <obry@adacore.com>
4674 * prj.ads (Gprinstall_Flags): New constant.
4675 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
4676 missing library dir if Directories_Must_Exist_In_Projects
4679 2014-07-30 Bob Duff <duff@adacore.com>
4681 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
4682 * s-traceb.ads: Updagte comments.
4684 2014-07-30 Robert Dewar <dewar@adacore.com>
4686 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
4687 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
4688 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
4691 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4693 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
4694 subprogram, used by all versions of hashed sets, to delete a node
4695 whose element has been improperly updated through a Reference_
4697 * a-cohase.adb: Remove Delete_Node, use new common procedure
4698 Delete_Node_At_Index.
4699 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
4700 * a-cihase.adb: Add Adjust and Finalize routines for
4701 Reference_Control_Type.
4702 (Reference_Preserving_Key): Build aggregate for
4703 Reference_Control_Type
4705 2014-07-30 Yannick Moy <moy@adacore.com>
4707 * checks.adb, checks.ads (Determine_Range_R): New procedure to
4708 determine the possible range of a floating-point expression.
4710 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4712 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
4713 * a-cborse.adb: Add Adjust and Finalize routines for
4714 Reference_Control_Type.
4715 (Reference_Preserving_Key): Build aggregate for
4716 Reference_Control_Type.
4717 (Delete): Check for tampering, and raise Program_Error (not
4718 Constraint_Error) when attempting to delete an element not in
4722 2014-07-30 Bob Duff <duff@adacore.com>
4724 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
4725 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
4726 Exception_Information is used to produce useful debugging
4727 information for the programmer. However, it was also used to
4728 implement the stream attributes for type Exception_Occurrence. The
4729 latter requires a stable and portable interface, which meant
4730 that we couldn't include a symbolic traceback. A separate set of
4731 routines was used to provide symbolic tracebacks under program
4732 control (i.e. not automatically). The goal of this ticket is
4733 to provide such automatic tracebacks, so the change here is to
4734 split the two functionalities: Exception_Information gives the
4735 maximally useful information for debugging (i.e. it now includes
4736 a symbolic traceback when a decorator is set, and it can be
4737 improved freely in the future without disturbing streaming).
4738 Untailored_Exception_Information always uses hexadecimal addresses
4739 in the traceback, has a stable and portable output, and is now
4742 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4744 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
4745 on the target of the assignment to find out whether it
4746 can be directly done by the back-end.
4747 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
4749 2014-07-30 Robert Dewar <dewar@adacore.com>
4751 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
4752 a-tasatt.adb: Minor reformatting.
4754 2014-07-30 Robert Dewar <dewar@adacore.com>
4756 * exp_ch4.adb: Minor reformatting.
4758 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4760 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
4761 Reference_Control_Type to generic package, to keep additional
4762 information for Reference_Types that manipulate keys. Add Adjust and
4763 Finalize procedures for this type.
4764 (Finalize): When finalizing a reference_preserving_key, verify
4765 that the key of the new value is equivalent to the key of the
4766 original element, raise Program_Error otherwise.
4767 (Insert): Detect tampering.
4768 (Reference_Preserving_Key): Build proper Reference_Control_Type,
4769 and update Busy and Lock bits to detect tampering.
4770 * a-cohase.ads: Keep with-clause private.
4772 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4774 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
4775 of an equality are of an Unchecked_Union type and lack inferable
4778 2014-07-30 Bob Duff <duff@adacore.com>
4780 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
4781 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
4782 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
4783 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
4784 we can call them from the runtimes. Leave renamings in place under GNAT.
4786 2014-07-30 Yannick Moy <moy@adacore.com>
4788 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
4789 inlining in GNATprove mode.
4791 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4793 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
4794 Reference_Control_Type to generic package, to keep additional
4795 information for Reference_Types that manipulate keys. Add Adjust and
4796 Finalize procedures for this type.
4797 (Delete_Node): New procedure called when finalizing a
4798 Reference_Control_Type, to remove a node whose element has been
4799 improperly updated through a Reference.
4800 (Insert): Detect tampering.
4801 (Reference_Preserving_Key): Build proper Reference_Control_Type,
4802 and update Busy and Lock bits to detect tampering.
4804 2014-07-30 Bob Duff <duff@adacore.com>
4806 * exp_intr.ads: Minor comment fix.
4808 2014-07-30 Gary Dismukes <dismukes@adacore.com>
4810 * exp_prag.adb, a-tags.ads: Minor typo fixes.
4812 2014-07-30 Bob Duff <duff@adacore.com>
4814 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
4815 a-except.ads, g-traceb.adb, memtrack.adb,
4816 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
4817 Cleanup: Make the three versions of System.Traceback.Call_Chain
4818 have the same interface. Use an array for the Traceback parameter
4819 instead of an Address. This will enable reduction in code
4822 2014-07-30 Pat Rogers <rogers@adacore.com>
4824 * gnat_ugn.texi: Corrected minor textual error in description
4827 2014-07-30 Bob Duff <duff@adacore.com>
4829 * Makefile.rtl: Sort file names.
4831 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4833 * a-tasatt.adb: Complete previous change: kill spurious warning
4834 on e.g. sparc, and make sure we only use the fast path when the
4835 alignment is compatible.
4837 2014-07-30 Yannick Moy <moy@adacore.com>
4839 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
4842 2014-07-30 Yannick Moy <moy@adacore.com>
4844 * inline.adb (Build_Body_To_Inline): Issue more precise messages
4845 for declarations that prevent inlining.
4846 (Cannot_Inline): Change usual start of message to refer to contextual
4847 analysis in GNATprove mode.
4848 * sem_res.adb (Resolve_Call): Change usual start of message to
4849 refer to contextual analysis in GNATprove mode, when inlining
4852 2014-07-30 Robert Dewar <dewar@adacore.com>
4854 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
4855 * inline.adb: Minor reformatting.
4857 2014-07-30 Javier Miranda <miranda@adacore.com>
4859 * a-tags.ads: Add comments.
4861 2014-07-30 Pat Rogers <rogers@adacore.com>
4863 * gnat_rm.texi: Minor word error.
4865 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4867 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
4868 created to capture the value of the prefix of 'Old at the
4869 beginning of the current declarative part, to prevent data flow
4870 anomalies in the postcondition procedure that will follow.
4872 2014-07-30 Yannick Moy <moy@adacore.com>
4874 * debug.adb: Retire debug flag -gnatdQ.
4875 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
4876 on decl, not on body. Ignore predicate functions.
4877 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
4878 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
4879 body when generating a decl for a body on which SPARK_Mode aspect
4881 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
4882 attaching pragma to entity, to account for declaration not coming
4884 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
4885 as not always inlined in GNATprove mode, when called in an
4888 2014-07-30 Vincent Celier <celier@adacore.com>
4890 * debug.adb: Minor comment update.
4892 2014-07-30 Robert Dewar <dewar@adacore.com>
4894 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
4895 * sprint.adb (Sprint_Node): Handle N_Contract case.
4896 * exp_prag.adb: Minor reformatting.
4897 * freeze.adb (Freeze_Entity): Check useless postcondition for
4898 No_Return subprogram.
4899 * sem_prag.adb: Minor reformatting.
4901 2014-07-30 Javier Miranda <miranda@adacore.com>
4903 * a-tags.ads: Complete comments about performance.
4905 2014-07-30 Fedor Rybin <frybin@adacore.com>
4907 * gnat_ugn.texi: Adding description for --exit-status option to
4908 gnattest section. Fixing index entry of --passed-tests option
4909 in gnattest section.
4911 2014-07-30 Javier Miranda <miranda@adacore.com>
4913 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
4914 rtsfind.ads: Remove references to package Interfaces.CPP since this
4915 package is no longer needed.
4917 2014-07-30 Bob Duff <duff@adacore.com>
4919 * s-taasde.adb (Timer_Queue): Don't use a
4920 build-in-place function call to initialize the Timer_Queue.
4921 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
4922 Turn off polling in these units, because otherwise we get
4923 elaboration circularities with Ada.Exceptions when the -gnatP
4925 * s-tassta.adb (Create_Task): Make sure independent tasks
4926 are created with Parent = Environment_Task. This was not true,
4927 for example, in s-interr.adb, when Interrupt_Manager does "new
4928 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
4929 which is wrong because the master is determined by the access
4930 type, which is at library level.
4931 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
4932 now set correctly by Create_Task.
4933 (Make_Passive): Remove the workaround for the race condition in
4935 * frontend.adb (Frontend): Revert to previous method of detecting
4936 temporary configuration pragma files, recognizing such files by
4937 ".tmp" in the name. This is more general than detecting pragmas
4938 Source_File_Name_Project, because it allows any tool to use
4939 this naming convention, no matter the content of the file.
4940 * gnat_ugn.texi: Document this naming convention.
4942 2014-07-30 Robert Dewar <dewar@adacore.com>
4944 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
4945 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
4946 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
4947 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
4948 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
4951 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4953 * sem_ch5.adb: Improve error recovery.
4954 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
4955 before analyzing the body, so that in GNATprove mode there is
4956 no light expansion. Whatever expansion is required by SPARK will
4957 be performed when analysing the inlined code.
4959 2014-07-30 Bob Duff <duff@adacore.com>
4961 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
4963 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4965 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
4966 verify that it is not hidden by an inner implicit declaration.
4968 2014-07-30 Thomas Quinot <quinot@adacore.com>
4970 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
4971 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
4972 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
4973 the call returns an unconstrained type: in this case there is
4974 already a transient scope, and we should not establish a new one.
4975 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
4976 True, also insert cleanup actions in the tree.
4977 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
4978 with Clean set True.
4980 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4982 * s-taskin.ads (Direct_Index, Direct_Index_Range,
4983 Direct_Attribute_Element, Direct_Attribute_Array,
4984 Direct_Index_Vector, Direct_Attributes, Is_Defined,
4985 Indirect_Attributes): Removed. (Atomic_Address,
4986 Attribute_Array, Attributes): New.
4987 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
4988 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
4989 (Finalize_Attributes): Reimplement.
4990 * s-tassta.adb (Create_Task): Remove call to
4991 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
4992 Replace Finalize_Attributes_Link by Finalize_Attributes.
4993 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
4994 Reimplement from scratch, using a simpler and more efficient
4996 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
4997 * s-parame.ads, s-parame-hpux.ads,
4998 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
4999 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
5000 Default_Attribute_Count.
5002 2014-07-30 Olivier Hainque <hainque@adacore.com>
5004 * vxworks-ppc-link.spec: New file. Extra link
5005 instructions for ppc-vxworks.
5006 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
5007 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
5008 * system-vxworks-arm.ads: Likewise.
5009 * gcc-interface/Makefile.in: Enable .spec files.
5011 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5013 * sem_aggr.adb: Minor comment reformatting.
5015 2014-07-30 Robert Dewar <dewar@adacore.com>
5017 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
5018 * sem_warn.adb (Has_Junk_Name): New function
5019 (Check_References): Use Has_Junk_Name to delete junk warnings
5020 (Check_Unset_Reference): ditto.
5021 (Warn_On_Unreferenced_Entity): ditto.
5022 (Warn_On_Useless_Assignment): ditto.
5024 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5026 * checks.adb (Insert_Valid_Check): Do not check for the packed
5027 array type of a prefix that is an access type.
5029 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5031 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
5032 Unconstrained_Array even if prefix is not frozen yet, as can
5033 occur with a private subtype used as a generic actual.
5035 2014-07-30 Gary Dismukes <dismukes@adacore.com>
5037 * sem_attr.adb: Minor reformatting.
5039 2014-07-30 Pat Rogers <rogers@adacore.com>
5041 * gnat_rm.texi: Corrected minor wording error in description
5042 of No_Exception_Registration.
5044 2014-07-30 Yannick Moy <moy@adacore.com>
5046 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
5047 mode. Realphabetize two subprograms.
5048 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
5049 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
5050 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
5052 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
5053 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
5054 Is_Inline in GNATprove mode.
5055 (Analyze_Subprogram_Specification):
5056 Set Is_Inlined_Always at subprogram entity creation.
5057 * sem_res.adb (Resolve_Call): Do not deal with inlining during
5058 pre-analysis. Issue warning on call to possibly inlined
5059 subprogram when body not seen.
5061 2014-07-30 Yannick Moy <moy@adacore.com>
5063 * lib-xref.adb (Generate_Reference): Add special
5064 case for compiler-generated formals in GNATprove mode.
5066 2014-07-30 Yannick Moy <moy@adacore.com>
5068 * sem_ch6.adb: Add comments.
5070 2014-07-30 Thomas Quinot <quinot@adacore.com>
5072 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
5074 2014-07-30 Robert Dewar <dewar@adacore.com>
5076 * sem_aggr.adb, sem_res.adb: Minor reformatting.
5078 2014-07-30 Thomas Quinot <quinot@adacore.com>
5080 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5081 Bit_Order): Set Reverse_Bit_Order on the base type of the
5082 specified first subtype.
5084 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5086 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
5087 to capture the value of actuals of a limited type rather than
5088 an object declaration, to prevent spurious errors when analyzing
5091 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5093 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
5094 as an instance, and inhibit semantic checks on already analyzed
5095 code to prevent spurious errors.
5097 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5099 * a-exctra.ads ("="): New function, to restore compatibility.
5101 2014-07-30 Pascal Obry <obry@adacore.com>
5103 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
5104 routine to use the OS dst setting.
5106 2014-07-30 Pat Rogers <rogers@adacore.com>
5108 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
5110 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5112 * sem_util.adb (Wrong_Type): Disable some checks equally within
5113 instances and within inlined bodies, to suppress spurious type
5114 errors on already analyzed code.
5115 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
5116 is legal in an inlined body, juts as it is in an instance body.
5118 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5120 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
5121 body the operand of an unchecked conversion may be a literal, in
5122 which case its type is the target type of the conversion. This
5123 is in contrast to conversions in other contexts, where the
5124 operand cannot be a literal and must be resolvable independent
5127 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
5129 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
5130 mere scalar constant instead of a reference for a renaming of
5132 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
5133 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
5135 2014-07-30 Robert Dewar <dewar@adacore.com>
5137 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
5138 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
5139 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
5140 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
5141 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
5142 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
5143 & code reorganization.
5145 2014-07-30 Bob Duff <duff@adacore.com>
5147 * s-tassta.adb, sem_util.ads: Minor reformatting.
5149 2014-07-30 Yannick Moy <moy@adacore.com>
5151 * inline.adb (Build_Body_To_Inline): Detect when
5152 subprogram has multiple returns, or not a single last return
5153 statement, in GNATprove mode.
5154 (Cannot_Inline): Simplify logic to handle case of GNATprove
5157 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5159 * sem_ch6.adb: Stubs are not subject to inlining.
5161 2014-07-30 Bob Duff <duff@adacore.com>
5163 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
5164 from a procedure to a function, so that it can more easily be
5165 called before the "begin" of a task.
5166 * s-taasde.ads (Delay_Block): Make this type immutably limited,
5167 so we can use a build-in-place function call to initialize
5168 Timer_Queue in the body.
5169 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
5170 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
5171 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
5172 Make_Independent before reaching its "begin", to avoid race
5173 conditions. This causes the activating task to wait until after
5174 Make_Independent is complete before proceeding. In addition,
5175 we initialize data structures used by independent tasks before
5176 activating those tasks, to avoid possible use of uninitialized data.
5177 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
5178 Minor comment fixes.
5180 2014-07-30 Bob Duff <duff@adacore.com>
5182 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
5183 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
5184 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
5185 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
5186 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
5188 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5190 * a-tasatt.adb: Remove old comments.
5192 2014-07-30 Yannick Moy <moy@adacore.com>
5194 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
5195 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
5196 to explain rationale for inlining or not in GNATprove mode.
5197 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
5198 to False when inlining is not possible.
5199 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
5200 flag to indicate that subprogram is fully inlined. To be reversed
5201 if inlining problem is found.
5202 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
5203 call in potentially unevaluated context.
5205 2014-07-30 Jose Ruiz <ruiz@adacore.com>
5207 * s-tarest.adb, s-tarest.ads: Fix comments.
5209 2014-07-30 Robert Dewar <dewar@adacore.com>
5211 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
5212 Change No_Scalar_Parts predicate to Scalar_Part_Present and
5213 invert sense of test. This avoids the "not No_xxx" situation
5214 which is always ugly.
5216 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5218 * inline.adb (Expand_Inlined_Call): When generating code for
5219 an internal subprogram the expansion uses the location of the
5220 call, so that gdb can skip over it. In GNATprove mode we want to
5221 preserve slocs of original subprogram when expanding an inlined
5222 call, to obtain better warnings, even though subprogram appears
5223 not to come from source if it is the inlining of a subprogram
5224 body without a previous spec.
5226 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5228 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5229 types with atomic components.
5231 2014-07-30 Thomas Quinot <quinot@adacore.com>
5233 * Make-generated.in: Remove now unnecessary targets after s-oscons
5236 2014-07-30 Yannick Moy <moy@adacore.com>
5238 * sem_res.adb (Resolve_Call): Use ultimate alias
5239 of callee when available.
5241 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5243 * sem_ch6.adb (Analyze_Expression_Function): To check whether
5244 an expression function is a completion, use the specification of
5245 the previous declaration, not its entity, which may be internally
5246 generated in an inlined context.
5248 2014-07-30 Doug Rupp <rupp@adacore.com>
5250 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
5251 temp files in /cache directory unless overridden by TMPDIR.
5253 2014-07-30 Jose Ruiz <ruiz@adacore.com>
5255 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
5256 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
5257 type CPU, so it can never be greater than CPU_Range'Last.
5259 2014-07-30 Bob Duff <duff@adacore.com>
5261 * s-taskin.ads: Minor comment fix.
5263 2014-07-30 Thomas Quinot <quinot@adacore.com>
5265 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
5268 2014-07-30 Yannick Moy <moy@adacore.com>
5270 * debug.adb: Free debug flag dQ used for frontend inlining in
5272 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
5275 2014-07-30 Thomas Quinot <quinot@adacore.com>
5277 * Make-generated.in: Remove generation of s-oscons.ads, only
5278 generate the xoscons utility, in runtime-agnostic rules.
5279 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
5280 no longer supported.
5282 2014-07-30 Bob Duff <duff@adacore.com>
5284 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
5285 parameter Chain to be used in the allocator case.
5286 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
5287 has tasks, wrap the code in a block that will activate them,
5288 including the usual finalization code to kill them off in case
5289 of exception or abort.
5291 2014-07-30 Robert Dewar <dewar@adacore.com>
5293 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
5294 Remove renamings (don't work for gdb).
5295 (par): New synonym for p (avoid gdb ambiguities).
5296 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
5298 2014-07-30 Bob Duff <duff@adacore.com>
5300 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
5302 * treepr.ads, treepr.adb (ppp): Make this debugging routine
5303 accept any type covered by Union_Id.
5305 2014-07-30 Robert Dewar <dewar@adacore.com>
5307 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
5309 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
5312 2014-07-30 Robert Dewar <dewar@adacore.com>
5314 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
5315 of predicate aspect on entity other than a type.
5317 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5319 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
5320 when a subprogram body without a previous spec cannot be inlined
5321 in GNATprove mode, because it includes aspects or pragmas that
5322 generate a SPARK contract clause.
5323 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
5324 instance cannot be inlined.
5326 2014-07-30 Robert Dewar <dewar@adacore.com>
5328 * debug.adb: Document that d7 suppresses compilation time output.
5329 * errout.adb (Write_Header): Include compilation time in
5331 * exp_intr.adb (Expand_Intrinsic_Call): Add
5332 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
5333 Compilation_Date/Compilation_Time.
5334 * g-souinf.ads (Compilation_Date): New function
5335 (Compilation_Time): New function.
5336 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
5337 * gnat_rm.texi (Compilation_Date): New function
5338 (Compilation_Time): New function.
5339 * opt.ads (Compilation_Time): New variable.
5340 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
5341 * sem_intr.adb (Compilation_Date): New function.
5342 (Compilation_Time): New function.
5343 * snames.ads-tmpl (Name_Compilation_Date): New entry.
5344 (Name_Compilation_Time): New entry.
5346 2014-07-30 Yannick Moy <moy@adacore.com>
5348 * inline.adb: Add comment.
5350 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5352 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
5353 parameterless attribute, and a postondition can mention an
5354 indexed component or a slice whose prefix is an attribute
5357 2014-07-30 Robert Dewar <dewar@adacore.com>
5359 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
5360 Avoid bomb when printing package Standard.
5362 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5364 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
5365 entity is created at this point, ensure that the name of the
5366 flag is unique, because the subprogram may be overloaded and
5367 other homonyms may also have elaboration flags created on the fly.
5369 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5371 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
5372 (Analyze_Attribute): Major cleanup of attribute
5373 'Update. The logic is now split into two distinct routines
5374 depending on the type of the prefix. The use of <> is now illegal
5375 in attribute 'Update.
5376 (Analyze_Record_Component_Update): New routine.
5377 (Check_Component_Reference): Removed.
5378 (Resolve_Attribute): Remove the return statement and ??? comment
5379 following the processing for attribute 'Update. As a result,
5380 the attribute now freezes its prefix.
5382 2014-07-30 Javier Miranda <miranda@adacore.com>
5384 * exp_ch4.adb (Apply_Accessibility_Check): Do
5385 not call Base_Address() in VM targets.
5387 2014-07-30 Yannick Moy <moy@adacore.com>
5389 * gnat1drv.adb (Adjust_Global_Switches): Set
5390 Ineffective_Inline_Warnings to True in GNATprove mode.
5391 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
5393 * opt.ads (Ineffective_Inline_Warnings): Add comment that
5394 describes use in GNATprove mode.
5395 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
5396 pragma when applied to the special body created for inlining.
5398 2014-07-30 Robert Dewar <dewar@adacore.com>
5400 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
5403 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5405 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
5406 not delayed. Update the delay status of most SPARK 2014 aspects.
5407 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
5408 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
5409 to Decorate and Insert_Pragma. Add various comments concerning
5410 the delay status of several SPARK 2014 aspects. The insertion
5411 of Refined_State now uses routine Insert_After_SPARK_Mode.
5412 (Decorate): New routine.
5413 (Decorate_Aspect_And_Pragma): Removed.
5414 (Insert_Delayed_Pragma): Removed.
5415 (Insert_Pragma): New routine.
5417 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5419 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
5420 only a warning, not an error on an attempt to inline a recursive
5423 2014-07-30 Robert Dewar <dewar@adacore.com>
5425 * g-forstr.adb: Minor code reorganization (use J rather than I
5426 as a variable name).
5427 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
5428 g-forstr.ads: Minor reformatting.
5430 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5432 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
5433 we are debugging the generated code.
5435 2014-07-30 Yannick Moy <moy@adacore.com>
5437 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
5438 returns True for source pointer for an inlined body.
5440 2014-07-30 Javier Miranda <miranda@adacore.com>
5442 * exp_ch4.adb (Apply_Accessibility_Check): Add
5443 missing calls to Base_Address().
5445 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5447 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
5448 mode, subprogram bodies without a previous declaration are also
5449 candidates for front-end inlining.
5451 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5453 * aspects.ads Aspects Async_Readers, Async_Writers,
5454 Effective_Reads and Effective_Writes do not need to be delayed.
5455 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
5456 optional Boolean expression when generating the corresponding
5457 pragma for an external property aspect.
5458 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
5459 local constant Obj. Add local constant Obj_Id. Reimplement the
5460 check which ensures that the related variable is in fact volatile.
5461 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
5462 * sem_util.adb (Is_Enabled): New routine.
5463 (Variable_Has_Enabled_Property): Reimplement the detection of
5464 an enabled external property.
5466 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
5468 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
5471 2014-07-30 Pascal Obry <obry@adacore.com>
5473 * g-forstr.adb, g-forstr.ads: New.
5474 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
5475 GNAT.Formatted_String.
5477 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5479 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
5480 (Expand_Array_Aggregate): Also enable in-place expansion for
5481 code generated by the compiler. For an object declaration,
5482 set the kind of the object in addition to its type. If an
5483 in-place assignment is to be generated and it can be directly
5484 done by the back-end, do not expand the aggregate.
5485 * fe.h (Is_Others_Aggregate): Declare.
5486 * gcc-interface/trans.c
5487 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
5488 aggregate with a single Others choice on the RHS by means of
5489 __builtin_memset. Tidy up.
5491 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5493 * gnat_rm.texi: minor reformatting.
5495 2014-07-30 Yannick Moy <moy@adacore.com>
5497 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
5500 2014-07-30 Robert Dewar <dewar@adacore.com>
5502 * gnat_rm.texi: Document additional implementation-defined use
5505 2014-07-30 Robert Dewar <dewar@adacore.com>
5507 * prj-proc.adb, prj-strt.adb: Update comments.
5509 2014-07-30 Gary Dismukes <dismukes@adacore.com>
5511 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
5513 2014-07-30 Vincent Celier <celier@adacore.com>
5515 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
5516 parameter No_Extending, defaulted to False. When No_Extending
5517 is True, do not look for an extending project.
5518 (Expression): For a variable reference that is not for the current
5519 project, get its Id calling Imported_Or_Extended_Project_From
5520 with No_Extending set to True.
5521 * prj-strt.adb (Parse_Variable_Reference): If a referenced
5522 variable is not found in the current project, check if it is
5523 defined in one of the projects it extends.
5525 2014-07-30 Robert Dewar <dewar@adacore.com>
5527 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
5528 some additional cases of internally generated routines.
5530 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5532 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
5533 if the compilation unit is a subunit, extend optional processing
5534 to all subunits of the current one. This allows gnatstub to
5535 supress generation of spurious bodies.
5537 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5539 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
5540 track of the initial element's index within the tree.
5542 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5544 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
5545 (Insert_Child): Add local variable First. Capture the index of the
5546 first node being created to ensure correct cursor construction
5547 later on. Use the three parameter version of Allocate_Node
5548 when creating multiple children as this method allows aspect
5549 Default_Value to take effect (if applicable).
5551 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
5553 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
5554 (Expand_Array_Aggregate): For a safe slice assignment, just set
5555 the target and use the common code path.
5557 2014-07-29 Robert Dewar <dewar@adacore.com>
5559 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
5560 predicate No_Predicate_Test_On_Arguments, new name is
5561 Predicate_Tests_On_Arguments (with the opposite sense).
5563 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5565 * sem_attr.adb (Resolve_Attribute): Clean up the code for
5566 attribute 'Access. Do not generate an elaboration flag for a
5567 stand alone expression function. The expression of an expression
5568 function is now frozen when the expression function appears as
5569 the prefix of attribute 'Access.
5570 * sem_ch6.adb (Analyze_Expression_Function): Remove local
5571 variable New_Decl and update all references to it after the
5572 rewriting has taken place. Establish the linkages between the
5573 generated spec and body.
5575 2014-07-29 Robert Dewar <dewar@adacore.com>
5577 * sem_prag.adb (ip, rv): Prevent from being optimized away.
5578 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
5579 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
5582 2014-07-29 Vincent Celier <celier@adacore.com>
5584 * prj-pp.adb: Minor comment update.
5585 * frontend.adb: If a target dependency info file has been read
5586 through switch -gnateT= add it to the dependencies of the source
5589 2014-07-29 Robert Dewar <dewar@adacore.com>
5591 * sem_ch3.adb, prj.adb: Minor reformatting.
5593 2014-07-29 Vincent Celier <celier@adacore.com>
5595 * prj-pp.adb (Pretty_Print.Output_Project_File): New
5596 procedure to output project file names between quotes without
5597 concatenation, even if the line is too long.
5598 (Pretty_Print): Use Output_Project_File for project being extended and
5601 2014-07-29 Vincent Celier <celier@adacore.com>
5603 * gnat_ugn.texi: Document that configuration pragmas files are
5604 added to the dependencies, unless they contain only pragmas
5605 Source_File_Name_Project.
5607 2014-07-29 Robert Dewar <dewar@adacore.com>
5609 * frontend.adb: Minor reformatting.
5611 2014-07-29 Robert Dewar <dewar@adacore.com>
5613 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
5614 (Expand_Actuals): Make sure predicate checks are properly applied
5615 for the case of OUT or IN OUT parameters.
5616 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
5617 predicate tests on arguments for Finalize
5618 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
5619 if predicate tests on subprogram arguments should be skipped.
5620 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
5622 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5624 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
5625 clause for the object and the expression is an aggregate, defer
5626 resolution and expansion of the aggregate until the freeze point
5628 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
5629 the parent node is an N_Reference generated during expansion.
5631 2014-07-29 Vincent Celier <celier@adacore.com>
5633 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
5635 2014-07-29 Robert Dewar <dewar@adacore.com>
5637 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
5638 prepcomp.ads: Minor reformatting and code clean up.
5639 * exp_ch6.adb (Expand_Actuals): Generate predicate test
5640 unconditionally for case of OUT or IN OUT actual (before this
5641 was generated only for certain subcases, which is wrong, the
5642 test is always needed).
5644 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5646 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
5647 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
5648 until context type is available.
5649 * sem_res.adb (Resolve_Allocator): In the case of a qualified
5650 expression, complete resolution of expression.
5651 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
5652 to apply Ada2012 checks on aliased formals, as well as
5653 accesibility checks when the context of the call is an allocator
5654 or a qualified expression.
5655 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
5656 Moved here from sem_ch3.
5657 (Object_Access_Level): Handle properly aliased formals and
5659 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
5660 now properly performed in sem_res (Resolve_Actuals,
5661 Check_Aliased_Parameter).
5663 2014-07-29 Yannick Moy <moy@adacore.com>
5665 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
5666 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
5667 function to decide when a subprogram can be inlined in GNATprove mode.
5668 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
5669 condition for possible inlining.
5670 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
5671 for Inline_Always in GNATprove mode.
5672 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
5673 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
5674 * sem_prag.adb Minor change in comments.
5675 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
5676 inside subprograms marked as SPARK_Mode On.
5677 * sinfo.ads: Minor typo fix.
5679 2014-07-29 Vincent Celier <celier@adacore.com>
5681 * frontend.adb: Add dependency on gnat.adc when taken into account
5682 and on non-temporary configuration pragmas files specified in
5684 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
5685 dependencies on configuration pragmas files.
5687 2014-07-29 Pat Rogers <rogers@adacore.com>
5689 * gnat_ugn.texi: Minor clarification to the explanation for the
5692 2014-07-29 Robert Dewar <dewar@adacore.com>
5694 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
5695 documentation that explains the need for this extended range
5696 (use by C_Pass_By_Copy).
5698 2014-07-29 Robert Dewar <dewar@adacore.com>
5700 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
5702 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
5704 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
5707 2014-07-29 Thomas Quinot <quinot@adacore.com>
5710 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
5711 CRTSCTS to be visible.
5713 2014-07-29 Bob Duff <duff@adacore.com>
5715 * g-trasym.adb, g-trasym.ads: Code cleanup.
5717 2014-07-29 Doug Rupp <rupp@adacore.com>
5719 * sigtramp-vxworks.c: Minor reformatting.
5721 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5723 * gnat_rm.texi: No doc needed for Ada2012 aspect
5724 Implicit_dereference.
5726 2014-07-29 Robert Dewar <dewar@adacore.com>
5728 * sem_attr.adb (Attribute_12): New array
5729 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
5730 (Check_Ada_2012_Attribute): Removed.
5732 2014-07-29 Doug Rupp <rupp@adacore.com>
5734 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
5736 * sigtramp-vxworks.c: New file.
5737 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
5739 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5741 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
5742 derived array type, add information about component type, which
5743 was previously missing in ali file.
5744 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
5746 2014-07-29 Thomas Quinot <quinot@adacore.com>
5748 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
5749 of the subtype created for a record component, do not mark
5750 the subtype as frozen. For one thing, this is anomalous (in
5751 particular, the base type might not itself be frozen yet);
5752 furthermore, proper freezing of the subtype must happen in any
5753 case. So, we just mark the subtype as requiring delayed freezing
5754 (and we'll actually freeze it when generating the init_proc of
5755 the enclosing record).
5756 Also change the name of the constrained record subtype (append a
5757 'C' so that it is clearly different from the unconstrained record
5758 type, "related_idV") to make debugging easier.
5759 (Process_Full_View): When creating a full subtype for a pending
5760 private subtype, re-establish the scope of the private subtype
5761 so that we get proper visibility on outer discriminants.
5762 * exp_ch3.adb (Build_Init_Statements): Freeze any component
5763 subtype that is not frozen yet.
5765 2014-07-29 Vincent Celier <celier@adacore.com>
5767 * prj-proc.adb (Recursive_Process): Always initialize the
5768 environment when the project is an aggregate project, even when
5769 it is not the root tree.
5770 2014-07-29 Robert Dewar <dewar@adacore.com>
5772 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
5773 * gnat_rm.texi: Complete list of implementation aspects.
5774 * aspects.ads: Minor comment clarification.
5776 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5778 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
5779 is a null-excluding access type, do not generate a constraint
5780 check if Suppress_Assignment_Checks is set on assignment node.
5781 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
5782 parameter of a null-excluding access type, there is access check
5783 on entry, so set Suppress_Assignment_Checks on generated statement
5784 that assigns actual to parameter block.
5785 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
5787 2014-07-29 Robert Dewar <dewar@adacore.com>
5789 * gnat_rm.texi: Change theta to @ in documentation of aspect
5792 2014-07-29 Robert Dewar <dewar@adacore.com>
5794 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
5796 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
5798 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
5799 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
5801 2014-07-29 Javier Miranda <miranda@adacore.com>
5803 * types.ads Update documentation on how to add new reason codes
5805 (RT_Exception_Code): Keep values ordered by their
5806 reason code. Required by the .NET backend.
5807 (RT_CE_Exceptions): Subtype declaration removed.
5808 (RT_PE_Exceptions): Subtype declaration removed.
5809 (RT_SE_Exceptions): Subtype declaration removed.
5810 (Kind): New mapping table of RT_Exception_Codes.
5811 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
5813 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
5814 mapping table. (Make_Raise_Program_Error): Updated to use the
5816 (Make_Raise_Storage_Error): Updated to use the new mapping table.
5817 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
5820 2014-07-29 Thomas Quinot <quinot@adacore.com>
5822 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
5823 distributed stubs generation.
5824 * exp_ch3.adb: Minor reformatting.
5826 2014-07-29 Yannick Moy <moy@adacore.com>
5828 * sinfo.ads: Document constraint between frontend and GNATprove.
5830 2014-07-29 Robert Dewar <dewar@adacore.com>
5832 * a-except.adb: Minor comment clarification.
5834 2014-07-29 Robert Dewar <dewar@adacore.com>
5836 * gnat_rm.texi: Complete list of implementation attributes.
5837 * snames.ads-tmpl: Clean up list of impl-defined attributes.
5839 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5841 * freeze.adb (Freeze_Record_Type): Perform various
5842 volatility-related checks.
5844 2014-07-29 Robert Dewar <dewar@adacore.com>
5846 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
5848 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5850 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
5851 the case where the attribute reference appears in a nested scope
5852 from that of the subprogram prefix.
5853 * sem_attr.adb: Minor reformatting.
5855 2014-07-29 Robert Dewar <dewar@adacore.com>
5857 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
5858 initialization options.
5860 2014-07-29 Robert Dewar <dewar@adacore.com>
5862 * sinfo.ads: Minor comment addition.
5864 2014-07-29 Bob Duff <duff@adacore.com>
5866 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
5868 2014-07-29 Doug Rupp <rupp@adacore.com>
5870 * init.c: Complete previous change.
5872 2014-07-29 Robert Dewar <dewar@adacore.com>
5874 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
5877 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5879 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
5880 and the completion will appear in the same declarative part,
5881 create elaboration flag.
5882 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
5883 is a completion of a declaration in the same declarative part,
5884 and the subprogram has had its address taken, add elaboration
5885 check inside the subprogram body, to detect elaboration errors
5886 that may occur through indirect calls.
5888 2014-07-29 Doug Rupp <rupp@adacore.com>
5890 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
5891 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
5893 2014-07-29 Vincent Celier <celier@adacore.com>
5895 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
5896 runtime directorie specified with two switches --RTS= designate
5897 the same directory, even when there are no literarily the same.
5899 2014-07-29 Robert Dewar <dewar@adacore.com>
5901 * gnat_ugn.texi: Minor documentation clarification.
5902 * switch-c.adb: Minor reformatting.
5904 2014-07-29 Robert Dewar <dewar@adacore.com>
5906 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5907 Fix incorrect RTE call which caused bomb if pragma was in
5908 configuration pragma file.
5910 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
5912 * expect.c (__gnat_expect_poll): Fix typo in previous change.
5913 * g-expect.adb: Update comments.
5915 2014-07-29 Arnaud Charlet <charlet@adacore.com>
5917 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
5918 (Default_Attribute_Count): Bump to 16 on native platforms.
5920 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5922 * sem_res.adb: Add guard to front-end inlining for SPARK.
5924 2014-07-29 Robert Dewar <dewar@adacore.com>
5926 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
5929 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5931 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
5932 inline in GNATprove mode when subprogran is marked Inline_Always.
5933 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
5934 mode if body to inline is available.
5935 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
5936 effective in GNATprove mode.
5937 * sem_ch10.adb (Analyze_Compilation_Unit): Call
5938 Check_Package_Body_For_Inlining in GNATprove mode, so that body
5939 containing subprograms with Inline_Always can be available before
5942 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5944 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
5945 to Check_Package_Body_For_Inlining, to prevent confusion with other
5946 inlining subprograms.
5948 2014-07-29 Robert Dewar <dewar@adacore.com>
5950 * opt.ads: Minor comment update.
5951 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
5952 we want setting of Uneval_Old at time of encountering the aspect.
5953 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
5955 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
5956 New function (Set_Uneval_Old_Accept): New procedure.
5957 (Set_Uneval_Old_Warn): New procedure.
5958 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
5960 2014-07-29 Robert Dewar <dewar@adacore.com>
5962 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
5963 * snames.ads-tmpl: Minor reformatting.
5964 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
5965 to give <Error>. Not clear why this was there, but the compiler
5966 sources do not reference Name_Error, and this interfered with
5967 the circuits for pragma Unevaluated_Use_Of_Old.
5969 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5971 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
5972 types in SPARK 2014 (again).
5973 * sem_res.adb (Is_OK_Volatile_Context): New routine.
5974 (Resolve_Entity_Name): Ensure that a volatile object with
5975 enabled properties Async_Writers or Effectire_Reads appears in
5976 a non-interfering context.
5978 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5980 * sem_ch6.adb: Move Build_Body_To_Inline,
5981 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
5982 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
5983 * inline.ads, inline.adb: Package now contains subprograms that
5984 implement front-end inlining. No functional changes, no test
5987 2014-07-29 Robert Dewar <dewar@adacore.com>
5989 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
5991 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5993 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
5994 is a limited view when the context is a package body, because
5995 there is no subsequent place at which the non-limited view may
5997 (Process_Formals): Ditto.
5998 * sinfo.ads, par-ch3.adb: Minor reformatting.
6000 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
6002 * expect.c (__gnat_expect_poll): New parameter dead_process
6003 used to return the dead process among the array of file
6004 descriptors. The Windows, VMS and HPUX implementations now
6005 properly report the dead process via this parameter. Other unixes
6007 * g-expect.adb (Poll): Adapt to the C profile.
6008 (Expect_Internal): Use the new parameter to properly close the
6009 File Descriptor. This then can be properly reported by the
6010 function First_Dead_Process as is expected.
6012 2014-07-29 Robert Dewar <dewar@adacore.com>
6014 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
6016 2014-07-29 Robert Dewar <dewar@adacore.com>
6018 * einfo.adb (Derived_Type_Link): New function
6019 (Set_Derived_Type_Link): New procedure.
6020 (Write_Field31_Name): Output Derived_Type_Link.
6021 * einfo.ads: New field Derived_Type_Link.
6022 * exp_ch6.adb (Expand_Call): Warn if change of representation
6024 * sem_ch13.adb: Minor addition of ??? comment.
6025 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
6026 expensive implicit conversion.
6027 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
6029 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6031 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
6032 to DF_Id. Add new local variable DF_Call. Do not perform any
6033 elaboration-related checks on the call to the partial finalization
6034 routine within an init proc to avoid generating bogus elaboration
6035 warnings on expansion-related code.
6036 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
6037 the top level of the routine. Ensure that Output_Calls takes
6038 into account flags -gnatel and -gnatwl when emitting warnings
6040 (Check_Internal_Call_Continue): Update the call to Output_Calls.
6041 (Elab_Warning): Moved to the top level of routine Check_A_Call.
6042 (Emit): New routines.
6043 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
6044 comment on usage. Output all warnings or info messages only when the
6045 caller context demands it and the proper elaboration flag is set.
6047 2014-07-29 Yannick Moy <moy@adacore.com>
6049 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
6050 Check rule about Old appearing in potentially unevaluated
6051 expression everywhere, not only in Post.
6053 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6055 * sem_prag.adb: Update comment.
6056 * a-except.adb, a-except-2005.adb: Minor editing.
6058 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
6060 * exp_dbug.adb (Debug_Renaming_Declaration):
6061 Do not create renaming entities for renamings of non-packed
6062 objects and for exceptions.
6064 2014-07-29 Robert Dewar <dewar@adacore.com>
6066 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
6067 sem_ch6.adb, par-ch3.adb: Minor reformatting.
6069 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6071 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
6072 subtype indication in an extended return statement when the
6073 return value is an ancestor of the return type of the function,
6074 and that return type is a null record extension.
6076 2014-07-29 Thomas Quinot <quinot@adacore.com>
6078 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
6079 message produced for the case of a type-related representation
6080 item that is made illegal by 13.10(1).
6081 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
6084 2014-07-29 Robert Dewar <dewar@adacore.com>
6086 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
6087 * erroutc.adb (Output_Error_Msgs): Take wide characters into
6088 account in computing position of error flags.
6089 * sinput.adb (Get_Column_Number): Take wide characters into
6092 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6094 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
6095 in an access type definition can carry a null_exclusion indicator.
6096 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
6097 carries a null_exclusion indicator, verify that the subtype
6098 indication denotes an access type, and create a null-excluding
6100 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
6101 defined on N_Access_To_Object_Definition to indicate that the
6102 subtype indication carries a null_exclusion indicator.
6104 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6106 * exp_ch6.adb (Add_Extra_Actual): Do not construct
6107 the extra actual by name, generate a reference instead.
6109 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6111 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
6112 Allow_Integer_Address if already set.
6113 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
6114 Fix order, for consistency with Rmsg_xx declarations.
6116 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6118 * sem_ch4.adb (Complete_Object_Operation): If the type of the
6119 candidate subprogram is a limited view, use non-limited view
6122 2014-07-29 Robert Dewar <dewar@adacore.com>
6124 * sem_ch13.adb: Minor change in RM reference.
6125 * sem_mech.ads: Minor reformatting.
6126 * einfo.ads: Minor comment fix.
6127 * types.ads: Minor correction to range given for Mechanism_Type.
6128 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
6129 check predicate on way out for OUT or IN OUT parameters.
6130 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
6131 better (P_Range_Constraint): Corresponding fix.
6132 * checks.ads: Minor comment clarification.
6134 2014-07-29 Gary Dismukes <dismukes@adacore.com>
6136 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
6137 and Treat_As_Volatile flags based on whether the renamed object
6138 is a volatile object.
6140 2014-07-29 Olivier Hainque <hainque@adacore.com>
6143 (Default_Alignment): Rename as Storage_Alignment. This is not
6144 a "default" that can be overriden. Augment comment to clarify
6145 intent and document why we need to manage alignment padding.
6146 (Header_Offset): Set to Header'Object_Size instead of 'Size
6147 rounded up to Storage_Alignment. Storage_Alignment on the
6148 allocation header is not required by our internals so was
6149 overkill. 'Object_Size is enough to ensure proper alignment
6150 of the header address when substracted from a storage address
6151 aligned on Storage_Alignment.
6152 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
6153 this is always added on top of the incoming allocation requests.
6154 (Align): New function, to perform alignment rounding operations.
6155 (Allocate): Add comments on the Storage_Address computation
6156 scheme and adjust so that the alignment padding applies to that
6157 (Storage_Address) only.
6159 2014-07-29 Robert Dewar <dewar@adacore.com>
6161 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
6162 pragma Unreferenced.
6163 * cstand.adb (Create_Standard): Use E_Array_Type for standard
6164 string types. Make sure index of Any_String/Any_Array is in a list.
6165 * errout.adb: Minor reformatting.
6167 2014-07-29 Robert Dewar <dewar@adacore.com>
6169 * gnat_ugn.texi: Clean up and correct documentation of warnings.
6170 * usage.adb: Minor corrections to make sure warnings are properly
6172 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
6173 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
6175 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6177 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
6178 created to match internal sequence numbers between compilations
6179 with/without abort must have its type properly set.
6181 2014-07-29 Robert Dewar <dewar@adacore.com>
6183 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
6184 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
6185 SSO_Default_Specified.
6186 * ali.ads (ALIs_Record): Add field SSO_Default
6187 (SSO_Default_Specified): New global switch.
6188 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
6189 (Check_Configuration_Consistency): Call this procedure
6190 * einfo.adb (SSO_Set_High_By_Default): New
6191 function (SSO_Set_Low_By_Default): New function
6192 (Set_SSO_Set_High_By_Default): New procedure
6193 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
6195 * einfo.ads (SSO_Set_Low_By_Default): New flag
6196 (SSO_Set_High_By_Default): New flag
6197 * freeze.adb (Set_SSO_From_Default): New procedure
6198 (Freeze_Array_Type): Call Set_SSO_From_Default
6199 (Freeze_Record_Type): Call Set_SSO_From_Default
6200 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
6201 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
6202 * lib-writ.ads: Add OL/OH parameters to P line
6203 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
6204 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
6206 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
6207 set by default using pragma Default_Scalar_Storage_Order.
6208 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
6209 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
6210 Clear SSO defaults when explicit SSO is inherited.
6211 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
6212 explicit SSO is specified.
6213 (Inherit_Aspects_At_Freeze_Point):
6214 Clear SSO default when inheriting SSO.
6215 * sem_ch3.adb (Set_Default_SSO): New procedure
6216 (Analyze_Private_Extension_Declaration): Set defualt SSO
6217 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
6218 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
6219 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
6220 (Record_Type_Declaration): ditto
6221 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
6223 * sem_prag.adb (Analyze_Pragma, case
6224 Default_Scalar_Storage_Order): Set Default_SSO
6226 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6228 * sem_ch6.adb (Valid_Operator_Definition): Verify that
6229 all parameter have mode IN. This check must be done here for
6230 subprogram instantiations that have operator names, because their
6231 analysis does not follow the same path as that for subprogram
6234 2014-07-29 Robert Dewar <dewar@adacore.com>
6236 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
6237 to make sure that the Etype of a component of the corresponding
6238 record type is present before trying to freeze it.
6239 * sem_ch5.adb: Minor reformatting.
6241 2014-07-29 Robert Dewar <dewar@adacore.com>
6243 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
6244 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
6245 and then use it when a stream operation is used from a library generic
6246 when the restriction (No_Streams) is active.
6248 2014-07-29 Thomas Quinot <quinot@adacore.com>
6250 * projects.texi: Fix minor typo.
6252 2014-07-29 Yannick Moy <moy@adacore.com>
6254 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
6256 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6258 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
6261 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6263 * exp_ch7.adb (Find_Last_Init): Add local variable
6264 Deep_Init_Found. Check the statement immediately following the
6265 declaration if [Deep_]Initialization was not found.
6267 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6269 * exp_util.adb (Is_Aliased): It appears that
6270 'reference-d and renamed objects still play some role in Boolean
6271 expression with actions and cannot be finalized immediately.
6273 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6275 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
6276 Loop names are not part of the full qualification of entity names.
6278 2014-07-29 Robert Dewar <dewar@adacore.com>
6280 * einfo.adb (Has_Protected): Test base type.
6281 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
6282 that we always properly check No_Protected_Type_Allocators.
6284 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6286 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
6287 loop declarations as well.
6288 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
6289 to an iterator loop, because it may contain local renaming
6290 declarations that require debugging information.
6292 2014-07-29 Robert Dewar <dewar@adacore.com>
6294 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
6296 2014-07-29 Robert Dewar <dewar@adacore.com>
6298 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
6299 (Set_Static_Real_Or_String_Predicate): New procedure
6300 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
6301 string predicates (Is_Predicate_Static): Handle static string
6303 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
6304 New procedure (Check_Expression_Against_Static_Predicate):
6305 Deal with static string predicates, now fully implemented
6306 (Eval_Relational_Op): Allow string equality/inequality as static
6307 if not comes from source.
6309 2014-07-29 Robert Dewar <dewar@adacore.com>
6311 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
6312 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
6313 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
6314 handling. Change name of Discrete_Predicate to
6315 Discrete_Static_Predicate, and replace testing of the presence of this
6316 field by testing the flag Has_Static_Expression.
6318 2014-07-29 Robert Dewar <dewar@adacore.com>
6320 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
6321 * opt.adb: Handle Uneval_Old.
6322 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
6323 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
6324 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
6325 * sem_attr.adb (Uneval_Old_Msg): New procedure.
6326 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
6327 (Pop_Scope): Restore Uneval_Old.
6328 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
6330 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
6331 Add entries for Name_Warn, Name_Allow.
6333 2014-07-29 Robert Dewar <dewar@adacore.com>
6335 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
6336 to Is_OK_Static_Range.
6337 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
6338 static attributes (Eval_Attribute, case Size): Handle size of
6339 zero properly (Eval_Attribute, case Value_Size): Handle size of
6341 * sem_ch13.adb: Minor reformatting.
6342 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
6343 Is_Static_Range to Is_OK_Static_Range.
6344 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
6345 wrong in several ways (Is_Static_Range): Moved here from spec
6346 (Is_Static_Subtype): Moved here from spec Change some incorrect
6347 Is_Static_Subtype calls to Is_OK_Static_Subtype.
6348 * sem_eval.ads: Add comments to section on
6349 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
6350 Add clarifying comments (Is_Static_Range): Moved to body
6351 (Is_Statically_Unevaluated): New function.
6352 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
6353 Is_Static_Range to Is_OK_Static_Range.
6354 * sinfo.ads: Additional commments for Is_Static_Expression noting
6355 that clients should almost always use Is_OK_Static_Expression
6356 instead. Many other changes throughout front end units to obey
6358 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
6359 for enumeration literal.
6360 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
6361 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
6362 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
6363 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
6364 Replace all occurrences of Is_Static_Expression by
6365 Is_OK_Static_Expression.
6367 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6369 * exp_ch4.adb (Process_Transient_Object): Remove constant
6370 In_Cond_Expr, use its initialization expression in place.
6371 * exp_ch7.adb (Process_Declarations): There is no need to check
6372 that a transient object being hooked is controlled as it would
6373 not have been hooked in the first place.
6374 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
6375 objects are not considered aliased when the related context is
6376 a Boolean expression_with_actions.
6377 (Requires_Cleanup_Actions): There is no need to check that a transient
6378 object being hooked is controlled as it would not have been hooked in
6381 2014-07-29 Robert Dewar <dewar@adacore.com>
6383 * errout.adb: Minor reformatting.
6385 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6387 * exp_ch3.adb (Default_Initialize_Object): Add new variables
6388 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
6389 not allowed to ensure the symmetrical generation of symbols.
6390 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
6391 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
6392 temporary when aborts are not allowed to ensure symmertrical
6393 generation of symbols.
6394 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
6395 Dummy. Generate a dummy temporary when aborts are not allowed
6396 to ensure symmertrical generation of symbols.
6398 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6400 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
6401 renaming, indicate that the renamed entity itself needs debug
6402 information. This is necessary if that entity is a temporary,
6403 e.g. part of the expansion of an explicit dereference in an
6406 2014-07-29 Thomas Quinot <quinot@adacore.com>
6408 * errout.adb (Set_Error_Posted): When propagating flag to
6409 an enclosing named association, also propagate to the parent
6410 of that node, so that named and positional associations are
6411 treated consistently.
6413 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6415 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
6416 Do_Range_Check properly on array component expressions that
6417 have a scalar type. In GNATprove mode, only checks on scalar
6418 components must be marked by the front-end.
6420 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6422 * sem_res.adb (Resolve_Type_Conversion): If the type of the
6423 expression is a limited view, use the non-limited view when
6426 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6428 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
6429 case statement as coming from a conditional expression.
6430 (Expand_N_If_Expression): Mark the generated if statement as
6431 coming from a conditional expression.
6432 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
6433 objects found in case statement alternatives when the case
6434 statement is actually a case expression.
6435 (Expand_N_If_Statement):
6436 Do not process controlled objects found in an if statement when
6437 the if statement is actually an if expression.
6438 * sinfo.adb (From_Conditional_Expression): New routine.
6439 (Set_From_Conditional_Expression): New routine.
6440 * sinfo.ads Add new semantic flag From_Conditional_Expression and
6441 update related nodes.
6442 (From_Conditional_Expression): New routine along with pragma Inline.
6443 (Set_From_Conditional_Expression): New routine along with pragma Inline.
6445 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6447 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
6448 formal parameter Obj_Id and update the comment on usage. Renamed
6449 Obj_Typ to Func_Typ and update all occurrences.
6450 (Find_Last_Init): Remove formal parameter Decl and update the comment
6452 Remove local constants Obj_Id and Obj_Typ. Remove local variables
6453 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
6454 (Find_Last_Init_In_Block): Remove formal parameter
6455 Init_Typ and update the comment on usage.
6456 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
6457 on usage. Check whether the procedure call is an initialization
6458 procedure of either the object type or the initialization type.
6459 (Is_Init_Proc_Of): New routine.
6460 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
6461 routine. Add new variable Init_Typ. Add circuitry to extract the object
6462 type as well as the initialization type.
6464 2014-07-29 Robert Dewar <dewar@adacore.com>
6466 * sem_case.adb: Minor reformatting.
6467 * sem_aux.ads: Minor reformatting.
6469 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6471 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
6472 pointer on these fields, even though they are semantic, because
6473 subsequent analysis and expansion of action nades may require
6474 exploring the tree, for example to locate a node to be wrapped
6475 when a function with controlled result is called.
6477 2014-07-29 Claire Dross <dross@adacore.com>
6479 * sem_aux.adb (Get_Binary_Nkind): Use case on
6480 Name_Id instead of an intermediate string.
6481 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
6484 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
6486 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
6487 about processing sources with preprocessor directives.
6489 2014-07-24 Martin Liska <mliska@suse.cz>
6491 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
6492 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
6493 (gnat_write_global_declarations): Likewise.
6495 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
6497 * gnat_rm.texi: Clean up for makeinfo 5.2.
6499 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
6501 * gnat_rm.texi (Machine Code Insertions): Clean up.
6503 2014-07-18 Robert Dewar <dewar@adacore.com>
6505 * exp_ch7.adb: Minor reformatting.
6507 2014-07-18 Claire Dross <dross@adacore.com>
6509 * sem_aux.ads (Get_Binary_Nkind): New function that returns
6510 the Node_Kind value of an entity defining a binary operator.
6511 (Get_Unary_Nkind): New function that returns the Node_Kind value
6512 of an entity defining a unary operator.
6514 2014-07-18 Pascal Obry <obry@adacore.com>
6516 * sysdep.c: comment update.
6517 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
6518 platforms where it is known to be supported.
6520 2014-07-18 Thomas Quinot <quinot@adacore.com>
6522 * sem_dist.adb (Process_Remote_AST_Declaration): Need
6523 to set Fat_Type's Ekind in order to be able to use its
6524 Corresponding_Remote_Type attribute.
6526 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6528 * einfo.adb Last_Aggregate_Assignment is now Node 30.
6529 (Last_Aggregate_Assignment): Include
6530 constants in the assertion. Update the underlying node.
6531 (Set_Last_Aggregate_Assignment): Include constants in the
6532 assertion. Update the underlying node. (Write_Field11_Name):
6533 Remove the entry for Last_Aggregate_Assignment.
6534 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
6535 * einfo.ads Update the node designation and usage of attribute
6536 Last_Aggregate_Assignment.
6537 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
6538 assignment statement used to initialize a controlled object.
6539 (Late_Expansion): Store the last assignment statement used to
6540 initialize a controlled record or an array of controlled objects.
6541 * exp_ch3.adb (Expand_N_Object_Declaration): Default
6542 initialization of objects is now performed in a separate routine.
6543 (Default_Initialize_Object): New routine.
6544 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
6545 Obj_Id. Update the comment on usage.
6546 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
6547 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
6548 (Is_Init_Call): Add formal parameter Init_Typ. Update the
6549 comment on usage. Account for the type init proc when trying
6550 to determine whether a statement is an initialization call.
6551 (Make_Adjust_Call): Rename formal parameter For_Parent to
6552 Skip_Self. Update all occurrences of For_Parent. Account for
6553 non-tagged types. Update the call to Make_Call.
6554 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
6555 comment on usage. Update all occurrences of For_Parent.
6556 (Make_Final_Call): Rename formal parameter For_Parent to
6557 Skip_Self. Update all occurrences of For_Parent. Account
6558 for non-tagged types. Update the call to Make_Call.
6559 (Process_Object_Declaration): Most variables and constants are
6560 now local to the routine.
6561 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
6562 For_Parent to Skip_Self. Update the comment on usage.
6563 (Make_Final_Call): Rename formal parameter For_Parent to
6564 Skip_Self. Update the comment on usage.
6566 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6568 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
6569 can be a procedure that is implemented by entry, and have a
6570 formal that is a synchronized interface. It does not have to
6571 be declared as a protected operation.
6573 2014-07-18 Robert Dewar <dewar@adacore.com>
6575 * gnat_rm.texi: Remove mention of obsolete attributes
6576 Max[_Interrupt]_Priority, which have never been implemented
6577 (or at the very least were removed long ago if they ever were
6578 implemented. Add documentation of Max[_Interrupt]_Priority
6579 constants in package System.
6580 * ttypes.ads: Document actual handling of package System,
6581 rather than a historical fantasy version. Remove mention of
6582 non-existent attributes Max[_Interrupt]_Priority.
6584 2014-07-18 Pascal Obry <obry@adacore.com>
6586 * a-witeio.adb (Put): No 16-bit character output when text
6587 translation is disabled.
6588 * i-cstrea.ads: Code clean up.
6590 2014-07-18 Robert Dewar <dewar@adacore.com>
6592 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
6595 2014-07-18 Arnaud Charlet <charlet@adacore.com>
6597 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
6599 2014-07-18 Pascal Obry <obry@adacore.com>
6601 * adaint.c: Do not include wchar.h on VxWorks.
6602 * mingw32.h: Remove obsolete definition.
6604 2014-07-18 Pascal Obry <obry@adacore.com>
6606 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
6607 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
6608 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
6609 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
6611 2014-07-18 Pascal Obry <obry@adacore.com>
6613 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
6614 * a-ztexio.adb: Likewise.
6615 * a-witeio.adb: Likewise.
6616 (Open): Pass file's translation mode to set_text_mode.
6617 * s-ficobl.ads (Content_Encoding): New type.
6618 (Text_Content_Encoding): New subtype.
6619 (AFCB): Rename Is_Text_File to Text_Encoding.
6620 * s-fileio.adb (Open): Handles new text_translation
6621 values. Remove Is_Text_File which is equivalent to Text_Encoding
6622 in Text_Content_Encoding.
6623 * adaint.h (__gnat_set_mode): New routine.
6624 * sysdep.c (__gnat_set_wide_text_mode): Removed.
6625 (__gnat_set_mode): New routine.
6627 2014-07-18 Arnaud Charlet <charlet@adacore.com>
6629 * gcc-interface/decl.c, gcc-interface/trans.c,
6630 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
6631 Is_Packed_Array_Impl_Type.
6633 2014-07-18 Gary Dismukes <dismukes@adacore.com>
6635 * sem_util.adb: Minor typo correction.
6637 2014-07-18 Ben Brosgol <brosgol@adacore.com>
6639 * gnat_rm.texi: Complete previous change.
6641 2014-07-18 Pascal Obry <obry@adacore.com>
6643 * s-fileio.adb: Minor style fix.
6645 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6647 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
6648 specification of stream attributes for subtypes that are not
6649 first subtypes, to prevent malformed rep_item chains in the case
6650 of such illegal specifications for discriminated private subtypes.
6651 (Check_Overloaded_Name): Verify that the name is an entity name
6652 before other checks.
6654 2014-07-18 Pascal Obry <obry@adacore.com>
6656 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
6658 2014-07-18 Robert Dewar <dewar@adacore.com>
6660 * sem_prag.adb, sem_attr.adb,
6661 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
6663 2014-07-18 Pascal Obry <obry@adacore.com>
6665 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
6666 * initialize.c (__gnat_wide_text_translation_required): Defined here.
6668 2014-07-18 Pascal Obry <obry@adacore.com>
6670 * adaint.c (__gnat_fputwc): New routine.
6671 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
6673 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6675 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
6676 (Set_Stores_Attribute_Old_Prefix): New routine.
6677 (Stores_Attribute_Old_Prefix): New routine.
6678 (Write_Entity_Flags):
6679 Output flag Stores_Attribute_Old_Prefix.
6680 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
6682 (Set_Stores_Attribute_Old_Prefix): New routine
6683 along with pragma Inline.
6684 (Stores_Attribute_Old_Prefix): New
6685 routine along with pragma Inline.
6686 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
6687 constant which captures the result of attribute 'Old's prefix.
6688 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
6689 relocated expression which acted as a prefix of attribute 'Old.
6691 2014-07-18 Bob Duff <duff@adacore.com>
6693 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
6694 null before dispatching to Deallocate_Subpool.
6695 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
6696 parameter of Default_Subpool_For_Pool to 'in out'.
6697 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
6698 a message to the raise.
6699 * sem_util.adb: Minor reformatting.
6701 2014-07-18 Robert Dewar <dewar@adacore.com>
6703 * sem_util.adb (Check_Expression_Against_Static_Predicate):
6704 Mark expression as non-static if it fails static predicate check,
6705 and issue additional warning.
6707 2014-07-18 Pascal Obry <obry@adacore.com>
6709 * a-witeio.adb (Put): Control translation based on
6710 wide_text_translation_required.
6711 * adaint.c (CurrentCCSEncoding): New variable.
6712 * initialize.c (__gnat_initialize): On Windows initialize
6713 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
6714 environment variable.
6715 * mingw32.h (CurrentCCSEncoding): New external.
6716 (__gnat_wide_text_translation_required): Likewise.
6717 * sysdep.c (wide_text_translation_required): New variable.
6718 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
6720 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6722 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
6723 variable Refined_States. Add global variable Matched_Items.
6724 (Check_Dependency_Clause): Account for dependency
6725 clauses utilizing states with visible null refinements.
6726 (Is_Null_Refined_State): New routine.
6727 (Match_Items): Record each successfully matched item of pragma Depends.
6728 (Record_Item): New routine.
6730 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6732 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
6733 Do_Range_Check flag on a dynamic index expression used in a
6734 component association in the argument of Update.
6736 2014-07-18 Gary Dismukes <dismukes@adacore.com>
6738 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
6740 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6742 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
6743 of enclosing blocks, loops and the enclosing function using a
6744 parent-based traversal.
6745 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
6746 stack reclamation if the iterator loop contains a return statement
6747 that uses the stack.
6748 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
6749 patch up the scope stack as the secondary stack management now
6750 takes into account the enclosing function of the iterator loop.
6752 2014-07-18 Robert Dewar <dewar@adacore.com>
6754 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
6756 2014-07-18 Robert Dewar <dewar@adacore.com>
6758 * einfo.adb (Has_Static_Predicate): New function.
6759 (Set_Has_Static_Predicate): New procedure.
6760 * einfo.ads (Has_Static_Predicate): New flag.
6761 * sem_ch13.adb (Is_Predicate_Static): New function
6762 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
6763 (Add_Call): Minor change in Sloc of generated expression
6764 (Add_Predicates): Remove setting of Static_Pred, no longer used.
6765 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
6766 replace by use of the entity flag Has_Static_Predicate_Aspect.
6767 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
6768 and issue warning that predicate is not checked for now.
6769 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
6771 * sem_util.adb (Check_Expression_Against_Static_Predicate):
6772 Carry out check for any case where there is a static predicate,
6773 and output appropriate message.
6774 * sinfo.ads: Minor comment corrections.
6776 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6778 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
6779 from an untagged private type whose full view is tagged, the type
6780 is marked tagged for layout reasons, but it has no dispatch table,
6781 so Set_All_DT_Position must not be called.
6782 * exp_ch13.adb: If the freeze node is for a type internal to a
6783 record declaration, as is the case for a class-wide subtype
6784 of a parent component, the relevant scope is the scope of the
6787 2014-07-18 Thomas Quinot <quinot@adacore.com>
6789 * g-memdum.adb, g-memdum.ads: Code clean ups.
6791 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6793 * sem_prag.adb (Check_Dependency_Clause):
6794 Update the comment on usage. Reimplement the mechanism which
6795 attempts to match a single clause of Depends against one or
6796 more clauses of Refined_Depends.
6797 (Input_Match): Removed.
6798 (Inputs_Match): Removed.
6799 (Is_Self_Referential): Removed.
6800 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
6801 (Normalize_Outputs): Rename variable Split to New_Claue and update
6802 all its occurrences.
6803 (Report_Extra_Clauses): Update the comment on usage.
6804 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
6806 2014-07-18 Gary Dismukes <dismukes@adacore.com>
6808 * i-cstrea.ads: Minor reformatting.
6810 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6812 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
6813 secondary stack-related flags to the generated block.
6814 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
6815 once the loop is relocated in a block.
6817 2014-07-18 Robert Dewar <dewar@adacore.com>
6819 * repinfo.ads: Add documentation on handling of back annotation
6822 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6824 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
6825 of full type declaration, denotes previous declaration for
6826 incomplete view of the type.
6827 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
6828 of declaration if one is present.
6829 (Replace_Type): When constructing the signature of an inherited
6830 operation, handle properly the case where the operation has a
6831 formal whose type is an incomplete view.
6832 * sem_util.adb (Collect_Primitive_Operations): Handle properly
6833 the case of an operation declared after an incomplete declaration
6834 for a type T and before the full declaration of T.
6836 2014-07-18 Pascal Obry <obry@adacore.com>
6838 * i-cstrea.ads: Add documentation for set_wide_text_mode.
6840 2014-07-18 Robert Dewar <dewar@adacore.com>
6842 * a-witeio.adb: Minor code reorganization.
6843 * i-cstrea.ads: Add comment.
6845 2014-07-18 Thomas Quinot <quinot@adacore.com>
6847 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
6850 2014-07-18 Robert Dewar <dewar@adacore.com>
6852 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
6854 2014-07-18 Pascal Obry <obry@adacore.com>
6856 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
6857 * a-witeio.adb (Put): On platforms where there is translation
6858 done by the OS output the raw text.
6859 (New_Line): Use Put above to properly handle the LM wide characters.
6861 2014-07-18 Thomas Quinot <quinot@adacore.com>
6863 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
6864 to Absolute_Address.
6866 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
6868 * opt.ads (Suppress_Back_Annotation): Remove as unused.
6869 * fe.h (Back_Annotate_Rep_Info): Likewise.
6870 (Global_Discard_Names): Likewise.
6872 2014-07-18 Robert Dewar <dewar@adacore.com>
6874 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
6877 2014-07-18 Vincent Celier <celier@adacore.com>
6879 * s-osinte-vms.ads: Fix style errors.
6881 2014-07-18 Thomas Quinot <quinot@adacore.com>
6883 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
6884 NAME_MAX and PATH_MAX.
6886 2014-07-18 Bob Duff <duff@adacore.com>
6888 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
6889 Build_Record_Or_Elementary_Output_Procedure): For Input and
6890 Output attributes, do not read/write the discriminants if they
6891 have default values; that will be done by Read/Write.
6893 2014-07-18 Robert Dewar <dewar@adacore.com>
6895 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
6896 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
6897 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
6898 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
6899 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
6901 2014-07-18 Robert Dewar <dewar@adacore.com>
6903 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
6905 2014-07-18 Vincent Celier <celier@adacore.com>
6907 * lib-writ.ads: Update documentation about the D lines.
6909 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6911 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
6912 as a parameter, rather than its Chars field, in order to locate
6913 freeze node of type. If the predicate or invariant has references
6914 to types other than the one to which the contract applies, these
6915 types must be frozen, and the corresponding predicate functions
6916 created, before that freeze node.
6918 2014-07-18 Robert Dewar <dewar@adacore.com>
6920 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
6921 * par_sco.adb: Minor reformatting.
6923 2014-07-18 Gary Dismukes <dismukes@adacore.com>
6925 * exp_ch4.adb (Real_Range_Check): Turn off
6926 the Do_Range_Check flag on the conversion's current Expression
6927 argument rather than on the originally captured Operand node,
6928 as Expression may reflect a rewriting (as in conversions to a
6931 2014-07-18 Vincent Celier <celier@adacore.com>
6933 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
6935 * ali.ads (Sdep_Record): New component Unit_Name.
6936 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
6937 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
6938 dependent unit is in a project and the source file name is not
6941 2014-07-18 Bob Duff <duff@adacore.com>
6943 * s-addima.ads: Minor: add comment.
6945 2014-07-18 Thomas Quinot <quinot@adacore.com>
6947 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
6948 of nesting rules for composites with different SSOs.
6950 2014-07-18 Thomas Quinot <quinot@adacore.com>
6952 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
6953 a proper logical operator.
6954 (Has_Decision): An If_Expression indicates the presence of a decision
6955 although it is not a logical operator.
6957 2014-07-18 Robert Dewar <dewar@adacore.com>
6959 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
6960 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
6962 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
6964 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
6965 on the null statement.
6967 2014-07-18 Thomas Quinot <quinot@adacore.com>
6969 * adaint.c: Minor comment rewording.
6970 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
6971 use of errno in this file is thread safe.
6973 2014-07-18 Arnaud Charlet <charlet@adacore.com>
6975 * gnat_ugn.texi: Doc clarification.
6976 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
6977 * sem_ch13.ads: Minor comment update.
6979 2014-07-18 Robert Dewar <dewar@adacore.com>
6981 * repinfo.ads: Minor comment fix.
6983 2014-07-18 Robert Dewar <dewar@adacore.com>
6985 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
6986 * sem_prag.adb: Add dummy implementation of
6987 Default_Scalar_Storage_Order.
6988 * snames.ads-tmpl: Add dummy entry for
6989 Default_Scalar_Storage_Order pragma.
6991 2014-07-18 Robert Dewar <dewar@adacore.com>
6993 * opt.adb (Tree_Read): Read Address_Is_Private,
6994 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
6995 (Tree_Write): Corresponding writes
6996 * opt.ads: Minor comment reformatting and fixes.
6997 * tree_io.ads: Increment ASIS_Version_Number.
6999 2014-07-18 Robert Dewar <dewar@adacore.com>
7001 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
7002 * types.h: Fix typo.
7004 2014-07-18 Robert Dewar <dewar@adacore.com>
7006 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
7008 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
7010 * sem_ch13.adb (Kill_Rep_Clause): New procedure
7011 (Analyze_Attribute_Definition_Clause): Use
7012 Kill_Rep_Clause. This is just a cleanup, no functional effect.
7013 (Analyze_Enumeration_Representation_Clause):
7014 Use Kill_Rep_Clause. This means that enum rep
7015 clauses are now properly removed from -gnatct trees.
7016 (Analyze_Record_Representation_Clause): Same change.
7017 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
7019 2014-07-18 Pascal Obry <obry@adacore.com>
7021 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
7022 OS_Time from time parts.
7023 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
7025 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7027 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
7028 indexing over containers that are derived types: check whether
7029 signature of found operation has the correct first parameter
7030 before retrieving directly a primitive operation.
7032 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7034 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7035 Do_Range_Check flag on dynamic bounds of a range used in a
7036 component association in the argument of Update.
7038 2014-07-18 Thomas Quinot <quinot@adacore.com>
7040 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
7041 accesses to errno(3) to be thread safe.
7043 2014-07-18 Vincent Celier <celier@adacore.com>
7045 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
7046 limited imported project that is an extending project, return
7047 a project being extended if it has the expected name.
7049 2014-07-18 Pascal Obry <obry@adacore.com>
7051 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
7052 routine to set the last modification time stamp for the given file.
7053 * gnatchop.adb (File_Time_Stamp): Removed.
7055 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
7057 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7059 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
7060 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
7061 Moved here, so it can be shared with the resolution of 'Update,
7062 whose argument shares some features with aggregates.
7063 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
7064 Aggregate_Constraint_Checks with the expression of each
7065 association, so that the Do_Range_Check flag is set when needed.
7067 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7069 * sem_ch4.adb (Try_Container_Indexing): If the container
7070 type is a derived type, the value of the inherited aspect is
7071 the Reference operation declared for the parent type. However,
7072 Reference is also a primitive operation of the new type, and
7073 the inherited operation has a different signature. We retrieve
7074 the right one from the list of primitive operations of the
7077 2014-07-18 Vincent Celier <celier@adacore.com>
7079 * debug.adb: Update comment.
7081 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7083 * exp_util.adb (Needs_Finalization): There is no reason why a
7084 C type should not benefit from finalization actions.
7086 2014-07-18 Thomas Quinot <quinot@adacore.com>
7088 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
7089 (FILENAME_MAX): Remove unneeded definition.
7091 2014-07-18 Robert Dewar <dewar@adacore.com>
7093 * exp_attr.adb, debug.adb: Update comments.
7095 2014-07-18 Vincent Celier <celier@adacore.com>
7097 * par-ch4.adb (Simple_Expression): Add missing style check
7098 for binary adding operators.
7099 (Term): Add missing style check for multiplying operators.
7101 2014-07-18 Robert Dewar <dewar@adacore.com>
7103 * impunit.adb: Minor comment correction.
7104 * widechar.adb, s-wchcon.ads: Minor comment corrections.
7106 2014-07-18 Robert Dewar <dewar@adacore.com>
7108 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
7109 for Build_Static_Predicate (Build_Predicate_Functions):
7110 Don't try to build discrete predicate for real type.
7111 (Build_Predicate_Functions): Report attempt to use
7112 Static_Predicate function on real type as unimplemented.
7113 * sem_util.adb (Check_Expression_Against_Static_Predicate):
7114 Add guard to prevent blow up on predicate for real type.
7116 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7118 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
7119 properly static predicate on enumeration types and modular types
7122 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
7124 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
7125 the corresponding source file index.
7126 * get_scos.ads (Get_SCOs): Add a default value for it.
7127 * par_sco.adb (SCO_Record): Fill the corresponding value.
7130 2014-07-18 Vincent Celier <celier@adacore.com>
7132 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
7133 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
7135 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
7137 2014-07-18 Thomas Quinot <quinot@adacore.com>
7139 * g-sercom.ads (Set): document possible data loss.
7141 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7143 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
7144 Output, Read, Write): If the restriction No_Streams is active,
7145 replace each occurrence of a stream attribute by an explicit
7148 2014-07-18 Robert Dewar <dewar@adacore.com>
7150 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
7153 2014-07-18 Robert Dewar <dewar@adacore.com>
7155 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
7157 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
7158 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
7159 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
7160 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
7162 2014-07-18 Robert Dewar <dewar@adacore.com>
7164 * bcheck.adb (Check_Consistent_Restrictions):
7165 Remove obsolete code checking for violation of
7166 No_Standard_Allocators_After_Elaboration (main program)
7167 * bindgen.adb (Gen_Adainit): Handle
7168 No_Standard_Allocators_After_Elaboration
7169 (Gen_Output_File_Ada): ditto.
7170 * exp_ch4.adb (Expand_N_Allocator): Handle
7171 No_Standard_Allocators_After_Elaboration.
7172 * Makefile.rtl: Add entry for s-elaall
7173 * rtsfind.ads: Add entry for Check_Standard_Allocator.
7174 * s-elaall.ads, s-elaall.adb: New files.
7175 * sem_ch4.adb (Analyze_Allocator): Handle
7176 No_Standard_Allocators_After_Elaboration.
7178 2014-07-18 Robert Dewar <dewar@adacore.com>
7180 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
7181 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
7182 Remove AB parameter from ali files and all uses.
7183 Remove Allocator_In_Body and all uses.
7185 2014-07-18 Robert Dewar <dewar@adacore.com>
7187 * g-expect-vms.adb: Add comment.
7189 2014-07-18 Thomas Quinot <quinot@adacore.com>
7191 * par_sco.adb (Is_Logical_Operation): return True for
7194 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7196 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
7197 analysis and resolution of each choice in the associations within
7198 the argument of Update, because they may be variable names.
7200 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7202 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
7203 actions before the generated if statement.
7205 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7207 * gnat_ugn.texi Enhance the documentation of
7208 switches -gnateA and -gnateV.
7210 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7212 * sem_util.adb (Build_Default_Subtype): Add missing condition
7213 so that code matches description: use the full view of the base
7214 only if the base is private and the subtype is not.
7216 2014-07-17 Gary Dismukes <dismukes@adacore.com>
7218 * exp_disp.adb: Minor reformatting.
7219 * exp_disp.adb: Minor code reorganization.
7221 2014-07-17 Thomas Quinot <quinot@adacore.com>
7223 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
7224 require an explicit SSO attribute definition clause on a composite type
7225 just because one of its components has one.
7227 2014-07-17 Robert Dewar <dewar@adacore.com>
7229 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
7230 attribute out of existence if the enclosing pragma is ignored.
7231 * sem_util.adb: Minor reformatting.
7233 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7235 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
7236 array aggregate expanded into assignments when it appears as a
7237 local declaration in an inlined body.
7239 2014-07-17 Doug Rupp <rupp@adacore.com>
7241 * init.c [__ANDROID__]: Modify for ZCX.
7242 * exp_aggr.adb: Minor reformatting
7243 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
7245 2014-07-17 Robert Dewar <dewar@adacore.com>
7247 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
7248 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
7249 scng.adb: Remove incorrect usage "allow to" and "allows to".
7251 2014-07-17 Robert Dewar <dewar@adacore.com>
7253 * exp_dist.adb: Minor reformatting.
7255 2014-07-17 Bob Duff <duff@adacore.com>
7257 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
7259 2014-07-17 Robert Dewar <dewar@adacore.com>
7261 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
7262 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
7264 2014-07-17 Thomas Quinot <quinot@adacore.com>
7266 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
7267 non-bit-packed array, propagate Reverse_Storage_Order to the
7270 2014-07-17 Javier Miranda <miranda@adacore.com>
7272 * exp_disp.adb: Fix comment.
7273 * exp_pakd.adb: Minor reformatting.
7275 2014-07-17 Robert Dewar <dewar@adacore.com>
7277 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
7278 entity if none exists (Gen_Elab_Calls): Complain if clash with
7279 No_Multiple_Elaboration.
7280 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
7281 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
7283 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
7284 * sem_ch4.adb: Minor comment updates.
7286 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7288 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
7289 of function call for later use when shared passive objects
7292 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7294 * par-ch13.adb (Get_Aspect_Specifications):
7295 Catch a case where the argument of SPARK aspect Refined_State
7296 is not properly parenthesized.
7298 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7300 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
7301 the lifetime of a reference to an Ada 2012 container element.
7302 (Is_Element_Reference): New routine.
7304 2014-07-17 Robert Dewar <dewar@adacore.com>
7306 * ali.ads: Minor comment fix.
7307 * lib-writ.adb: Minor reformatting.
7309 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7311 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
7312 in ASIS mode, load another subunit only if it a subunit of the
7313 current one, not a sibling that has been reached through the
7314 analysis of an ancestor. This allows the construction of the
7315 ASIS tree for the subunit even when sibling subunits have errors.
7317 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7319 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
7320 prevents the analysis of various contracts when the associated
7321 construct is erroneous.
7322 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
7323 SPARK_Pragma of an illegal or a partially decorated construct.
7325 2014-07-17 Robert Dewar <dewar@adacore.com>
7327 * s-imguns.ads: Minor reformatting.
7329 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7331 * exp_ch7.adb (Build_Finalization_Master): Move all local
7332 variables to the proper code section. When looking for an existing
7333 finalization master, inspect the ultimate ancestor type of the
7335 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
7337 2014-07-17 Robert Dewar <dewar@adacore.com>
7339 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
7340 * gnat_rm.texi: Document Entity argument for pragma Annotate and
7342 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
7343 for Annotate aspect.
7344 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
7345 Entity argument at end.
7346 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
7348 2014-07-17 Tristan Gingold <gingold@adacore.com>
7350 * s-imguns.ads: Fix minor typo.
7352 2014-07-17 Thomas Quinot <quinot@adacore.com>
7354 * sprint.adb: Minor reformatting.
7356 2014-07-17 Robert Dewar <dewar@adacore.com>
7358 * sprint.adb (Write_Itype): Print proper header for string
7361 2014-07-17 Steve Baird <baird@adacore.com>
7363 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
7365 2014-07-17 Vincent Celier <celier@adacore.com>
7367 * gnatbind.adb: Change in message "try ... for more information".
7369 2014-07-17 Robert Dewar <dewar@adacore.com>
7371 * sprint.adb: Code clean up.
7373 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7375 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
7376 the relevant code section. Add new local constant Obj_Id. When
7377 a limited controlled object is initialized by a function call,
7378 the build-in-place object access function call acts as the last
7379 initialization statement.
7380 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
7381 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
7382 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
7384 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7386 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
7387 propagate intrinsic flag to renamed entity, to allow e.g. renaming
7388 of Unchecked_Conversion.
7389 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
7390 if the declaration has errors.
7392 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7394 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
7395 container is busy before checking whether capacity allows for
7396 a further insertion. Insertion in a busy container that is full
7397 raises Program_Error rather than Capacity_Error. Previous to that
7398 patch which exception was raised varied among container types.
7400 2014-07-17 Robert Dewar <dewar@adacore.com>
7402 * g-comlin.ads, g-comlin.adb: Minor clean up.
7404 2014-07-17 Bob Duff <duff@adacore.com>
7406 * gnat_ugn.texi: Update gnatpp doc.
7408 2014-07-17 Robert Dewar <dewar@adacore.com>
7410 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
7411 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
7412 could do this by actually expanding a real generic.
7413 * a-tags.ads: Add comments about performance.
7414 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
7415 Print Etype of defining identifier, rather than the object
7416 definition. More information.
7418 2014-07-17 Thomas Quinot <quinot@adacore.com>
7420 * exp_dist.adb: Minor documentation clarification.
7422 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7424 * exp_util.adb (Is_Aliased): Revert previous change.
7426 2014-07-17 Vincent Celier <celier@adacore.com>
7428 * g-comlin.adb (Try_Help): New procedure.
7429 (Getopt): Use new procedure Try_Help.
7430 * g-comlin.ads (Try_Help): New procedure.
7432 2014-07-17 Bob Duff <duff@adacore.com>
7434 * gnat_ugn.texi: Minor update.
7436 2014-07-17 Robert Dewar <dewar@adacore.com>
7438 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
7439 * sinfo.ads: Document restriction on aggregates (must expand to
7440 assignments if one or more assignments needs expansion, e.g. for
7442 * sem_ch13.adb: All warning messages regarding bit order should
7444 * gnat_ugn.texi: Minor correction of missing @ on @code
7446 2014-07-17 Robert Dewar <dewar@adacore.com>
7448 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
7449 * s-rident.ads (Partition_Boolean_Restrictions): Add
7450 No_Long_Long_Integer.
7451 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
7452 Long_Integer'Size if restriction No_Long_Long_Integer is active.
7453 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
7454 as the implicit base type for a signed integer type declaration
7455 if restriction No_Long_Long_Integer is active.
7456 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
7457 No_Long_Long_Integer.
7459 2014-07-17 Robert Dewar <dewar@adacore.com>
7461 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
7462 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
7463 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
7464 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
7465 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
7467 2014-07-17 Robert Dewar <dewar@adacore.com>
7469 * debug.adb: Remove -gnatdQ.
7470 * exp_disp.adb: Remove -gnatdQ.
7471 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
7472 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
7473 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
7474 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
7475 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
7476 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
7478 2014-07-17 Robert Dewar <dewar@adacore.com>
7480 * back_end.adb: Minor reformatting and comment additions.
7481 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
7483 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
7484 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
7485 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
7486 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
7487 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
7488 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
7490 2014-07-17 Robert Dewar <dewar@adacore.com>
7492 * gnat_rm.texi: Minor comment updates.
7494 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7496 * sem_util.adb (Make_Explicit_Dereference): If the expression
7497 being dereferenced is a generalized indexing, reset the overloaded
7498 flag on the generalized indexing call, consistent with the
7499 resetting of the flag on the original indexed component.
7501 2014-07-17 Robert Dewar <dewar@adacore.com>
7503 * gnat_ugn.texi: Document advise not to mix -gnatV? and
7506 2014-07-17 Robert Dewar <dewar@adacore.com>
7508 * checks.adb (Insert_Valid_Check): Don't insist on a name
7509 for the prefix when we make calls to Force_Evaluation and
7510 Duplicate_Subexpr_No_Checks.
7511 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
7512 (Remove_Side_Effects): Handle all volatile references right
7513 (Side_Effect_Free): Volatile reference is never side effect free
7514 * sinfo.ads (N_Attribute_Reference): Add comments explaining
7515 that in the tree, the prefix can be a general expression.
7517 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7519 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7520 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
7521 * sem_ch7.adb (Analyze_Package_Body_Contract,
7522 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
7524 2014-07-17 Robert Dewar <dewar@adacore.com>
7526 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
7527 Store_After_Actions_In_Scope.
7529 2014-07-17 Robert Dewar <dewar@adacore.com>
7531 * sem_aux.ads: Minor comment addition.
7533 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7535 * sem_res.adb (Make_Call_Into_Operator): If the call is already
7536 a rewriting of an operator node, there are no actuals to be
7537 propagated from original node to rewritten node when in ASIS mode.
7539 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7541 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7542 Analyze_Subprogram_Contract): Add new local variable Mode. Save
7543 and restore the SPARK mode of the related construct in a
7545 * sem_ch7.adb (Analyze_Package_Body_Contract,
7546 Analyze_Package_Contract): Add new local variable Mode. Save and
7547 restore the SPARK mode of the related construct in a stack-like fashion.
7548 * sem_util.adb Remove with and use clause for Opt.
7549 (Restore_SPARK_Mode): New routine.
7550 (Save_SPARK_Mode_And_Set): New routine.
7551 * sem_util.ads Add with and use clause for Opt.
7552 (Restore_SPARK_Mode): New routine.
7553 (Save_SPARK_Mode_And_Set): New routine.
7555 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7557 * exp_util.adb (Is_Aliased): Transient objects
7558 within an expression with actions cannot be considered aliased.
7560 2014-07-17 Thomas Quinot <quinot@adacore.com>
7562 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
7563 introduce a new list (cleanup actions) for each (transient) scope.
7564 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
7566 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
7567 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
7568 processing for Store_xxx_Actions_In_Scope.
7569 (Build_Cleanup_Statements): Allow for a list of additional
7570 cleanup statements to be passed by the caller.
7571 (Expand_Cleanup_Actions): Take custom cleanup actions associated
7572 with an N_Block_Statement into account.
7573 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
7574 reorganization (refactoring only, no behaviour change).
7575 (Make_Transient_Block): Add assertion to ensure that the current
7576 scope is indeed a block (namely, the entity for the transient
7577 block being constructed syntactically, which has already been
7578 established as a scope). If cleanup actions are present in the
7579 transient scope, transfer them now to the transient block.
7580 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
7581 called function while it is still present as the name in a call
7582 in the tree. This may not be the case later on if the call is
7583 rewritten into a transient block.
7584 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
7585 inserted after calling a protected operation on a shared passive
7586 protected must be performed in a block finalizer, not just
7587 inserted in the tree, so that they are executed even in case of
7588 a normal (RETURN) or abnormal (exception) transfer of control
7589 outside of the current scope.
7590 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
7591 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
7592 Scope_Stack_Entry reorganization.
7594 2014-07-17 Thomas Quinot <quinot@adacore.com>
7596 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
7597 call for types that do not have an explicit attribute definition
7598 clause for External_Tag, as their default tag may clash with an
7599 explicit tag defined for some other type.
7601 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7603 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
7604 controlled function call with multiple actual parameters that
7605 appears in Object.Operation form.
7607 2014-07-17 Thomas Quinot <quinot@adacore.com>
7609 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
7611 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7612 External_Tag): No need to set entity flag.
7613 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
7614 Reimplement correctly in terms of Has_Rep_Item.
7616 2014-07-17 Thomas Quinot <quinot@adacore.com>
7618 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
7619 Start examining the tree at the node passed to
7620 Establish_Transient_Scope (not its parent).
7621 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7622 The access type for the variable storing the reference to
7623 the call must be declared and frozen prior to establishing a
7625 * exp_ch9.adb: Minor reformatting.
7627 2014-07-17 Pascal Obry <obry@adacore.com>
7629 * s-os_lib.ads: Minor comment update.
7631 2014-07-17 Tristan Gingold <gingold@adacore.com>
7633 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
7635 * socket.c: Remove #warning to avoid warning.
7636 * expect.c: Indent some preprocessor directives to clarify
7637 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
7639 * env.c: Fix indentation. Port to PikeOS.
7640 * gsocket.h: Port to PikeOS. Remove #warning.
7641 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
7642 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
7643 of stubbed __gnat_setup_parent_communication.
7644 * adaint.c: Port to PikeOS. Reindent some preprocessor
7645 directives to clarify nested if. Fix indentation. Add missing
7648 2014-07-17 Robert Dewar <dewar@adacore.com>
7650 * sem_attr.adb: Minor reformatting.
7652 2014-07-17 Robert Dewar <dewar@adacore.com>
7654 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
7656 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7658 * sem_case.adb (Check_Choice_Set): If the case expression is the
7659 expression in a predicate, do not recheck coverage against itself,
7660 to prevent spurious errors.
7661 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
7662 expression comes from an aspect specification, to prevent spurious
7663 errors when expression is a case expression in a predicate.
7665 2014-07-17 Pascal Obry <obry@adacore.com>
7667 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
7668 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
7670 2014-07-17 Vincent Celier <celier@adacore.com>
7672 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
7673 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
7674 the usage for an erroneous invocation of a gnat tool.
7676 2014-07-16 Vincent Celier <celier@adacore.com>
7678 * gnatls.adb: Get the target parameters only if -nostdinc was
7681 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7683 * checks.adb (Insert_Valid_Check): If the expression is a packed
7684 component of a modular type of the right size the data is always
7685 valid. This os particularly useful if the component is part of
7686 a volatile variable.
7688 2014-07-16 Robert Dewar <dewar@adacore.com>
7690 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
7692 2014-07-16 Thomas Quinot <quinot@adacore.com>
7694 * exp_ch7.ads: Minor documentation fix.
7696 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7698 * sem_ch3.adb (Find_Type_Name): Diagnose properly
7699 a private extension completion that is an interface definition
7700 with an interface list.
7702 2014-07-16 Arnaud Charlet <charlet@adacore.com>
7704 * gnatls.adb (Gnatls): Code clean ups.
7706 2014-07-16 Thomas Quinot <quinot@adacore.com>
7708 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
7709 * sem.adb (Analyze): Handle N_Compound_Statement.
7710 * sprint.adb (Sprint_Node_Actual): Ditto.
7711 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
7712 procedure to handle N_Compound_Statement.
7713 * exp_aggr.adb (Collect_Initialization_Statements):
7714 Use a proper compound statement node, instead of a bogus
7715 expression-with-actions with a NULL statement as its expression,
7716 to wrap collected initialization statements.
7717 * freeze.ads, freeze.adb
7718 (Explode_Initialization_Compound_Statement): New public procedure,
7719 lifted from Freeze_Entity.
7720 (Freeze_Entity): When freezing
7721 an object with captured initialization statements and without
7722 delayed freezing, explode compount statement.
7723 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
7724 case that used to handle bogus EWAs with NULL statement as
7726 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
7727 delayed freezing and captured initialization statements, explode
7730 2014-07-16 Gary Dismukes <dismukes@adacore.com>
7732 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
7734 2014-07-16 Doug Rupp <rupp@adacore.com>
7736 * s-interr-hwint.adb: Casing error on parameter.
7738 2014-07-16 Pascal Obry <obry@adacore.com>
7740 * Makefile.rtl: Add g-rewdat.o dependencies in
7741 GNATRTL_NONTASKING_OBJS.
7743 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7745 * sem_case.adb: Code clean up.
7747 2014-07-16 Vincent Celier <celier@adacore.com>
7749 * make.adb: Do not read gnat.adc when gnatmake is invoked
7752 2014-07-16 Pascal Obry <obry@adacore.com>
7754 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
7755 implementation of GNAT.Rewrite_Data.
7757 2014-07-16 Vincent Celier <celier@adacore.com>
7759 * gnatls.adb (Normalize): New function.
7760 (Gnatls): Get the target parameters. On targets other than VMS,
7761 normalize the path names in the source search path, the object search
7762 path and the project search path.
7764 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7766 * sem_case.adb: Avoid self-checking of case expressions in
7769 2014-07-16 Robert Dewar <dewar@adacore.com>
7771 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
7774 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
7776 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
7778 2014-07-16 Ben Brosgol <brosgol@adacore.com>
7780 * gnat_ugn.texi: Fix typo.
7782 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7784 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
7785 expression if it is the specification of a subtype predicate:
7786 it will be expanded when the return statement is analyzed, or
7787 when a static predicate is transformed into a static expression
7788 for evaluation by the front-end.
7789 * sem_ch13.adb (Get_RList): If the expression for a static
7790 predicate is a case expression, extract the alternatives of the
7791 branches with a True value to create the required statically
7792 evaluable expression.
7794 2014-07-16 Thomas Quinot <quinot@adacore.com>
7796 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
7797 expression, not the location of the aspect, for all generated
7798 code, so that in particular the call to raise_assert_failure
7799 gets the sloc of the associated condition.
7801 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
7802 Set an explicit End_Label on the handled sequence of statements
7803 for the _Postconditions procedure so that the implicit return
7804 statement does not erroneously get associated with code generated
7805 for the last condition in postconditions.
7807 2014-07-16 Thomas Quinot <quinot@adacore.com>
7809 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
7810 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
7811 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
7814 2014-07-16 Robert Dewar <dewar@adacore.com>
7816 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
7817 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
7818 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
7820 * par-ch4.adb (At_Start_Of_Attribute): New function
7821 (P_Simple_Expression): Better msg for bad attribute prefix.
7822 * scans.ads: Minor reformatting.
7824 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7826 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
7827 static constant, check that in belongs to the corresponding index
7828 subtype, to produce the proer warning when expansion is disabled.
7830 2014-07-16 Robert Dewar <dewar@adacore.com>
7832 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
7833 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
7834 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
7835 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
7836 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
7838 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
7839 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
7842 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
7844 * exp_ch7.adb (Process_Declarations): Reinstate the check on
7845 a hook object to ensure that the related transient declaration
7847 * exp_util.adb (Is_Aliased): Do not consider expresison with
7848 actions as a special context.
7849 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
7850 ensure that the related transient declaration is finalizable.
7852 2014-07-16 Robert Dewar <dewar@adacore.com>
7854 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
7855 * snames.ads-tmpl: Add Allocation_Check to list of check names.
7856 * types.ads: Add Allocation_Check to list of check names.
7858 2014-07-16 Thomas Quinot <quinot@adacore.com>
7860 * sem_util.adb (Enter_Name): replace bogus test for presence of
7861 Corresponding_Remote_Type with correct test on Ekind.
7862 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
7863 of calls to Corresponding_ Remote_Type (documentation fix).
7865 2014-07-16 Robert Dewar <dewar@adacore.com>
7867 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
7868 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
7870 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
7871 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
7873 2014-07-16 Robert Dewar <dewar@adacore.com>
7875 * gnat_ugn.texi: Document binder switch -Ra.
7876 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
7878 * opt.ads (List_Closure_All): New switch.
7879 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
7882 2014-07-16 Ben Brosgol <brosgol@adacore.com>
7884 * gnat_rm.texi: Minor edits, to make case consistent in names
7885 of types and fields.
7887 2014-07-16 Robert Dewar <dewar@adacore.com>
7889 * gnat_rm.texi: Document erroneous mixing of thin pointers and
7891 * gnat_ugn.texi: Add note on size of access types about thin
7892 pointers and the use of attribute Unrestricted_Access.
7894 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7896 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
7897 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
7898 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
7899 machinery to detect tampering on bounded vectors.
7901 2014-07-16 Robert Dewar <dewar@adacore.com>
7903 * gnat_rm.texi: Document that leading/trailing asterisks are
7904 now implied for the pattern match string for pragma Warnings
7905 and Warning_As_Error.
7906 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
7907 (Analyze_Pragma, case Warning_As_Error): Call
7908 Acquire_Warning_Match_String.
7909 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
7911 2014-07-16 Bob Duff <duff@adacore.com>
7913 * gnat_ugn.texi: Document need for project file
7914 for --incremental switch for gnat2xml.
7916 2014-07-16 Robert Dewar <dewar@adacore.com>
7918 * gnat_rm.texi: Fix example of non-packable components in packed
7921 2014-07-16 Robert Dewar <dewar@adacore.com>
7923 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
7924 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
7925 upper case in exception messages.
7927 2014-07-16 Robert Dewar <dewar@adacore.com>
7929 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
7930 is renamed Has_Same_Storage.
7931 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
7932 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
7935 2014-07-16 Robert Dewar <dewar@adacore.com>
7937 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
7938 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
7940 2014-07-16 Robert Dewar <dewar@adacore.com>
7942 * gnat_ugn.texi: Add note that integrated
7943 preprocessing cannot be applied to configuration pragma files.
7945 2014-07-16 Yannick Moy <moy@adacore.com>
7947 * sem_attr.adb (Analyze_Attribute/cases Pred
7948 and Succ): Always enable range check on fixed-point types if
7949 not suppressed for the type.
7951 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
7953 * sem_util.adb (State_Has_Enabled_Property):
7954 Account for an external property denoted by an others choice.
7956 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
7958 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
7959 * exp_ch7.adb (Process_Declarations): There is no need to check
7960 that a transient object being hooked is controlled as it would
7961 not have been hooked in the first place.
7962 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
7963 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
7964 (Is_Aliased): A renaming of a transient controlled object is
7965 not considered aliasing when it occurs within an expression
7967 (Requires_Cleanup_Actions): There is no need to
7968 check that a transient object being hooked is controlled as it
7969 would not have been hooked in the first place.
7970 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
7972 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
7974 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
7975 the outer level of routine Analyze_Aspect_Specifications. Ensure
7976 that the corresponding pragmas of aspects Initial_Condition and
7977 Initializes are inserted after pragma SPARK_Mode.
7979 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7981 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
7982 properly a choice list with more than one choice, where each
7983 is an aggregate denoting a sequence of array indices for a
7984 multidimentional array. For SPARK use.
7986 2014-07-16 Vadim Godunko <godunko@adacore.com>
7988 * a-coinho-shared.adb (Adjust): Create
7989 copy of internal shared object and element when source container
7992 (Query_Element): Likewise.
7993 (Update_Element): Likewise.
7994 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
7995 to get reference for empty holder.
7996 (Reference): Likewise.
7998 2014-07-16 Thomas Quinot <quinot@adacore.com>
8000 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
8001 from Process_Transient_Oject.
8002 * exp_ch4.ads: Ditto.
8003 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
8004 declaration as an action on the topmost enclosing expression,
8005 not on a possibly conditional subexpreession.
8007 2014-07-16 Vadim Godunko <godunko@adacore.com>
8009 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
8010 Fix parameter mode of Update_Element.
8012 2014-07-16 Robert Dewar <dewar@adacore.com>
8014 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
8017 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8019 * a-cohase.ads: Type Iterator must be controlled, so that the
8020 tampering bit is properly set through an iteration.
8021 * a-cohase.adb: Add Finalize operation for type Iterator.
8023 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8025 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
8028 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8030 * a-coinho-shared.adb: Fix spurious accessibility check.
8032 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8034 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
8036 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8039 * gnat_rm.texi: Fix errors with makeinfo 5.1.
8041 2014-06-14 Arnaud Charlet <charlet@adacore.com>
8044 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
8046 2014-06-13 Yannick Moy <moy@adacore.com>
8048 * exp_attr.adb: Fix typo in comment.
8049 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
8050 checking in GNATprove_Mode.
8052 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8054 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
8056 2014-06-13 Robert Dewar <dewar@adacore.com>
8058 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
8061 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8063 * sem_prag.adb (Analyze_Pragma): Add local
8064 variable Missing_Parentheses. Emit an error when a state
8065 declaration with options appears without parentheses. Add a
8066 guard to prevent a bogus error when a state declaration may be
8067 interpreted as an option if a previous declaration with options
8068 was not parenthesized.
8070 2014-06-13 Robert Dewar <dewar@adacore.com>
8072 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
8073 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
8074 * checks.ads (Alignment_Warnings_Record): New type.
8075 (Alignment_Warnings): New table
8076 (Validate_Alignment_Check_Warnings): New procedure.
8077 * errout.adb (Delete_Warning_And_Continuations): New procedure
8078 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
8079 Warnings_Treated_As_Errors (Finalize): Minor reformatting
8080 * errout.ads (Warning_Msg): New variable
8081 (Delete_Warning_And_Continuations): New procedure
8082 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
8083 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
8085 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8087 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
8089 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8091 * errout.adb (SPARK_Msg_N): New routine.
8092 (SPARK_Msg_NE): New routine.
8093 * errout.ads Add a section on SPARK-related error routines.
8094 (SPARK_Msg_N): New routine.
8095 (SPARK_Msg_NE): New routine.
8096 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
8097 pragma Abstract_State is always inserted after SPARK_Mode.
8098 (Insert_After_SPARK_Mode): New routine.
8099 * sem_prag.adb (Analyze_Abstract_State,
8100 Analyze_Constituent, Analyze_External_Property,
8101 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
8102 Analyze_Global_List, Analyze_Initialization_Item,
8103 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
8104 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
8105 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
8106 Analyze_Refined_Global_In_Decl_Part,
8107 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
8108 Check_Aspect_Specification_Order, Check_Constituent_Usage,
8109 Check_Declaration_Order, Check_Dependency_Clause,
8110 Check_Duplicate_Mode, Check_Duplicate_Option,
8111 Check_Duplicate_Property, Check_External_Properties,
8112 Check_External_Property, Check_Function_Return,
8113 Check_Matching_Constituent, Check_Matching_State,
8114 Check_Mode_Restriction_In_Enclosing_Context,
8115 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
8116 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
8117 Has_Extra_Parentheses, Inconsistent_Mode_Error,
8118 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
8119 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
8120 Report_Unrefined_States, Report_Unused_Constituents,
8121 Report_Unused_States, Role_Error, Usage_Error):
8122 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
8123 to report semantic errors only when SPARK_Mode is on.
8124 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
8125 pragma Depends explicitly, this is now done by the analysis.
8126 (Analyze_Global_In_Decl_List): Do not check the syntax of
8127 pragma Global explicitly, this is now done by the analysis.
8128 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
8129 pragma Initializes explicitly, this is now done by the analysis.
8130 (Analyze_Part_Of): Do not check the syntax of the encapsulating
8131 state, this is now done by the analysis.
8132 (Analyze_Pragma): Do
8133 not check the syntax of a state declaration, this is now done
8135 (Analyze_Refined_Depends_In_Decl_Part): Do not
8136 check the syntax of pragma Refined_Depends explicitly, this is now
8137 done by the analysis.
8138 (Analyze_Refined_Global_In_Decl_Part): Do
8139 not check the syntax of pragma Refined_Global explicitly, this is
8140 now done by the analysis.
8141 (Analyze_Refined_State_In_Decl_Part):
8142 Do not check the syntax of pragma Refined_State explicitly, this
8143 is now done by the analysis.
8144 (Check_Dependence_List_Syntax): Removed.
8145 (Check_Global_List_Syntax): Removed.
8146 (Check_Initialization_List_Syntax): Removed.
8147 (Check_Item_Syntax): Removed.
8148 (Check_Missing_Part_Of): Do not consider items from an instance.
8149 (Check_Refinement_List_Syntax): Removed.
8150 (Check_State_Declaration_Syntax): Removed.
8151 (Collect_Global_List): Do not raise Program_Error when the input is
8153 (Process_Global_List): Do not raise Program_Error when the input
8155 * sem_ch13.adb: Minor reformatting.
8157 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8159 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
8160 that is an interface definition with an interface list.
8161 (Process_Full_View): Move error message on missmatched interfaces
8162 between views to the declaration of full view, for clarity.
8163 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
8166 2014-06-13 Robert Dewar <dewar@adacore.com>
8168 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
8171 2014-06-13 Robert Dewar <dewar@adacore.com>
8173 * makeutl.adb: Minor reformatting.
8175 2014-06-13 Gail Schenker <schenker@adacore.com>
8177 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
8178 associated flag (d.z), no longer needed.
8180 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8182 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
8183 Export aspects, do not check whether a corresponding Convention
8184 aspect has been specified. Convention is optional in Ada2012,
8185 and defaults to Convention_Ada.
8187 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
8189 * checks.adb (Apply_Address_Clause_Check): Only issue the new
8190 warning if the propagation warning is issued.
8192 2014-06-13 Thomas Quinot <quinot@adacore.com>
8194 * exp_ch4.adb: Minor reformatting.
8196 2014-06-13 Robert Dewar <dewar@adacore.com>
8198 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
8199 Handle float range check case (Expand_N_Attribute_Reference,
8200 case Succ): Handle float range check case.
8201 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
8204 2014-06-13 Vincent Celier <celier@adacore.com>
8206 * makeutl.ads (Compute_Builder_Switches): Change name of
8207 parameter Root_Environment to Env.
8208 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
8209 Env parameter of procedure Get_Or_Create_Configuration_File.
8210 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
8211 of new parameter Env.
8212 * prj-conf.ads (Locate_Runtime): New parameter Env of type
8213 Prj.Tree.Environment.
8215 2014-06-13 Robert Dewar <dewar@adacore.com>
8217 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
8219 2014-06-13 Robert Dewar <dewar@adacore.com>
8221 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
8223 * sem_attr.adb: Minor code reformatting and simplification.
8224 * checks.adb: Fix minor typo.
8226 2014-06-13 Emmanuel Briot <briot@adacore.com>
8228 * g-comlin.adb (Get_Argument): fix expansion
8229 of command line arguments (e.g. "*.adb") when using a custom
8230 parser. The parser was not passed to the recursive call, and
8231 thus we were trying to do the expansion on the default command
8234 2014-06-13 Thomas Quinot <quinot@adacore.com>
8236 * exp_ch9.adb: Minor reformatting.
8238 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8240 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
8241 To determine whether the attribute should be expanded, examine
8242 whether the enclosing postcondition pragma is to be checked,
8243 rather than using the internal flag Assertions_Enabled.
8245 2014-06-13 Ben Brosgol <brosgol@adacore.com>
8247 * gnat_rm.texi: Minor fixes.
8248 * gnat_ugn.texi: Added a missing "@itemize".
8250 2014-06-13 Robert Dewar <dewar@adacore.com>
8252 * debug.adb: Remove -gnatd.1 flag documentation.
8253 * layout.adb (Layout_Type): Remove special handling of size
8254 for anonymous access type.
8255 * sem_ch3.adb (Replace_Type): Remove special handling of size
8256 for anonymous access type.
8258 2014-06-13 Robert Dewar <dewar@adacore.com>
8260 * debug.adb: Document debug flag -gnatd.1.
8261 * layout.adb (Layout_Type): Size change for anonymous access
8262 types under -gnatd.1.
8263 * sem_ch3.adb (Replace_Type): Size change for anonymous access
8264 types under -gnatd.1.
8266 2014-06-13 Robert Dewar <dewar@adacore.com>
8268 * layout.adb (Layout_Type): Anonymous access types designating
8269 unconstrained arrays are always thin pointers.
8270 * sem_ch3.adb (Replace_Type): Anonymous access types designating
8271 unconstrained arrays are always thin pointers.
8273 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8275 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
8276 to resolve the prefix of an attribute that is an entity name
8277 and may be a parameterless call. Minor code reorganization.
8279 2014-06-13 Robert Dewar <dewar@adacore.com>
8281 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
8283 * opt.ads (Compiler_Unit): New flag.
8284 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
8285 for null statement sequence (not allowed in compiler unit).
8286 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
8288 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
8290 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
8291 Check_Compiler_Unit.
8292 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
8293 Check_Compiler_Unit (this construct is not allowed in compiler
8295 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
8296 Set Opt.Compiler_Unit.
8298 2014-06-13 Geert Bosch <bosch@adacore.com>
8300 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
8301 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
8302 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
8304 2014-06-13 Robert Dewar <dewar@adacore.com>
8306 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
8308 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8310 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
8311 types in SPARK as it is poorly placed and poorly formulated. The
8312 check was flagging ALL volatile entities as illegal in SPARK.
8313 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
8314 types as illegal in SPARK.
8316 2014-06-13 Robert Dewar <dewar@adacore.com>
8318 * sem_cat.adb: Minor reformatting.
8320 2014-06-13 Yannick Moy <moy@adacore.com>
8322 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
8324 2014-06-13 Arnaud Charlet <charlet@adacore.com>
8326 * gnat_rm.texi: Add detail on SPARK_05 restriction.
8328 2014-06-13 Bob Duff <duff@adacore.com>
8330 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
8331 Add assertions requiring the secondary stack to be initialized.
8332 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
8333 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
8334 secondary stack is initialized before calling Init_Tasking_Soft_Links,
8335 by adding pragmas Elaborate_Body.
8337 2014-06-13 Thomas Quinot <quinot@adacore.com>
8339 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
8340 kludge disabling new legality check.
8342 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8344 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
8346 (Freeze_Type): Volatile types are now illegal in SPARK.
8348 2014-06-13 Robert Dewar <dewar@adacore.com>
8350 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
8351 * gnat_rm.texi: Document aspect Thread_Local_Storage.
8353 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8355 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
8356 value is a temporary that renames an aggregate is legal in a
8357 preelaborated unit. Illegalities, if any will be detected in
8358 the aggregate components.
8360 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8362 * einfo.ads: Minor reformatting an comment expansion.
8364 2014-06-13 Robert Dewar <dewar@adacore.com>
8366 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
8368 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
8370 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
8371 * sem_warn.adb: Minor reformatting.
8373 2014-06-13 Doug Rupp <rupp@adacore.com>
8375 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
8378 2014-06-13 Yannick Moy <moy@adacore.com>
8380 * sem_warn.adb (Check_Unset_References): Take
8381 case of Refined_Post into account in Within_Postcondition check.
8383 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8385 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
8388 2014-06-13 Yannick Moy <moy@adacore.com>
8390 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
8391 Aspect_Export): Consider that variables may be set outside the program.
8393 2014-06-13 Robert Dewar <dewar@adacore.com>
8395 * back_end.adb (Make_Id): New function.
8396 (Make_SC): New function.
8397 (Set_RND): New procedure.
8398 * back_end.ads (Make_Id): New function.
8399 (Make_SC): New function.
8400 (Set_RND): New procedure.
8401 * einfo.ads: Minor comment updates.
8402 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
8403 * gnat1drv.adb (Gnat1drv): New calling sequence for
8404 Get_Target_Parameters.
8405 (Gnat1drv): Move Atree.Initialize here from Frontend.
8406 * targparm.adb (Get_Target_Parameters): New calling
8407 sequence (Get_Target_Parameters): Handle pragma Restriction
8409 * targparm.ads (Get_Target_Parameters): New calling sequence.
8411 2014-06-13 Gary Dismukes <dismukes@adacore.com>
8413 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
8414 loop if the pragma does not come from source, so that an implicit
8415 pragma Import only applies to the first declaration, avoiding
8416 possible conflicts with earlier explicit and implicit declarations
8417 due to multiple Provide_Shift_Operators pragmas.
8418 (Set_Imported): Remove previous fix that bypassed pragma duplication
8420 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
8421 of Provide_Shift_Operators.
8423 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
8425 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
8426 string pointer directly to set_decl_section_name.
8428 2014-06-11 Robert Dewar <dewar@adacore.com>
8430 * sem_ch13.adb: Minor reformatting.
8432 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8434 * sem_prag.adb (Check_Clause_Syntax): Add new
8435 local variable Outputs. Account for the case where multiple
8436 output items appear as an aggregate.
8438 2014-06-11 Robert Dewar <dewar@adacore.com>
8440 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8443 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8445 * einfo.ads: Minor reformatting.
8447 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8449 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8450 new variable First_Node. Update the position after all insertions have
8451 taken place to First_Node.
8453 2014-06-11 Robert Dewar <dewar@adacore.com>
8455 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8456 * layout.adb (Layout_Type): Remove test of -gnatd.1.
8458 2014-06-11 Robert Dewar <dewar@adacore.com>
8460 * sem_ch13.adb: Minor reformatting.
8462 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8464 * sem_prag.adb (Check_Clause_Syntax): Add new
8465 local variable Outputs. Account for the case where multiple
8466 output items appear as an aggregate.
8468 2014-06-11 Robert Dewar <dewar@adacore.com>
8470 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8473 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8475 * einfo.ads: Minor reformatting.
8477 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8479 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8480 new variable First_Node. Update the position after all insertions have
8481 taken place to First_Node.
8483 2014-06-11 Robert Dewar <dewar@adacore.com>
8485 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8486 * layout.adb (Layout_Type): Remove test of -gnatd.1.
8488 2014-06-11 Thomas Quinot <quinot@adacore.com>
8490 * freeze.ads: Minor reformatting.
8491 * checks.adb (Determine_Range): Do not attempt to determine
8492 the range of a deferred constant whose full view has not been
8494 * sem_res.adb (Resolve): Remove undesirable guard against
8495 resolving expressions from expression functions.
8497 2014-06-11 Robert Dewar <dewar@adacore.com>
8499 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
8501 * layout.adb (Layout_Type): Make anonymous access types for
8502 subprogram formal types and return types always thin. For now
8503 only enabled if -gnatd.1 set.
8505 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8507 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8508 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
8509 subprogram must be a null procedure.
8511 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8513 * sem_prag.adb (Analyze_Input_Item): Allow formal
8514 parameters to appear as input_items in an initialization_list
8515 of pragma Initializes. Encapsulation now applies to states and
8516 variables only (as it should). Add RM references to key errors.
8517 * sem_prag.adb (Set_Imported): Suppress errors
8518 about preceding Imports when the pragma does not come from source,
8519 which can happen through use of pragma Provide_Shift_Operators.
8521 2014-06-11 Thomas Quinot <quinot@adacore.com>
8523 * sem_ch3.adb: Minor reformatting.
8524 * einfo.ads (Full_View): Minor comment update.
8526 2014-06-11 Robert Dewar <dewar@adacore.com>
8528 * einfo.adb (Is_Independent): New flag.
8529 * einfo.ads (Is_Independent): New flag.
8530 (Has_Independent_Components): Clean up and fix comments.
8531 * sem_prag.adb (Fix_Error): Deal with changing argument
8532 [of] to entity [for].
8533 (Analyze_Pragma, case Independent): Set Is_Independent flag
8534 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
8535 in all components of specified record.
8537 2014-06-11 Thomas Quinot <quinot@adacore.com>
8539 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
8540 Set proper Etype on bounds of dummy type created for analysis
8543 2014-06-11 Robert Dewar <dewar@adacore.com>
8545 * debug.adb: Minor comment fix (add missing section of dot
8548 2014-06-11 Robert Dewar <dewar@adacore.com>
8550 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
8551 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
8552 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
8553 * errout.adb (Output_Messages): Avoid duplicate output for
8554 library level instance.
8555 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
8556 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
8557 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
8558 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
8559 accomodate largest modulus value.
8560 * gnat_ugn.texi: Minor updates.
8562 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8564 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
8565 load body of generic package or its parent, if body is optional
8566 and the unit does not require a body.
8568 2014-06-11 Robert Dewar <dewar@adacore.com>
8570 * gnat_rm.texi: Document System.Unsigned_Types.
8571 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
8572 * s-unstyp.ads: Update comments (this is now user available unit).
8574 2014-06-11 Robert Dewar <dewar@adacore.com>
8576 * make.adb, sem_res.adb: Minor reformatting.
8578 2014-06-11 Thomas Quinot <quinot@adacore.com>
8580 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
8581 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
8582 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
8583 Preelaborate_05 to just Preelaborate in runtime units, and similarly
8584 change Pure_05 to just Pure.
8586 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8588 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
8589 analysis if error has been posted on subprogram body.
8591 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8593 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8594 rule given in RM 13.1 (8/1) for operational attributes to stream
8595 attributes: the attribute must apply to a first subtype. Fixes
8596 missing errors in ACATS test bdd2004.
8598 2014-06-11 Robert Dewar <dewar@adacore.com>
8600 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
8601 record type if restriction No_Implicit_Conditionals is active.
8602 (Expand_N_Object_Declaration): Don't allow default initialization
8603 for variant record type if restriction No_Implicit_Condition is active.
8604 (Build_Variant_Record_Equality): Don't build for variant
8605 record type if restriction No_Implicit_Conditionals is active.
8606 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
8607 No_Implicit_Conditionals.
8608 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
8610 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
8612 * i-cstrin.ads: Update comments.
8614 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8616 * sem_res.adb (Resolve_Selected_Component): Handle properly a
8617 selected component whose prefix is overloaded, when none of the
8618 interpretations matches the expected type.
8620 2014-06-11 Bob Duff <duff@adacore.com>
8622 * make.adb (Wait_For_Available_Slot): Give a more
8623 informative error message; if the ALI file is not found, print
8624 the full path of what it's looking for.
8626 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
8628 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
8629 option to specify the result file encoding.
8631 2014-06-11 Robert Dewar <dewar@adacore.com>
8633 * errout.ads, sem_ch12.adb: Minor reformatting.
8634 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
8635 * lib-xref.adb: Minor reformatting.
8636 * restrict.adb: Minor code reorganization (put routines in
8639 2014-06-11 Yannick Moy <moy@adacore.com>
8641 * einfo.ads: Minor typo in comment
8643 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8645 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
8646 formal private types and private type extensions, to indicate
8647 variable in a generic unit whose uninitialized use suggest that
8648 actual type should be fully initialized.
8649 Needs_Initialized_Actual: removed, functionaity replaced by
8651 * lib-xref.adb (Generate_Reference): Generate a reference for
8652 variables of a formal type when the unit is not the main unit,
8653 to enable appropriate warnings in an instance.
8654 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
8655 of variable in a generic unit that suggests that actual type
8656 should be full initialized.
8657 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
8658 and do not emot warning, which now only appears in an instance.
8660 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
8662 * gnat_ugn.texi: Fix minor typo.
8664 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8666 * sem_ch3.adb Add with and use clause for Sem_Ch10.
8667 (Analyze_Declarations): Code reformatting. Analyze the contract
8668 of a subprogram body stub at the end of the declarative region.
8669 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
8670 now a variable. Do not process the body if its contract is not
8671 available. Account for subprogram body stubs when extracting
8672 the corresponding spec.
8673 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
8675 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
8677 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
8678 Account for subprogram body stubs when extracting the
8680 (Analyze_Global_In_Decl_List):
8681 Account for subprogram body stubs when extracting the
8683 (Analyze_Refined_Depends_In_Decl_Part):
8684 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
8685 of the related body. Spec_Is now a variable. Account for
8686 subprogram body stubs when extracting the corresponding spec.
8687 (Analyze_Refined_Global_In_Decl_Part): Use
8688 Find_Related_Subprogram_Or_Body to retrieve the declaration
8689 of the related body. Spec_Is now a variable. Account for
8690 subprogram body stubs when extracting the corresponding spec.
8691 (Collect_Subprogram_Inputs_Output): Account for subprogram body
8692 stubs when extracting the corresponding spec.
8694 2014-06-11 Vincent Celier <celier@adacore.com>
8696 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
8699 2014-06-11 Robert Dewar <dewar@adacore.com>
8701 * debug.adb: Add debug flag -gnatd.q.
8702 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
8704 * styleg.adb (Check_Xtra_Parens): Message should be a style
8706 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
8707 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
8708 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
8709 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
8711 2014-06-11 Ben Brosgol <brosgol@adacore.com>
8713 * gnat_rm.texi: Revised chapter on Implementation Defined
8716 2014-06-11 Geert Bosch <bosch@adacore.com>
8718 * s-exctab.adb: avoid race conditions in exception registration.
8720 2014-06-11 Robert Dewar <dewar@adacore.com>
8722 * errout.adb (Warn_Insertion): New function.
8723 (Error_Msg): Use Warn_Insertion and Prescan_Message.
8724 (Error_Msg_Internal): Set Info field of error object.
8725 (Error_Msg_NEL): Use Prescan_Message.
8726 (Set_Msg_Text): Don't store info: at start of message.
8727 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
8728 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
8729 * errout.ads: Document new ?$? and >$> insertion sequences
8730 Document use of "(style)" and "info: "
8731 * erroutc.adb (dmsg): Print several missing fields
8732 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
8733 Deal with new tagging of info messages
8734 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
8735 Add field Info (Prescan_Message): New procedure, this procedure
8736 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
8737 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
8738 sem_elab.adb: Follow new rules for info message (info belongs
8739 only at the start of a message, and only in the first message,
8740 not in any of the continuations).
8741 * gnat_ugn.texi: Document full set of warning tags.
8743 2014-06-11 Gary Dismukes <dismukes@adacore.com>
8745 * sem_util.adb: Minor typo fix.
8747 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8749 * sem_warn.adb (Check_References): Do not emit spurious warnings
8750 on uninitialzed variable of a formal private type if variable
8753 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
8755 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
8756 set_decl_section_name accessor.
8758 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8760 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8761 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8762 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8764 2014-05-21 Robert Dewar <dewar@adacore.com>
8766 * layout.adb: Minor reformatting.
8767 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
8770 2014-05-21 Robert Dewar <dewar@adacore.com>
8772 * restrict.ads (Implementation_Restriction): Add entry for
8774 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
8775 Ada.[Wide_[Wide_]Text_IO.
8776 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
8777 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
8778 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
8779 Wide_Wide_Value if restriction No_Fixed_IO is set.
8780 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
8782 2014-05-21 Robert Dewar <dewar@adacore.com>
8784 * gnatcmd.adb: Minor error msg changes (no upper case letter
8786 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
8789 2014-05-21 Robert Dewar <dewar@adacore.com>
8791 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
8792 via generic formals.
8793 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
8796 2014-05-21 Thomas Quinot <quinot@adacore.com>
8798 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
8799 more accurately describe that this subprogram needs to come into
8800 play also in cases where no byte swapping is involved, because
8801 it also takes care of some required shifts (left-justification
8804 2014-05-21 Thomas Quinot <quinot@adacore.com>
8806 * freeze.adb (Check_Component_Storage_Order): Indicate whether
8807 a Scalar_Storage_Order attribute definition is present for the
8809 (Freeze_Record_Type): Suppress junk warnings
8810 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
8813 2014-05-21 Robert Dewar <dewar@adacore.com>
8815 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
8816 to Kill_Elaboration_Checks.
8818 2014-05-21 Gary Dismukes <dismukes@adacore.com>
8820 * layout.adb (Assoc_Add): Suppress the optimization of the (E
8821 - C1) + C2 case, when the expression type is unsigned and C1 <
8822 C2, to avoid creating a negative literal when folding.
8824 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
8826 * freeze.adb (Freeze_Record_Type): Update the use of
8828 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
8830 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
8831 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
8832 of Is_SPARK_Volatile.
8833 (Analyze_Loop_Parameter_Specification):
8834 Update the use of Is_SPARK_Volatile.
8835 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
8836 formal parameter when its type is volatile.
8837 * sem_prag.adb (Analyze_Global_Item): Update the use of
8839 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
8840 determines whether an entity is a volatile source SPARK object.
8841 * sem_util.adb (Has_Enabled_Property): Accout for external
8842 properties being set on objects other than abstract states
8843 and variables. An example would be a formal parameter.
8844 (Is_SPARK_Volatile): New routine.
8845 (Is_SPARK_Volatile_Object):
8846 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
8847 when checking entities and/or types.
8848 * sem_util.ads (Is_SPARK_Volatile): New routine.
8850 2014-05-21 Robert Dewar <dewar@adacore.com>
8852 * sem_warn.adb: Minor fix to warning messages (use ?? instead
8855 2014-05-21 Vincent Celier <celier@adacore.com>
8857 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
8858 switch --version and --help.
8860 2014-05-21 Robert Dewar <dewar@adacore.com>
8862 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
8864 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8866 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
8867 iterator variable when the domain of iteration is a formal
8868 container and this is an element iterator.
8870 2014-05-21 Bob Duff <duff@adacore.com>
8872 * sem_ch12.adb: Minor reformatting.
8874 2014-05-21 Robert Dewar <dewar@adacore.com>
8876 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
8878 2014-05-21 Robert Dewar <dewar@adacore.com>
8880 * sem_elab.adb: Minor reformatting.
8881 * s-taprop.ads: Minor comment fix.
8882 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
8883 Kill_Elaboration_Checks.
8884 * errout.adb, erroutc.adb: Minor reformatting.
8886 2014-05-21 Thomas Quinot <quinot@adacore.com>
8888 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
8889 component. No byte swapping occurs, but this procedure also takes
8890 care of appropriately justifying the argument.
8892 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
8894 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
8896 (Analyze_Subprogram_Body_Helper): Move the
8897 analysis of aspect specifications and the processing of the
8898 subprogram body contract after inlining has taken place.
8899 (Diagnose_Misplaced_Aspect_Specifications): Removed.
8901 2014-05-21 Javier Miranda <miranda@adacore.com>
8903 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
8905 2014-05-21 Robert Dewar <dewar@adacore.com>
8907 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
8908 continuations any more.
8910 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8912 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
8913 present in formal_Private_Definitions and on private extension
8914 declarations of a formal derived type. Set when the use of the
8915 formal type in a generic suggests that the actual should be a
8916 fully initialized type.
8917 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
8918 to indicate that an entity of a generic type has default
8919 initialization, and that the corresponing actual type in any
8920 subsequent instantiation should be fully initialized.
8921 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
8922 to emit a warning if the actual for a generic type on which
8923 Needs_Initialized_Actual is set is not a fully initialized type.
8925 2014-05-21 Robert Dewar <dewar@adacore.com>
8927 * sem_elab.adb, prj-dect.adb: Minor reformatting.
8929 2014-05-21 Robert Dewar <dewar@adacore.com>
8931 * erroutc.ads: Minor comment addition.
8933 2014-05-21 Robert Dewar <dewar@adacore.com>
8935 * errout.ads: Add documentation for use of >*> tag.
8936 * restrict.adb: Make sure we use >*> tag for restriction warnings.
8938 2014-05-21 Gary Dismukes <dismukes@adacore.com>
8940 * debug.adb: Add case of illegal overriding_indicator for a
8941 protected subprogram body to description of -gnatd.E switch.
8942 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
8943 for cases of giving overriding_indicators on protected subprogram
8944 bodies, but change this to a warning if -gnatd.E is enabled. No
8945 longer give a style warning about missing indicators on protected
8948 2014-05-21 Robert Dewar <dewar@adacore.com>
8950 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
8951 sem_elab.ads: Minor reformatting.
8952 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
8955 2014-05-21 Pascal Obry <obry@adacore.com>
8957 * prj-dect.adb: Allow package Install in aggregate project.
8959 2014-05-21 Robert Dewar <dewar@adacore.com>
8961 * sem_ch13.adb (Analyze_Aspect_Specifications):
8962 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
8963 * sem_prag.adb: Minor comment improvements.
8965 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8967 * sem_ch12.adb (Install_Body): When checking whether freezing of
8968 instantiation must be delayed, verify that the common enclosing
8969 subprogram to generic and instance is in fact an overloadable
8972 2014-05-21 Vincent Celier <celier@adacore.com>
8974 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
8975 mains with the same name and fail if there is more than one.
8976 * prj.ads, prj.adb (Find_All_Sources): New function
8978 2014-05-21 Robert Dewar <dewar@adacore.com>
8980 * sem_ch13.adb: Minor reformatting.
8981 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
8982 * sem_prag.adb: Minor error message improvement.
8984 2014-05-21 Yannick Moy <moy@adacore.com>
8986 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
8987 (Enclosing_Subprogram_Or_Package): Only return a library-level
8990 2014-05-21 Javier Miranda <miranda@adacore.com>
8992 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
8993 to the full view of the parent type when processing a derived type
8994 which is the full view of a private type not defined in a generic
8995 unit which is derived from a private type with discriminants
8996 whose full view is a non-tagged record type.
8998 2014-05-21 Javier Miranda <miranda@adacore.com>
9000 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
9001 Complete previous patch.
9003 2014-05-21 Thomas Quinot <quinot@adacore.com>
9006 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
9007 Provide a behaviour more consistent with underlying datagram
9008 socket: do not attempt to loop over Send_Socket/Receive_Socket
9009 iterating along the buffer.
9011 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
9013 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
9014 or a tagged type is not labelled as volatile. Ensure that a
9015 non-volatile type has no volatile components.
9016 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
9017 Obj_Typ. Code reformatting. Ensure that a discriminated or
9018 tagged object is not labelled as volatile.
9019 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
9020 pragma Volatile applies to a full type declaration or an object
9021 declaration when SPARK mode is on.
9023 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
9025 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
9026 providing options needed for compiling the argument source for
9027 the situation when a project file can be used as a tool parameter.
9029 2014-05-21 Gary Dismukes <dismukes@adacore.com>
9031 * gnat_rm.texi: Minor typo fix.
9033 2014-05-21 Robert Dewar <dewar@adacore.com>
9035 * stand.adb (Tree_Read): Read missing entities.
9036 (Tree_Write): Write missing entities.
9038 2014-05-21 Ben Brosgol <brosgol@adacore.com>
9040 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
9041 section in gnatmetric chapter.
9043 2014-05-21 Robert Dewar <dewar@adacore.com>
9045 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
9046 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
9047 post-call copy write back (see detailed comment in code).
9048 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
9050 * tbuild.ads: Minor reformatting.
9052 2014-05-21 Robert Dewar <dewar@adacore.com>
9054 * stand.ads: Add warning about adding new entities and
9055 Tree_Read/Tree_Write.
9057 2014-05-21 Robert Dewar <dewar@adacore.com>
9059 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
9060 references to restricted entities within the units in which they
9063 2014-05-21 Robert Dewar <dewar@adacore.com>
9065 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
9066 simplify the needed test, and also deal with failure to catch
9067 situations with non-standard names.
9068 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
9069 (Source_File_Is_Subunit): Removed, no longer used.
9071 2014-05-21 Javier Miranda <miranda@adacore.com>
9074 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
9075 renaming of an access to interface object there is no need to
9076 generate extra code to reference the tag.
9078 2014-05-21 Robert Dewar <dewar@adacore.com>
9080 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
9081 Warnings (Off, string).
9083 2014-05-21 Robert Dewar <dewar@adacore.com>
9085 * osint.adb: Fix three error messages to say invalid instead
9087 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
9088 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
9089 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
9091 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9093 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
9094 sem_ch9.ads: Move discriminant manipulation routines for analysis of
9095 aspect specifications from sem_ch9 to sem_ch13, where they belong.
9097 2014-05-21 Robert Dewar <dewar@adacore.com>
9099 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
9100 Clearly document -gnatyg (GNAT style switches).
9101 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
9102 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
9103 available for VMS after all.
9104 * warnsw.adb: Reorganize to eliminate duplicated code
9105 (Restore_Warnings): Add a couple of missing entries
9106 (Save_Warnings): Add a couple of missing entries.
9107 * warnsw.ads: Add missing entries to Warning_Record (not clear
9108 what the impact is).
9110 2014-05-21 Robert Dewar <dewar@adacore.com>
9112 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
9114 * errout.ads: Document ?*? (restriction warning) insertion.
9115 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
9117 * erroutc.ads: Document use of * for restriction warning tag.
9118 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
9120 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9122 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
9123 make discriminants immediately visible when analyzing an aspect
9124 of a subtype declaration.
9125 (Uninstall_Discriminants): Do not apply to the entity in a
9126 subtype declaration.
9128 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9130 * sem_util.adb: Code clean up.
9132 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
9134 * gnat_ugn.texi: Document -Werror.
9136 2014-05-21 Bob Duff <duff@adacore.com>
9138 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
9139 This was returning False if the Object is a constant view. Fix
9140 it to return True in that case, because it might be a view of
9142 (Has_Discriminant_Dependent_Constraint): Fix latent
9143 bug; this function was crashing when passed a discriminant.
9145 2014-05-21 Robert Dewar <dewar@adacore.com>
9147 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
9148 * s-arit64.adb: Minor code reorganization.
9149 * sem_prag.adb: Minor comment fix (remove erroneous use of the
9152 2014-05-21 Robert Dewar <dewar@adacore.com>
9154 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
9155 computing new table size.
9157 2014-05-21 Robert Dewar <dewar@adacore.com>
9159 * einfo.ads: Minor reformatting.
9160 * ceinfo.adb: Deal with slight format change of einfo.ads.
9162 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9164 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
9165 implementation of the SPARK 2014 rule concerning private child
9168 2014-05-21 Vincent Celier <celier@adacore.com>
9170 * makeusg.adb: Add switch -d to usage.
9172 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9174 * sem_util.adb (Find_Actual): If an actual that is the prefix
9175 of an enclosing prefixed call has been rewritten, use Nkind
9176 and Sloc to identify the corresponding formal, when handling
9177 deferred references.
9179 2014-05-21 Robert Dewar <dewar@adacore.com>
9181 * debug.adb: Document -gnatd.z switch.
9182 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
9184 2014-05-21 Robert Dewar <dewar@adacore.com>
9186 * einfo.ads (Can_Never_Be_Null): Minor comment update.
9187 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
9188 error message change.
9189 * s-arit64.adb ("abs"): New function. Use expression functions
9190 for the simple conversions and arithmetic.
9192 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9194 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
9195 set function_start_locus.
9197 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9199 * utils.c (gnat_write_global_declarations): Adjust the flags put on
9202 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9204 * gcc-interface/decl.c (change_qualified_type): New static function.
9205 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
9206 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
9207 <E_Array_Subtype>: Likewise.
9208 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
9209 (gnat_to_gnu_component_type): Likewise.
9210 (gnat_to_gnu_param): Likewise.
9212 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9214 * fe.h (Set_Present_Expr): Move around.
9215 (End_Location): New macro.
9216 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
9218 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9220 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
9221 lieu of more verbose construct.
9222 * gcc-interface/trans.c (Call_to_gnu): Likewise.
9223 (gnat_to_gnu): Likewise. Remove obsolete code.
9225 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9227 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
9228 consider that regular packed arrays can never be superflat.
9230 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9232 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
9234 * gcc-interface/decl.c (annotate_value): Adjust.
9235 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
9236 (push_range_check_info): Likewise.
9237 (Loop_Statement_to_gnu): Likewise.
9238 (Subprogram_Body_to_gnu): Likewise.
9239 (Compilation_Unit_to_gnu): Likewise.
9240 (start_stmt_group): Likewise.
9241 * gcc-interface/utils.c (init_gnat_utils): Likewise.
9242 (gnat_pushlevel): Likewise.
9243 (maybe_pad_type): Likewise.
9245 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
9247 * seh_init.c: Fix copyright year.
9249 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9251 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
9252 are defined. Move include windows.h before system.h.
9253 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
9254 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
9256 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
9258 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
9259 to the appropriate type.
9260 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
9261 (pos_to_constructor): Likewise.
9263 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
9265 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
9267 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9268 Mike Stump <mikestump@comcast.net>
9269 Richard Sandiford <rdsandiford@googlemail.com>
9271 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
9272 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
9273 (annotate_value): Use wide-int interfaces.
9274 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
9276 2014-04-28 Richard Henderson <rth@redhat.com>
9278 * gcc-interface/Makefile.in: Support aarch64-linux.
9280 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
9282 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
9283 add 'Suffix' parameter and adjust comment.
9284 (Get_External_Name_With_Suffix): Delete.
9285 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
9286 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
9288 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
9289 Call Get_External_Name instead of Get_External_Name_With_Suffix.
9290 (Get_Secondary_DT_External_Name): Likewise.
9291 * exp_cg.adb (Write_Call_Info): Likewise.
9292 * exp_disp.adb (Export_DT): Likewise.
9293 (Import_DT): Likewise.
9294 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
9295 parameter with False default.
9296 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
9297 * types.h (Fat_Pointer): Rename into...
9298 (String_Pointer): ...this. Add comment on interfacing rules.
9299 * fe.h (Compiler_Abort): Adjust for above renaming.
9300 (Error_Msg_N): Likewise.
9301 (Error_Msg_NE): Likewise.
9302 (Get_External_Name): Likewise. Add third parameter.
9303 (Get_External_Name_With_Suffix): Delete.
9304 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
9305 (create_concat_name): Adjust call to Get_External_Name, remove call to
9306 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
9307 * gcc-interface/trans.c (post_error): Likewise.
9308 (post_error_ne): Likewise.
9309 * gcc-interface/misc.c (internal_error_function): Likewise.
9311 2014-04-28 Richard Biener <rguenther@suse.de>
9314 * gcc-interface/utils.c: Define flag_isoc11.
9316 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
9318 * gnatvsn.ads (Library_Version): Bump to 4.10.
9320 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
9323 2014-04-22 Richard Henderson <rth@redhat.com>
9325 * gcc-interface/Makefile.in: Support aarch64-linux.
9327 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
9329 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9330 (Error_Msg_N): Likewise.
9331 (Error_Msg_NE): Likewise.
9332 (Get_External_Name_With_Suffix): Likewise.
9333 * types.h (Fat_Pointer): Delete.
9334 (String_Pointer): New type.
9335 (DECLARE_STRING_POINTER): New macro.
9336 * gcc-interface/decl.c (create_concat_name): Adjust.
9337 * gcc-interface/trans.c (post_error): Likewise.
9338 (post_error_ne): Likewise.
9339 * gcc-interface/misc.c (internal_error_function): Likewise.
9341 2014-04-22 Richard Henderson <rth@redhat.com>
9343 * gcc-interface/Makefile.in: Support aarch64-linux.
9345 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
9346 (__gnat_alternate_stack): Enable for all linux except ia64.
9348 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
9350 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9351 (Error_Msg_N): Likewise.
9352 (Error_Msg_NE): Likewise.
9353 (Get_External_Name_With_Suffix): Likewise.
9354 * types.h (Fat_Pointer): Delete.
9355 (String_Pointer): New type.
9356 (DECLARE_STRING_POINTER): New macro.
9357 * gcc-interface/decl.c (create_concat_name): Adjust.
9358 * gcc-interface/trans.c (post_error): Likewise.
9359 (post_error_ne): Likewise.
9360 * gcc-interface/misc.c (internal_error_function): Likewise.
9362 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9363 Pierre-Marie de Rodat <derodat@adacore.com>
9365 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
9366 scalar constant instead of a reference for renaming of scalar literal.
9367 Do not create a new object for constant renaming except for a function
9368 call. Make sure a VAR_DECL is created for the renaming pointer.
9369 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
9370 (fold_constant_decl_in_expr): New function.
9371 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
9372 For a constant renaming, try to fold a constant DECL in the result.
9373 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
9374 (Identifier_to_gnu): Reference the renamed object of constant renaming
9376 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
9377 invalidate constant renaming pointers.
9379 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9381 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
9382 (build_vector_type_for_size): New function.
9383 (build_vector_type_for_array): Likewise.
9384 (unchecked_convert): Build an intermediate vector type to convert
9385 from a generic array type to a vector type.
9386 (handle_vector_size_attribute): Reimplement.
9387 (handle_vector_type_attribute): Likewise.
9389 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9391 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
9392 Is_OK_Static_Expression in lieu of Is_Static_Expression to
9393 detect valid arguments.
9395 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9397 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
9399 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
9401 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
9402 (components_to_record): Likewise.
9403 * gcc-interface/utils.c (make_aligning_type): Likewise.
9404 (maybe_pad_type): Likewise.
9405 (finish_record_type): Likewise.
9406 (rest_of_record_type_compilation): Likewise.
9408 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
9410 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
9411 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
9413 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
9414 hint for Loop_Optimize.
9415 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
9416 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9417 with new Ivdep hint.
9418 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
9419 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9420 with new Ivdep hint.
9421 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
9423 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
9424 Robert Dewar <dewar@adacore.com>
9426 * opt.ads (Suppress_Back_Annotation): Remove as unused.
9427 * fe.h (Back_Annotate_Rep_Info): Likewise.
9428 (Global_Discard_Names): Likewise.
9429 (List_Representation_Info): Declare.
9430 * types.h (Uint_Minus_1): Likewise.
9431 * repinfo.ads: Document back-annotation change.
9432 * gcc-interface/gigi.h (init_gnat_decl): Declare.
9433 (destroy_gnat_decl): Likewise.
9434 * gcc-interface/decl.c (annotate_value): Do not create the cache of
9435 annotated values here but...
9436 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
9438 (init_gnat_decl): ...here instead. New function.
9439 (destroy_gnat_decl): Likewise.
9440 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
9441 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
9443 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
9445 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
9446 offset for the field, if any.
9448 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
9449 Svante Signell <svante.signell@gmail.com>
9453 * s-osinte-x32.adb: New file.
9454 * s-linux.ads (Time): New section.
9455 * s-linux-alpha.ads (Time): Likewise.
9456 * s-linux-android.ads (Time: Likewise.
9457 * s-linux-hppa.ads (Time): Likewise.
9458 * s-linux-mipsel.ads (Time): Likewise.
9459 * s-linux-sparc.ads (Time): Likewise.
9460 * s-linux-x32.ads (Time): Likewise.
9461 * s-osprim-x32.ads (timespec): Adjust.
9463 (To_Timespec): Likewise.
9464 * s-osinte-linux.ads (Time): Define local subtypes for those defined
9466 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
9467 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
9468 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
9469 * s-osinte-solaris-posix.ads (timespec): Likewise.
9470 * s-osinte-posix.adb (To_Timespec): Likewise.
9471 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
9473 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
9476 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
9477 * s-linux-android.ads: New file.
9478 * s-intman-android.adb: Likewise.
9479 * s-osinte-android.ads: Adjust.
9480 * sigtramp-armdroid.c: Likewise.
9481 * sigtramp.h: Add Android support.
9483 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
9485 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
9487 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
9490 * system-linux-alpha.ads: Adjust for Ada 2005.
9491 * system-linux-mips.ads: Likewise.
9492 * system-linux-mips64el.ads: Likewise.
9493 * system-linux-mipsel.ads: Likewise.
9494 * system-linux-s390.ads: Likewise.
9495 * system-linux-s390x.ads: Likewise.
9496 * system-linux-sparc.ads: Likewise.
9497 * system-linux-sparcv9.ads: Likewise.
9498 * system-rtems.ads: Likewise.
9499 * system-vxworks-arm.ads: Likewise.
9501 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
9504 * gcc-interface/Makefile.in (target_cpu_default): Revert
9507 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
9510 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
9511 it to set the RM size. Use directly 'size' for the Esize.
9512 (Create_Back_End_Float_Types): Adjust call to above.
9513 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
9514 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
9515 (Write_Target_Dependent_Values): Adjust comment.
9516 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
9518 (Write_Target_Dependent_Values): Write the precision in lieu of size.
9519 (Initialization): Read the precision in lieu of size and compute the
9520 size from the precision and the alignment.
9521 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
9522 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
9523 types for vector modes, pass the size in addition to the precision.
9525 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
9527 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
9529 2014-03-07 Doug Rupp <rupp@adacore.com>
9532 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
9533 (Support_64_Bit_Divides): Removed, no longer used.
9534 (ZCX_By_Default): Enabled.
9536 2014-02-25 Doug Rupp <rupp@adacore.com>
9538 * gcc-interface/Makefile.in (arm-linux):
9539 (EH_MECHANISM): Use ARM unwinder (-arm)
9540 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
9542 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
9543 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
9544 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
9545 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
9546 Add dependencies for sigtramp-armvxw.o.
9548 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9550 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
9552 2014-02-25 Robert Dewar <dewar@adacore.com>
9554 * rtsfind.adb (Is_RTE): Protect against entity with no scope
9555 field (previously this call blew up on the Standard entity).
9556 * sem_attr.adb (Analyze_Attribute, case Access): Remove
9557 test for No_Abort_Statements, this is now handled in
9558 Set_Entity_With_Checks.
9559 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
9560 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
9561 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
9562 Set_Entity_With_Checks.
9563 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
9564 Add checks for No_Abort_Statements.
9566 2014-02-25 Robert Dewar <dewar@adacore.com>
9568 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
9569 Check_Restriction is OK.
9571 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9573 * sem_ch3.adb (Process_Full_View): Better error message when
9574 the full view of a private type without discriminants is an
9576 * sem_ch7.adb (Uninstall_Declarations): Ditto.
9578 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9580 * sigtramp-armvxw.c: Also restore r0.
9582 2014-02-25 Robert Dewar <dewar@adacore.com>
9584 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
9585 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
9586 set unconditionally.
9587 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
9588 any more (Output_Msg_Text): Rewritten with new convention on
9589 output of warnings that are treated as errors.
9590 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
9592 * gnat_rm.texi: Updates to documentation on pragma
9594 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
9595 set Warning_Doc_Switch.
9596 * lib-writ.ads: Add documentation note on ALI file generation
9598 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
9600 * sem_attr.adb (Resolve_Attribute, case Access):
9601 Abort_Task'Access violates the No_Abort_Statements restriction.
9602 * sem_res.adb (Resolve_Call): Check restriction
9603 No_Abort_Statements for call to Abort_Task or a renaming of it.
9605 2014-02-25 Robert Dewar <dewar@adacore.com>
9607 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
9609 * lib.ads: Minor reformatting.
9610 * einfo.ads: Minor reformatting.
9612 2014-02-25 Doug Rupp <rupp@adacore.com>
9614 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
9615 use Short_Descriptor(S) as the argument passing mechanism.
9617 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9619 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
9621 2014-02-25 Robert Dewar <dewar@adacore.com>
9623 * atree.ads (Warnings_Treated_As_Errors): New variable.
9624 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
9625 error object (Initialize): Initialize Warnings_As_Errors_Count
9626 (Write_Error_Summary): Include count of warnings treated as errors.
9627 * erroutc.adb (Warning_Treated_As_Error): New function.
9628 (Matches): Function moved to outer level of package.
9629 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
9630 (Warning_Treated_As_Error): New function.
9631 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
9632 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
9633 * opt.ads (Config_Switches_Type): Add entry for
9634 Warnings_As_Errors_Count.
9635 (Warnings_As_Errors_Count): New variable.
9636 (Warnings_As_Errors): New array.
9637 * par-prag.adb: Add dummy entry for Warning_As_Error.
9638 * sem_prag.adb (Analyze_Pragma): Implement new pragma
9640 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
9642 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9644 * sigtramp.h: Fix minor inaccuracy.
9646 2014-02-25 Ben Brosgol <brosgol@adacore.com>
9648 * gnat_ugn.texi: Added description of kill command.
9650 2014-02-25 Robert Dewar <dewar@adacore.com>
9652 * gnat_rm.texi (Address_Clauses): Add a section discussing the
9653 problem of address clauses causing unexpected initialization,
9654 including the effect of Initialize_Scalars.
9656 2014-02-25 Robert Dewar <dewar@adacore.com>
9658 * errout.adb: Various changes for better msgs for anonmous access
9660 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
9662 (Buffer_Remove): Version with character argument.
9663 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
9664 of mismatching conventions for access-to-subprogram case.
9665 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
9666 access types in record.
9667 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
9668 types, including in records.
9670 2014-02-25 Doug Rupp <rupp@adacore.com>
9672 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
9673 enhancements and corrections.
9675 2014-02-25 Robert Dewar <dewar@adacore.com>
9677 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
9679 2014-02-25 Robert Dewar <dewar@adacore.com>
9681 * gnat_rm.texi: First set of documentation additions for
9682 predefined RM units.
9683 * checks.adb: Minor reformatting.
9684 * sem_elab.adb (Check_Task_Activation): Minor fix to error
9686 * sem_util.adb: Minor reformatting.
9688 2014-02-25 Arnaud Charlet <charlet@adacore.com>
9690 * usage.adb (Usage): Add help on -gnateC.
9691 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
9692 * opt.ads (Generate_CodePeer_Messages): New flag.
9693 * gnat_ugn.texi: Document new switch -gnateC.
9695 2014-02-25 Ben Brosgol <brosgol@adacore.com>
9697 * gnat_rm.texi: Corrected minor typos in Implementation Defined
9699 * opt.ads: Minor reformatting.
9701 2014-02-25 Robert Dewar <dewar@adacore.com>
9703 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
9704 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
9706 * opt.ads (Warn_Info_Messages): New flag.
9707 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
9709 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
9711 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
9712 * usage.adb: Add documentation of -gnatel/-gnateL Update
9713 documentation of -gnatwl/-gnatwL.
9714 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
9715 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
9717 2014-02-25 Robert Dewar <dewar@adacore.com>
9719 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
9720 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
9721 * interfac.ads: Minor code reorganization (add pragma
9722 Compiler_Unit_Warning).
9723 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
9724 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
9725 Has_Shift_Operator flag.
9726 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
9727 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
9728 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
9729 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
9730 Add entry for Name_Amount.
9731 * checks.adb (Selected_Range_Checks): When checking for a null
9732 range, make sure we use the base type, and not the subtype for
9733 deciding a range is null.
9734 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
9735 for suspicious loop bound which is outside the range of the
9737 * gnat_ugn.texi: Add documentation section "Determining the
9738 Chosen Elaboration Order"
9739 * sem_ch13.adb (UC_Entry): Add field Act_Unit
9740 (Validate_Unchecked_Conversion): Store Act_Unit
9741 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
9742 * treepr.adb: Minor reformatting.
9744 2014-02-25 Arnaud Charlet <charlet@adacore.com>
9746 * usage.adb: Minor: fix typo.
9748 2014-02-25 Robert Dewar <dewar@adacore.com>
9750 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
9751 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
9752 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
9753 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
9754 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
9755 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
9756 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
9757 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
9758 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
9759 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
9760 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
9761 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
9762 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
9763 Compiler_Unit_Warning, change Compiler_Unit everywhere to
9764 Compiler_Unit_Warning.
9766 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
9768 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
9769 in ASIS mode aggregates that are used as aspect definitions.
9771 2014-02-25 Robert Dewar <dewar@adacore.com>
9773 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
9776 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9778 * freeze.adb (Freeze_Entity): If the return type of a function
9779 is a limited view, and the non-limited view has not been seen yet,
9780 defer freezing to some later point.
9782 2014-02-25 Robert Dewar <dewar@adacore.com>
9784 * sem_ch3.adb: Minor reformatting.
9786 2014-02-25 Robert Dewar <dewar@adacore.com>
9788 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
9789 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
9790 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
9791 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
9792 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
9793 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
9794 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
9795 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
9796 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
9797 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
9798 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
9799 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
9800 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
9801 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
9802 snames.ads-tmpl: Change Compiler_Unit everywhere to
9803 Compiler_Unit_Warning.
9805 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
9807 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
9808 (Collect_Body_Postconditions_In_Decls): New routine.
9809 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
9810 postcondition aspects or pragmas that appear on a subprogram
9812 (Collect_Spec_Preconditions): Factor out code. Handle
9813 precondition aspects or pragmas that appear on a subprogram
9815 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
9816 aspects that apply to a subprogram body stub is no longer delayed,
9817 the aspects are analyzed on the spot.
9818 (SPARK_Aspect_Error):
9819 Aspects that apply to a subprogram declaration cannot appear in
9821 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
9822 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
9823 is now a local variable. Code cleanup. Analysis related to
9824 the aspects of a subprogram body stub is now carried out by
9825 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
9826 and/or pragmas of a subprogram body stub to the proper body
9827 as this is no longer needed. Do not analyze the aspects of a
9828 subprogram stub when the corresponding source unit is missing.
9829 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
9831 (Analyze_Task_Body_Stub): Flag the illegal use of
9833 (Optional_Subunit): Add local variable Unum.
9834 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
9835 pragma when it applies to a subprogram body stub.
9836 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
9837 Depends and Global can now apply to a subprogram body stub as
9838 long as it acts as its own spec.
9839 (Analyze_Refined_Pragma):
9840 Code reformatting. Refinement pragmas cannot apply to a subunit.
9842 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
9844 * einfo.ads Update the usage of flag
9845 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
9846 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
9847 now starts with the letter 'C'. This makes reading expanded
9849 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
9850 Iter_Loop. Signal that an Ada 2012 iterator loop requires
9851 secondary stack management when creating a transient scope for
9852 an element reference.
9853 * exp_util.adb (Process_Statements_For_Controlled_Objects):
9854 When wrapping the statements of a loop, pass the E_Loop entity
9855 to the wrapping machinery.
9856 (Wrap_Statements_In_Block): Add
9857 formal parameter Scop along with comment on usage. Add local
9858 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
9859 block as requiring secondary stack management when the block is
9860 created inside an Ada 2012 iterator loop. This ensures that any
9861 reference objects are reclaimed on each iteration of the loop.
9862 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
9863 tasked with the handling of container iterators as requiring
9864 secondary stack management. This ensures that iterators are
9865 reclaimed when the loop terminates or is exited in any fashion.
9866 * sem_util.adb (Add_Block_Identifier): New routine.
9867 (Find_Enclosing_Iterator_Loop): New routine.
9868 * sem_util.ads (Add_Block_Identifier): New routine.
9869 (Find_Enclosing_Iterator_Loop): New routine.
9871 2014-02-25 Robert Dewar <dewar@adacore.com>
9873 * sinfo.ads: Minor reformatting.
9875 2014-02-25 Tristan Gingold <gingold@adacore.com>
9877 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
9879 2014-02-25 Pascal Obry <obry@adacore.com>
9881 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
9883 2014-02-25 Tristan Gingold <gingold@adacore.com>
9885 * sem_ch10.adb: Minor comment fix.
9887 2014-02-25 Bob Duff <duff@adacore.com>
9889 * s-tasdeb.adb: Misc cleanup of this package,
9890 including printing addresses in hexadecimal.
9891 (Write): Fix minor bug when taking 'Address of an empty string.
9893 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9895 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
9896 public child unit when it does not refer to the abstract state
9897 of a public ancestor.
9899 2014-02-25 Yannick Moy <moy@adacore.com>
9901 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
9902 Validity_Checks in GNATprove and CodePeer modes.
9904 2014-02-25 Pascal Obry <obry@adacore.com>
9906 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
9907 Artifacts attribute.
9909 2014-02-25 Yannick Moy <moy@adacore.com>
9911 * sem_prag.adb: Minor reformatting to get consistent messages.
9913 2014-02-25 Robert Dewar <dewar@adacore.com>
9915 * checks.adb: Minor reformatting.
9916 * sinfo.ads (Do_Range_Check): Document that this flag is never
9917 passed to the back end.
9919 2014-02-25 Yannick Moy <moy@adacore.com>
9921 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
9922 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
9924 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
9926 * sem_res.adb (Appears_In_Check): New routine.
9927 (Resolve_Entity_Name): Remove local variables Prev and
9928 Usage_OK. Par is now a constant. Remove the parent chain traversal
9929 as the placement of a volatile object with enabled property
9930 Async_Writers and/or Effective_Reads must appear immediately
9931 within a legal construct.
9933 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
9935 * checks.adb (Apply_Selected_Range_Checks):
9936 Alphabetize local constants and variables. Add comments.
9937 Always insert a range check that requires runtime evaluation into
9940 2014-02-25 Robert Dewar <dewar@adacore.com>
9942 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
9944 2014-02-25 Bob Duff <duff@adacore.com>
9946 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
9947 iterations while waiting for independent tasks to terminate;
9948 if an independent task does not terminate, we do not want to
9949 hang here. In that case, the thread will be terminated when the
9951 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
9953 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9955 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
9956 used to perform pre-analysis of the expression for SPARK
9957 aspects that have a non-standard syntax, such as GLobal and
9958 Initializes. The procedure applies to the original expression
9959 in an aspect specification, prior to the analysis of the
9960 corresponding pragma, in order to provide semantic information
9961 for ASIS navigation purposes.
9962 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
9963 Call new subprogram.
9965 2014-02-25 Yannick Moy <moy@adacore.com>
9967 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
9969 2014-02-25 Doug Rupp <rupp@adacore.com>
9971 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
9972 (__gnat_adjust_context_for_raise): Bump the PC by 2.
9974 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9976 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
9977 misplaced IS, add a statement sequence to improper body only if
9978 one has not been parsed already.
9980 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9982 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
9983 mismatch when multidimensional array is updated with a single
9986 2014-02-25 Yannick Moy <moy@adacore.com>
9988 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
9989 sem_ch6.adb: Mark most references to SPARK RM in error messages
9992 2014-02-24 Ed Schonberg <schonberg@adacore.com>
9994 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
9995 appears in a list of basic declarations, complete the tree with
9996 an empty statement list, to prevent cascaded errors and crashes
9997 if semantic analysis is attempted.
9999 2014-02-24 Thomas Quinot <quinot@adacore.com>
10001 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
10003 * erroutc.adb: Minor reformatting.
10005 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10007 * sem_prag.adb (Check_Clause_Syntax): Account
10008 for a solitary input item in a dependency list.
10010 2014-02-24 Yannick Moy <moy@adacore.com>
10012 * gnat1drv.adb (Adjust_Global_Switches): Do not
10013 use validity checks at all in GNATprove_Mode.
10015 2014-02-24 Robert Dewar <dewar@adacore.com>
10017 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
10018 atree.adb, atree.ads: Minor reformatting.
10020 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10022 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
10023 global and dependence refinement when SPARK_Mode is off.
10024 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
10025 state refinement when SPARK_Mode is off.
10026 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
10027 variable Decl. Insert the generated pragma for Refined_State
10028 after a potential pragma SPARK_Mode.
10029 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
10030 constant Deps. Remove local variable Expr. Check the syntax
10031 of pragma Depends when SPARK_Mode is off. Factor out the
10032 processing for extra parenthesis around individual clauses.
10033 (Analyze_Global_In_Decl_List): Items is now a constant. Check
10034 the syntax of pragma Global when SPARK_Mode is off.
10035 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
10036 Initializes when SPARK_Mode is off.
10037 (Analyze_Part_Of): Check
10038 the syntax of the encapsulating state when SPARK_Mode is off.
10039 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
10040 SPARK_Mode is off. Move the declaration order check with respect
10041 to pragma Initializes to the end of the processing. Do not verify
10042 the declaration order for pragma Initial_Condition when SPARK_Mode
10043 is off. Do not complain about a useless package refinement when
10045 (Analyze_Refined_Depends_In_Decl_Part): Refs
10046 is now a constant. Check the syntax of pragma Refined_Depends
10047 when SPARK_Mode is off.
10048 (Analyze_Refined_Global_In_Decl_Part):
10049 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
10050 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
10051 Refined_State when SPARK_Mode is off.
10052 (Check_Dependence_List_Syntax): New routine.
10053 (Check_Global_List_Syntax): New routine.
10054 (Check_Initialization_List_Syntax): New routine.
10055 (Check_Item_Syntax): New routine.
10056 (Check_State_Declaration_Syntax): New routine.
10057 (Check_Refinement_List_Syntax): New routine.
10058 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
10060 2014-02-24 Robert Dewar <dewar@adacore.com>
10062 * a-tags.adb, s-os_lib.adb: Minor reformatting.
10064 2014-02-24 Thomas Quinot <quinot@adacore.com>
10066 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
10067 strerror message, not just numeric errno value.
10069 2014-02-24 Doug Rupp <rupp@adacore.com>
10071 * raise-gcc.c (exception_class_eq): Make endian neutral.
10073 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10075 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
10076 flag, and reset Etype and Analyzed attributes unconditionally
10077 when copying a tree that may be partly analyzed.
10078 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
10079 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
10080 within a subprogram body and applies to it, remove it from the
10081 body before making a copy of it, to prevent spurious errors when
10082 analyzing the copied body.
10084 2014-02-24 Thomas Quinot <quinot@adacore.com>
10086 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
10087 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
10088 vxWorks.h has been included. Also ensure that file attributes
10089 related definitions are output even in cases where socket support
10091 * a-tags.adb: Code clean up.
10092 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
10093 instead of -I to add the main ada source directory to the header
10094 search path, in order to avoid conflict between our own "types.h"
10095 and VxWork's <types.h>.
10097 2014-02-24 Robert Dewar <dewar@adacore.com>
10099 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
10100 * debug.adb: Remove documentation of -gnatd.X, no longer used.
10101 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
10103 2014-02-24 Bob Duff <duff@adacore.com>
10105 * gnat_ugn.texi: Improve documentation of gnatpp.
10107 2014-02-24 Thomas Quinot <quinot@adacore.com>
10109 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
10110 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
10111 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
10112 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
10113 a chars_ptr, because on Windows this is a renaming of
10114 Socket_Error_Message.
10116 2014-02-24 Robert Dewar <dewar@adacore.com>
10118 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
10119 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
10120 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
10123 2014-02-24 Thomas Quinot <quinot@adacore.com>
10125 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
10126 that the source directory containing s-oscons-tmplt.c is on the
10127 include path, so that all internal header files are available.
10129 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10131 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
10132 domain of iteration is an attribute reference 'Old, this is an
10133 Ada 2012 iterator and the loop must be rewritten as such.
10135 2014-02-24 Thomas Quinot <quinot@adacore.com>
10137 * s-fileio.adb (Errno_Message): Remove, use shared version from
10139 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
10140 * g-stseme (Socket_Error_Message): Reimplement in terms of new
10142 * g-socthi.ads, g-socthi.adb: Change profile of
10143 Socket_Error_Message to return String to allow the above.
10144 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
10145 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
10146 * g-socthi-vxworks.ads: Update to account for the above profile
10148 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
10149 * s-crtl.ads (strncpy): New procedure.
10150 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
10151 Use import from s-crtl.
10152 * a-envvar.adb, osint.adb: Use imports of C runtime functions
10153 from s-crtl instead of re-importing locally.
10155 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10157 * sem_prag.adb (Analyze_Global_Item): Emit the
10158 variable related checks concerning volatile objects only when
10161 2014-02-24 Robert Dewar <dewar@adacore.com>
10163 * sem_ch5.adb (Analyze_Iterator_Specification): use
10164 Error_Msg_Ada_2012_Feature.
10166 2014-02-24 Jose Ruiz <ruiz@adacore.com>
10168 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
10169 No_Local_Timing_Events and No_Specific_Termination_Handlers
10170 must be set, according to the Ravenscar profile definition
10173 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10175 * sem_ch6.adb (Analyze_Expression_Function): If this is a
10176 completion, freeze return type and its designated type if needed.
10178 2014-02-24 Thomas Quinot <quinot@adacore.com>
10180 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10181 'Address): When moving initialization statements to a freeze
10182 entity, keep them under a single node (i.e. do not unwrap
10183 expressions with actions), and set the Initialization_Statements
10184 attribute again so that processing of a later pragma Import can
10187 2014-02-24 Claire Dross <dross@adacore.com>
10189 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
10190 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
10191 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
10192 Left/Right to First_To_Previous/Current_To_Last.
10194 2014-02-24 Thomas Quinot <quinot@adacore.com>
10196 * adaint.h (struct file_attributes): New component "error"
10197 (__gnat_error_attributes): Accessor for the above.
10198 * adaint.c (__gnat_error_attributes): New subprogram
10199 (__gnat_stat): Fix returned value (expect errno value)
10200 (__gnat_stat_to_attr): Add management of error component (set to
10201 stat errno value, except for missing files where it is set to 0,
10202 and exists is set to 0).
10203 * osint.ads (File_Attributes_Size): Update per change above,
10204 also clarify documentation.
10205 * s-filatt.ads: New file, binding to file attributes related
10207 * Makefile.rtl (s-filatt): New runtime unit.
10208 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
10209 to library function if not available on target).
10210 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
10211 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
10212 SIZEOF_struct_dirent_alloc): New constants.
10213 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
10214 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
10215 Perform appropriate error checking if stat fails (do not just
10216 ignore existing files if stat fails)
10217 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
10220 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10222 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
10223 the use of volatile objects as global items in a function to
10224 the variable related checks section.
10225 * sem_util.adb (Async_Readers_Enabled): Directly call
10226 Has_Enabled_Property.
10227 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
10228 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
10229 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
10230 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
10231 Update the comment on usage. State_Has_Enabled_Property how handles
10232 the original logic of the routine. Add processing for variables.
10233 (State_Has_Enabled_Property): New routine.
10234 (Variable_Has_Enabled_Property): New routine.
10236 2014-02-24 Robert Dewar <dewar@adacore.com>
10238 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
10239 Minor reformatting.
10240 * atree.ads, atree.adb (Node35): New function.
10241 (Set_Node35): New procedure.
10242 * debug.adb: Define new debug flag -gnatd.X.
10243 * einfo.ads, einfo.adb (Import_Pragma): New field.
10244 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
10245 really active yet, has to be activated with -gnatd.X.
10246 * sem_prag.adb (Set_Imported): Set new Import_Pragma
10247 field (Set_Imported): Don't set Is_Public (see
10248 Freeze.Wrap_Imported_Subprogram)
10249 * par-ch3.adb (P_Component_List): Handle unexpected null component.
10251 2014-02-24 Yannick Moy <moy@adacore.com>
10253 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
10254 * gnat_rm.texi: Correct documentation of attribute Update.
10256 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10258 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
10259 iterator in older versions of Ada.
10261 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10263 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
10264 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
10266 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10268 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
10269 indexed_components that are instances of Ada 2012 container
10270 indexing operations. Analysis and resolution of such nodes
10271 is performed on the attribute, and the original source is
10272 preserved for ASIS operations. If expansion is enabled, the
10273 indexed component is replaced by the value of this attribute,
10274 which is in a call to an Indexing aspect, in most case wrapped
10275 in a dereference operation.
10276 * sem_ch4.adb (Analyze_Indexed_Component): Create
10277 Generalized_Indexing attribute when appropriate.
10278 (Analyze_Call): If prefix is not overloadable and has an indexing
10279 aspect, transform into an indexed component so it can be analyzed
10280 as a potential container indexing.
10281 (Analyze_Expression): If node is an indexed component with a
10282 Generalized_ Indexing, do not re-analyze.
10283 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
10284 of an indexed_component that has been transformed into a container
10285 indexing operation.
10286 (Resolve_Indexed_Component): Call the above when required.
10287 (Resolve): Do not insert an explicit dereference operation on
10288 an indexed_component whose type has an implicit dereference:
10289 the operation is inserted when resolving the related
10290 Generalized_Indexing.
10292 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
10294 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
10297 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10299 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
10301 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
10302 Merge the expected and available mode errors.
10303 (Report_Unused_Constituents): Remove leading spaces in error messages.
10304 (Report_Unused_States): Remove leading spaces in error messages.
10306 2014-02-24 Thomas Quinot <quinot@adacore.com>
10308 * par_sco.adb (Traverse_One): Refine categorization of statement
10311 2014-02-24 Robert Dewar <dewar@adacore.com>
10313 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
10314 Pure_05, Pure_12 and Preelaborate_05.
10315 * gnat_rm.texi: Update accordingly.
10316 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
10317 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
10318 Recognize one argument form of these pragmas only in GNAT mode
10321 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10323 * s-dimmks.ads: Replace symbol for temperature, previously the
10324 Greek letter Theta, by the ASCII @ sign.
10325 * s-diflio.ads: ditto.
10327 2014-02-24 Robert Dewar <dewar@adacore.com>
10329 * exp_ch4.adb: Minor code reorganization (use OR for boolean
10331 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
10333 2014-02-24 Ben Brosgol <brosgol@adacore.com>
10335 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
10336 so that references to gnatmem and ASIS tools do not appear in the FSF
10337 edition of the GNAT User's Guide.
10339 2014-02-24 Yannick Moy <moy@adacore.com>
10341 * freeze.adb (Freeze_Entity): Do not issue warning
10342 for pre/post being ignored on imported subprogram in GNATprove
10345 2014-02-24 Robert Dewar <dewar@adacore.com>
10347 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
10348 stand.ads, sem_eval.adb: Minor reformatting.
10350 2014-02-24 Yannick Moy <moy@adacore.com>
10352 * sem_prag.adb: Minor rewording in error message.
10354 2014-02-24 Johannes Kanig <kanig@adacore.com>
10356 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
10357 GNATprove_mode, gnat2why doesn't need nor use these types.
10359 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10361 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
10362 target, in the case of signed integer exponentiation that uses a
10363 run-time routine, always select the Exp_* versions, since overflow
10364 checking is automatically done by AAMP arithmetic instructions.
10366 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10368 * sem_ch13.adb (Analyze_Aspect_Specifications):
10369 When the related context is a package instace, insert pragma
10370 Abstract_State after all internally-generated renamings related
10371 to the instance "header".
10373 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10375 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
10377 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
10378 call to an abstract subprogram is legal if it appears in a
10379 pre/postcondition of another abstract operation.
10381 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
10383 * gnat_ugn.texi: Misc updates.
10385 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10387 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
10389 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10391 * layout.adb (Layout_Variant_Record): Instantiate
10392 Generic_Check_Choices and call Check_Choices before calling
10393 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
10394 set to prevent generating incorrect discriminant-checking
10395 functions for 'others' variants (functions that unconditionally
10396 return True rather than accounting for the values covered by the
10398 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
10399 Formal_Derived_Matching.
10400 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
10401 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
10402 Formal_Derived_Matching formal to Subtypes_Statically_Match.
10403 (Subtypes_Statically_Match): Suppress the Object_Size matching
10404 test in the case where Formal_Derived_Matching is True.
10405 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
10406 True for Formal_Derived_Matching_Formal on the call to
10407 Subtypes_Statically_Compatible.
10409 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
10411 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
10413 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
10415 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
10416 Look through a conversion between original and packable version to get
10418 (build_component_ref): Rework comment and fix formatting.
10420 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
10422 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
10423 project-specific options.
10425 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10427 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
10428 not Constraint_Error.
10429 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
10430 * sem_ch5.adb: Code clean up.
10432 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
10434 * sem_prag.adb (Usage_Error): Remove local
10435 constant Typ. Remove the specialized diagnostics for unconstrained
10436 or tagged items as those are not part of the explicit input set
10437 of the related subprogram and should not be flagged.
10439 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10441 * sem_attr.adb: Add guard to preserve all errors.
10443 2014-02-20 Vincent Celier <celier@adacore.com>
10445 * switch-m.adb (Normalize_Compiler_Switches): Take into account
10446 switches that are recorded in ALI files: -gnateA, -gnateE,
10447 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
10449 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10451 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
10452 of an element iterator form over a formal container with an
10454 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
10455 to create declaration and loop statements for both forms of
10456 container iterators.
10457 (Expand_Formal_Container_Element_Iterator): New procedure
10458 to handle loops of the form "for E of C" when C is a formal
10460 (Expand_Formal_Container_Iterator): Code cleanup.
10462 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
10464 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
10465 (Analyze_Contract_Case): Remove the use of
10466 "may". Replace "aspect Contract_Cases" to avoid categorization
10467 of aspect vs pragma.
10468 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
10469 (Analyze_Global_Item): Remove
10470 the use of "formal", specify the subprogram. Split the
10471 error message about a state with visible refinement into
10472 two. Remove the use of "global" from "volatile global item".
10473 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
10475 (Analyze_Input_Output): Update the call to
10476 Check_Mode. Specify the duplicated item. Reword the error
10477 message concerning an input of a null output list. Use "\"
10478 for error message continuation.
10479 (Analyze_Part_Of): Remove
10480 the use of "may". Use "\" for error message continuation.
10481 (Analyze_Refined_Depends_In_Decl_Part): Update the error
10482 message concerning a useless refinement to match the format
10484 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
10485 concerning a useless refinement.
10486 (Analyze_Refinement_Clause): Use "\" for error message continuation.
10487 (Check_Constituent_Usage): Use "\" for error message continuation.
10488 (Check_Dependency_Clause): Use "\" for error message continuation.
10489 (Check_Matching_Constituent): Use "\" for error message continuation.
10490 (Check_Missing_Part_Of): Use "\" for error message continuation.
10491 (Check_Mode): Renamed to
10492 Check_Role. Update the comment on usage. Redo the error reporting
10494 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
10495 message continuation.
10496 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
10497 with comment on usage. Update all occurrences of Is_Input and Is_Output.
10498 (Inconsistent_Mode_Error): Use "\" for error message continuation.
10499 (Input_Match): Use "\" for error message continuation.
10500 (Role_Error): New routine.
10501 (Set_Convention_From_Pragma): Use "\" for error message continuation.
10502 (Usage_Error): Add local variable Error_Msg. Build specialized error
10503 message showcasing the offending item kind. Redo the diagnostics for
10504 unconstrained types.
10506 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10508 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
10509 to determine whether a type is a container type, rather than
10510 examining only its type declaration, so that subtypes and derived
10511 types are handled properly.
10513 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
10515 * gnat_ugn.texi: gnatmetric: add description of project-specific
10518 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10520 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
10521 all choices in an association for a record type have the same
10522 type, as is done for record aggregates.
10524 2014-02-20 Robert Dewar <dewar@adacore.com>
10526 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
10527 Unmodified rather than Warnings (Off). Make comments
10528 uniform in the four affected units.
10530 2014-02-20 Robert Dewar <dewar@adacore.com>
10532 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10533 Object_Size): For non-scalar types allow any value that is a
10535 * gnat_rm.texi: Document Object_Size for composites more clearly.
10537 2014-02-20 Yannick Moy <moy@adacore.com>
10539 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
10541 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10543 * stand.ads: Raise_Type: new predefined entity, used as the type
10544 of a Raise_Expression prior to resolution.
10545 * cstand.adb: Build entity for Raise_Type.
10546 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
10547 initial type of the node.
10548 * sem_type.adb (Covers): Raise_Type is compatible with all
10550 * sem_res.adb (Resolve): Remove special handling of Any_Type on
10551 Raise_Expression nodes.
10552 (Resolve_Raise_Expression): Signal ambiguity if the type of the
10553 context is still Raise_Type.
10555 2014-02-20 Robert Dewar <dewar@adacore.com>
10557 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
10558 mismatching predicates.
10559 * sem_ch6.adb (Check_Conformance): Give better messages on
10560 predicate mismatch.
10561 * sem_eval.adb (Predicates_Match): Move to spec.
10562 * sem_eval.ads (Predicates_Match): Moved here from body.
10564 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10566 * a-cbmutr.adb: Use default value in Insert_Child.
10568 2014-02-20 Vincent Celier <celier@adacore.com>
10570 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
10571 Stringt.Initialize in all project aware tools.
10573 2014-02-20 Doug Rupp <rupp@adacore.com>
10575 * gnat_ugn.texi: Document gnatbind -X option.
10576 * vms_data.ads: Minor warnings documentation reformatting.
10578 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10580 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
10581 procedure for a base type.
10583 2014-02-20 Robert Dewar <dewar@adacore.com>
10585 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
10586 expression with type info.
10587 * sem_ch13.adb: Minor reformatting.
10588 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
10589 False if predicates do not match on the two types.
10591 2014-02-20 Arnaud Charlet <charlet@adacore.com>
10593 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
10594 In Relaxed_RM_Semantics mode, allow any static integer value,
10595 for compatibility with other compilers.
10597 2014-02-20 Vincent Celier <celier@adacore.com>
10599 * errutil.adb (Initialize): Properly initialize entry in table
10600 Warnings when warnings are suppressed.
10602 2014-02-20 Robert Dewar <dewar@adacore.com>
10604 * s-os_lib.ads: Add warning about non-portability of Rename_File.
10605 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
10606 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
10607 * gnat_ugn.texi: Document no warnings on junk variable names.
10608 * layout.adb: Minor code reorganization (use Ekind_In).
10609 * stringt.adb: Move initialization of Null_String_Id to Initialize
10612 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10614 * sem_ch13.adb: Initialize optional Element_Id.
10616 2014-02-20 Robert Dewar <dewar@adacore.com>
10618 * s-os_lib.ads (Rename_File): Minor commment addition.
10620 2014-02-20 Thomas Quinot <quinot@adacore.com>
10622 * einfo.ads: Minor reformatting.
10624 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
10626 * aspects.adb (Exchange_Aspects): New routine.
10627 * aspects.ads (Exchange_Aspects): New routine.
10628 * atree.adb (Rewrite): Do not check whether the save node has
10629 aspects as it never will, instead check the node about to be clobbered.
10630 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
10631 entities of generic packages.
10632 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
10633 pointer of an aspect specification list after rewriting takes place.
10634 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
10635 specifications of the generic template and the copy used for analysis.
10636 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
10637 the aspect specifications of the generic template and the
10638 copy used for analysis.
10639 (Analyze_Package_Instantiation): Propagate the aspect specifications
10640 from the generic template to the instantiation.
10641 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
10642 specifications from the generic template to the instantiation.
10643 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
10644 Abstract_State, Initializes and Initial_Condition when they
10645 apply to a package instantiation.
10647 2014-02-20 Robert Dewar <dewar@adacore.com>
10649 * stringt.adb: Add call to Initialize in package initialization.
10651 2014-02-20 Robert Dewar <dewar@adacore.com>
10653 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
10654 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
10655 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
10656 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
10659 2014-02-20 Bob Duff <duff@adacore.com>
10661 * s-os_lib.ads: Minor: Remove incorrect comment.
10663 2014-02-20 Robert Dewar <dewar@adacore.com>
10665 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
10667 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10669 * a-cborma.adb (Assign): When creating a node without a specified
10670 element, insert an uninitialized element in the map, because
10671 the instance may provide an element type with a default
10672 initialization, e.g a scalar with a Default_Value aspect.
10673 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
10674 (Insert): In the version without explicit element, provide an
10675 uninitialized element, as above.
10676 * a-cbdlli.adb (Append): In the version without explicit element,
10677 provide an uninitalized element, as above.
10678 (Allocate): Remove unused version.
10680 2014-02-20 Robert Dewar <dewar@adacore.com>
10682 * sem_elab.adb: Minor code reorganization (use Nkind_In).
10683 * stringt.adb: Remove temporary pragma Warnings (Off).
10684 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
10687 2014-02-20 Matthew Heaney <heaney@adacore.com>
10689 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
10692 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10694 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
10695 properly the cursor type for subsequent volatile testing in SPARK
10696 mode, when domain is a formal container with an Iterabe aspect.
10698 2014-02-20 Robert Dewar <dewar@adacore.com>
10700 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
10701 (Set_Specific_Warning_Off): Add Reason argument.
10702 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
10703 (Set_Specific_Warning_Off): Add Reason argument.
10704 * erroutc.adb (Warnings_Entry): Add Reason field
10705 (Specific_Warning_Entry): Add Reason field.
10706 (Warnings_Suppressed): return String_Id for Reason.
10707 (Warning_Specifically_Suppressed): return String_Id for Reason.
10708 * erroutc.ads (Warnings_Entry): Add Reason field.
10709 (Specific_Warning_Entry): Add Reason field.
10710 (Set_Specific_Warning_Off): Add Reason argument.
10711 (Set_Warnings_Mode_Off): Add Reason argument.
10712 (Warnings_Suppressed): return String_Id for Reason.
10713 (Warning_Specifically_Suppressed): return String_Id for Reason.
10714 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
10715 (Warning_Specifically_Suppressed): returns String_Id for Reason
10716 * gnat_rm.texi: Document that Warning parameter is string literal
10717 or a concatenation of string literals.
10718 * par-prag.adb: New handling for Reason argument.
10719 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
10720 for Reason argument.
10721 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
10722 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
10723 * stringt.adb: Set Null_String_Id.
10724 * stringt.ads (Null_String_Id): New constant.
10726 2014-02-20 Robert Dewar <dewar@adacore.com>
10728 * einfo.ads: Minor comment addition: Etype of package is
10729 Standard_Void_Type.
10730 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
10731 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
10732 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
10733 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
10734 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
10735 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10736 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
10737 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
10738 Replace all calls with calls to New_Occurrence_Of.
10740 2014-02-20 Robert Dewar <dewar@adacore.com>
10742 * par-util.adb (Ignore, case of right paren): Make this a
10745 2014-02-19 Robert Dewar <dewar@adacore.com>
10747 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
10748 * debug.adb: Remove -gnatd.X switch, no longer used.
10749 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
10752 2014-02-19 Bob Duff <duff@adacore.com>
10754 * g-socket.ads: Minor: Correct some comments.
10756 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10758 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
10760 2014-02-19 Arnaud Charlet <charlet@adacore.com>
10762 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
10763 an error on out of range priorities if Relaxed_RM_Semantics.
10764 * sem_prag.adb (Analyze_Pragma): Ditto.
10766 2014-02-19 Bob Duff <duff@adacore.com>
10768 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
10769 where F denotes the renaming of an enumeration literal, and
10770 issue a specialized error message.
10772 2014-02-19 Matthew Heaney <heaney@adacore.com>
10774 * a-chtgop.ads (Checked_Index): New operation.
10775 (Next): Changed mode of hash table.
10776 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
10777 (Generic_Read, Reserve_Capacity): Ditto.
10778 (Generic_Equal): Detect tampering.
10779 (Next): Changed mode of hash table, detect tampering.
10780 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
10782 (Find): Changed mode of hash table.
10783 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
10784 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
10786 (Find): Changed mode of hash table, check for tampering.
10787 (Generic_Replace_Element): Check for tampering.
10788 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
10789 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
10790 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
10792 (Find, Generic_Replace_Element): Check for tampering.
10793 * a-chtgbo.ads (Checked_Index): New operation.
10794 * a-chtgbo.adb (Checked_Index): New operation
10795 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
10796 (Generic_Read, Next): Ditto.
10797 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
10798 table (Difference, Intersection): Use variable view of
10799 source, detect tampering (Find, Is_Subset, Overlap): Use
10800 variable view of container (Symmetric_Difference, Union):
10801 Detect tampering (Vet): Use Checked_Index to detect tampering
10802 (Constant_Reference, Element, Find): Use variable view of
10804 (Update_Element_Preserving_Key): Detect tampering.
10805 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
10807 (Is_Subset): Ditto.
10808 (Equivalent_Sets, Overlap): Use Node's Next component.
10809 (Vet): Use Checked_Index to detect tampering.
10810 (Constant_Reference, Element, Find): Use variable view of container.
10811 (Update_Element_Preserving_Key): Detect tampering.
10812 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
10813 Element, Find): Use variable view of container.
10814 (Reference): Rename hash table component.
10815 (Vet): Use Checked_Index to detect tampering.
10817 2014-02-19 Arnaud Charlet <charlet@adacore.com>
10819 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
10822 2014-02-19 Thomas Quinot <quinot@adacore.com>
10824 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
10825 against calls without Def_Id.
10827 2014-02-19 Claire Dross <dross@adacore.com>
10829 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10830 a-cofove.ads: Add global annotations to subprograms.
10832 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10834 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
10835 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
10836 Initial_Condition no longer requires the presence of pragma
10837 Initialized. Do not try to diagnose whether all variables mentioned in
10838 pragma Initializes also appear in Initial_Condition.
10839 (Collect_Variables): Removed.
10840 (Match_Variable): Removed.
10841 (Match_Variables): Removed.
10842 (Report_Unused_Variables): Removed.
10844 2014-02-19 Thomas Quinot <quinot@adacore.com>
10846 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
10848 2014-02-19 Robert Dewar <dewar@adacore.com>
10850 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
10853 2014-02-19 Vincent Celier <celier@adacore.com>
10855 * prj-part.adb (Parse_Single_Project): Use the fully resolved
10856 project path, with all symbolic links resolved, to check if the
10857 same project is imported with a different unresolved path.
10858 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
10859 changed to Resolved_Path to reflect that all symbolic links
10862 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10864 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
10865 from sem_ch13, for use elsewhere.
10866 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
10867 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
10868 cursor type on the loop variable when the iteration is over o
10871 2014-02-19 Vincent Celier <celier@adacore.com>
10873 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
10874 for an empty Target (Check_Target): Never fail when an empty
10875 target is declared in the configuration project.
10877 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10879 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
10880 the pragma comes fron a predicate aspect and the context is a
10881 record declaration within the scope that declares the type.
10883 2014-02-19 Robert Dewar <dewar@adacore.com>
10885 * gnat_rm.texi: Minor clarifications.
10886 * expander.adb, sem_aggr.adb: Add comments.
10888 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10890 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
10891 applies to a subprogram body, the name is the current scope,
10892 rather than being declared in the current scope.
10893 (Analyze_Pragma, case No_Return): Handle properly a No_Return
10894 aspect applied to a subprogram body.
10896 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10898 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
10899 of overloaded subprograms, and fix bug in handling of primitive
10902 2014-02-19 Pascal Obry <obry@adacore.com>
10904 * s-os_lib.adb: Minor reformatting.
10906 2014-02-19 Yannick Moy <moy@adacore.com>
10908 * expander.adb (Expand): Do nothing inside generics.
10909 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
10912 2014-02-19 Yannick Moy <moy@adacore.com>
10914 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
10916 2014-02-19 Robert Dewar <dewar@adacore.com>
10918 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
10919 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
10922 2014-02-19 Claire Dross <dross@adacore.com>
10924 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10925 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
10927 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10929 * sem_ch3.adb (Analyze_Declarations): Analyze
10930 a package contract at the end of the private declarations (if
10931 applicable), otherwise analyze it and the end of the visible
10934 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10936 * style.adb (Missing_Overriding): If subprogram is an
10937 instantiation, place warning on the instance node itself,
10938 without mention of the original generic. Do not emit message
10939 if explicit Ada version is older than the introduction of the
10940 overriding indicator.
10942 2014-02-19 Yannick Moy <moy@adacore.com>
10944 * gnat_rm.texi: Doc clarifications.
10946 2014-02-19 Yannick Moy <moy@adacore.com>
10948 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
10951 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10953 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
10954 specified First primitive, rather than by name.
10955 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
10956 and extend error checking for missing primitives and incorrect
10959 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10961 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
10962 errors when a Synchronization aspect on an overriding protected
10963 operation does not match the given aspect on the overridden
10964 operation of an ancestor interface.
10966 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10968 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
10969 (Check_Loop_Pragma_Placement): Update
10970 comment on usage. Remove local variables Orig_Stmt and
10971 Within_Same_Sequence. Check that the current Loop_Invariant or
10972 Loop_Variant pragma is grouped together with other such pragmas.
10973 (Is_Loop_Pragma): New routine.
10974 (Prev_In_Loop): Removed.
10976 2014-02-19 Robert Dewar <dewar@adacore.com>
10978 * par-ch6.adb (P_Return): For extended return, end column lines
10980 * par.adb: Minor documentation clarification.
10982 2014-02-19 Yannick Moy <moy@adacore.com>
10984 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
10985 that Loop_Invariant and Loop_Variant appear consecutively.
10986 * gnat_rm.texi Update documentation of Loop_Invariant and
10987 Loop_Variant pragmas.
10989 2014-02-19 Robert Dewar <dewar@adacore.com>
10991 * debug.adb: Document -gnatd.X.
10992 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
10994 (Check_Then_Column): Ditto.
10995 * styleg.adb (Check_Then): Allow THEN on line after IF.
10996 (Check_Then): Check THEN placement under control of -gnatd.X
10997 * styleg.ads (Check_Then): Now called even if THEN is not first
10999 * stylesw.ads (Style_Check_If_Then_Layout): Document new
11001 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
11003 2014-02-19 Robert Dewar <dewar@adacore.com>
11005 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
11006 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
11007 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
11008 vms_conv.adb: Fix bad layout of IF statements
11010 2014-02-19 Robert Dewar <dewar@adacore.com>
11012 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
11014 2014-02-19 Robert Dewar <dewar@adacore.com>
11016 * exp_util.adb: Update comments.
11018 2014-02-19 Doug Rupp <rupp@adacore.com>
11020 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
11021 * init.c (__gl_float_format): [VMS] New global.
11022 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
11023 representation in effect.
11025 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11027 * exp_ch6.adb Add with and use clause for Exp_Prag.
11028 (Expand_Contract_Cases): Relocated to Exp_Prag.
11029 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
11030 * exp_prag.adb Add with and use clauses for Checks and Validsw.
11031 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
11032 structure of the expanded code to showcase the evaluation of
11033 attribute 'Old prefixes. Add local variable Old_Evals. Expand
11034 any attribute 'Old references found within a consequence. Add
11035 circuitry to evaluate the prefixes of attribute 'Old that
11036 belong to a selected consequence.
11037 (Expand_Old_In_Consequence): New routine.
11038 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
11039 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
11040 potentially unevaluated prefix is always evaluated.
11042 2014-02-19 Robert Dewar <dewar@adacore.com>
11044 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
11045 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
11046 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
11047 handling for the case of Modify_Tree_For_C, this approach did
11049 * exp_util.adb (Matching_Standard_Type): New function
11050 (Side_Effect_Free): New top level functions (from
11051 Remove_Side_Effects).
11052 * exp_util.ads (Side_Effect_Free): New top level functions
11054 * sinfo.ads: Minor comment updates.
11056 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11058 * exp_ch6.adb (Expand_Simple_Function_Return): If return
11059 type is unconstrained and uses the secondary stack, mark the
11060 enclosing function accordingly, to ensure that the value is not
11061 prematurely removed.
11063 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11065 * par.adb Alphabetize the routines in Par.Sync.
11066 (Resync_Past_Malformed_Aspect): New routine.
11067 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
11068 variables. Code and comment reformatting. Detect missing
11069 parentheses on aspects [Refined_]Global and [Refined_]Depends
11070 with a non-null definition.
11071 * par-sync.adb: Alphabetize all routines in this separate unit.
11072 (Resync_Past_Malformed_Aspect): New routine.
11074 2014-02-19 Robert Dewar <dewar@adacore.com>
11076 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
11077 if Esize values do not match.
11079 2014-02-19 Yannick Moy <moy@adacore.com>
11081 * sinfo.ads: Minor comment update.
11083 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11085 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
11087 2014-02-19 Thomas Quinot <quinot@adacore.com>
11089 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
11090 that has the No_Ctrl_Actions flag is a suitable node to be
11091 wrapped if the assigned expression has no finalization actions.
11092 * sem_eval.adb (Eval_Entity_Name): For a compile time known
11093 boolean value, mark the corresponding condition SCO as constant.
11095 2014-02-19 Robert Dewar <dewar@adacore.com>
11097 * exp_util.adb: Minor reformatting.
11098 * exp_util.ads (Matching_Standard_Type): New function.
11099 * exp_ch7.adb: Minor reformatting.
11101 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11103 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
11104 to find declaration for Cursor, to handle properly the case of
11105 a discriminated iterable type.
11107 2014-02-19 Vincent Celier <celier@adacore.com>
11109 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
11110 imported library projects with the library ALI dirs, when setting
11112 * prj-env.ads (Ada_Objects_Path): Correct comments about
11113 argument Including_Libraries.
11115 2014-02-19 Gary Dismukes <dismukes@adacore.com>
11117 * gnat_rm.texi: Minor spelling fixes.
11119 2014-02-19 Doug Rupp <rupp@adacore.com>
11121 * init.c: Remove unneeded code.
11122 * fe.h (Float_Format): New macro
11123 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
11125 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11127 * sem_prag.adb (Check_Refined_Global_Item):
11128 A state or variable acts as a constituent only it is part of an
11129 encapsulating state and the state has visible refinement.
11131 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11133 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
11134 postcondition for a function when the expression does not mention
11135 'Result but the function has in-out parameters.
11137 2014-02-19 Robert Dewar <dewar@adacore.com>
11139 * gnat_rm.texi: Add documentation on Value_Size forcing biased
11142 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11144 * lib-xref.ads Remove the small table of letter and symbol usage as we
11147 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11149 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
11150 messages depending on the offending misplaced aspect specifications.
11151 (Diagnose_Misplaced_Aspect_Specifications): New routine.
11153 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11155 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
11156 for iterable aspect primitives.
11157 (Resolve_Iterable_Operation): Use expected signature of iterable
11158 aspect to resolve primitive when overloading is present.
11159 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
11160 (Check_Signature): Removed.
11162 2014-02-19 Yannick Moy <moy@adacore.com>
11164 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
11165 subunit in GNATprove_Mode.
11166 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
11168 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11170 * lib-xref.ads Alphabetize the contents of table
11171 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
11172 for E_Abstract_State. List all letters and symbols in use.
11173 * sem_prag.adb (Analyze_Abstract_State): Update all calls
11174 to Create_Abstract_State to reflect the new signature.
11175 (Create_Abstract_State): Change subprogram profile and update
11176 the comment on usage. Use the proper location of the state
11177 declaration when creating a new abstract state entity. Do not
11178 generate an external name, but simply reuse the name coming from
11179 the state declaration.
11181 2014-02-19 Robert Dewar <dewar@adacore.com>
11183 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
11184 declarations get properly inserted in Modify_Tree_For_C mode.
11185 * sinfo.ads: Minor comment addition.
11187 2014-02-19 Robert Dewar <dewar@adacore.com>
11189 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
11190 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
11192 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11194 * style.adb (Missing_Overriding): Warning does not apply in
11195 language versions prior to Ada 2005.
11196 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
11197 * sem_attr.adb: Add Attribute_Iterable where needed.
11198 * exp_attr.adb: ditto.
11199 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
11200 handle loops and quantified expressions over types that have an
11201 iterable aspect. Called from Expand_Iterator_Loop.
11202 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
11203 with Iterable aspect.
11204 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
11205 subprograms specified in the Iterable aspect have the proper
11206 signature involving container and cursor.
11207 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
11208 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
11209 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
11210 New procedure to retrieve one of the primitives First, Last,
11211 or Has_Element, from the value of the iterable aspect of a
11213 (Is_Container_Element): Predicate to recognize expressions
11214 that denote an element of one of the predefined containers,
11215 for possible optimization. This subprogram is not currently
11216 used, pending ARG discussions on the legality of the proposed
11217 optimization. Worth preserving for eventual use.
11218 (Is_Iterator): Recognize formal container types.
11219 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
11221 2014-02-19 Robert Dewar <dewar@adacore.com>
11223 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
11224 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
11225 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
11226 declarations from list of actions.
11227 * output.ads, output.adb (Delete_Last_Char): New procedure.
11228 * sinfo.ads: Document handling of Mod and expression with actions
11229 in Modify_Tree_For_C mode.
11231 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11233 * par-ch9.adb (P_Task): Add a null statement to produce a
11234 well-formed task body when due to a previous syntax error the
11235 statement list is empty.
11237 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11239 * sem_prag.adb (Check_Dependency_Clause): Account
11240 for the case where a state with a non-null refinement matches a
11241 null output list. Comment reformatting.
11242 (Inputs_Match): Copy a solitary input to avoid an assertion failure
11243 when trying to match the same input in multiple clauses.
11245 2014-02-19 Gary Dismukes <dismukes@adacore.com>
11247 * sem_attr.adb: Minor typo fix.
11249 2014-02-18 Robert Dewar <dewar@adacore.com>
11251 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
11252 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
11253 (Create_Standard): Create new unsigned types.
11254 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
11255 mode (Expand_N_Reference): Removed, problematic and not needed
11257 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
11258 not needed for now.
11259 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
11260 * expander.adb: Remove call to Expand_N_Reference (problematic,
11261 and not needed now).
11262 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
11263 * stand.adb: Read and write unsigned type entities.
11264 * stand.ads: Add new unsigned types.
11266 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
11268 * sem_ch4.adb (Analyze_Call): Do not mark a function call
11269 as being inside an assertion expression as the flag is now removed.
11270 (Check_Ghost_Subprogram_Call): Do not query the
11271 In_Assertion_Expression flag as it is now removed, instead use
11272 a predicate function.
11273 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
11274 In_Assertion_Expression flag as it is now removed, instead use
11275 a predicate function.
11276 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
11277 * sem_util.adb Add with and use clause for Sem_Prag.
11278 (In_Assertion_Expression_Pragma): New routine.
11279 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
11280 * sinfo.adb (In_Assertion_Expression): Removed.
11281 (Set_In_Assertion_Expression): Removed.
11282 * sinfo.ads Remove flag In_Assertion_Expression along with its
11284 (In_Assertion_Expression): Removed along with
11285 pragma Inline. (Set_In_Assertion_Expression): Removed along
11286 with pragma Inline.
11288 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
11290 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
11291 used together with '-r', '-rf' or '-rnb' options.
11293 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
11295 * sem_attr.adb (Analyze_Attribute): Comment
11296 and code reformatting. Use separate routines to check the
11297 legality of attribute 'Old in certain pragmas. Verify
11298 the use of 'Old, 'Result and locally declared entities
11299 within the prefix of 'Old.
11300 (Check_References_In_Prefix): New routine.
11301 (Check_Use_In_Contract_Cases): New routine.
11302 (Check_Use_In_Test_Case): New routine.
11304 2014-02-18 Vincent Celier <celier@adacore.com>
11306 * sem_aux.adb (Is_By_Reference_Type): For each components of
11307 a record type, check also if the component is volatile as it
11308 may have an aspect that makes it volatile. If it is, then the
11309 record type is a by reference type.
11311 2014-02-18 Robert Dewar <dewar@adacore.com>
11313 * exp_attr.adb: Minor reformatting.
11314 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
11315 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
11316 as another case where we don't generate N_Reference nodes for
11318 * expander.adb (Expand): Add call to Expand_N_Reference.
11320 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11322 * sem_prag.adb (Analyze_Refined_Pragma): Remove
11323 local variable Pack_Spec. Refinement pragmas may now apply to
11324 bodies of both visible and private subprograms.
11326 2014-02-06 Robert Dewar <dewar@adacore.com>
11328 * exp_attr.adb (Expand_Loop_Entry_Attribute):
11329 Minor change (Attr => N) (Expand_Pred_Succ): New name
11330 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
11331 Max): Expand into if expression if Modify_Tree_For_C mode.
11332 (Expand_N_Attribute_Reference, case Min): ditto
11333 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
11336 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11338 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
11339 predicate check if this is an internal declaration with
11340 No_Initialization set, as for an expanded aggregate component.
11342 2014-02-06 Doug Rupp <rupp@adacore.com>
11344 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
11345 conditions with severity of "SUCCESS" or "INFORMATIONAL".
11347 2014-02-06 Yannick Moy <moy@adacore.com>
11349 * sem_prag.adb (Analyze_Pragma): Analyze pragma
11350 Debug rewritten node before rewriting it as a null statement in
11353 2014-02-06 Robert Dewar <dewar@adacore.com>
11355 * sem_attr.adb (Min_Max): New procedure.
11356 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
11359 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
11361 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
11364 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11366 * sem_prag.adb (Analyze_Abstract_State): Update
11367 all calls to Create_Abstract_State to pass the proper state
11369 (Create_Abstract_State): Add new formal parameter
11370 State_Decl along with comment on usage. Establish a link between
11371 the abstract state entity and the state declaration.
11373 2014-02-06 Robert Dewar <dewar@adacore.com>
11375 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
11376 comparison of unordered enumeration type.
11377 (Analyze_Attribute, case Max): Check for improper comparison of
11378 unordered enumeration type.
11379 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
11381 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
11382 Moved here from Sem_Res.
11384 2014-02-06 Robert Dewar <dewar@adacore.com>
11386 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
11389 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11391 * sem_ch6.adb (Process_Formals): Error message reformatting.
11393 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11395 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
11396 variable Spec. Do not inherit the null indicator from the
11397 subprogram body when generating the spec.
11399 2014-02-06 Robert Dewar <dewar@adacore.com>
11401 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
11404 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11406 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
11407 when the function has a foreign convention, but not if only the
11408 limited return type has such a convention.
11410 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11412 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
11413 variable Spec. Comment reformatting. Use Copy_Separate_Tree
11414 rather than New_Copy_Tree when building the corresponding
11415 subprogram declaration.
11417 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11419 * sem_prag.adb (Analyze_Global_Item): Remove
11420 the mode-related checks on abstract states with enabled external
11422 (Property_Error): Removed.
11424 2014-02-06 Javier Miranda <miranda@adacore.com>
11426 * lib-xref.adb (Generate_Reference): When
11427 generating the reference to the first private entity take care
11428 of handling swapped entities.
11430 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
11432 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11435 2014-02-06 Robert Dewar <dewar@adacore.com>
11437 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
11438 than the word size when operating in Modify_Tree_For_C mode.
11439 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
11441 2014-02-06 Robert Dewar <dewar@adacore.com>
11443 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
11444 compare is case insensitive.
11445 * gnat_rm.texi: Document that string compare for Warnings Off
11446 is now case insensitive.
11448 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
11450 * gnat_rm.texi: Small wording tweak.
11452 2014-02-06 Pascal Obry <obry@adacore.com>
11454 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
11455 and Included_Artifact_Patterns attribute definitions.
11457 2014-02-06 Yannick Moy <moy@adacore.com>
11459 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
11460 SPARK_Mode pragma component for all subprograms, including stubs.
11462 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11464 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
11465 the configuration options of the enclosing context in a
11467 (Analyze_Subprogram_Body_Stub): Maintain the
11468 configuration options of the enclosing context in a stack-like
11471 2014-02-06 Robert Dewar <dewar@adacore.com>
11473 * debug.adb: -gnatd.u sets Modify_Tree_For C
11474 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
11475 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
11476 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
11477 * exp_intr.adb (Expand_Shift): Call expander so we do
11478 Modify_Tree_For_C expansions.
11479 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11482 2014-02-06 Fedor Rybin <frybin@adacore.com>
11484 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
11485 after the phase 1 of the processing of each aggregated project
11486 to get access to project trees of aggregated projects.
11487 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
11488 If specified, On_New_Tree_Loaded is called after each aggregated
11489 project has been processed succesfully.
11490 (Process): new parameter On_New_Tree_Loaded.
11491 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
11492 callback added after processing of each aggregated project.
11493 (Recursive_Process): new parameter On_New_Tree_Loaded.
11494 (Process): new parameter On_New_Tree_Loaded.
11495 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
11496 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
11497 On_New_Tree_Loaded.
11498 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
11499 On_New_Tree_Loaded.
11501 2014-02-06 Bob Duff <duff@adacore.com>
11503 * gnat_ugn.texi: Implement --insert-blank-lines and
11504 --preserve-blank-lines switches.
11506 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
11508 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11511 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
11513 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
11514 of the pragma on individual objects.
11516 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11518 * einfo.adb Node29 is now used as BIP_Initialization_Call.
11519 (BIP_Initialization_Call): New routine.
11520 (Set_BIP_Initialization_Call): New routine.
11521 (Write_Field29_Name): Add an entry for constants and variables.
11522 * einfo.ads Add new attribute BIP_Initialization_Call and update
11523 its usage in nodes.
11524 (BIP_Initialization_Call): New routine along with pragma Inline.
11525 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
11526 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
11527 Add local declaration Res_Decl. Capture the build-in-place
11528 initialization call when the related object declaration has
11529 created a transient block.
11530 * exp_ch7.adb (Process_Transient_Objects): Add local variable
11531 Fin_Insrt. Recognize a scenario where an object declaration acts
11532 as a transient context and is initialized by a build-in-place
11535 2014-02-06 Pascal Obry <obry@adacore.com>
11537 * prj-util.adb (For_Interface_Sources): Fix handling of required
11538 bodies for aggregate libs.
11540 2014-02-06 Robert Dewar <dewar@adacore.com>
11542 * nlists.ads: Minor comment clarifications.
11544 2014-02-06 Robert Dewar <dewar@adacore.com>
11546 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11548 * opt.ads (Modify_Tree_For_C): New flag.
11549 * output.ads, output.adb (Last_Char): New function.
11551 2014-02-06 Pascal Obry <obry@adacore.com>
11553 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
11554 share/gpr for cross-builds.
11556 2014-02-06 Robert Dewar <dewar@adacore.com>
11558 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
11559 Minor reformatting and code clean ups.
11561 2014-02-06 Pascal Obry <obry@adacore.com>
11563 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
11564 * prj.ads: Minor typo fix in comment.
11566 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11568 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
11569 local variable Expr. Flag clauses with extra parenthesis as this
11570 is not allowed by the syntax of the pragma. Code reformatting.
11572 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11574 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
11575 variables. Rename variabme Tnn to Temp. Do not create a temporary
11576 if assertions are disabled. Find enclosing routine _Postconditions
11577 and insert the temporary that captures the value of the prefix
11578 before the routine.
11579 * exp_ch6.adb (Build_Postconditions_Procedure):
11580 Insert the generated _Postconditions routine
11581 before the first source declaration of the related
11583 (Insert_After_Last_Declaration): Removed.
11584 (Insert_Before_First_Source_Declaration): New routine.
11586 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11588 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
11589 Utility to determine whether current expansion is for the body
11590 of a predefined primitive operation.
11591 (Make_Predicate_Check): Use Within_Internal_Subpgram
11592 * checks.adb (Apply_Predicate_Check): Use
11593 Within_Internal_Subprogram
11594 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
11596 2014-02-06 Pascal Obry <obry@adacore.com>
11598 * prj.ads, prj-util.adb: Minor reformatting.
11600 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11602 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
11603 Take into account the Split_PPC flag to ensure that conjuncts
11604 in a composite postcondition aspect are tested in source order.
11606 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11608 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
11610 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
11611 illegal use of SPARK_Mode.
11612 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
11613 * sem_prag.adb (Analyze_Pragma): Code reformatting.
11614 * sem_util.adb Add with and use clause for Aspects.
11615 (Check_SPARK_Mode_In_Generic): New routine.
11616 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
11618 2014-02-06 Thomas Quinot <quinot@adacore.com>
11620 * a-calend.adb (Formatting_Operations.Split): Ensure that
11621 Time_Error is raised for invalid time values.
11623 2014-02-06 Arnaud Charlet <charlet@adacore.com>
11625 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
11628 2014-02-06 Robert Dewar <dewar@adacore.com>
11630 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
11631 * exp_ch3.adb (Build_Dcheck_Function): Set
11632 Is_Discriminant_Check_Function.
11634 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11636 * exp_ch7.adb (Is_Subprogram_Call): Inspect
11637 the original tree in certain cases where a construct has been
11638 factored out and replaced by a reference to a temporary.
11640 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11642 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
11643 parameters when propagating predicate function to full view.
11644 (Find_Type_Of_Object): Freeze base type of object type to catch
11645 premature use of discriminated private type without a full view.
11647 2014-02-06 Robert Dewar <dewar@adacore.com>
11649 * sprint.adb: Minor reformatting.
11651 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11653 * exp_ch4.adb (Process_Transient_Object): Add local variable
11654 Temp_Ins. When the transient object is initialized by an
11655 aggregate, the hook must capture the object after the last
11656 component assignment takes place.
11657 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
11658 routine Is_Subprogram_Call.
11659 (Is_Subprogram_Call): Inspect an
11660 aggregate that has been heavily expanded for subprogram calls.
11661 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
11662 and Temp_Ins. Remove the nested declare block and adjust the
11663 indentation. When the transient object is initialized by an
11664 aggregate, the hook must capture the object after the last
11665 component assignment takes place.
11667 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11669 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
11670 external states with enabled properties that do not match the
11672 (Property_Error): New routine.
11673 * sem_res.adb (Property_Error): New routine.
11674 (Resolve_Actuals): Detect illegal uses of external variables with
11675 enabled properties in procedure calls that do not match the mode of
11676 the corresponding formal parameter.
11678 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11680 * sem_util.adb (Has_Enabled_Property): Rename
11681 formal parameter Prop_Nam to Property. Update the comment on usage
11682 and all occurrences in the body. Add local variable Prop_Nam. When
11683 inspecting a property with an expression, the property name
11684 appears as the first choice of the component association.
11686 2014-02-04 Robert Dewar <dewar@adacore.com>
11688 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
11690 2014-02-04 Gary Dismukes <dismukes@adacore.com>
11692 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
11693 for consistency with other messages.
11695 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11697 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
11698 iterator, indicate that the element is a constant if the container
11699 type does not have a variable indexing aspect.
11700 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
11701 marked as constant, do not reset its Ekind, to ensure that
11702 container elements in an element loop are not modified if the
11703 container (e.g. a hashed set) only has a constant indexing aspect.
11705 2014-02-04 Arnaud Charlet <charlet@adacore.com>
11707 * g-souinf.ads: Subprograms in this unit are actually not pure.
11708 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
11709 * einfo.ads (Is_Pure): Update doc to match implementation.
11711 2014-02-04 Gary Dismukes <dismukes@adacore.com>
11713 * exp_ch13.adb: Minor spelling fix.
11715 2014-02-04 Robert Dewar <dewar@adacore.com>
11717 * opt.ads: Minor comment update.
11719 2014-02-04 Robert Dewar <dewar@adacore.com>
11721 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
11722 instead of Replace.
11724 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11726 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
11727 on null expressions if component type is non-null, when the
11728 corresponding association covers an empty range of index values.
11730 2014-02-04 Robert Dewar <dewar@adacore.com>
11732 * sinfo.ads: Further comments on N_Expression_With_Actions node.
11734 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
11736 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
11737 variables Out_Items and Ref_Global. Remove local constant
11738 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
11739 and D8. Remove the useless collection of global items as this
11740 was a leftover from an earlier version of the routine. Move
11741 several routines out to avoid deep nesting and indentation.
11742 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
11743 parameter Do_Checks to Post_Errors. Update the comment on usage.
11744 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
11745 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
11746 to Post_Errors. Update the comment on usage. Account for the
11747 case where a self referential state may have a null input_list.
11748 (Is_Self_Referential): New routine.
11750 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11752 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
11753 entity renames an expression, as in the case of an object of
11754 an unconstrained type initialized by a function call, defer the
11755 rewriting of the expression to the expander.
11756 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
11757 'Alignment): If the entity renames an expression, introduce
11758 temporary to capture value, and rewrite original declaration to
11761 2014-02-04 Gary Dismukes <dismukes@adacore.com>
11763 * g-comlin.adb: Minor typo fix.
11765 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11767 * freeze.adb (Freeze_All): Types derived from a formal
11768 access_to_classwide type do not have a finalization master.
11770 2014-02-04 Robert Dewar <dewar@adacore.com>
11772 * sprint.adb: Minor reformatting.
11774 2014-02-04 Robert Dewar <dewar@adacore.com>
11776 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
11777 cases where Actions is a null list.
11778 * sinfo.ads (N_Expression_With_Actions): Actions can be
11779 temporarily empty during semantic analysis, but must be non-empty
11780 in the final expanded tree.
11782 2014-01-31 Robert Dewar <dewar@adacore.com>
11784 * exp_ch9.adb: Minor reformatting.
11786 2014-01-31 Emmanuel Briot <briot@adacore.com>
11788 * g-comlin.adb (Set_Command_Line): Take the switches
11789 configuration from the Command_Line_Config.
11791 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
11793 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
11796 2014-01-31 Vincent Celier <celier@adacore.com>
11798 * projects.texi: Add more documentation about others used as an
11799 index in indexed attributes.
11801 2014-01-31 Robert Dewar <dewar@adacore.com>
11803 * gnat_ugn.texi: Minor update.
11804 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
11805 * exp_util.adb: Minor reformatting.
11807 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11809 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
11810 depends on data that is not private to the protected object,
11811 and potentially modifiable in unsynchronized fashion.
11813 2014-01-31 Yannick Moy <moy@adacore.com>
11815 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
11818 2014-01-31 Robert Dewar <dewar@adacore.com>
11820 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
11821 for Unknown_Package.
11822 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
11824 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
11826 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
11827 the logic that generates a runtime check to determine the
11828 controlled status of the object about to be allocated or
11829 deallocated. Class-wide types now always use a runtime check
11830 even if they appear as generic actuals.
11831 (Find_Object): Detect
11832 a special case that involves interface class-wide types because
11833 the object appears as a complex expression.
11835 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11837 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
11838 subprogram with an incomplete untagged formals on the list of
11839 private dependents, to verify that the type is properly completed
11840 in the private part.
11841 * sem_attr.adb: Code clean up.
11843 2014-01-31 Robert Dewar <dewar@adacore.com>
11845 * exp_ch6.adb: Minor reformatting.
11847 2014-01-31 Vincent Celier <celier@adacore.com>
11849 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
11850 when Pkg is unknown.
11852 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
11854 * sem_res.adb (Resolve_Entity_Name): Comment
11855 reformatting. Allow volatile objects in various generated checks.
11857 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11859 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
11860 component association, set the etype of the identifier, for
11863 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11865 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
11866 declared in a package, not checks can apply to the subprogram.
11868 2014-01-31 Robert Dewar <dewar@adacore.com>
11870 * erroutc.adb (Validate_Specific_Warnings): Warnings are
11871 controlled -gnatw.W.
11872 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
11873 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
11875 2014-01-31 Arnaud Charlet <charlet@adacore.com>
11877 * exp_disp.adb: Update comments.
11879 2014-01-31 Yannick Moy <moy@adacore.com>
11881 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
11882 Save_Global_References): Guard access to expression in aspect.
11884 2014-01-31 Yannick Moy <moy@adacore.com>
11886 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
11887 Issue an error when the pragma is applied to a generic unit,
11888 a generic declaration, or inside a generic.
11890 2014-01-31 Yannick Moy <moy@adacore.com>
11892 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
11895 2014-01-31 Robert Dewar <dewar@adacore.com>
11897 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
11900 2014-01-31 Tristan Gingold <gingold@adacore.com>
11902 * exp_disp.adb: Add a historic note.
11904 2014-01-31 Robert Dewar <dewar@adacore.com>
11906 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
11907 Process_Deferred_References.
11909 2014-01-31 Yannick Moy <moy@adacore.com>
11911 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
11912 ineffective pragma Warnings(Off) in GNATprove_Mode.
11914 2014-01-31 Bob Duff <duff@adacore.com>
11916 * s-taskin.ads: Minor comment fix.
11917 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
11918 just direct dependents. If this is actually an abort, each task
11919 will take care of aborting its dependents, so all dependents will
11920 get aborted, as before. However, when this is called the second
11921 time from Vulnerable_Complete_Master "for convenience" (i.e. to
11922 kill off tasks waiting at terminate alternatives), aborting
11923 indirect dependents is wrong, because it causes some unrelated
11924 tasks to get aborted.
11926 2014-01-31 Robert Dewar <dewar@adacore.com>
11928 * sem_ch4.adb: Minor reformatting.
11930 2014-01-31 Robert Dewar <dewar@adacore.com>
11932 * exp_ch2.adb: New calling sequence for Is_LHS.
11933 * frontend.adb: Add call to Process_Deferred_References.
11934 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
11935 (Deferred_References): New table.
11936 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
11938 (Find_Expanded_Name): Ditto.
11939 * sem_res.adb: New calling sequence for Is_LHS.
11940 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
11941 * sem_warn.adb: Call Process_Deferred_References before issuing
11944 2014-01-31 Tristan Gingold <gingold@adacore.com>
11946 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
11947 use of System_Tasking_Protected_Objects_Single_Entry.
11948 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
11949 of Protected_Single_Entry_Call.
11950 (Expand_N_Timed_Entry_Call): Remove single_entry case.
11951 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
11953 (Make_Disp_Timed_Select_Body): Likewise.
11954 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
11955 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
11957 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
11958 (Wait_For_Completion_With_Timeout): Remove.
11959 (Protected_Single_Entry_Call): Remove Mode parameter
11960 (always Simple_Call).
11961 (Service_Entry): Remove Self_Id constant (not used anymore).
11962 (Timed_Protected_Single_Entry_Call): Remove.
11963 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
11964 (Protected_Single_Entry_Call): Remove Mode parameter.
11966 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
11968 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
11969 * einfo.ads (Get_Pragma): Update the comment on special pragmas
11970 handled by this routine.
11971 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
11972 to the contract of the related subprogram body.
11973 * sem_util.adb (Add_Contract_Item): Handle the insertion of
11974 pragma Refined_Post into the contract of a subprogram body.
11975 * sinfo.ads Update the documentation of node N_Contract.
11976 * sem_res.adb (Resolve_Entity_Name): Add a guard
11977 to detect abstract states and variables only when checking the
11978 SPARK 2014 rules concerning volatile object placement.
11980 2014-01-29 Ed Schonberg <schonberg@adacore.com>
11982 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
11983 null is compatible with any access type.
11985 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
11987 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
11988 placement is not in a package.
11990 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
11992 * sem_util.adb (Has_Enabled_Property): Compare the character field of
11995 2014-01-29 Robert Dewar <dewar@adacore.com>
11997 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
11998 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
11999 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
12001 2014-01-29 Robert Dewar <dewar@adacore.com>
12003 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
12004 * sem_warn.adb (Check_References): Suppress warnings if inside
12005 Initial_Condition pragma.
12007 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12009 * sem_prag.adb (Check_Missing_Part_Of): List all values of
12010 State_Space_Kind for readability reasons. Do not emit an error on
12011 a private item when the enclosing package lacks aspect/pragma
12012 Abstract_State. Do not emit an error on a private package
12013 instantiation when the corresponding generic template lacks
12015 (Has_Visible_State): New routine.
12016 * sem_util.adb (Find_Placement_In_State_Space): The visible
12017 declarations of any kind of child units in general act as proper
12018 placement location.
12020 2014-01-29 Robert Dewar <dewar@adacore.com>
12022 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
12023 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
12024 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
12025 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
12026 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
12027 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
12028 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
12029 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
12030 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
12031 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
12032 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
12033 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
12034 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
12035 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
12036 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
12037 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
12038 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
12039 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
12040 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
12041 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
12042 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
12043 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
12044 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
12045 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
12046 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
12047 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
12048 s-regpat.adb, s-secsta.adb, s-stalib.ads,
12049 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
12050 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
12051 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
12052 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
12053 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
12055 2014-01-29 Robert Dewar <dewar@adacore.com>
12057 * expander.adb: Minor reformatting.
12059 2014-01-29 Javier Miranda <miranda@adacore.com>
12061 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
12064 2014-01-29 Javier Miranda <miranda@adacore.com>
12066 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
12067 that checks if an interface types defines the predefined "="
12068 function because the compiler was erroneously not generating the
12069 predefined "=" primitive as soon as the name of some interface
12070 primitive is "=" (formals were not checked).
12072 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12074 * expander.adb (Expander): In GNATprove mode, do not process
12075 transient scopes: they are in general not created in this mode,
12076 and an attempt to examine them will lead to constraint errors when
12077 processing configuration pragmas that have analyzable expressions.
12079 2014-01-29 Vincent Celier <celier@adacore.com>
12081 * clean.adb (Gnatclean): Fail if main project is an aggregate
12082 project or if there is an aggregate library project in the
12084 * gnatcmd.adb: Fail if the main project is an aggregate project
12085 or if there is an aggegate library project in the project tree.
12086 * make.adb (Initialize): : Fail if main project is an aggregate
12087 project or if there is an aggregate library project in the
12089 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
12090 * prj-makr.adb (Initialize): Fail if the main project is an
12091 aggregate project or an aggregate library project.
12093 2014-01-29 Vincent Celier <celier@adacore.com>
12095 * prj-part.adb (Check_Import_Aggregate): New procedure
12096 to check if an imported project is an aggregate project.
12097 (Parse_Single_Project): Call Check_Import_Aggregate
12098 * projects.texi: Document that aggregate projects cannot be
12099 extended or imported.
12101 2014-01-29 Robert Dewar <dewar@adacore.com>
12103 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
12104 reformatting and code clean up.
12105 * gnat_ugn.texi: Add documentation section on Atomic Variables
12108 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12110 * einfo.adb Flag264 is now unused.
12111 (Has_Body_References): Removed.
12112 (Set_Has_Body_References): Removed.
12113 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
12114 * einfo.ads Update the comment on usage of attribute
12115 Body_References. Remove attribute Has_Body_References and its
12117 (Has_Body_References): Removed along with pragma Inline.
12118 (Set_Has_Body_References): Removed along with pragma Inline.
12119 * sem_prag.adb (Analyze_Global_Item): Move the call to
12120 Record_Possible_Body_Reference in the state related checks
12121 section. Add a comment intended function.
12122 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
12123 in the state related checks section. Add a comment intended function.
12124 (Analyze_Refinement_Clause): Cleanup the illegal body reference
12125 reporting. Add a comment on timing of error reporting.
12126 (Record_Possible_Body_Reference): Reimplement the routine.
12128 2014-01-29 Vincent Celier <celier@adacore.com>
12130 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
12131 unit-based languages.
12132 (Mains.Complete_Mains.Do_Complete): Use the source file project
12133 tree when calling Find_File_Add_Extension. Use the correct
12134 project name when reporting an error.
12136 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12138 * aspects.adb Add an entry for aspect Part_Of in table
12140 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
12141 Aspect_Argument, Aspect_Names and Aspect_Delay.
12142 * atree.h Define Elist9.
12143 * atree.adb (Elist9): New routine.
12144 (Set_Elist9): New routine.
12145 * atree.ads (Elist9): New routine.
12146 (Set_Elist9): New routine.
12147 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
12148 the list of node usage. Remove Refined_State from the list of
12150 (Encapsulating_State): New routine.
12152 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
12153 (Refined_State): Removed.
12154 (Set_Encapsulating_State): New routine.
12155 (Set_Part_Of_Constituents): New routine.
12156 (Set_Refined_State): Removed.
12157 (Write_Field9_Name): Add an entry
12158 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
12159 Encapsulating_State. Remove the entry for Refined_State.
12160 * einfo.ads Add new attributes Encapsulating_State
12161 and Part_Of_Constituents alond with their usage in
12162 entities. Remove attribute Refined_State along with its
12164 (Encapsulating_State): New routine and
12165 pragma Inline. (Get_Pragma): Update the comment on usage.
12166 (Part_Of_Constituents): New routine and pragma Inline.
12167 (Refined_State): Removed along with pragma Inline.
12168 (Set_Encapsulating_State): New routine and pragma Inline.
12169 (Set_Part_Of_Constituents): New routine and pragma Inline.
12170 (Set_Refined_State): Removed along with pragma Inline.
12171 * par-prag.adb Pragma Part_Of does not need any special processing
12173 * sem_ch3.adb (Analyze_Declarations): Remove local variables
12174 Body_Id and Prag. Call separate routines to analyze the
12175 contract of a package [body].
12176 (Analyze_Object_Contract):
12177 Update the comment on usage. Remove local variables
12178 Items and Nam. Use Get_Pragma rather than traversing the
12179 classification list. Verify whether the lack of indicator
12180 Part_Of agrees with the placement of the variable in state space.
12181 (Analyze_Object_Declaration): Initialize the encapsulating state
12182 of a variable. (Requires_State_Refinement): Moved to sem_util.
12183 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
12184 (Analyze_Package_Contract): New routine.
12185 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
12186 (Analyze_Package_Contract): New routine.
12187 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
12188 state and Part_Of constituents.
12189 * sem_ch13.adb (Analyze_Aspect_Specifications):
12190 Add processing for aspect Part_Of. Update all
12191 calls to Decorate_Delayed_Aspect_And_Pragma.
12192 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
12193 not need any special processing at freeze time.
12194 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
12195 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
12196 update the associated comment.
12197 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
12198 (Analyze_Abstract_State): Add new global variable State_Id. Remove
12199 local constants Errors and Loc. Remove local variables Is_Null
12200 and State_Nam. Create the entity of the abstract state on the
12201 spot, before all remaining checks are performed. Verify that a
12202 missing Part_Of option agrees with the placement of the abstract
12203 state within the state space.
12204 (Analyze_Depends_In_Decl_Part):
12205 Add new global variables Constits_Seen and States_Seen. Check
12206 that a state and a corresponding constituent do not appear
12207 in pragma [Refined_]Depends.
12208 (Analyze_Global_In_Decl_Part):
12209 Add new global variables Constits_Seen and States_Seen. Check
12210 that a state and a corresponding constituent do not appear
12211 in pragma [Refined_]Global.
12212 (Analyze_Global_Item):
12213 Remove the now obsolete code that deals with Part_Of.
12214 Add the entity of the global item to the list of processed
12215 items. (Analyze_Initializes_In_Decl_Part): Add new global
12216 variables Constits_Seen and States_Seen. Check that a state
12217 and a corresponding constituent do not appear in pragma
12219 (Analyze_Initialization_Item): Add the entity
12220 of the initialization item to the list of processed items.
12221 (Analyze_Input_Item): Add the entity of the initialization
12222 item to the list of processed items.
12223 (Analyze_Input_Output):
12224 Remove the now obsolete code that deals with Part_Of. Add the
12225 entity of the input/output to the list of processed items.
12226 (Analyze_Part_Of): New routine.
12227 (Analyze_Part_Of_Option): Remove
12228 local constant Par_State. Add local constant Encaps and local
12229 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
12230 the option. Turn the related state into a Part_Of constituent
12231 if the option is legal.
12232 (Analyze_Pragma): Add processing
12233 for pragma Part_Of.
12234 (Analyze_Refined_State_In_Decl_Part):
12235 Remove global constants Pack_Body and Spec_Id. Remove
12236 global variables Abstr_States and Hidden_States. Add new
12237 global variables Available_States, Body_Id, Body_States and
12238 Spec_Id. Add new local constant Body_Decl. Reimplement the
12239 logic that extracts the states available for refinement from
12240 the related package and the body hidden states of the said
12242 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
12243 (Check_Applicable_Policy): Alphabetize body.
12244 (Check_Dependency_Clause): Replace Refined_State
12245 with Encapsulating_State.
12246 (Check_Matching_Constituent):
12247 Reimplement the logic that determines whether an item is a valid
12248 / invalid constituent of the current refined state. Return when
12249 a construct does not denote a valid abstract state. Extract the
12250 list of Part_Of constituents for further analysis. Check that all
12251 Part_Of constituents of a state have been used in its refinement.
12252 (Check_Matching_State): Update the comment on usage. Operate
12253 on the list of available states.
12254 (Check_Missing_Part_Of): New routine.
12255 (Check_Refined_Global_Item): Replace Refined_State
12256 with Encapsulating_State.
12257 (Check_State_And_Constituent_Use): New routine.
12258 (Create_Abstract_State): New routine.
12259 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
12260 (Is_Part_Of): Removed.
12261 (Collect_Body_States): New routine.
12262 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
12263 (Collect_Hidden_States): Removed.
12264 (Report_Unrefined_States): Change the profile of the procedure along
12265 with the comment on usage.
12266 (Report_Unused_Constituents): New routine.
12267 (Report_Unused_Hidden_States): Removed.
12268 (Report_Unused_States): New routine.
12269 * sem_prag.ads (Check_Missing_Part_Of): New routine.
12270 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
12271 appear in the classification pragmas of a package instantiation
12273 (Find_Placement_In_State_Space): New routine.
12274 (Is_Child): Removed.
12275 (Is_Child_Or_Sibling): Remove formal
12276 parameter Private_Child. Remove the private child checks.
12277 (Requires_State_Refinement): Moved from sem_ch3.
12278 * sem_util.ads Add new type State_Space_Kind along with
12279 comment on its usage and values.
12280 (Add_Contract_Item): Update the comment on usage.
12281 (Find_Body_Discriminal): Alphabetize spec.
12282 (Find_Placement_In_State_Space): New routine.
12283 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
12284 and update the comment on usage.
12285 (Requires_State_Refinement): Moved from sem_ch3.
12286 * sinfo.ads: Update the documentation of N_Contract.
12287 * snames.ads-tmpl The predefined name for Part_Of is now used
12288 to denote a pragma. Add Pragma_Id for Part_Of.
12290 2014-01-29 Emmanuel Briot <briot@adacore.com>
12292 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
12294 (Dump): New subprogram.
12296 2014-01-29 Tristan Gingold <gingold@adacore.com>
12298 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
12299 Expand_Entry_Declaration to factorize code.
12301 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12303 * checks.adb: minor clarification.
12304 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
12305 search for primitive operations to the entities that immediately
12306 follow the type declaration.
12308 2014-01-29 Tristan Gingold <gingold@adacore.com>
12310 * exp_ch9.adb (Build_Protected_Entry): Do not call
12311 Complete_Entry_Body anymore.
12312 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
12313 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
12315 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
12317 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
12318 string when the Name input bigger than allowed. Adapt the function
12321 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12323 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
12324 if expression is within a case_expression of if_expression.
12326 2014-01-29 Robert Dewar <dewar@adacore.com>
12328 * exp_ch9.adb, inline.ads: Minor reformatting.
12330 2014-01-29 Tristan Gingold <gingold@adacore.com>
12332 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
12334 2014-01-29 Yannick Moy <moy@adacore.com>
12336 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
12337 SPARK_Mode_Pragma components to be able to analyze generic
12339 * sem_ch12.adb (Analyze_Package_Instantiation,
12340 Inline_Instance_Body, Need_Subprogram_Instance_Body,
12341 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
12342 for future analysis of the instance.
12343 (Instantiate_Package_Body,
12344 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
12345 from instantiation to analyze the instance.
12347 2014-01-29 Robert Dewar <dewar@adacore.com>
12349 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
12352 2014-01-29 Yannick Moy <moy@adacore.com>
12354 * gnat_rm.texi: Update description of SPARK_Mode pragma.
12356 2014-01-29 Tristan Gingold <gingold@adacore.com>
12358 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
12360 2014-01-29 Thomas Quinot <quinot@adacore.com>
12362 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
12364 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12366 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
12367 resulting string is an internal entity. and thus requires no
12368 initialization. This is relevant when Initialize_ Scalars is
12369 enabled, because the resultant spurious initialization may lead to
12370 secondary stack anomalies that produce a mangled name for a task.
12372 2014-01-29 Yannick Moy <moy@adacore.com>
12374 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
12375 not inherited from spec anymore. Check consistency
12376 rules after processing of declarations.
12377 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
12378 from spec anymore. Check consistency rules after processing of
12380 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
12382 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
12385 2014-01-27 Robert Dewar <dewar@adacore.com>
12387 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
12389 (Resolve_Range): Add type name/location to unordered msg.
12391 2014-01-27 Claire Dross <dross@adacore.com>
12393 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
12394 Capacity) is only called with Capacity >= Length (Source) and
12395 Capacity in Capacity_Range.
12396 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
12397 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
12398 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
12399 in the code is this is not the case.
12401 2014-01-27 Thomas Quinot <quinot@adacore.com>
12403 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
12404 selected component in an instance where the component of the
12405 actual is not visibile at instantiation.
12407 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12409 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
12410 has a dynamic predicate, generate freeze node for Actual_Subtype
12411 at once, because the declaration of the corresponding predicate
12412 function will make reference to it.
12414 2014-01-27 Tristan Gingold <gingold@adacore.com>
12416 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
12418 2014-01-27 Robert Dewar <dewar@adacore.com>
12420 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
12421 for 2**X optimization.
12423 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12425 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
12426 explicitly whether value is in range of Character, because the
12427 library is typically compiled with range checks disabled, and
12428 we cannot rely on the implicit check on the argument of 'Val.
12430 2014-01-27 Vincent Celier <celier@adacore.com>
12432 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
12433 not the Target to itself.
12435 2014-01-27 Robert Dewar <dewar@adacore.com>
12437 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
12438 changes to avoid incorrect use of unordered enum types.
12440 2014-01-27 Thomas Quinot <quinot@adacore.com>
12442 * sem_ch4.adb: Minor reformatting.
12444 2014-01-27 Robert Dewar <dewar@adacore.com>
12446 * scn.adb (Check_End_Of_Line): Removed.
12447 (Error_Long_Line): Removed.
12448 (Determine_License): Use versions of above routines from Scanner.
12449 * scng.adb (Check_End_Of_Line): Moved to spec.
12450 (Error_Long_Line): Removed, no longer used.
12451 * scng.ads (Check_End_Of_Line): Moved here from body.
12453 2014-01-27 Tristan Gingold <gingold@adacore.com>
12455 * exp_ch7.adb (Build_Cleanup_Statements): Call
12456 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
12457 for protected body.
12458 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
12459 Remove Service_Name variable.
12460 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
12461 factorize code from the above subprograms.
12462 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
12464 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
12466 * einfo.adb (Has_Option): Reimplemented.
12467 * sem_prag.adb (Analyze_Refinement_Clause): Add global
12468 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
12469 External_Constit_Seen and State. Add local variables Body_Ref,
12470 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
12471 avoid a cumbersome while pool. Verify the legality of an external
12472 state and relevant properties.
12473 (Check_External_Property): New routine.
12474 (Check_Matching_State): Remove parameter profile
12475 and update comment on usage.
12476 (Collect_Constituent): Store the
12477 relevant external property of a constituent.
12478 * sem_util.adb (Async_Readers_Enabled): Update the call to
12479 Has_Enabled_Property.
12480 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
12481 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
12482 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
12483 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
12484 Update comment on usage. Reimplement the logic to recognize the various
12485 formats of properties.
12487 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12489 * par-ch5.adb: Minor reformatting.
12491 2014-01-27 Tristan Gingold <gingold@adacore.com>
12493 * s-tposen.ads: Harmonize style and comments.
12495 2014-01-27 Vincent Celier <celier@adacore.com>
12497 * projects.texi: Document that shared library projects, by
12498 default, cannot import projects that are not shared library
12501 2014-01-27 Robert Dewar <dewar@adacore.com>
12503 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
12506 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12508 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
12509 any other exception is raised.
12510 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
12511 still necessary to perform a conversion in order to remove overlong
12514 2014-01-27 Robert Dewar <dewar@adacore.com>
12516 * exp_smem.adb: Minor reformatting.
12518 2014-01-27 Thomas Quinot <quinot@adacore.com>
12520 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
12522 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12524 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
12525 nodes for operands to the original node for the call, to preserve
12526 Original_Node pointers within the resolved operands, given that
12527 they may have been rewritten as well. Previous approach copied
12528 the operands into a new tree and lost those pointers.
12530 2014-01-27 Claire Dross <dross@adacore.com>
12533 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
12535 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12537 * sem_util.adb (Check_Internal_Protected_Use): A call through
12538 an anonymous access parameter of the current protected function
12539 is not a potential modification of the current object.
12541 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12543 * a-cobove.adb (Reserve_Capacity): Procedure raises
12544 Capacity_Error, not Constraint_Error, when request cannot be
12547 2014-01-27 Vincent Celier <celier@adacore.com>
12549 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
12550 not the Target to itself.
12552 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12554 * exp_ch4.adb (Expand_Concatenate): If the target of the
12555 concatenation is a library-level entity, always use the off-line
12556 version of concatenation, regardless of optimization level. This
12557 is space-efficient, and prevents linking problems when some
12558 units are compiled with different optimization levels.
12560 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12562 * sem_ch5.adb: Code clean up.
12564 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12566 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
12567 when an array or container iterator includes a subtype indication,
12568 which is only legal in an element iterator.
12570 2014-01-27 Thomas Quinot <quinot@adacore.com>
12572 * exp_ch7.adb: Minor reformatting.
12574 2014-01-27 Robert Dewar <dewar@adacore.com>
12576 * opt.adb (SPARK_Mode): Default for library units is None rather
12578 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
12580 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
12582 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
12584 2014-01-27 Robert Dewar <dewar@adacore.com>
12586 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
12587 Suspicious_Labels table if we have identifier; followed by loop
12589 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
12590 * par.adb (Suspicious_Labels): New table.
12592 2014-01-27 Robert Dewar <dewar@adacore.com>
12594 * exp_aggr.adb (Check_Bounds): Reason is range check, not
12597 2014-01-27 Yannick Moy <moy@adacore.com>
12599 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
12601 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
12603 (Add_SPARK_Xrefs): Include references to constants.
12604 * spark_xrefs.ads Document new character 'c' for references to
12607 2014-01-27 Thomas Quinot <quinot@adacore.com>
12609 * exp_smem.adb (Add_Write_After): For a function call, insert write as
12610 an after action in a transient scope.
12612 2014-01-27 Thomas Quinot <quinot@adacore.com>
12614 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
12615 to a shared variable as an OUT formal in a call to an init proc,
12616 the 'Read call must be emitted after, not before, the call.
12618 2014-01-27 Robert Dewar <dewar@adacore.com>
12620 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
12622 2014-01-27 Robert Dewar <dewar@adacore.com>
12624 * a-wichha.adb (Character_Set_Version): Change to output proper
12627 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
12629 * einfo.adb (Is_Input_Only_State): Removed.
12630 (Is_Non_Volatile_State): Removed.
12631 (Is_Output_State): Removed.
12632 * einfo.ads (Is_Input_Only_State): Remove attribute and
12633 subprogram. Update related entity.
12634 (Is_Non_Volatile_State):
12635 Remove attribute and subprogram. Update related entity.
12636 (Is_Output_State): Removed attribute and subprogram. Update
12638 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
12640 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
12641 an object, not just variables.
12642 (Analyze_Object_Contract): New routine.
12643 (Analyze_Variable_Contract): Removed.
12644 (Process_Discriminants): Detect an illegal use of volatile
12645 discriminant in SPARK mode.
12646 * sem_ch5.adb (Analyze_Iterator_Specification):
12647 Detect an illegal use of volatile loop variable.
12648 (Analyze_Loop_Parameter_Specification): Detect an illegal use
12649 of volatile loop variable.
12650 * sem_ch6.adb (Process_Formals): Update the volatile object
12651 detection. Detect an illegal formal of mode IN OUT or OUT in
12652 SPARK mode. Enhance the error messages with references.
12653 * sem_ch12.adb (Instantiate_Object): Update the volatile object
12654 detection. Enhance the error messages with references.
12655 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
12656 messages with references.
12657 (Analyze_Contract_Case): Enhance the error messages with references.
12658 (Analyze_External_Property): Call Check_Duplicate_Property to process
12659 an external property.
12660 (Analyze_External_Property_In_Decl_Part): New routine.
12661 (Analyze_External_State_In_Decl_Part): Removed.
12662 (Analyze_Global_Item): Detect an illegal
12663 use of a volatile constant. Detect an illegal use
12664 of a variable with enabled Effective_Reads. Enhance
12665 the error messages with references. Remove obsolete
12666 checks concerning Input_Only and Output_Only states.
12667 (Analyze_Initialization_Item): Enhance the error messages
12669 (Analyze_Initializes_In_Decl_Part): Do not
12670 collect the states and variables when the initialization list
12672 (Analyze_Input_Item): Enhance the error messages with references.
12673 (Analyze_Input_Output): Enhance the error messages with references.
12674 (Analyze_Pragma): Enhance the error messages with references.
12675 (Analyze_Refinement_Clause): Code reformatting.
12676 (Analyze_Refined_Depends_In_Decl_Part):
12677 Rename global variable Global to Reg_Global and update all
12678 occurrences. Add local variables D7 and D8. Update the error
12679 messages with references. Update the call to Collect_Global_Items.
12680 (Analyze_Refined_Global_In_Decl_Part): Add local variables
12681 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
12682 the call to Collect_Global_Items. Account for a Proof_In state
12683 in null / useless refinement checks. Verify the coverage of
12685 (Check_Dependency_Clause): Remove local variable
12686 Out_Constits. Remove the retrieval and removal of constituents
12687 for an Output_Only state. Remove the reporting of unused
12688 Output_Only state constituents.
12689 (Check_Duplicate_Mode): Enhance
12690 the error message with a reference.
12691 (Check_Duplicate_Property): New routine.
12692 (Check_Duplicate_Option): Enhance the error message with a reference.
12693 (Check_External_Properties): Enhance the error message with a reference.
12694 (Check_Function_Return): Enhance the error message with a reference.
12695 (Check_In_Out_States): Update
12696 comment on usage. Add a specialized error message for Proof_In
12697 constituents. Enhance the error message with a reference.
12698 (Check_Input_States): Update comment on usage. Account for
12699 possible Proof_In constituents. Enhance the error message
12701 (Check_Matching_Constituent): Enhance the error message with a
12703 (Check_Matching_State): Enchance the error message with a reference.
12704 (Check_Mode): Add local variable From_Global. Update the call to
12705 Find_Mode. Emit more precise error messages concerning extra items
12706 (Check_Mode_Restriction_In_Enclosing_Context): Consider
12707 pragma Refined_Global. Enhance the error message with a
12709 (Check_Mode_Restriction_In_Function): Enhance the error message with
12711 (Check_Output_States): Update comment on usage. Add local variable
12712 Posted. Account for possible Proof_In constituents. Produce a detailed
12713 list of missing constituents.
12714 (Check_Proof_In_States): New routine.
12715 (Check_Refined_Global_Item): Handle Proof_In
12716 constituents. Enchance the error message with a reference.
12717 (Collect_Global_Items): Add formal parameters Proof_In_Items
12718 and Has_Proof_In_State. Update the comment on usage. Account
12719 for Proof_In items.
12720 (Create_Or_Modify_Clause): Enchance
12721 the error message with a reference.
12723 formal parameter From_Global. Update the comment on usage.
12724 Detect when the mode is governed by pragma [Refined_]Global.
12725 (Output_Constituents): Removed.
12726 (Report_Extra_Constituents):
12727 Report extra Proof_In constituents.
12728 (Report_Unused_Constituents): Removed.
12729 (Usage_Error): Code reformatting. Enhance the error
12730 messages with reference.
12731 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
12732 (Analyze_External_State_In_Decl_Part): Removed.
12733 * sem_res.adb (Resolve_Actuals): Update the volatile object
12734 detection. Enhance the error message with a reference.
12735 (Resolve_Entity_Name): Update the volatile object
12736 detection. Enhance the error message with a reference.
12737 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
12738 (Is_SPARK_Volatile_Object): New routine.
12739 (Has_Volatile_Component): New routine.
12740 * sem_util.ads (Is_Delegate): Alphabetized.
12741 (Is_SPARK_Volatile_Object): New routine.
12742 (Has_Volatile_Component): New routine.
12743 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
12745 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12747 * sem_attr.adb: Resolve fully prefix of 'Update.
12749 2014-01-27 Ben Brosgol <brosgol@adacore.com>
12751 * gnat_rm.texi: Minor clarifications.
12753 2014-01-27 Robert Dewar <dewar@adacore.com>
12755 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
12756 about call that is generated as part of an Initial_Condition
12758 * sem_prag.adb: Minor spelling correction.
12760 2014-01-27 Robert Dewar <dewar@adacore.com>
12762 * sem_prag.adb (Set_Convention_From_Pragma): Check that
12763 convention Ghost can only apply to functions.
12764 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
12766 2014-01-27 Robert Dewar <dewar@adacore.com>
12768 * gnat_ugn.texi: Add Short_Enums to documentation of
12771 2014-01-27 Robert Dewar <dewar@adacore.com>
12773 * sem_prag.adb (Analyze_Input_Item): Correct check for input
12774 item in same package.
12775 * sem_util.ads, sem_util.adb (Within_Scope): New function.
12777 2014-01-26 Arnaud Charlet <charlet@adacore.com>
12779 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
12780 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
12781 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
12782 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
12785 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
12787 * gcc-interface/Makefile.in: Fix oversight.
12789 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
12791 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
12792 conversion from a thin pointer with a shifted value.
12793 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
12794 read-only flag from the values onto the result.
12795 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
12797 2014-01-25 Tristan Gingold <gingold@adacore.com>
12799 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
12800 for E_Variable with a pragma Linker_Section.
12802 2014-01-25 Robert Dewar <dewar@adacore.com>
12804 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
12805 with Default_Value aspect is passed in by copy.
12807 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
12809 * set_targ.adb: Set Short_Enums.
12810 * gcc-interface/lang.opt (fshort-enums): New option.
12811 * gcc-interface/misc.c (gnat_handle_option): Handle it.
12812 (gnat_post_options): Do not modify the global settings.
12814 2014-01-24 Robert Dewar <dewar@adacore.com>
12816 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
12818 (Random_Decimal_Fixed): New generic function.
12819 * s-rannum.ads: Minor comment clarifications.
12821 2014-01-24 Robert Dewar <dewar@adacore.com>
12823 * back_end.adb: Remove Short_Enums handling (handled in
12824 Ttypes/Get_Targ now) Minor added comments.
12825 * freeze.adb: Change name Short_Enums_On_Target to
12826 Target_Short_Enums.
12827 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
12828 * opt.ads: Minor comment updates.
12829 * sem_ch13.adb: Change name Short_Enums_On_Target to
12830 Target_Short_Enums.
12831 * set_targ.adb: Set Short_Enums from gcc back end.
12832 * set_targ.ads (Short_Enums): New variable.
12833 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
12834 Ttypes/Get_Targ now).
12835 * ttypes.ads (Target_Short_Enums): New constant boolean switch
12837 2014-01-24 Pascal Obry <obry@adacore.com>
12839 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
12841 2014-01-24 Gary Dismukes <dismukes@adacore.com>
12843 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
12844 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
12847 2014-01-24 Robert Dewar <dewar@adacore.com>
12849 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
12851 2014-01-24 Vincent Celier <celier@adacore.com>
12853 * prj.adb (Add_Aggregated_Project): Do not add a project in
12854 the list if it is already there.
12856 2014-01-24 Yannick Moy <moy@adacore.com>
12858 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
12859 Correct the search for a subrogram declaration to which a pragma is
12862 2014-01-24 Bob Duff <duff@adacore.com>
12864 * gnat_ugn.texi: Document --decimal-grouping and
12865 --based-grouping switches in gnatpp.
12867 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12869 * sinfo.ads: Documentation update.
12871 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12873 * sem_ch3.adb (Constant_Redeclaration): New declaration is
12874 illegal if previous one has an initial expression that is an
12875 aggregate expanded into assignments.
12877 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12879 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
12880 code reorganization to remove spurious warning on a loop with
12881 an array element iterator that has a null range.
12883 2014-01-24 Vincent Celier <celier@adacore.com>
12885 * make.adb (Binding_Phase): When setting the Ada paths, use
12886 the library ALI dir, not the object dir in libraries.
12888 2014-01-24 Yannick Moy <moy@adacore.com>
12890 * sinfo.ads: Add documentation of check flag fields.
12892 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12894 * sem_res.adb (Resolve_Actuals): If an actual is a view
12895 conversion of a discriminated object, and the formal type is
12896 discriminated and constrained, apply a discriminant check to
12899 2014-01-24 Robert Dewar <dewar@adacore.com>
12901 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
12903 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12905 * sem_ch3.adb (Analyze_Declarations): At the end of an
12906 appropriate declarative part, call Freeze_All from the first
12907 declaration in the scope, not from the first unfrozen one. This
12908 is necessary to apply visibility checks to entities with delayed
12909 aspects. Otherwise, in the presence of instantiations and cleanups
12910 that they may generate, the delayed aspects may be analyzed too
12911 late and produce spurious visibility errors.
12912 * sem_attr.adb: Place etype on range.
12913 * sem_ch6.adb: Documentation expression functions.
12915 2014-01-24 Robert Dewar <dewar@adacore.com>
12917 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
12918 terminology in compiler).
12920 2014-01-24 Robert Dewar <dewar@adacore.com>
12922 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
12923 categories, now that Ada 95 supports raise expressions.
12925 2014-01-24 Robert Dewar <dewar@adacore.com>
12927 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
12928 Short_Enums_On_Target.
12929 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
12931 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
12933 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12935 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
12936 indication is given explicity, check that it matches the array
12937 component type or the container element type of the domain
12940 2014-01-24 Tristan Gingold <gingold@adacore.com>
12942 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
12943 * gcc-interface/misc.c (flag_short_enums): Declare.
12944 (gnat_post_options): Set it.
12946 2014-01-24 Vincent Celier <celier@adacore.com>
12948 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
12949 to cache the result when Including_Libraries is False.
12950 * prj-env.ads (Ada_Objects_Path): Update documentation
12951 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
12952 (Get_Object_Directory): Return the Library_Ali_Dir only when
12953 when Including_Libraries is True.
12954 * prj.ads (Get_Object_Directory): Fix and complete documentation
12955 (Project_Data): New component Ada_Objects_Path_No_Libs
12957 2014-01-24 Robert Dewar <dewar@adacore.com>
12959 * checks.adb (Expr_Known_Valid): Result of fpt operator never
12962 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
12964 * back_end.adb: Minor fix in comment.
12966 2014-01-24 Javier Miranda <miranda@adacore.com>
12968 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
12969 required to report the error in case of task types.
12971 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12973 * sem_attr.adb: Additional index checking.
12975 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12977 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
12978 expressions in each component association, and for records note
12979 the entity in each association choice, for subsequent resolution.
12980 (Resolve_Attribute, case 'Update): Complete resolution of
12981 expressions in each component association.
12983 2014-01-24 Robert Dewar <dewar@adacore.com>
12985 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
12986 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
12987 leading to wrong handling of SPARK_Mode for library units).
12989 2014-01-24 Robert Dewar <dewar@adacore.com>
12991 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
12992 on generic instances (do not consider them to be internally
12995 2014-01-24 Doug Rupp <rupp@adacore.com>
12997 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
12998 vice pthread_sigmask.
13000 2014-01-24 Vincent Celier <celier@adacore.com>
13002 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
13005 2014-01-24 Vincent Celier <celier@adacore.com>
13007 * prj-ext.adb (Add): Do not output anything when Silent is True,
13008 whatever the verbosity. When Source is From_External_Attribute,
13009 set the corresponding environment variable if it is not already set.
13010 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
13012 * prj-proc.adb (Process_Expression_For_Associative_Array):
13013 For attribute External, call Prj.Ext.Add with Silent set to
13014 True for the child environment, to avoid useless output in non
13017 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13019 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
13020 range given by a subtype indication, and force evaluation of
13021 the bounds, as for a simple range.
13022 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
13023 of bounds of slice for various kinds of discrete ranges.
13024 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
13025 Evaluate_Slice_Bounds.
13027 2014-01-24 Bob Duff <duff@adacore.com>
13029 * s-taskin.ads (Activator): Make this Atomic, because
13030 Activation_Is_Complete reads it, and that can be called
13031 from any task. Previously, this component was only
13032 modified by the activator before activation, and by
13033 Self after activation.
13034 * a-taside.ads, a-taside.adb (Environment_Task,
13035 Activation_Is_Complete): Implement these missing functions.
13037 2014-01-24 Doug Rupp <rupp@adacore.com>
13039 * init.c: Add a handler section for Android.
13041 2014-01-24 Arnaud Charlet <charlet@adacore.com>
13043 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
13045 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13047 * sem_ch4.adb (Operator_Check): If one operand is a
13048 Raise_Expression, set its type to that of the other operand.
13049 * sem_res.adb (Resolve_Raise_Expression): new procedure.
13050 (Resolve_Actuals): For an actual that is a Raise_Expression,
13051 set the type to that of the formal.
13052 * sem_type.adb (Find_Unique_Type): If one of the operands is a
13053 Raise_Expression, return type of the other operand.
13055 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13057 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
13058 component of the record has a type with a default aspect, and
13059 the corresponding aggregate component is initiaized with a box,
13060 use the default value in the rewritten aggregate.
13062 2014-01-24 Tristan Gingold <gingold@adacore.com>
13064 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
13065 s-interr-sigaction.adb,
13066 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
13067 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
13068 to the call to Install_Restricted_Handlers.
13070 2014-01-24 Emmanuel Briot <briot@adacore.com>
13072 * prj-nmsc.adb (Check_File): Add protection when the source is
13073 not fully initialized.
13075 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13077 * sem_util.adb (Is_Post_State): In a postcondition, a selected
13078 component that denotes an implicit dereference is a reference
13079 to the post state of the subprogram.
13081 2014-01-24 Robert Dewar <dewar@adacore.com>
13083 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
13084 for generated subprograms.
13085 (Analyze_Subprogram_Specification): Ditto.
13087 2014-01-24 Vincent Celier <celier@adacore.com>
13089 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
13090 attributes in package Builder of aggregate and aggregate library
13092 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
13093 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
13094 Remove parameters. Change error message from "... externally
13095 build library ..." to "... externally built project ...".
13096 (Process_Naming_Scheme.Check): Do not do any check in aggregate
13097 project, as attribute Library_Dir and Library_Name have already
13098 been detected as forbidden.
13100 2014-01-24 Vincent Celier <celier@adacore.com>
13102 * prj-env.adb (Find_Project): If cached project path is not in
13103 project directory, look in current directory first and use cached
13104 project path only if project is not found in project directory.
13106 2014-01-24 Robert Dewar <dewar@adacore.com>
13108 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
13110 2014-01-24 Vincent Celier <celier@adacore.com>
13112 * projects.texi: Document that aggregate projects are only
13113 supported by gprbuild, but not by gnatmake. Document that the
13114 only attribute Switches in package Binder of aggregate projects
13115 will be ignored if its index is not others. Document that
13116 attribute Global_Config_File is allowed in package Binder of
13117 aggregate projects.
13119 2014-01-24 Robert Dewar <dewar@adacore.com>
13121 * sem_prag.adb: Minor code reorganization.
13122 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
13124 2014-01-24 Pascal Obry <obry@adacore.com>
13126 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
13127 attribute definition.
13129 2014-01-24 Vincent Celier <celier@adacore.com>
13131 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
13132 in the Queue the same source (same path, same multi-source index)
13133 from the same project file, to avoid compiling several times
13136 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
13138 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
13139 (Has_Gigi_Rep_Item): Likewise.
13140 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
13141 Has_Gigi_Rep_Item for objects.
13142 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
13143 (prepend_one_attribute): ...this.
13144 (prepend_one_attribute_pragma): New function extracted from...
13145 (prepend_attributes): ...here. Swap the parameters for consistency.
13146 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
13147 prepend_attributes.
13148 <object>: Deal with a pragma Linker_Section on a constant
13149 or variable. <E_Function>: Deal with a pragma Linker_Section
13151 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
13153 2014-01-24 Vincent Celier <celier@adacore.com>
13155 * opt.ads: Minor comment update.
13157 2014-01-24 Robert Dewar <dewar@adacore.com>
13159 * sem_prag.adb (Analyze_Input_Output): Add missing error check
13161 * sem_util.adb (Is_Refined_State): Add defense against junk
13164 2014-01-24 Pascal Obry <obry@adacore.com>
13166 * projects.texi: Removes Build_Slaves attribute documentation.
13168 2014-01-23 Robert Dewar <dewar@adacore.com>
13170 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
13173 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13175 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
13176 applies to expressions that come from source.
13177 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
13179 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
13180 rule regarding potentially unevaluated expressions, to prefix
13183 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13185 * exp_util.adb (Make_Invqriant_Call): If type of expression is
13186 a private extension, get invariant from base type.
13188 2014-01-23 Robert Dewar <dewar@adacore.com>
13190 * sem_util.adb, sem_attr.adb: Minor reformatting.
13192 2014-01-23 Robert Dewar <dewar@adacore.com>
13194 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
13195 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
13196 * sem.adb (Semantics): Remove save/restore of
13197 SPARK_Mode[_Pragma]. Not needed since already done in
13198 Save/Restore_Opt_Config_Switches.
13200 2014-01-23 Robert Dewar <dewar@adacore.com>
13202 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
13203 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
13204 Linker_Section enhancements.
13206 2014-01-23 Tristan Gingold <gingold@adacore.com>
13208 * gnat_rm.texi: Minor editing.
13210 2014-01-23 Robert Dewar <dewar@adacore.com>
13212 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
13213 with'ed internal units.
13214 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
13216 2014-01-23 Javier Miranda <miranda@adacore.com>
13218 * lib-xref.adb (Generate_Reference): As part of processing the
13219 "end-of-spec" reference generate an extra reference to the first
13220 private entity of the package.
13221 * xr_tabls.adb (Add_Reference): No action needed for the extra
13222 'E' reference associated; similar to the processing of the
13225 2014-01-23 Bob Duff <duff@adacore.com>
13227 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
13229 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13231 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
13232 predicate to implement rule given in 6.1.1 (20/3).
13233 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
13234 'Old in a postcondition, if it is potentially unevaluated and
13235 it is not an entity name.
13237 2014-01-23 Bob Duff <duff@adacore.com>
13239 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
13241 2014-01-23 Robert Dewar <dewar@adacore.com>
13243 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
13246 2014-01-23 Bob Duff <duff@adacore.com>
13248 * g-dynhta.ads: Minor comment fix.
13250 2014-01-23 Yannick Moy <moy@adacore.com>
13252 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
13253 from spec on body only when not already inherited on spec. Set
13254 SPARK_Mode from context on body without previous spec. *
13255 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
13256 library-level entities. Correct retrieval of entity from
13257 declaration, for cases where the declaration is not a unit.
13258 * sem_ch12.adb (Instantiate_Object): Avoid
13259 calling Is_Volatile_Object on an empty node.
13261 2014-01-23 Robert Dewar <dewar@adacore.com>
13263 * gnatlink.adb (Gnatlink): Check for suspicious executable file
13266 2014-01-23 Robert Dewar <dewar@adacore.com>
13268 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
13269 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
13270 style errors in instances.
13271 * g-dynhta.ads (Static_HTable): Comment updates.
13273 2014-01-23 Vincent Celier <celier@adacore.com>
13275 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
13276 to find a configuration project file when Config_File_Name is
13277 No_Configuration_File.
13278 * prj-conf.ads (No_Configuration_File): New constant String.
13279 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
13280 with Config_File_Name set to No_Configuration_File, so that
13281 no existing configuration project file will be used, and the
13282 configuration project will be only created in memory when
13283 Add_Default_GNAT_Naming_Scheme is called.
13284 * projects.texi: Minor reformatting.
13286 2014-01-23 Vincent Celier <celier@adacore.com>
13288 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
13289 a config project file if On_Load_Config is not null.
13290 * prj-pars.adb: Minor comment changes.
13292 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13294 * lib-xref.adb (Output_References): Output progenitors of
13295 synchronized tagged types, for source navigation.
13297 2014-01-23 Robert Dewar <dewar@adacore.com>
13299 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
13300 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
13301 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
13303 2014-01-23 Emmanuel Briot <briot@adacore.com>
13305 * prj-conf.adb (Get_Or_Create_Configuration_File): call
13306 On_Load_Config later.
13308 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
13310 * sem_ch3.adb (Analyze_Declarations): Do not
13311 generate the spec of the late primitive in ASIS mode. Add two
13312 comments to explain the special cases when the expansion is
13315 2014-01-23 Robert Dewar <dewar@adacore.com>
13317 * sem_util.adb (Note_Possible_Modification): Fix error of
13318 misbehaving for implicit dereference cases in -gnatc mode.
13320 2014-01-23 Emmanuel Briot <briot@adacore.com>
13322 * prj-pars.adb: Minor reformatting.
13324 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13326 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
13327 body generated for an expression function within a protected body
13328 needs a set of renaming declarations if the expression function
13331 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13333 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
13334 list interface progenitor of a tagged concurrent type, for better
13337 2014-01-22 Robert Dewar <dewar@adacore.com>
13339 * lib.adb (In_Extended_Main_Code_Unit): Return False for
13341 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
13342 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
13343 treatment of Slocs No_Location and Standard_Location.
13344 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
13345 check for entity with Standard_Location Sloc, rather than relying
13346 on Lib routines to do that.
13347 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
13348 that a call cannot occur before a later occuring body within
13351 2014-01-22 Thomas Quinot <quinot@adacore.com>
13353 * rtsfind.adb: Update comment.
13355 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
13357 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
13358 * sem_ch3.adb (Analyze_Declarations): Add local variable
13359 Body_Seen. Generate the spec of a late controlled
13360 primitive body that is about to freeze its related type.
13361 (Handle_Late_Controlled_Primitive): New routine.
13363 2014-01-22 Robert Dewar <dewar@adacore.com>
13365 * a-stream.adb: Minor reformatting.
13367 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13369 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
13370 sub-procedure Declared_In_Actual to handle properly the visibility
13371 of actuals in actual packages, that are themselves actuals to a
13372 actual package of the current instance. This mimics properly the
13373 visibility of formals of formal packages declared with a box,
13374 within the corresponding generic unit.
13376 2014-01-22 Robert Dewar <dewar@adacore.com>
13378 * checks.adb: Do not assume that a volatile variable is valid.
13380 2014-01-22 Thomas Quinot <quinot@adacore.com>
13382 * g-catiio.ads (Image, Value): Clarify that these functions
13383 operate in the local time zone. Minor documentation update.
13385 2014-01-22 Thomas Quinot <quinot@adacore.com>
13387 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
13389 2014-01-22 Robert Dewar <dewar@adacore.com>
13391 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
13392 Moved to sem_aux.adb.
13394 2014-01-22 Robert Dewar <dewar@adacore.com>
13396 * vms_data.ads: Minor reformatting.
13398 2014-01-22 Robert Dewar <dewar@adacore.com>
13400 * debug.adb: Document messages affected by -gnatd.E including
13401 the new ones that relate to late definition of equality.
13402 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
13403 debug flag -gnatd.E is set, then generate warnings rather than
13405 (Check_Untagged_Equality): In earlier versions of Ada,
13406 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
13408 2014-01-22 Robert Dewar <dewar@adacore.com>
13410 * sem_prag.adb (Usage_Error): Output additional messages for
13411 unconstrained OUT parameters lacking an input dependency.
13413 2014-01-22 Robert Dewar <dewar@adacore.com>
13415 * sem_ch4.adb: Minor reformatting.
13417 2014-01-22 Robert Dewar <dewar@adacore.com>
13419 * restrict.ads: Minor reformatting.
13420 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
13421 forbids a call from within a subprogram to the same subprogram.
13423 2014-01-22 Thomas Quinot <quinot@adacore.com>
13425 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
13426 stream attributes for Stream_Element_Array.
13427 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
13428 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
13429 defined in the current scope.
13431 2014-01-22 Robert Dewar <dewar@adacore.com>
13433 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
13435 2014-01-22 Thomas Quinot <quinot@adacore.com>
13437 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
13439 2014-01-22 Thomas Quinot <quinot@adacore.com>
13441 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
13442 declaration initialized with a function call, whose type
13443 has variable size, need to remove side effects so that the
13444 initialization expression becomes a dereference of a temporary
13445 reference to the function result.
13447 2014-01-22 Yannick Moy <moy@adacore.com>
13449 * errout.adb (Initialize): Remove trick to add dummy entry
13451 * erroutc.adb (Set_Warnings_Mode_Off,
13452 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
13453 command line switch.
13454 * opt.ads (Warning_Mode): Document behavior
13455 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
13457 2014-01-22 Robert Dewar <dewar@adacore.com>
13459 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
13461 2014-01-22 Robert Dewar <dewar@adacore.com>
13463 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
13464 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
13465 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
13466 case Storage_Size): call Check_Pool_Size_Clash.
13468 2014-01-22 Robert Dewar <dewar@adacore.com>
13470 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
13471 sem_eval.ads: Minor reformatting.
13473 2014-01-22 Thomas Quinot <quinot@adacore.com>
13475 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
13476 Any_Composite to prevent cascaded errors.
13478 2014-01-22 Yannick Moy <moy@adacore.com>
13480 * errout.adb (Initialize): Do not insert special entry in Warnings
13481 table in GNATprove_Mode.
13482 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
13484 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
13487 2014-01-22 Robert Dewar <dewar@adacore.com>
13489 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
13492 2014-01-22 Robert Dewar <dewar@adacore.com>
13494 * snames.ads-tmpl: Update header.
13496 2014-01-22 Thomas Quinot <quinot@adacore.com>
13498 * exp_util.adb (Insert_Actions): When inserting actions on a
13499 short circuit operator that has already been analyzed, do not park
13500 actions in node; instead introduce an N_Expression_With_Actions
13501 and insert actions immediately.
13502 Add guard for unexpected case of climbing up through statement
13503 in Actions list of an N_Expression_With_Actions.
13504 * sem_elab.adb (Insert_Elab_Check): Remove complex
13505 specialized circuitry for the case where the context is already
13506 analyzed, as it is not needed and introduces irregularities in
13507 finalization. Instead rely on the above change to Insert_Actions
13508 to ensure that late insertion on short circuit operators works
13511 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13513 * sem_ch4.adb (Operator_Check): Improve error message when an
13514 operand of concatenation is an access type.
13516 2014-01-22 Thomas Quinot <quinot@adacore.com>
13518 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
13521 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13523 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
13524 of an expanded name in a proper body, whose prefix is a package
13525 in the context of the proper body, when there is a homonym of
13526 the package declared in the parent unit.
13528 2014-01-22 Robert Dewar <dewar@adacore.com>
13530 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
13531 msg if errors found.
13532 (Check_One_Unit): Same change.
13534 2014-01-22 Robert Dewar <dewar@adacore.com>
13536 * ug_words: Add missing/wrong entries for VMS warning switches.
13537 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
13539 2014-01-22 Jerome Guitton <guitton@adacore.com>
13541 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
13544 2014-01-22 Robert Dewar <dewar@adacore.com>
13546 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
13548 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
13550 * gcc-interface/Makefile.in: Minor fixes.
13552 2014-01-21 Robert Dewar <dewar@adacore.com>
13554 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
13555 * par-ch5.adb (P_Condition): New version with expression prescanned.
13556 * par.adb (P_Condition): New version with expression prescanned.
13558 2014-01-21 Robert Dewar <dewar@adacore.com>
13560 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
13561 if Address is not a private type.
13562 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13563 Ignore pragma if System.Address is not a private type.
13565 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13567 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
13568 uninitialized value.
13570 2014-01-21 Thomas Quinot <quinot@adacore.com>
13572 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
13574 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13576 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
13577 the value of Assertions_Enabled flag when compiling an instance of
13578 an internal unit. This facilitates the use of pre/postconditions
13579 in generic internal units, such as the new elementary function
13582 2014-01-21 Robert Dewar <dewar@adacore.com>
13584 * exp_aggr.adb: Minor reformatting.
13585 * sem_attr.adb: Minor reformatting.
13586 * sem_res.adb: Minor comment addition.
13587 * einfo.adb: Minor comment updates.
13588 * freeze.adb: Minor reformatting and code reorganization.
13590 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13592 * par-ch4.adb (P_If_Expression): Handle more gracefully an
13593 elsif clause that does not have an else part.
13595 2014-01-21 Robert Dewar <dewar@adacore.com>
13597 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
13598 * gcc-interface/Makefile.in: clean up target pairs.
13600 2014-01-21 Pascal Obry <obry@adacore.com>
13602 * projects.texi: Minor typo fix.
13604 2014-01-21 Thomas Quinot <quinot@adacore.com>
13606 * freeze.adb (Check_Component_Storage_Order): If a record type
13607 has an explicit Scalar_Storage_Order attribute definition clause,
13608 reject any component that itself is of a composite type and does
13611 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13613 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
13614 can be used to generate proper cross-reference information for
13615 the parent units of proper bodies.
13617 2014-01-21 Thomas Quinot <quinot@adacore.com>
13619 * exp_pakd.adb (Expand_Packed_Element_Set,
13620 Expand_Packed_Element_Reference): No byte swapping required in
13621 the front-end for the case of a reverse storage order array,
13622 as this is now handled uniformly in the back-end. However we
13623 still need to swap back an extracted element if it is itself a
13624 nested composite with reverse storage order.
13626 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
13628 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
13629 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
13632 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13634 * gnat_ugn.texi: Minor updates.
13636 2014-01-21 Thomas Quinot <quinot@adacore.com>
13638 * exp_pakd.adb: Update comment, minor reformatting.
13640 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
13642 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
13643 object check when SPARK_Mode is on.
13644 * sem_ch6.adb (Process_Formals): Trigger the volatile object
13645 check when SPARK_Mode is on.
13646 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
13647 check when SPARK_Mode is on.
13648 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
13649 corresponding pragma of aspect SPARK_Mode in the visible
13650 declarations of a package declaration.
13651 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
13652 check when SPARK_Mode is on.
13653 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
13654 check when SPARK_Mode is on.
13655 (Resolve_Entity_Name): Trigger
13656 the volatile object check when SPARK_Mode is on.
13658 2014-01-21 Robert Dewar <dewar@adacore.com>
13660 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
13661 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
13663 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13665 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
13666 object is declared, it is rewritten as a renaming of an dynamic
13667 expression that wraps the initial value. The renaming declaration
13668 is first given an internal name, to prevent collisions with the
13669 entity already declared, and then the name is modified to reflect
13670 the original one. the modification of the name must preserve
13671 the source location of the original, to prevent spurious errors
13672 when compiling with style checks if the declaration involves
13673 more than one entity.
13675 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
13677 * aspects.adb Add entries for Async_Readers, Async_Writers,
13678 Effective_Reads and Effective_Writes in table Canonical_Aspect.
13679 * aspects.ads Add entries for Async_Readers, Async_Writers,
13680 Effective_Reads and Effective_Writes in tables Aspect_Id,
13681 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
13682 * atree.adb (Ekind_In): New version with 8 parameters.
13683 (Node34): New routine.
13684 (Set_Node34): New routine.
13685 * atree.ads (Ekind_In): New version with 8 parameters.
13686 (Node34): New routine.
13687 (Set_Node34): New routine.
13688 * einfo.adb Contract is now Node34.
13689 (Contract): Update the assertion and node usage.
13690 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
13691 Effective_Reads and Effective_Writes.
13692 (Set_Contract): Update the assertion and node usage.
13693 (Write_Field24_Name): Remove the output for a contract.
13694 (Write_Field34_Name): Add output for a contract.
13695 * einfo.ads Contract is now Node34. Update the comment on
13696 attribute usage and related node structures.
13697 (Get_Pragma): Update the comment on usage.
13698 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
13699 Effective_Reads and Effective_Writes do not require special
13700 processing by the parser.
13701 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
13702 (Analyze_Declarations): Analyze the contract of a variable at
13703 the end of the declarative region.
13704 (Analyze_Object_Declaration): Create a contract for a variable.
13705 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
13706 of classification pragmas.
13707 (Process_Formals): Detect an illegal
13708 use of a volatile object as a formal in a function.
13709 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
13710 a volatile object as an actual in generic instantiation.
13711 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
13712 Effective_Reads and Effective_Writes in table Sig_Flags.
13713 (Analyze_External_State_In_Decl_Part): New routine.
13714 (Analyze_Global_Item): Detect an illegal use of a volatile object
13715 as a global item of a function.
13716 (Analyze_Pragma): Reimplement
13717 pragma Abstract_State. Add support for pragmas Async_Readers,
13718 Async_Writers, Effective_Reads and Effective_Writes.
13719 (Check_External_Properties): New routine.
13720 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
13721 (Check_External_Properties): New routine.
13722 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
13723 volatile object as an actual in a call.
13724 (Resolve_Entity_Name):
13725 Add local variables Par, Prev and Usage_OK. Detect illegal
13726 contexts of volatile objects.
13727 * sem_util.adb (Add_Contract_Item): Add support for
13728 pragmas associated with the contract of a variable.
13729 (Async_Readers_Enabled): New routine.
13730 (Async_Writers_Enabled): New routine.
13731 (Effective_Reads_Enabled): New routine.
13732 (Effective_Writes_Enabled): New routine.
13733 (Has_Enabled_Property):
13735 (Is_Unchecked_Conversion_Instance): New routine.
13736 (Is_Volatile_Object): Add support for entities that may denote
13738 * sem_util.ads (Add_Contract_Item): Update the
13740 (Async_Readers_Enabled): New routine.
13741 (Async_Writers_Enabled): New routine.
13742 (Effective_Reads_Enabled): New routine.
13743 (Effective_Writes_Enabled): New routine.
13744 (Is_Unchecked_Conversion_Instance): New routine.
13745 * sinfo.ads Update the comment on the structure of N_Contract.
13746 * snames.ads-tmpl Add predefined names for Async_Readers,
13747 Async_Writers, Effective_Reads and Effective_Writes. Add
13748 pragma ids for Async_Readers, Async_Writers, Effective_Reads
13749 and Effective_Writes.
13751 2014-01-21 Robert Dewar <dewar@adacore.com>
13753 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
13754 * sem_eval.adb (Compile_Time_Known_Value): Remove special
13755 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
13756 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
13757 (Test_Foldable): Add CRT_Safe parameter
13758 * sem_eval.ads (Compile_Time_Known_Value): Remove special
13759 handling of CRT mode.
13760 (CRT_Safe_Compile_Time_Known_Value): New function.
13762 2014-01-21 Robert Dewar <dewar@adacore.com>
13764 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
13765 with pragma or aspect that applies to package spec or subprogram
13768 2014-01-21 Robert Dewar <dewar@adacore.com>
13770 * exp_aggr.adb: Minor reformatting.
13772 2014-01-21 Johannes Kanig <kanig@adacore.com>
13774 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
13776 2014-01-21 Bob Duff <duff@adacore.com>
13778 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
13780 2014-01-21 Steve Baird <baird@adacore.com>
13782 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
13784 2014-01-21 Vincent Celier <celier@adacore.com>
13786 * prj-part.adb (Parse_Single_Project): Accept to extend a project
13787 if it has only be imported by an project being extended. When a
13788 project that has only been imported by a project being extended
13789 is imported by another project that is not being extended,
13790 reset the previous indication, so that it will be an error if
13791 this project is extended later.
13792 * prj-tree.adb (Create_Project): Include component From_Extended
13793 in table Projects_HT
13794 * prj-tree.ads (Project_Name_And_Node): New Boolean component
13797 2014-01-21 Robert Dewar <dewar@adacore.com>
13799 * atree.ads, atree.adb: Add Node33 and Set_Node33.
13800 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
13801 New field (SPARK_Pragma_Inherited): New flag
13802 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
13804 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
13805 * opt.ads (SPARK_Mode_Pragma): New global variable.
13806 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
13807 * sem_ch3.adb: Use new SPARK_Mode data structures.
13808 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
13809 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
13810 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
13811 (Pop_Scope): Restore SPARK_Mode_Pragma.
13812 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
13813 new data structures.
13815 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13817 * back_end.adb: Undo previous change, not needed. Minor reformatting.
13819 2014-01-21 Thomas Quinot <quinot@adacore.com>
13821 * exp_ch5.adb: Fix comment.
13822 * switch-c.adb: Minor comment update.
13823 * exp_ch3.adb: Minor reformatting.
13825 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13827 * back_end.adb (Scan_Compiler_Arguments): Do not store object
13828 filename in gnatprove mode.
13830 2014-01-21 Thomas Quinot <quinot@adacore.com>
13832 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
13833 suppresses usage of primitive _assign for tagged types).
13834 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
13835 No_Ctrl_Actions for a tagged type that does not require
13836 finalization, as we want to disable usage of _assign (which
13837 may cause undesirable discriminant checks on an uninitialized,
13840 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13842 * sem_prag.adb: Reject invariant'class on completion.
13844 2014-01-21 Javier Miranda <miranda@adacore.com>
13846 * exp_ch3.adb (Build_Init_Procedure): For
13847 derivations of interfaces, do not move the the initialization
13848 of the _parent field since such assignment is not generated.
13850 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13852 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
13853 with the operator it renames if we are within an expression of
13854 a pre/postcondition, because the expression will be reanalyzed
13855 at a later point, and the analysis of the renaming may affect
13856 the visibility of the operator when in an instance.
13858 2014-01-21 Robert Dewar <dewar@adacore.com>
13860 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
13861 Add this flag to type conversion nodes and assignment nodes.
13862 * treepr.adb: Deal properly with Flag 1,2,3.
13863 * treeprs.adt: Minor comment update.
13865 2014-01-21 Robert Dewar <dewar@adacore.com>
13867 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
13869 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
13870 parameter, completely rewrite spec.
13872 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13874 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
13875 instance that is inlined, it may have been rewritten as a wrapper
13876 package. In that case the unit that must be made visible is the
13877 related instance of the package.
13879 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13881 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
13882 previous change in codepeer mode.
13884 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13886 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
13887 call to Abort_Undefer, as expected by the runtime.
13888 * s-tasren.adb (Local_Complete_Rendezvous): Replace
13889 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
13890 deferred at this point. Update comments.
13892 2014-01-21 Thomas Quinot <quinot@adacore.com>
13894 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
13896 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13898 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
13901 2014-01-21 Robert Dewar <dewar@adacore.com>
13903 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
13905 2014-01-21 Thomas Quinot <quinot@adacore.com>
13907 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
13908 this is value is used in Node_Id arithmetic operations.
13909 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
13910 instead of hard-coded unrolled code.
13912 2014-01-21 Yannick Moy <moy@adacore.com>
13914 * gnat1drv.adb: Minor code cleanup, removing useless code.
13916 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13918 * opt.ads (SPARK_Switches_File_Name): New.
13919 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
13920 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
13921 * gnat_ugn.texi: Document -gnates.
13923 2014-01-21 Yannick Moy <moy@adacore.com>
13925 * errout.adb (Special_Msg_Delete): Update comment. Remove
13926 special case for GNATprove which should not ignore mismatch
13927 in sizes for representation clauses.
13928 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
13929 which should not ignore pragma Pack.
13931 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13933 * sem_ch4.adb: Code clean up.
13935 2014-01-21 Steve Baird <baird@adacore.com>
13937 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
13939 2014-01-21 Robert Dewar <dewar@adacore.com>
13941 * gcc-interface/gigi.h: Get Flags array address.
13942 * gcc-interface/trans.c: Acquire Flags array address.
13943 * atree.adb: Add support for Flags array and Flag0,1,2,3.
13944 * atree.ads: Add support for Flags array and Flag0,1,2,3.
13945 * atree.h: Add support for Flags array and Flag0,1,2,3.
13946 * back_end.adb: Pass Flags array address to gigi.
13948 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13950 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
13951 reference to generated body so that legality checks on stream
13952 attributes are properly applied. If type is tagged and already
13953 frozen, insert generated body at the point of the renaming
13956 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13958 * sem_ch12.adb: Code clean up.
13959 * sem_ch8.adb: Minor reformatting
13961 2014-01-20 Robert Dewar <dewar@adacore.com>
13963 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
13964 converting warnings on inevitable exceptions to errors.
13965 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
13966 converting warnings on inevitable exceptions to errors.
13967 * opt.adb (SPARK_Mode_Config): Handled like other config flags
13968 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
13969 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
13970 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
13971 New flag (Config_Switches_Type): Add SPARK_Mode field
13972 * sem.adb: Minor code reorganization (remove unnecessary with)
13973 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
13974 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
13975 converting warnings on inevitable exceptions to errors.
13976 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
13977 converting warnings on inevitable exceptions to errors.
13978 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
13979 converting warnings on inevitable exceptions to errors.
13980 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
13981 converting warnings on inevitable exceptions to errors.
13982 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
13983 from spec if needed
13984 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
13985 from spec if needed
13986 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
13988 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
13989 converting warnings on inevitable exceptions to errors.
13990 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
13991 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
13992 of Get_SPARK_Mode_Id
13993 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
13994 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
13995 converting warnings on inevitable exceptions to errors.
13996 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
13997 converting warnings on inevitable exceptions to errors.
13998 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
14001 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14003 * sem_ch13.adb: Add semantic information to rewritten type
14006 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14008 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
14009 are of a type with unknown discriminants, convert both to the
14010 underlying view of the type, so that the proper constraint check
14011 can be applied to the right-hand side.
14013 2014-01-20 Robert Dewar <dewar@adacore.com>
14015 * atree.adb (Copy_Node): Fix failure to copy last component
14016 (Exchange_Entities): Fix failure to exchange last entity
14018 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14020 * sem_ch12.adb: Code clean up.
14022 2014-01-20 Robert Dewar <dewar@adacore.com>
14024 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
14026 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14028 * sem_ch4.adb (Analyze_Quantified_Expression): If after
14029 pre-analysis the loop parameter specification has been
14030 rewritten as a iterator specification, propagate the change to
14031 the quantified expression, for ASIS navigtion needs.
14033 2014-01-20 Vincent Celier <celier@adacore.com>
14035 * par-ch10.adb: Minor error message change: escape [ and ].
14037 2014-01-20 Robert Dewar <dewar@adacore.com>
14039 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
14040 * errout.adb: Implement [ and ] insertion characters.
14041 * errout.ads: Document new [ and ] insertion characters.
14042 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
14043 addition of ??? comment.
14044 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
14045 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
14046 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
14047 Make warnings on exceptions into errors in GNATprove mode.
14048 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
14051 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14053 * sem_ch13.adb: Code clean up.
14055 2014-01-20 Robert Dewar <dewar@adacore.com>
14057 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
14059 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
14060 error in GNATprove mode.
14062 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14064 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
14065 reference 'Old takes no parameters, and thus can appear as a
14068 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14070 * exp_aggr.adb: Fix minor typos.
14072 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14074 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
14075 instance the attribute is legal, and its value is determined
14076 statically if the type has no discriminants. This choice is
14077 more useful than rechecking the legality rule in the instance,
14078 is consistent with older usage, and is also consistent with all
14081 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14083 * sem_cat.adb (Validate_Static_Object_Name): Change error into
14084 warning in Relaxed_Semantic_Mode.
14086 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14088 * sem_attr.adb: Code and comments cleanup.
14090 2014-01-20 Yannick Moy <moy@adacore.com>
14092 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
14093 * errout.adb (Compilation_Errors): Remove special handling in
14095 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
14096 removed debug flags.
14097 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
14098 Global, Initial_Condition, Initializes and Refined_State pragmas and
14100 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
14101 SPARK_Strict_Mode): Remove global flags.
14102 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
14103 always performed now, on packages declaring a null state.
14104 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
14105 at providing pedantic mode for bounds of integer types.
14106 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
14107 "some" quantified expression now issued under control of -gnatw.t,
14108 like the other warning on unused bound variable.
14109 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
14111 (Analyze_Pragma): Remove tests for SPARK 2014
14112 pragmas, not officially allowed by GNAT.
14114 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14116 * sem_prag.adb (Analyze_Pragma): Ensure that
14117 the sole argument of pragmas Abstract_State, Contract_Cases,
14118 Depends, Global and Initializes in in aggregate form.
14119 (Analyze_Refined_Pragma): Ensure that the sole argument of
14120 pragmas Refined_Depends, Refined_Global and Refined_State is in
14122 (Ensure_Aggregate_Form): New routine.
14124 2014-01-20 Doug Rupp <rupp@adacore.com>
14126 * sem_attr.adb (Analyze_Attribute): case
14127 Attribute_Constrained => treat all prefixes as legal for Declib
14130 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14132 * sem_prag.adb (Check_Mode): Reimplement the routine.
14133 (Find_Mode): New routine.
14135 2014-01-20 Robert Dewar <dewar@adacore.com>
14137 * sem_ch4.adb (Operator_Check): Handle additional
14138 Allow_Integer_Address cases.
14140 2014-01-20 Robert Dewar <dewar@adacore.com>
14142 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
14143 allowed if address is non-private, no longer true.
14144 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14145 Remove check for address being private, causes difficulty when
14146 pragma used in gnat.adc file and is not needed, since we guard
14147 this in Address_Integer_Convert_OK.
14148 * exp_ch7.adb: Minor reformatting.
14149 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
14151 2014-01-20 Robert Dewar <dewar@adacore.com>
14153 * checks.adb (Apply_Range_Check): Remove gnatprove special
14154 casing of exponentiation.
14155 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
14156 operand for integer case to check range against Natural.
14158 2014-01-20 Robert Dewar <dewar@adacore.com>
14160 * s-tataat.adb: Minor reformatting.
14162 2014-01-20 Robert Dewar <dewar@adacore.com>
14164 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
14165 entities, and also fix documentation to remove mention of visible
14166 integer type, since this is not what the implementation does.
14167 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
14168 entities, and also fix documentation to remove mention of visible
14169 integer type, since this is not what the implementation does.
14170 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
14172 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
14173 case for parameter type check.
14174 * sem_res.adb (Resolve): Use new function
14175 Address_Integer_Convert_OK.
14176 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
14177 reformatting throughout.
14178 * sem_util.adb (Address_Integer_Convert_OK): New function.
14179 * sem_util.ads: Minor reformatting (put specs in alpha order)
14180 (Address_Integer_Convert_OK): New function.
14182 2014-01-20 Thomas Quinot <quinot@adacore.com>
14184 * exp_ch7.adb (Wrap_Transient_Expression):
14185 Insertion extra conditional expression only if
14186 Opt.Suppress_Control_Flow_Optimizations is set.
14188 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14190 * s-tataat.adb (Initialize_Attributes): Abort might already be
14191 deferred in Create_Task.
14193 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14195 * checks.adb (Apply_Scalar_Range_Check): Flag
14196 the exponent as requiring a range check when the expression is
14199 2014-01-20 Fedor Rybin <frybin@adacore.com>
14201 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
14203 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14205 * sem_util.adb (Default_Initialization): New routine.
14206 * sem_util.ads: Add new type Default_Initialization_Kind.
14207 (Default_Initialization): New routine.
14209 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14211 * sem_prag.adb (Check_Mode): Correct all error
14212 message logic dealing with in/in out parameters that may appear
14213 as inputs or have a self reference.
14215 2014-01-20 Robert Dewar <dewar@adacore.com>
14217 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
14218 * sem_res.adb (Resolve): Fix error causing infinite loop for
14219 integer used as address. Allow addresses as integers.
14221 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14223 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
14225 2014-01-20 Bob Duff <duff@adacore.com>
14227 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
14228 error when "use all" is not followed by "type".
14230 2014-01-20 Bob Duff <duff@adacore.com>
14232 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
14235 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14237 * checks.adb (Apply_Address_Clause_Check): If there is an
14238 alignment check on the expression in an address clause, and there
14239 is no local exception propagation, add an additional explanatory
14240 message to clarify the cause of previous warning.
14242 2014-01-20 Robert Dewar <dewar@adacore.com>
14244 * exp_ch7.adb: Minor reformatting.
14245 * opt.ads: Minor comment updates.
14246 * sem.adb: Minor name change Is_Main_Unit =>
14247 Is_Main_Unit_Or_Main_Unit_Spec.
14248 * sem_ch6.adb: Minor reformatting and code reorganization.
14250 2014-01-20 Bob Duff <duff@adacore.com>
14252 * gnat_ugn.texi: Update gnatpp switches.
14254 2014-01-20 Thomas Quinot <quinot@adacore.com>
14256 * exp_ch9.adb: Minor comment edit.
14258 2014-01-20 Robert Dewar <dewar@adacore.com>
14260 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
14261 only if System.Address is a private type.
14262 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
14263 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14264 Allowed only if type System.Address is private, since otherwise
14266 * sem_res.adb: Fix failure to properly Analyze unchecked
14267 conversions that were introduced by Allow_Integer_Address.
14268 * switch-c.adb: Remove -gnates switch.
14269 * usage.adb: Remove -gnates switch.
14270 * gnat_ugn.texi: Remove documentation of -gnates flag.
14272 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14274 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
14275 resolve expression to perform proper name capture.
14277 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14279 * sem.adb (Semantics): When saving/restoring configuration
14280 switches, the spec of a pre- defined unit that is the main unit
14281 must be treated as a predefined unit as well.
14283 2014-01-20 Thomas Quinot <quinot@adacore.com>
14285 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
14286 expression, insert an extra conditional expression when saving
14287 the value of the expression, for the benefit of control flow
14288 graph based coverage analysis.
14289 * exp_ch3.adb: Minor reformatting.
14291 2014-01-20 Robert Dewar <dewar@adacore.com>
14293 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
14294 * gnat_rm.texi: Document pragma Allow_Integer_Address.
14295 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
14296 * opt.ads: New flag Allow_Integer_Address.
14297 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
14298 * sem_ch5.adb: Minor reformatting.
14299 * sem_prag.adb: Implement pragma Allow_Integer_Address.
14300 * sem_res.adb (Resolve): Allow integer address value if
14302 * sem_util.adb: Minor reformatting.
14303 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
14304 * switch-c.adb: Recognize flag -gnates.
14305 * usage.adb: Document flag -gnates.
14307 2014-01-20 Thomas Quinot <quinot@adacore.com>
14309 * s-tadeca.adb: Fix minor typos in comment.
14311 2014-01-20 Pascal Obry <obry@adacore.com>
14313 * s-win32.ads (FreeLibrary): New import.
14315 2014-01-20 Robert Dewar <dewar@adacore.com>
14317 * sem_res.adb, sem_cat.adb: Minor reformatting.
14318 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
14319 assigning to OUT parameters for the current subprogram scope.
14320 * exp_ch4.adb: Minor reformatting.
14322 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14324 * exp_ch4.adb (Process_Transient_Object,
14325 Find_Enclosing_Contexts): If the top-level if-expression that
14326 generated the transient object is an actual in a call, the proper
14327 Hook_Context is a construct enclosing the call.
14328 * einfo.ads: Indicate that Related_Expression is used to link a
14329 loop variable to the container expression over which the loop
14331 (Analyze_Iterator_Specification): Set the Related_Expression of
14332 the loop variable in a container element iterator.
14333 (Note_Possible_Modification): If the variable is the loop
14334 variable in a container element iterator, indicate that the
14335 enclosing container is also modified.
14337 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14339 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
14341 2014-01-20 Robert Dewar <dewar@adacore.com>
14343 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
14344 Minor reformatting and code clean up.
14346 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14348 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
14349 of objects of private type if Relaxed_RM_Semantics.
14351 2014-01-20 Claire Dross <dross@adacore.com>
14353 * a-cofove.ads (Vector): Capacity discriminant
14354 should be in range of the index.
14356 2014-01-20 Thomas Quinot <quinot@adacore.com>
14358 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
14359 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
14360 possible difference between epoch of Ada.Calendar clock and Ada
14361 real-time/tasking clock.
14362 * s-taprop-posix.adb: Minor comment fix.
14364 2014-01-20 Doug Rupp <rupp@adacore.com>
14366 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
14368 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14370 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
14371 checks on the prefix of attribute 'Old.
14372 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
14373 generation of validity checks on a range that belongs to the
14374 iteration scheme of a quantified expression.
14375 * sem_ch5.adb (One_Bound): Suppress the generation of validity
14376 checks on a bound that belongs to the iteration scheme of a
14377 quantified expression, generate the check in all other cases.
14379 2014-01-20 Bob Duff <duff@adacore.com>
14381 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
14383 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14385 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
14386 interpretations that do not come from other predefined units,
14387 to prevent spurious ambiguities in the presence of user-defined
14388 operators in the context of (an instance of) a predefined unit.
14390 2014-01-20 Robert Dewar <dewar@adacore.com>
14392 * gnat_rm.texi: Document that Loop_Variant is included in
14393 Statement_Assertions.
14394 * sem_prag.adb (Check_Kind): Add Loop_Variant to
14395 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
14396 to Statement_Assertions.
14398 2014-01-20 Doug Rupp <rupp@adacore.com>
14400 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
14401 for errno ENOENT from RTP on NFS mounted file system.
14403 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14405 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
14406 examine code that does not come from source. The check does not
14407 apply to code generated for constraint checks, and such code may
14408 generate spurious error messages when compiled with expansion
14409 disabled (as in a generic unit) because side effects may not
14411 2) Make error messages more explicit: indicate the component
14412 of the construct whose value is indeterminate because of a
14413 call to a function with in-out parameter in another component,
14414 when there is no mandated order of execution between the two
14415 components (actuals, aggregate components, alternatives).
14417 2014-01-20 Robert Dewar <dewar@adacore.com>
14419 * gnat_rm.texi: Minor cleanup.
14421 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14423 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
14424 can now apply to a refined postcondition.
14425 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
14426 variable Result_Seen. Add variables Case_Prag, Post_Prag,
14427 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
14428 whether postconditions and/or constract-cases mention attribute
14429 'Result and introduce a post-state when applied to functions.
14430 (Check_Result_And_Post_State): Removed.
14431 * sem_prag.adb (Analyze_Pragma): Add local variable
14432 Result_Seen. Verify that the expression of pragma Refined_Post
14433 mentions attribute 'Result and introduces a post-state.
14434 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
14436 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14438 * exp_ch7.adb (Is_Subprogram_Call): New routine.
14439 (Process_Transient_Objects): Make variable Must_Hook global with
14440 respect to all locally declared subprograms. Search the context
14441 for at least one subprogram call.
14442 (Requires_Hooking): Removed.
14444 2014-01-20 Claire Dross <dross@adacore.com>
14446 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
14447 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
14448 External_Axiomatization);
14450 2014-01-20 Robert Dewar <dewar@adacore.com>
14452 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
14453 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
14454 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
14455 Allow Loop_Entry to be used in these pragmas if they appear in
14456 an appropriate context.
14457 (Placement_Error): Specialize error
14458 message for pragma Assert[_And_Cut] or pragma Assume containing
14459 Loop_Entry attribute.
14460 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
14461 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
14462 and code clean ups.
14464 2014-01-20 Robert Dewar <dewar@adacore.com>
14466 * gnat1drv.adb: Minor comment update.
14468 2014-01-20 Tristan Gingold <gingold@adacore.com>
14470 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
14471 variables, comment out unused code.
14472 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
14473 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
14474 * s-excmac-arm.ads: New file.
14476 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14478 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
14479 Drange and Index_Typ. Remove the circuitry which creates a
14480 range check to compare the index type of the array against the
14482 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
14483 the circuitry which creates a range check to handle a
14484 discrete_range denoted by a subtype indication.
14486 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
14488 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
14489 nodes to get the original sloc range.
14491 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14493 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
14494 entity of a [library level] package.
14496 2014-01-20 Tristan Gingold <gingold@adacore.com>
14498 * raise-gcc.c (exception_class_eq): New function.
14499 (is_handled_by): Use it to compare exception classes.
14500 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
14501 be called to return URC_CONTINUE_UNWIND.
14502 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
14503 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
14505 2014-01-20 Robert Dewar <dewar@adacore.com>
14507 * opt.ads: Minor comment update.
14509 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14511 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
14512 constants to the "Local variables" area. Add new constant D. Add
14513 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
14514 to Pref_Typ and update all occurrences. Add circuitry to extract
14515 the discrete_range and the index type and build a range check.
14517 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14519 * gnat1drv.adb (Adjust_Global_Switches): Enable
14520 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
14523 2014-01-20 Thomas Quinot <quinot@adacore.com>
14525 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
14527 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14529 * sem_ch13.adb (Analyze_Aspect_Specifications):
14530 When aspect SPARK_Mode appears on a package body, insert the
14531 generated pragma at the top of the body declarations.
14533 2014-01-20 Robert Dewar <dewar@adacore.com>
14535 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
14536 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
14537 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
14538 sem_ch8.adb, exp_dist.adb: Minor reformatting.
14540 2014-01-20 Yannick Moy <moy@adacore.com>
14542 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
14545 2014-01-20 Pascal Obry <obry@adacore.com>
14547 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
14549 * g-arrspl.adb: Adapt all routine to this new implementation.
14550 (Set): Copy the Slice_Set definition before reusing it.
14552 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14554 * sem_prag.adb (Process_Import_Or_Interface): In
14555 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
14556 (Analyze_Pragma): Ditto for pragma Export.
14557 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
14560 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14562 * einfo.ads: E_Abstract_State is now part of the entities that
14563 can be overloaded. Update type Overloadable_Kind to reflect the
14564 inclusion of abstract states.
14565 * sem_ch6.adb (New_Overloaded_Entity): A function can now
14566 overload an abstract state.
14567 * sem_prag.adb (Analyze_Constituent): Handle the overloading
14568 of states by functions. Use Entity_Of to obtain the entity of
14569 a constituent. (Analyze_Global_Item): Handle the overloading of
14570 states by functions.
14571 (Analyze_Initialization_Item): Handle the
14572 overloading of states by functions. Use Entity_Of to obtain the
14574 (Analyze_Input_Item): Handle the overloading
14575 of states by functions. Use Entity_Of to obtain the entity of an item.
14576 (Analyze_Input_Output): Handle the overloading of states by functions.
14577 (Analyze_Refinement_Clause): Handle the overloading
14578 of states by functions. Use Entity_Of to obtain the entity of an item.
14579 (Appears_In): Use Entity_Of to obtain the entity of an element.
14580 (Check_Usage): Use Entity_Of to obtain the entity of
14581 an item. Add a guard to prevent a crash due to a previous error.
14582 (Resolve_State): New routine.
14584 2014-01-20 Yannick Moy <moy@adacore.com>
14586 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
14587 opt.ads: Minor comments updates.
14589 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14591 * einfo.adb (Non_Limited_View): Applies to abstract states.
14592 (Set_From_Limited_With): Applies to abstract states.
14593 (Set_Non_Limited_View): Applies to abstract states.
14594 (Write_Field17): Output the non-limited view of an abstract state.
14595 * einfo.ads: Update the comment on usage and occurrences in
14596 nodes for attributes From_Limited_With and Non_Limited_View.
14597 * sem_aux.adb (Available_View): This routine can now handle
14599 * sem_aux.ads (Available_View): This routine can now handle
14600 abstract states. Update the comment on usage.
14601 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
14602 of states and variables.
14603 (In_Pragmas_Depends_Or_Global): New routine.
14604 * sem_ch10.adb (Build_Limited_Views): Implement
14605 abstract (limited) views of variables and states.
14606 (Build_Shadow_Entity): This routine is now a procedure. Add
14607 formal parameter Shadow. Update the comment on usage. Add
14608 context-specific decoration for states and variables.
14609 (Decorate_State): New routine. (Decorate_Variable): New routine.
14610 (Find_And_Process_States): New routine.
14611 (Process_Declarations): Renamed to Process_Declarations_And_States.
14612 (Process_Declarations_And_States): Add formal parameters
14613 Pack and Create_Abstract_Views. Update the comment on usage.
14614 (Process_States): New routine.
14615 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
14616 views of states and variables. Match the abstract view of a state
14617 against its corresponding non-abstract view.
14618 (Is_Matching_Input):
14619 Handle abstract views of states and variables. Match the abstract
14620 view of a state against its corresponding non-abstract view.
14621 (Process_Global_Item): Handle abstract views of states and
14624 2014-01-20 Bob Duff <duff@adacore.com>
14626 * sem_ch10.adb (Expand_With_Clause): Don't
14627 recurse on the prefix if the current with-ed name refers to a
14628 package that renames its own parent, eg "package P.Q renames P;".
14630 2014-01-20 Yannick Moy <moy@adacore.com>
14632 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
14633 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
14634 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
14635 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
14636 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
14639 2014-01-20 Yannick Moy <moy@adacore.com>
14641 * sinfo.ads Update documentation of GNATprove mode.
14643 2014-01-20 Yannick Moy <moy@adacore.com>
14645 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
14646 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
14647 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
14648 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
14650 * sem_ch13.adb: Remove blank.
14651 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
14652 subprograms by alias for renamings, not for inherited primitive
14654 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
14656 (Remove_Side_Effects): Apply the removal in
14657 GNATprove mode, for the full analysis of expressions.
14658 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
14660 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
14661 save/restore actions for Expander_Active flag in GNATprove mode,
14662 similar to what is done in ASIS mode.
14663 * frontend.adb (Frontend): Generic bodies are instantiated in
14665 * gnat1drv.adb (Adjust_Global_Switches): Set operating
14666 mode to Check_Semantics in GNATprove mode, although a light
14667 expansion is still performed.
14668 (Gnat1drv): Set Back_End_Mode to
14669 Declarations_Only in GNATprove mode, and later on special case
14670 the GNATprove mode to continue analysis anyway.
14671 * lib-writ.adb (Write_ALI): Always generate ALI files in
14673 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
14675 (SPARK_Mode): Renamed as GNATprove_Mode.
14676 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
14677 tree in GNATprove_Mode.
14678 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
14679 body in GNATprove mode.
14680 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
14682 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
14683 Make sure side effects are removed in GNATprove mode.
14685 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14687 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
14688 for aliased objects with an unconstrained nominal subtype.
14689 * gcc-interface/trans.c (Call_to_gnu): Likewise.
14690 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
14691 <case N_Op_Minus>: Remove useless code.
14692 (Exception_Handler_to_gnu_zcx): Minor tweaks.
14694 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14696 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
14697 Tidy up. For a subtype with discriminants and variant part, if a
14698 variant is statically selected and the fields all have a constant
14699 position, put them in order of increasing position. Likewise if
14700 no variant part but representation clause is present.
14701 * gcc-interface/utils.c (make_packable_type): Robustify.
14702 (maybe_pad_type): Use local variable and tidy up condition. If no
14703 alignment is specified, use the original one.
14704 (create_type_stub_decl): Minor tweak.
14705 (convert) <case VECTOR_CST>: Fix typo.
14706 <case CONSTRUCTOR>: Deal with padding types around the same type.
14707 Do not punt on missing fields.
14708 (unchecked_convert): Call finish_record_type to lay out the special
14709 record types made for conversions from/to problematic integer types.
14710 Bump the alignment of CONSTRUCTORs before converting them to a more
14713 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14715 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
14716 obsolete code for type_annotate_only mode, simplify code and slightly
14717 improve wording of comments.
14719 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
14722 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
14723 as intermediate type.
14724 (UI_To_gnu): Likewise.
14726 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
14728 * gnatvsn.ads (Current_Year): Bump to 2014.
14730 2014-01-02 Tobias Burnus <burnus@net-b.de>
14732 * gnat_ugn.texi: Bump @copying's copyright year.
14734 Copyright (C) 2014 Free Software Foundation, Inc.
14736 Copying and distribution of this file, with or without modification,
14737 are permitted in any medium without royalty provided the copyright
14738 notice and this notice are preserved.