1 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/Makefile.in: Fix oversight.
5 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
7 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
8 conversion from a thin pointer with a shifted value.
9 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
10 read-only flag from the values onto the result.
11 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
13 2014-01-25 Tristan Gingold <gingold@adacore.com>
15 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
16 for E_Variable with a pragma Linker_Section.
18 2014-01-25 Robert Dewar <dewar@adacore.com>
20 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
21 with Default_Value aspect is passed in by copy.
23 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
25 * set_targ.adb: Set Short_Enums.
26 * gcc-interface/lang.opt (fshort-enums): New option.
27 * gcc-interface/misc.c (gnat_handle_option): Handle it.
28 (gnat_post_options): Do not modify the global settings.
30 2014-01-24 Robert Dewar <dewar@adacore.com>
32 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
34 (Random_Decimal_Fixed): New generic function.
35 * s-rannum.ads: Minor comment clarifications.
37 2014-01-24 Robert Dewar <dewar@adacore.com>
39 * back_end.adb: Remove Short_Enums handling (handled in
40 Ttypes/Get_Targ now) Minor added comments.
41 * freeze.adb: Change name Short_Enums_On_Target to
43 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
44 * opt.ads: Minor comment updates.
45 * sem_ch13.adb: Change name Short_Enums_On_Target to
47 * set_targ.adb: Set Short_Enums from gcc back end.
48 * set_targ.ads (Short_Enums): New variable.
49 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
51 * ttypes.ads (Target_Short_Enums): New constant boolean switch
53 2014-01-24 Pascal Obry <obry@adacore.com>
55 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
57 2014-01-24 Gary Dismukes <dismukes@adacore.com>
59 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
60 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
63 2014-01-24 Robert Dewar <dewar@adacore.com>
65 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
67 2014-01-24 Vincent Celier <celier@adacore.com>
69 * prj.adb (Add_Aggregated_Project): Do not add a project in
70 the list if it is already there.
72 2014-01-24 Yannick Moy <moy@adacore.com>
74 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
75 Correct the search for a subrogram declaration to which a pragma is
78 2014-01-24 Bob Duff <duff@adacore.com>
80 * gnat_ugn.texi: Document --decimal-grouping and
81 --based-grouping switches in gnatpp.
83 2014-01-24 Ed Schonberg <schonberg@adacore.com>
85 * sinfo.ads: Documentation update.
87 2014-01-24 Ed Schonberg <schonberg@adacore.com>
89 * sem_ch3.adb (Constant_Redeclaration): New declaration is
90 illegal if previous one has an initial expression that is an
91 aggregate expanded into assignments.
93 2014-01-24 Ed Schonberg <schonberg@adacore.com>
95 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
96 code reorganization to remove spurious warning on a loop with
97 an array element iterator that has a null range.
99 2014-01-24 Vincent Celier <celier@adacore.com>
101 * make.adb (Binding_Phase): When setting the Ada paths, use
102 the library ALI dir, not the object dir in libraries.
104 2014-01-24 Yannick Moy <moy@adacore.com>
106 * sinfo.ads: Add documentation of check flag fields.
108 2014-01-24 Ed Schonberg <schonberg@adacore.com>
110 * sem_res.adb (Resolve_Actuals): If an actual is a view
111 conversion of a discriminated object, and the formal type is
112 discriminated and constrained, apply a discriminant check to
115 2014-01-24 Robert Dewar <dewar@adacore.com>
117 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
119 2014-01-24 Ed Schonberg <schonberg@adacore.com>
121 * sem_ch3.adb (Analyze_Declarations): At the end of an
122 appropriate declarative part, call Freeze_All from the first
123 declaration in the scope, not from the first unfrozen one. This
124 is necessary to apply visibility checks to entities with delayed
125 aspects. Otherwise, in the presence of instantiations and cleanups
126 that they may generate, the delayed aspects may be analyzed too
127 late and produce spurious visibility errors.
128 * sem_attr.adb: Place etype on range.
129 * sem_ch6.adb: Documentation expression functions.
131 2014-01-24 Robert Dewar <dewar@adacore.com>
133 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
134 terminology in compiler).
136 2014-01-24 Robert Dewar <dewar@adacore.com>
138 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
139 categories, now that Ada 95 supports raise expressions.
141 2014-01-24 Robert Dewar <dewar@adacore.com>
143 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
144 Short_Enums_On_Target.
145 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
147 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
149 2014-01-24 Ed Schonberg <schonberg@adacore.com>
151 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
152 indication is given explicity, check that it matches the array
153 component type or the container element type of the domain
156 2014-01-24 Tristan Gingold <gingold@adacore.com>
158 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
159 * gcc-interface/misc.c (flag_short_enums): Declare.
160 (gnat_post_options): Set it.
162 2014-01-24 Vincent Celier <celier@adacore.com>
164 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
165 to cache the result when Including_Libraries is False.
166 * prj-env.ads (Ada_Objects_Path): Update documentation
167 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
168 (Get_Object_Directory): Return the Library_Ali_Dir only when
169 when Including_Libraries is True.
170 * prj.ads (Get_Object_Directory): Fix and complete documentation
171 (Project_Data): New component Ada_Objects_Path_No_Libs
173 2014-01-24 Robert Dewar <dewar@adacore.com>
175 * checks.adb (Expr_Known_Valid): Result of fpt operator never
178 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
180 * back_end.adb: Minor fix in comment.
182 2014-01-24 Javier Miranda <miranda@adacore.com>
184 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
185 required to report the error in case of task types.
187 2014-01-24 Ed Schonberg <schonberg@adacore.com>
189 * sem_attr.adb: Additional index checking.
191 2014-01-24 Ed Schonberg <schonberg@adacore.com>
193 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
194 expressions in each component association, and for records note
195 the entity in each association choice, for subsequent resolution.
196 (Resolve_Attribute, case 'Update): Complete resolution of
197 expressions in each component association.
199 2014-01-24 Robert Dewar <dewar@adacore.com>
201 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
202 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
203 leading to wrong handling of SPARK_Mode for library units).
205 2014-01-24 Robert Dewar <dewar@adacore.com>
207 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
208 on generic instances (do not consider them to be internally
211 2014-01-24 Doug Rupp <rupp@adacore.com>
213 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
214 vice pthread_sigmask.
216 2014-01-24 Vincent Celier <celier@adacore.com>
218 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
221 2014-01-24 Vincent Celier <celier@adacore.com>
223 * prj-ext.adb (Add): Do not output anything when Silent is True,
224 whatever the verbosity. When Source is From_External_Attribute,
225 set the corresponding environment variable if it is not already set.
226 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
228 * prj-proc.adb (Process_Expression_For_Associative_Array):
229 For attribute External, call Prj.Ext.Add with Silent set to
230 True for the child environment, to avoid useless output in non
233 2014-01-24 Ed Schonberg <schonberg@adacore.com>
235 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
236 range given by a subtype indication, and force evaluation of
237 the bounds, as for a simple range.
238 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
239 of bounds of slice for various kinds of discrete ranges.
240 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
241 Evaluate_Slice_Bounds.
243 2014-01-24 Bob Duff <duff@adacore.com>
245 * s-taskin.ads (Activator): Make this Atomic, because
246 Activation_Is_Complete reads it, and that can be called
247 from any task. Previously, this component was only
248 modified by the activator before activation, and by
249 Self after activation.
250 * a-taside.ads, a-taside.adb (Environment_Task,
251 Activation_Is_Complete): Implement these missing functions.
253 2014-01-24 Doug Rupp <rupp@adacore.com>
255 * init.c: Add a handler section for Android.
257 2014-01-24 Arnaud Charlet <charlet@adacore.com>
259 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
261 2014-01-24 Ed Schonberg <schonberg@adacore.com>
263 * sem_ch4.adb (Operator_Check): If one operand is a
264 Raise_Expression, set its type to that of the other operand.
265 * sem_res.adb (Resolve_Raise_Expression): new procedure.
266 (Resolve_Actuals): For an actual that is a Raise_Expression,
267 set the type to that of the formal.
268 * sem_type.adb (Find_Unique_Type): If one of the operands is a
269 Raise_Expression, return type of the other operand.
271 2014-01-24 Ed Schonberg <schonberg@adacore.com>
273 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
274 component of the record has a type with a default aspect, and
275 the corresponding aggregate component is initiaized with a box,
276 use the default value in the rewritten aggregate.
278 2014-01-24 Tristan Gingold <gingold@adacore.com>
280 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
281 s-interr-sigaction.adb,
282 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
283 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
284 to the call to Install_Restricted_Handlers.
286 2014-01-24 Emmanuel Briot <briot@adacore.com>
288 * prj-nmsc.adb (Check_File): Add protection when the source is
289 not fully initialized.
291 2014-01-24 Ed Schonberg <schonberg@adacore.com>
293 * sem_util.adb (Is_Post_State): In a postcondition, a selected
294 component that denotes an implicit dereference is a reference
295 to the post state of the subprogram.
297 2014-01-24 Robert Dewar <dewar@adacore.com>
299 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
300 for generated subprograms.
301 (Analyze_Subprogram_Specification): Ditto.
303 2014-01-24 Vincent Celier <celier@adacore.com>
305 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
306 attributes in package Builder of aggregate and aggregate library
308 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
309 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
310 Remove parameters. Change error message from "... externally
311 build library ..." to "... externally built project ...".
312 (Process_Naming_Scheme.Check): Do not do any check in aggregate
313 project, as attribute Library_Dir and Library_Name have already
314 been detected as forbidden.
316 2014-01-24 Vincent Celier <celier@adacore.com>
318 * prj-env.adb (Find_Project): If cached project path is not in
319 project directory, look in current directory first and use cached
320 project path only if project is not found in project directory.
322 2014-01-24 Robert Dewar <dewar@adacore.com>
324 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
326 2014-01-24 Vincent Celier <celier@adacore.com>
328 * projects.texi: Document that aggregate projects are only
329 supported by gprbuild, but not by gnatmake. Document that the
330 only attribute Switches in package Binder of aggregate projects
331 will be ignored if its index is not others. Document that
332 attribute Global_Config_File is allowed in package Binder of
335 2014-01-24 Robert Dewar <dewar@adacore.com>
337 * sem_prag.adb: Minor code reorganization.
338 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
340 2014-01-24 Pascal Obry <obry@adacore.com>
342 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
343 attribute definition.
345 2014-01-24 Vincent Celier <celier@adacore.com>
347 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
348 in the Queue the same source (same path, same multi-source index)
349 from the same project file, to avoid compiling several times
352 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
354 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
355 (Has_Gigi_Rep_Item): Likewise.
356 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
357 Has_Gigi_Rep_Item for objects.
358 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
359 (prepend_one_attribute): ...this.
360 (prepend_one_attribute_pragma): New function extracted from...
361 (prepend_attributes): ...here. Swap the parameters for consistency.
362 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
364 <object>: Deal with a pragma Linker_Section on a constant
365 or variable. <E_Function>: Deal with a pragma Linker_Section
367 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
369 2014-01-24 Vincent Celier <celier@adacore.com>
371 * opt.ads: Minor comment update.
373 2014-01-24 Robert Dewar <dewar@adacore.com>
375 * sem_prag.adb (Analyze_Input_Output): Add missing error check
377 * sem_util.adb (Is_Refined_State): Add defense against junk
380 2014-01-24 Pascal Obry <obry@adacore.com>
382 * projects.texi: Removes Build_Slaves attribute documentation.
384 2014-01-23 Robert Dewar <dewar@adacore.com>
386 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
389 2014-01-23 Ed Schonberg <schonberg@adacore.com>
391 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
392 applies to expressions that come from source.
393 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
395 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
396 rule regarding potentially unevaluated expressions, to prefix
399 2014-01-23 Ed Schonberg <schonberg@adacore.com>
401 * exp_util.adb (Make_Invqriant_Call): If type of expression is
402 a private extension, get invariant from base type.
404 2014-01-23 Robert Dewar <dewar@adacore.com>
406 * sem_util.adb, sem_attr.adb: Minor reformatting.
408 2014-01-23 Robert Dewar <dewar@adacore.com>
410 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
411 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
412 * sem.adb (Semantics): Remove save/restore of
413 SPARK_Mode[_Pragma]. Not needed since already done in
414 Save/Restore_Opt_Config_Switches.
416 2014-01-23 Robert Dewar <dewar@adacore.com>
418 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
419 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
420 Linker_Section enhancements.
422 2014-01-23 Tristan Gingold <gingold@adacore.com>
424 * gnat_rm.texi: Minor editing.
426 2014-01-23 Robert Dewar <dewar@adacore.com>
428 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
429 with'ed internal units.
430 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
432 2014-01-23 Javier Miranda <miranda@adacore.com>
434 * lib-xref.adb (Generate_Reference): As part of processing the
435 "end-of-spec" reference generate an extra reference to the first
436 private entity of the package.
437 * xr_tabls.adb (Add_Reference): No action needed for the extra
438 'E' reference associated; similar to the processing of the
441 2014-01-23 Bob Duff <duff@adacore.com>
443 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
445 2014-01-23 Ed Schonberg <schonberg@adacore.com>
447 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
448 predicate to implement rule given in 6.1.1 (20/3).
449 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
450 'Old in a postcondition, if it is potentially unevaluated and
451 it is not an entity name.
453 2014-01-23 Bob Duff <duff@adacore.com>
455 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
457 2014-01-23 Robert Dewar <dewar@adacore.com>
459 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
462 2014-01-23 Bob Duff <duff@adacore.com>
464 * g-dynhta.ads: Minor comment fix.
466 2014-01-23 Yannick Moy <moy@adacore.com>
468 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
469 from spec on body only when not already inherited on spec. Set
470 SPARK_Mode from context on body without previous spec. *
471 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
472 library-level entities. Correct retrieval of entity from
473 declaration, for cases where the declaration is not a unit.
474 * sem_ch12.adb (Instantiate_Object): Avoid
475 calling Is_Volatile_Object on an empty node.
477 2014-01-23 Robert Dewar <dewar@adacore.com>
479 * gnatlink.adb (Gnatlink): Check for suspicious executable file
482 2014-01-23 Robert Dewar <dewar@adacore.com>
484 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
485 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
486 style errors in instances.
487 * g-dynhta.ads (Static_HTable): Comment updates.
489 2014-01-23 Vincent Celier <celier@adacore.com>
491 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
492 to find a configuration project file when Config_File_Name is
493 No_Configuration_File.
494 * prj-conf.ads (No_Configuration_File): New constant String.
495 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
496 with Config_File_Name set to No_Configuration_File, so that
497 no existing configuration project file will be used, and the
498 configuration project will be only created in memory when
499 Add_Default_GNAT_Naming_Scheme is called.
500 * projects.texi: Minor reformatting.
502 2014-01-23 Vincent Celier <celier@adacore.com>
504 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
505 a config project file if On_Load_Config is not null.
506 * prj-pars.adb: Minor comment changes.
508 2014-01-23 Ed Schonberg <schonberg@adacore.com>
510 * lib-xref.adb (Output_References): Output progenitors of
511 synchronized tagged types, for source navigation.
513 2014-01-23 Robert Dewar <dewar@adacore.com>
515 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
516 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
517 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
519 2014-01-23 Emmanuel Briot <briot@adacore.com>
521 * prj-conf.adb (Get_Or_Create_Configuration_File): call
522 On_Load_Config later.
524 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
526 * sem_ch3.adb (Analyze_Declarations): Do not
527 generate the spec of the late primitive in ASIS mode. Add two
528 comments to explain the special cases when the expansion is
531 2014-01-23 Robert Dewar <dewar@adacore.com>
533 * sem_util.adb (Note_Possible_Modification): Fix error of
534 misbehaving for implicit dereference cases in -gnatc mode.
536 2014-01-23 Emmanuel Briot <briot@adacore.com>
538 * prj-pars.adb: Minor reformatting.
540 2014-01-22 Ed Schonberg <schonberg@adacore.com>
542 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
543 body generated for an expression function within a protected body
544 needs a set of renaming declarations if the expression function
547 2014-01-22 Ed Schonberg <schonberg@adacore.com>
549 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
550 list interface progenitor of a tagged concurrent type, for better
553 2014-01-22 Robert Dewar <dewar@adacore.com>
555 * lib.adb (In_Extended_Main_Code_Unit): Return False for
557 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
558 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
559 treatment of Slocs No_Location and Standard_Location.
560 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
561 check for entity with Standard_Location Sloc, rather than relying
562 on Lib routines to do that.
563 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
564 that a call cannot occur before a later occuring body within
567 2014-01-22 Thomas Quinot <quinot@adacore.com>
569 * rtsfind.adb: Update comment.
571 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
573 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
574 * sem_ch3.adb (Analyze_Declarations): Add local variable
575 Body_Seen. Generate the spec of a late controlled
576 primitive body that is about to freeze its related type.
577 (Handle_Late_Controlled_Primitive): New routine.
579 2014-01-22 Robert Dewar <dewar@adacore.com>
581 * a-stream.adb: Minor reformatting.
583 2014-01-22 Ed Schonberg <schonberg@adacore.com>
585 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
586 sub-procedure Declared_In_Actual to handle properly the visibility
587 of actuals in actual packages, that are themselves actuals to a
588 actual package of the current instance. This mimics properly the
589 visibility of formals of formal packages declared with a box,
590 within the corresponding generic unit.
592 2014-01-22 Robert Dewar <dewar@adacore.com>
594 * checks.adb: Do not assume that a volatile variable is valid.
596 2014-01-22 Thomas Quinot <quinot@adacore.com>
598 * g-catiio.ads (Image, Value): Clarify that these functions
599 operate in the local time zone. Minor documentation update.
601 2014-01-22 Thomas Quinot <quinot@adacore.com>
603 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
605 2014-01-22 Robert Dewar <dewar@adacore.com>
607 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
608 Moved to sem_aux.adb.
610 2014-01-22 Robert Dewar <dewar@adacore.com>
612 * vms_data.ads: Minor reformatting.
614 2014-01-22 Robert Dewar <dewar@adacore.com>
616 * debug.adb: Document messages affected by -gnatd.E including
617 the new ones that relate to late definition of equality.
618 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
619 debug flag -gnatd.E is set, then generate warnings rather than
621 (Check_Untagged_Equality): In earlier versions of Ada,
622 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
624 2014-01-22 Robert Dewar <dewar@adacore.com>
626 * sem_prag.adb (Usage_Error): Output additional messages for
627 unconstrained OUT parameters lacking an input dependency.
629 2014-01-22 Robert Dewar <dewar@adacore.com>
631 * sem_ch4.adb: Minor reformatting.
633 2014-01-22 Robert Dewar <dewar@adacore.com>
635 * restrict.ads: Minor reformatting.
636 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
637 forbids a call from within a subprogram to the same subprogram.
639 2014-01-22 Thomas Quinot <quinot@adacore.com>
641 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
642 stream attributes for Stream_Element_Array.
643 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
644 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
645 defined in the current scope.
647 2014-01-22 Robert Dewar <dewar@adacore.com>
649 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
651 2014-01-22 Thomas Quinot <quinot@adacore.com>
653 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
655 2014-01-22 Thomas Quinot <quinot@adacore.com>
657 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
658 declaration initialized with a function call, whose type
659 has variable size, need to remove side effects so that the
660 initialization expression becomes a dereference of a temporary
661 reference to the function result.
663 2014-01-22 Yannick Moy <moy@adacore.com>
665 * errout.adb (Initialize): Remove trick to add dummy entry
667 * erroutc.adb (Set_Warnings_Mode_Off,
668 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
670 * opt.ads (Warning_Mode): Document behavior
671 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
673 2014-01-22 Robert Dewar <dewar@adacore.com>
675 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
677 2014-01-22 Robert Dewar <dewar@adacore.com>
679 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
680 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
681 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
682 case Storage_Size): call Check_Pool_Size_Clash.
684 2014-01-22 Robert Dewar <dewar@adacore.com>
686 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
687 sem_eval.ads: Minor reformatting.
689 2014-01-22 Thomas Quinot <quinot@adacore.com>
691 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
692 Any_Composite to prevent cascaded errors.
694 2014-01-22 Yannick Moy <moy@adacore.com>
696 * errout.adb (Initialize): Do not insert special entry in Warnings
697 table in GNATprove_Mode.
698 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
700 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
703 2014-01-22 Robert Dewar <dewar@adacore.com>
705 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
708 2014-01-22 Robert Dewar <dewar@adacore.com>
710 * snames.ads-tmpl: Update header.
712 2014-01-22 Thomas Quinot <quinot@adacore.com>
714 * exp_util.adb (Insert_Actions): When inserting actions on a
715 short circuit operator that has already been analyzed, do not park
716 actions in node; instead introduce an N_Expression_With_Actions
717 and insert actions immediately.
718 Add guard for unexpected case of climbing up through statement
719 in Actions list of an N_Expression_With_Actions.
720 * sem_elab.adb (Insert_Elab_Check): Remove complex
721 specialized circuitry for the case where the context is already
722 analyzed, as it is not needed and introduces irregularities in
723 finalization. Instead rely on the above change to Insert_Actions
724 to ensure that late insertion on short circuit operators works
727 2014-01-22 Ed Schonberg <schonberg@adacore.com>
729 * sem_ch4.adb (Operator_Check): Improve error message when an
730 operand of concatenation is an access type.
732 2014-01-22 Thomas Quinot <quinot@adacore.com>
734 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
737 2014-01-22 Ed Schonberg <schonberg@adacore.com>
739 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
740 of an expanded name in a proper body, whose prefix is a package
741 in the context of the proper body, when there is a homonym of
742 the package declared in the parent unit.
744 2014-01-22 Robert Dewar <dewar@adacore.com>
746 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
748 (Check_One_Unit): Same change.
750 2014-01-22 Robert Dewar <dewar@adacore.com>
752 * ug_words: Add missing/wrong entries for VMS warning switches.
753 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
755 2014-01-22 Jerome Guitton <guitton@adacore.com>
757 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
760 2014-01-22 Robert Dewar <dewar@adacore.com>
762 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
764 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
766 * gcc-interface/Makefile.in: Minor fixes.
768 2014-01-21 Robert Dewar <dewar@adacore.com>
770 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
771 * par-ch5.adb (P_Condition): New version with expression prescanned.
772 * par.adb (P_Condition): New version with expression prescanned.
774 2014-01-21 Robert Dewar <dewar@adacore.com>
776 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
777 if Address is not a private type.
778 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
779 Ignore pragma if System.Address is not a private type.
781 2014-01-21 Arnaud Charlet <charlet@adacore.com>
783 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
786 2014-01-21 Thomas Quinot <quinot@adacore.com>
788 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
790 2014-01-21 Ed Schonberg <schonberg@adacore.com>
792 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
793 the value of Assertions_Enabled flag when compiling an instance of
794 an internal unit. This facilitates the use of pre/postconditions
795 in generic internal units, such as the new elementary function
798 2014-01-21 Robert Dewar <dewar@adacore.com>
800 * exp_aggr.adb: Minor reformatting.
801 * sem_attr.adb: Minor reformatting.
802 * sem_res.adb: Minor comment addition.
803 * einfo.adb: Minor comment updates.
804 * freeze.adb: Minor reformatting and code reorganization.
806 2014-01-21 Ed Schonberg <schonberg@adacore.com>
808 * par-ch4.adb (P_If_Expression): Handle more gracefully an
809 elsif clause that does not have an else part.
811 2014-01-21 Robert Dewar <dewar@adacore.com>
813 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
814 * gcc-interface/Makefile.in: clean up target pairs.
816 2014-01-21 Pascal Obry <obry@adacore.com>
818 * projects.texi: Minor typo fix.
820 2014-01-21 Thomas Quinot <quinot@adacore.com>
822 * freeze.adb (Check_Component_Storage_Order): If a record type
823 has an explicit Scalar_Storage_Order attribute definition clause,
824 reject any component that itself is of a composite type and does
827 2014-01-21 Ed Schonberg <schonberg@adacore.com>
829 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
830 can be used to generate proper cross-reference information for
831 the parent units of proper bodies.
833 2014-01-21 Thomas Quinot <quinot@adacore.com>
835 * exp_pakd.adb (Expand_Packed_Element_Set,
836 Expand_Packed_Element_Reference): No byte swapping required in
837 the front-end for the case of a reverse storage order array,
838 as this is now handled uniformly in the back-end. However we
839 still need to swap back an extracted element if it is itself a
840 nested composite with reverse storage order.
842 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
844 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
845 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
848 2014-01-21 Arnaud Charlet <charlet@adacore.com>
850 * gnat_ugn.texi: Minor updates.
852 2014-01-21 Thomas Quinot <quinot@adacore.com>
854 * exp_pakd.adb: Update comment, minor reformatting.
856 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
858 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
859 object check when SPARK_Mode is on.
860 * sem_ch6.adb (Process_Formals): Trigger the volatile object
861 check when SPARK_Mode is on.
862 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
863 check when SPARK_Mode is on.
864 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
865 corresponding pragma of aspect SPARK_Mode in the visible
866 declarations of a package declaration.
867 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
868 check when SPARK_Mode is on.
869 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
870 check when SPARK_Mode is on.
871 (Resolve_Entity_Name): Trigger
872 the volatile object check when SPARK_Mode is on.
874 2014-01-21 Robert Dewar <dewar@adacore.com>
876 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
877 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
879 2014-01-21 Ed Schonberg <schonberg@adacore.com>
881 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
882 object is declared, it is rewritten as a renaming of an dynamic
883 expression that wraps the initial value. The renaming declaration
884 is first given an internal name, to prevent collisions with the
885 entity already declared, and then the name is modified to reflect
886 the original one. the modification of the name must preserve
887 the source location of the original, to prevent spurious errors
888 when compiling with style checks if the declaration involves
889 more than one entity.
891 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
893 * aspects.adb Add entries for Async_Readers, Async_Writers,
894 Effective_Reads and Effective_Writes in table Canonical_Aspect.
895 * aspects.ads Add entries for Async_Readers, Async_Writers,
896 Effective_Reads and Effective_Writes in tables Aspect_Id,
897 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
898 * atree.adb (Ekind_In): New version with 8 parameters.
899 (Node34): New routine.
900 (Set_Node34): New routine.
901 * atree.ads (Ekind_In): New version with 8 parameters.
902 (Node34): New routine.
903 (Set_Node34): New routine.
904 * einfo.adb Contract is now Node34.
905 (Contract): Update the assertion and node usage.
906 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
907 Effective_Reads and Effective_Writes.
908 (Set_Contract): Update the assertion and node usage.
909 (Write_Field24_Name): Remove the output for a contract.
910 (Write_Field34_Name): Add output for a contract.
911 * einfo.ads Contract is now Node34. Update the comment on
912 attribute usage and related node structures.
913 (Get_Pragma): Update the comment on usage.
914 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
915 Effective_Reads and Effective_Writes do not require special
916 processing by the parser.
917 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
918 (Analyze_Declarations): Analyze the contract of a variable at
919 the end of the declarative region.
920 (Analyze_Object_Declaration): Create a contract for a variable.
921 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
922 of classification pragmas.
923 (Process_Formals): Detect an illegal
924 use of a volatile object as a formal in a function.
925 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
926 a volatile object as an actual in generic instantiation.
927 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
928 Effective_Reads and Effective_Writes in table Sig_Flags.
929 (Analyze_External_State_In_Decl_Part): New routine.
930 (Analyze_Global_Item): Detect an illegal use of a volatile object
931 as a global item of a function.
932 (Analyze_Pragma): Reimplement
933 pragma Abstract_State. Add support for pragmas Async_Readers,
934 Async_Writers, Effective_Reads and Effective_Writes.
935 (Check_External_Properties): New routine.
936 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
937 (Check_External_Properties): New routine.
938 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
939 volatile object as an actual in a call.
940 (Resolve_Entity_Name):
941 Add local variables Par, Prev and Usage_OK. Detect illegal
942 contexts of volatile objects.
943 * sem_util.adb (Add_Contract_Item): Add support for
944 pragmas associated with the contract of a variable.
945 (Async_Readers_Enabled): New routine.
946 (Async_Writers_Enabled): New routine.
947 (Effective_Reads_Enabled): New routine.
948 (Effective_Writes_Enabled): New routine.
949 (Has_Enabled_Property):
951 (Is_Unchecked_Conversion_Instance): New routine.
952 (Is_Volatile_Object): Add support for entities that may denote
954 * sem_util.ads (Add_Contract_Item): Update the
956 (Async_Readers_Enabled): New routine.
957 (Async_Writers_Enabled): New routine.
958 (Effective_Reads_Enabled): New routine.
959 (Effective_Writes_Enabled): New routine.
960 (Is_Unchecked_Conversion_Instance): New routine.
961 * sinfo.ads Update the comment on the structure of N_Contract.
962 * snames.ads-tmpl Add predefined names for Async_Readers,
963 Async_Writers, Effective_Reads and Effective_Writes. Add
964 pragma ids for Async_Readers, Async_Writers, Effective_Reads
965 and Effective_Writes.
967 2014-01-21 Robert Dewar <dewar@adacore.com>
969 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
970 * sem_eval.adb (Compile_Time_Known_Value): Remove special
971 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
972 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
973 (Test_Foldable): Add CRT_Safe parameter
974 * sem_eval.ads (Compile_Time_Known_Value): Remove special
975 handling of CRT mode.
976 (CRT_Safe_Compile_Time_Known_Value): New function.
978 2014-01-21 Robert Dewar <dewar@adacore.com>
980 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
981 with pragma or aspect that applies to package spec or subprogram
984 2014-01-21 Robert Dewar <dewar@adacore.com>
986 * exp_aggr.adb: Minor reformatting.
988 2014-01-21 Johannes Kanig <kanig@adacore.com>
990 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
992 2014-01-21 Bob Duff <duff@adacore.com>
994 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
996 2014-01-21 Steve Baird <baird@adacore.com>
998 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
1000 2014-01-21 Vincent Celier <celier@adacore.com>
1002 * prj-part.adb (Parse_Single_Project): Accept to extend a project
1003 if it has only be imported by an project being extended. When a
1004 project that has only been imported by a project being extended
1005 is imported by another project that is not being extended,
1006 reset the previous indication, so that it will be an error if
1007 this project is extended later.
1008 * prj-tree.adb (Create_Project): Include component From_Extended
1009 in table Projects_HT
1010 * prj-tree.ads (Project_Name_And_Node): New Boolean component
1013 2014-01-21 Robert Dewar <dewar@adacore.com>
1015 * atree.ads, atree.adb: Add Node33 and Set_Node33.
1016 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
1017 New field (SPARK_Pragma_Inherited): New flag
1018 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
1020 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
1021 * opt.ads (SPARK_Mode_Pragma): New global variable.
1022 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
1023 * sem_ch3.adb: Use new SPARK_Mode data structures.
1024 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
1025 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
1026 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
1027 (Pop_Scope): Restore SPARK_Mode_Pragma.
1028 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
1029 new data structures.
1031 2014-01-21 Arnaud Charlet <charlet@adacore.com>
1033 * back_end.adb: Undo previous change, not needed. Minor reformatting.
1035 2014-01-21 Thomas Quinot <quinot@adacore.com>
1037 * exp_ch5.adb: Fix comment.
1038 * switch-c.adb: Minor comment update.
1039 * exp_ch3.adb: Minor reformatting.
1041 2014-01-21 Arnaud Charlet <charlet@adacore.com>
1043 * back_end.adb (Scan_Compiler_Arguments): Do not store object
1044 filename in gnatprove mode.
1046 2014-01-21 Thomas Quinot <quinot@adacore.com>
1048 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
1049 suppresses usage of primitive _assign for tagged types).
1050 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
1051 No_Ctrl_Actions for a tagged type that does not require
1052 finalization, as we want to disable usage of _assign (which
1053 may cause undesirable discriminant checks on an uninitialized,
1056 2014-01-21 Ed Schonberg <schonberg@adacore.com>
1058 * sem_prag.adb: Reject invariant'class on completion.
1060 2014-01-21 Javier Miranda <miranda@adacore.com>
1062 * exp_ch3.adb (Build_Init_Procedure): For
1063 derivations of interfaces, do not move the the initialization
1064 of the _parent field since such assignment is not generated.
1066 2014-01-21 Ed Schonberg <schonberg@adacore.com>
1068 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
1069 with the operator it renames if we are within an expression of
1070 a pre/postcondition, because the expression will be reanalyzed
1071 at a later point, and the analysis of the renaming may affect
1072 the visibility of the operator when in an instance.
1074 2014-01-21 Robert Dewar <dewar@adacore.com>
1076 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
1077 Add this flag to type conversion nodes and assignment nodes.
1078 * treepr.adb: Deal properly with Flag 1,2,3.
1079 * treeprs.adt: Minor comment update.
1081 2014-01-21 Robert Dewar <dewar@adacore.com>
1083 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
1085 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
1086 parameter, completely rewrite spec.
1088 2014-01-21 Ed Schonberg <schonberg@adacore.com>
1090 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
1091 instance that is inlined, it may have been rewritten as a wrapper
1092 package. In that case the unit that must be made visible is the
1093 related instance of the package.
1095 2014-01-21 Arnaud Charlet <charlet@adacore.com>
1097 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
1098 previous change in codepeer mode.
1100 2014-01-21 Arnaud Charlet <charlet@adacore.com>
1102 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
1103 call to Abort_Undefer, as expected by the runtime.
1104 * s-tasren.adb (Local_Complete_Rendezvous): Replace
1105 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
1106 deferred at this point. Update comments.
1108 2014-01-21 Thomas Quinot <quinot@adacore.com>
1110 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
1112 2014-01-21 Arnaud Charlet <charlet@adacore.com>
1114 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
1117 2014-01-21 Robert Dewar <dewar@adacore.com>
1119 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
1121 2014-01-21 Thomas Quinot <quinot@adacore.com>
1123 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
1124 this is value is used in Node_Id arithmetic operations.
1125 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
1126 instead of hard-coded unrolled code.
1128 2014-01-21 Yannick Moy <moy@adacore.com>
1130 * gnat1drv.adb: Minor code cleanup, removing useless code.
1132 2014-01-21 Arnaud Charlet <charlet@adacore.com>
1134 * opt.ads (SPARK_Switches_File_Name): New.
1135 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
1136 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
1137 * gnat_ugn.texi: Document -gnates.
1139 2014-01-21 Yannick Moy <moy@adacore.com>
1141 * errout.adb (Special_Msg_Delete): Update comment. Remove
1142 special case for GNATprove which should not ignore mismatch
1143 in sizes for representation clauses.
1144 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
1145 which should not ignore pragma Pack.
1147 2014-01-21 Ed Schonberg <schonberg@adacore.com>
1149 * sem_ch4.adb: Code clean up.
1151 2014-01-21 Steve Baird <baird@adacore.com>
1153 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
1155 2014-01-21 Robert Dewar <dewar@adacore.com>
1157 * gcc-interface/gigi.h: Get Flags array address.
1158 * gcc-interface/trans.c: Acquire Flags array address.
1159 * atree.adb: Add support for Flags array and Flag0,1,2,3.
1160 * atree.ads: Add support for Flags array and Flag0,1,2,3.
1161 * atree.h: Add support for Flags array and Flag0,1,2,3.
1162 * back_end.adb: Pass Flags array address to gigi.
1164 2014-01-21 Ed Schonberg <schonberg@adacore.com>
1166 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
1167 reference to generated body so that legality checks on stream
1168 attributes are properly applied. If type is tagged and already
1169 frozen, insert generated body at the point of the renaming
1172 2014-01-21 Ed Schonberg <schonberg@adacore.com>
1174 * sem_ch12.adb: Code clean up.
1175 * sem_ch8.adb: Minor reformatting
1177 2014-01-20 Robert Dewar <dewar@adacore.com>
1179 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
1180 converting warnings on inevitable exceptions to errors.
1181 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
1182 converting warnings on inevitable exceptions to errors.
1183 * opt.adb (SPARK_Mode_Config): Handled like other config flags
1184 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
1185 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
1186 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
1187 New flag (Config_Switches_Type): Add SPARK_Mode field
1188 * sem.adb: Minor code reorganization (remove unnecessary with)
1189 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
1190 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
1191 converting warnings on inevitable exceptions to errors.
1192 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
1193 converting warnings on inevitable exceptions to errors.
1194 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
1195 converting warnings on inevitable exceptions to errors.
1196 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
1197 converting warnings on inevitable exceptions to errors.
1198 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
1200 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
1202 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
1204 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
1205 converting warnings on inevitable exceptions to errors.
1206 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
1207 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
1208 of Get_SPARK_Mode_Id
1209 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
1210 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
1211 converting warnings on inevitable exceptions to errors.
1212 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
1213 converting warnings on inevitable exceptions to errors.
1214 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
1217 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1219 * sem_ch13.adb: Add semantic information to rewritten type
1222 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1224 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
1225 are of a type with unknown discriminants, convert both to the
1226 underlying view of the type, so that the proper constraint check
1227 can be applied to the right-hand side.
1229 2014-01-20 Robert Dewar <dewar@adacore.com>
1231 * atree.adb (Copy_Node): Fix failure to copy last component
1232 (Exchange_Entities): Fix failure to exchange last entity
1234 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1236 * sem_ch12.adb: Code clean up.
1238 2014-01-20 Robert Dewar <dewar@adacore.com>
1240 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
1242 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1244 * sem_ch4.adb (Analyze_Quantified_Expression): If after
1245 pre-analysis the loop parameter specification has been
1246 rewritten as a iterator specification, propagate the change to
1247 the quantified expression, for ASIS navigtion needs.
1249 2014-01-20 Vincent Celier <celier@adacore.com>
1251 * par-ch10.adb: Minor error message change: escape [ and ].
1253 2014-01-20 Robert Dewar <dewar@adacore.com>
1255 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
1256 * errout.adb: Implement [ and ] insertion characters.
1257 * errout.ads: Document new [ and ] insertion characters.
1258 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
1259 addition of ??? comment.
1260 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
1261 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
1262 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
1263 Make warnings on exceptions into errors in GNATprove mode.
1264 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
1267 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1269 * sem_ch13.adb: Code clean up.
1271 2014-01-20 Robert Dewar <dewar@adacore.com>
1273 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
1275 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
1276 error in GNATprove mode.
1278 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1280 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
1281 reference 'Old takes no parameters, and thus can appear as a
1284 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1286 * exp_aggr.adb: Fix minor typos.
1288 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1290 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
1291 instance the attribute is legal, and its value is determined
1292 statically if the type has no discriminants. This choice is
1293 more useful than rechecking the legality rule in the instance,
1294 is consistent with older usage, and is also consistent with all
1297 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1299 * sem_cat.adb (Validate_Static_Object_Name): Change error into
1300 warning in Relaxed_Semantic_Mode.
1302 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1304 * sem_attr.adb: Code and comments cleanup.
1306 2014-01-20 Yannick Moy <moy@adacore.com>
1308 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
1309 * errout.adb (Compilation_Errors): Remove special handling in
1311 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
1312 removed debug flags.
1313 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
1314 Global, Initial_Condition, Initializes and Refined_State pragmas and
1316 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
1317 SPARK_Strict_Mode): Remove global flags.
1318 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
1319 always performed now, on packages declaring a null state.
1320 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
1321 at providing pedantic mode for bounds of integer types.
1322 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
1323 "some" quantified expression now issued under control of -gnatw.t,
1324 like the other warning on unused bound variable.
1325 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
1327 (Analyze_Pragma): Remove tests for SPARK 2014
1328 pragmas, not officially allowed by GNAT.
1330 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1332 * sem_prag.adb (Analyze_Pragma): Ensure that
1333 the sole argument of pragmas Abstract_State, Contract_Cases,
1334 Depends, Global and Initializes in in aggregate form.
1335 (Analyze_Refined_Pragma): Ensure that the sole argument of
1336 pragmas Refined_Depends, Refined_Global and Refined_State is in
1338 (Ensure_Aggregate_Form): New routine.
1340 2014-01-20 Doug Rupp <rupp@adacore.com>
1342 * sem_attr.adb (Analyze_Attribute): case
1343 Attribute_Constrained => treat all prefixes as legal for Declib
1346 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1348 * sem_prag.adb (Check_Mode): Reimplement the routine.
1349 (Find_Mode): New routine.
1351 2014-01-20 Robert Dewar <dewar@adacore.com>
1353 * sem_ch4.adb (Operator_Check): Handle additional
1354 Allow_Integer_Address cases.
1356 2014-01-20 Robert Dewar <dewar@adacore.com>
1358 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
1359 allowed if address is non-private, no longer true.
1360 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
1361 Remove check for address being private, causes difficulty when
1362 pragma used in gnat.adc file and is not needed, since we guard
1363 this in Address_Integer_Convert_OK.
1364 * exp_ch7.adb: Minor reformatting.
1365 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
1367 2014-01-20 Robert Dewar <dewar@adacore.com>
1369 * checks.adb (Apply_Range_Check): Remove gnatprove special
1370 casing of exponentiation.
1371 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
1372 operand for integer case to check range against Natural.
1374 2014-01-20 Robert Dewar <dewar@adacore.com>
1376 * s-tataat.adb: Minor reformatting.
1378 2014-01-20 Robert Dewar <dewar@adacore.com>
1380 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
1381 entities, and also fix documentation to remove mention of visible
1382 integer type, since this is not what the implementation does.
1383 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
1384 entities, and also fix documentation to remove mention of visible
1385 integer type, since this is not what the implementation does.
1386 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
1388 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
1389 case for parameter type check.
1390 * sem_res.adb (Resolve): Use new function
1391 Address_Integer_Convert_OK.
1392 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
1393 reformatting throughout.
1394 * sem_util.adb (Address_Integer_Convert_OK): New function.
1395 * sem_util.ads: Minor reformatting (put specs in alpha order)
1396 (Address_Integer_Convert_OK): New function.
1398 2014-01-20 Thomas Quinot <quinot@adacore.com>
1400 * exp_ch7.adb (Wrap_Transient_Expression):
1401 Insertion extra conditional expression only if
1402 Opt.Suppress_Control_Flow_Optimizations is set.
1404 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1406 * s-tataat.adb (Initialize_Attributes): Abort might already be
1407 deferred in Create_Task.
1409 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1411 * checks.adb (Apply_Scalar_Range_Check): Flag
1412 the exponent as requiring a range check when the expression is
1415 2014-01-20 Fedor Rybin <frybin@adacore.com>
1417 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
1419 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1421 * sem_util.adb (Default_Initialization): New routine.
1422 * sem_util.ads: Add new type Default_Initialization_Kind.
1423 (Default_Initialization): New routine.
1425 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1427 * sem_prag.adb (Check_Mode): Correct all error
1428 message logic dealing with in/in out parameters that may appear
1429 as inputs or have a self reference.
1431 2014-01-20 Robert Dewar <dewar@adacore.com>
1433 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
1434 * sem_res.adb (Resolve): Fix error causing infinite loop for
1435 integer used as address. Allow addresses as integers.
1437 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1439 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
1441 2014-01-20 Bob Duff <duff@adacore.com>
1443 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
1444 error when "use all" is not followed by "type".
1446 2014-01-20 Bob Duff <duff@adacore.com>
1448 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
1451 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1453 * checks.adb (Apply_Address_Clause_Check): If there is an
1454 alignment check on the expression in an address clause, and there
1455 is no local exception propagation, add an additional explanatory
1456 message to clarify the cause of previous warning.
1458 2014-01-20 Robert Dewar <dewar@adacore.com>
1460 * exp_ch7.adb: Minor reformatting.
1461 * opt.ads: Minor comment updates.
1462 * sem.adb: Minor name change Is_Main_Unit =>
1463 Is_Main_Unit_Or_Main_Unit_Spec.
1464 * sem_ch6.adb: Minor reformatting and code reorganization.
1466 2014-01-20 Bob Duff <duff@adacore.com>
1468 * gnat_ugn.texi: Update gnatpp switches.
1470 2014-01-20 Thomas Quinot <quinot@adacore.com>
1472 * exp_ch9.adb: Minor comment edit.
1474 2014-01-20 Robert Dewar <dewar@adacore.com>
1476 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
1477 only if System.Address is a private type.
1478 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
1479 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
1480 Allowed only if type System.Address is private, since otherwise
1482 * sem_res.adb: Fix failure to properly Analyze unchecked
1483 conversions that were introduced by Allow_Integer_Address.
1484 * switch-c.adb: Remove -gnates switch.
1485 * usage.adb: Remove -gnates switch.
1486 * gnat_ugn.texi: Remove documentation of -gnates flag.
1488 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1490 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
1491 resolve expression to perform proper name capture.
1493 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1495 * sem.adb (Semantics): When saving/restoring configuration
1496 switches, the spec of a pre- defined unit that is the main unit
1497 must be treated as a predefined unit as well.
1499 2014-01-20 Thomas Quinot <quinot@adacore.com>
1501 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
1502 expression, insert an extra conditional expression when saving
1503 the value of the expression, for the benefit of control flow
1504 graph based coverage analysis.
1505 * exp_ch3.adb: Minor reformatting.
1507 2014-01-20 Robert Dewar <dewar@adacore.com>
1509 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
1510 * gnat_rm.texi: Document pragma Allow_Integer_Address.
1511 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
1512 * opt.ads: New flag Allow_Integer_Address.
1513 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
1514 * sem_ch5.adb: Minor reformatting.
1515 * sem_prag.adb: Implement pragma Allow_Integer_Address.
1516 * sem_res.adb (Resolve): Allow integer address value if
1518 * sem_util.adb: Minor reformatting.
1519 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
1520 * switch-c.adb: Recognize flag -gnates.
1521 * usage.adb: Document flag -gnates.
1523 2014-01-20 Thomas Quinot <quinot@adacore.com>
1525 * s-tadeca.adb: Fix minor typos in comment.
1527 2014-01-20 Pascal Obry <obry@adacore.com>
1529 * s-win32.ads (FreeLibrary): New import.
1531 2014-01-20 Robert Dewar <dewar@adacore.com>
1533 * sem_res.adb, sem_cat.adb: Minor reformatting.
1534 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
1535 assigning to OUT parameters for the current subprogram scope.
1536 * exp_ch4.adb: Minor reformatting.
1538 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1540 * exp_ch4.adb (Process_Transient_Object,
1541 Find_Enclosing_Contexts): If the top-level if-expression that
1542 generated the transient object is an actual in a call, the proper
1543 Hook_Context is a construct enclosing the call.
1544 * einfo.ads: Indicate that Related_Expression is used to link a
1545 loop variable to the container expression over which the loop
1547 (Analyze_Iterator_Specification): Set the Related_Expression of
1548 the loop variable in a container element iterator.
1549 (Note_Possible_Modification): If the variable is the loop
1550 variable in a container element iterator, indicate that the
1551 enclosing container is also modified.
1553 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1555 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
1557 2014-01-20 Robert Dewar <dewar@adacore.com>
1559 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
1560 Minor reformatting and code clean up.
1562 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1564 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
1565 of objects of private type if Relaxed_RM_Semantics.
1567 2014-01-20 Claire Dross <dross@adacore.com>
1569 * a-cofove.ads (Vector): Capacity discriminant
1570 should be in range of the index.
1572 2014-01-20 Thomas Quinot <quinot@adacore.com>
1574 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
1575 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
1576 possible difference between epoch of Ada.Calendar clock and Ada
1577 real-time/tasking clock.
1578 * s-taprop-posix.adb: Minor comment fix.
1580 2014-01-20 Doug Rupp <rupp@adacore.com>
1582 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
1584 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1586 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
1587 checks on the prefix of attribute 'Old.
1588 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
1589 generation of validity checks on a range that belongs to the
1590 iteration scheme of a quantified expression.
1591 * sem_ch5.adb (One_Bound): Suppress the generation of validity
1592 checks on a bound that belongs to the iteration scheme of a
1593 quantified expression, generate the check in all other cases.
1595 2014-01-20 Bob Duff <duff@adacore.com>
1597 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
1599 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1601 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
1602 interpretations that do not come from other predefined units,
1603 to prevent spurious ambiguities in the presence of user-defined
1604 operators in the context of (an instance of) a predefined unit.
1606 2014-01-20 Robert Dewar <dewar@adacore.com>
1608 * gnat_rm.texi: Document that Loop_Variant is included in
1609 Statement_Assertions.
1610 * sem_prag.adb (Check_Kind): Add Loop_Variant to
1611 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
1612 to Statement_Assertions.
1614 2014-01-20 Doug Rupp <rupp@adacore.com>
1616 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
1617 for errno ENOENT from RTP on NFS mounted file system.
1619 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1621 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
1622 examine code that does not come from source. The check does not
1623 apply to code generated for constraint checks, and such code may
1624 generate spurious error messages when compiled with expansion
1625 disabled (as in a generic unit) because side effects may not
1627 2) Make error messages more explicit: indicate the component
1628 of the construct whose value is indeterminate because of a
1629 call to a function with in-out parameter in another component,
1630 when there is no mandated order of execution between the two
1631 components (actuals, aggregate components, alternatives).
1633 2014-01-20 Robert Dewar <dewar@adacore.com>
1635 * gnat_rm.texi: Minor cleanup.
1637 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1639 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
1640 can now apply to a refined postcondition.
1641 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
1642 variable Result_Seen. Add variables Case_Prag, Post_Prag,
1643 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
1644 whether postconditions and/or constract-cases mention attribute
1645 'Result and introduce a post-state when applied to functions.
1646 (Check_Result_And_Post_State): Removed.
1647 * sem_prag.adb (Analyze_Pragma): Add local variable
1648 Result_Seen. Verify that the expression of pragma Refined_Post
1649 mentions attribute 'Result and introduces a post-state.
1650 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
1652 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1654 * exp_ch7.adb (Is_Subprogram_Call): New routine.
1655 (Process_Transient_Objects): Make variable Must_Hook global with
1656 respect to all locally declared subprograms. Search the context
1657 for at least one subprogram call.
1658 (Requires_Hooking): Removed.
1660 2014-01-20 Claire Dross <dross@adacore.com>
1662 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
1663 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
1664 External_Axiomatization);
1666 2014-01-20 Robert Dewar <dewar@adacore.com>
1668 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
1669 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
1670 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
1671 Allow Loop_Entry to be used in these pragmas if they appear in
1672 an appropriate context.
1673 (Placement_Error): Specialize error
1674 message for pragma Assert[_And_Cut] or pragma Assume containing
1675 Loop_Entry attribute.
1676 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
1677 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
1680 2014-01-20 Robert Dewar <dewar@adacore.com>
1682 * gnat1drv.adb: Minor comment update.
1684 2014-01-20 Tristan Gingold <gingold@adacore.com>
1686 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
1687 variables, comment out unused code.
1688 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
1689 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
1690 * s-excmac-arm.ads: New file.
1692 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1694 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
1695 Drange and Index_Typ. Remove the circuitry which creates a
1696 range check to compare the index type of the array against the
1698 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
1699 the circuitry which creates a range check to handle a
1700 discrete_range denoted by a subtype indication.
1702 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
1704 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
1705 nodes to get the original sloc range.
1707 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1709 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
1710 entity of a [library level] package.
1712 2014-01-20 Tristan Gingold <gingold@adacore.com>
1714 * raise-gcc.c (exception_class_eq): New function.
1715 (is_handled_by): Use it to compare exception classes.
1716 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
1717 be called to return URC_CONTINUE_UNWIND.
1718 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
1719 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
1721 2014-01-20 Robert Dewar <dewar@adacore.com>
1723 * opt.ads: Minor comment update.
1725 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1727 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
1728 constants to the "Local variables" area. Add new constant D. Add
1729 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
1730 to Pref_Typ and update all occurrences. Add circuitry to extract
1731 the discrete_range and the index type and build a range check.
1733 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1735 * gnat1drv.adb (Adjust_Global_Switches): Enable
1736 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
1739 2014-01-20 Thomas Quinot <quinot@adacore.com>
1741 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
1743 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1745 * sem_ch13.adb (Analyze_Aspect_Specifications):
1746 When aspect SPARK_Mode appears on a package body, insert the
1747 generated pragma at the top of the body declarations.
1749 2014-01-20 Robert Dewar <dewar@adacore.com>
1751 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
1752 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
1753 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
1754 sem_ch8.adb, exp_dist.adb: Minor reformatting.
1756 2014-01-20 Yannick Moy <moy@adacore.com>
1758 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
1761 2014-01-20 Pascal Obry <obry@adacore.com>
1763 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
1765 * g-arrspl.adb: Adapt all routine to this new implementation.
1766 (Set): Copy the Slice_Set definition before reusing it.
1768 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1770 * sem_prag.adb (Process_Import_Or_Interface): In
1771 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
1772 (Analyze_Pragma): Ditto for pragma Export.
1773 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
1776 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1778 * einfo.ads: E_Abstract_State is now part of the entities that
1779 can be overloaded. Update type Overloadable_Kind to reflect the
1780 inclusion of abstract states.
1781 * sem_ch6.adb (New_Overloaded_Entity): A function can now
1782 overload an abstract state.
1783 * sem_prag.adb (Analyze_Constituent): Handle the overloading
1784 of states by functions. Use Entity_Of to obtain the entity of
1785 a constituent. (Analyze_Global_Item): Handle the overloading of
1786 states by functions.
1787 (Analyze_Initialization_Item): Handle the
1788 overloading of states by functions. Use Entity_Of to obtain the
1790 (Analyze_Input_Item): Handle the overloading
1791 of states by functions. Use Entity_Of to obtain the entity of an item.
1792 (Analyze_Input_Output): Handle the overloading of states by functions.
1793 (Analyze_Refinement_Clause): Handle the overloading
1794 of states by functions. Use Entity_Of to obtain the entity of an item.
1795 (Appears_In): Use Entity_Of to obtain the entity of an element.
1796 (Check_Usage): Use Entity_Of to obtain the entity of
1797 an item. Add a guard to prevent a crash due to a previous error.
1798 (Resolve_State): New routine.
1800 2014-01-20 Yannick Moy <moy@adacore.com>
1802 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
1803 opt.ads: Minor comments updates.
1805 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1807 * einfo.adb (Non_Limited_View): Applies to abstract states.
1808 (Set_From_Limited_With): Applies to abstract states.
1809 (Set_Non_Limited_View): Applies to abstract states.
1810 (Write_Field17): Output the non-limited view of an abstract state.
1811 * einfo.ads: Update the comment on usage and occurrences in
1812 nodes for attributes From_Limited_With and Non_Limited_View.
1813 * sem_aux.adb (Available_View): This routine can now handle
1815 * sem_aux.ads (Available_View): This routine can now handle
1816 abstract states. Update the comment on usage.
1817 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
1818 of states and variables.
1819 (In_Pragmas_Depends_Or_Global): New routine.
1820 * sem_ch10.adb (Build_Limited_Views): Implement
1821 abstract (limited) views of variables and states.
1822 (Build_Shadow_Entity): This routine is now a procedure. Add
1823 formal parameter Shadow. Update the comment on usage. Add
1824 context-specific decoration for states and variables.
1825 (Decorate_State): New routine. (Decorate_Variable): New routine.
1826 (Find_And_Process_States): New routine.
1827 (Process_Declarations): Renamed to Process_Declarations_And_States.
1828 (Process_Declarations_And_States): Add formal parameters
1829 Pack and Create_Abstract_Views. Update the comment on usage.
1830 (Process_States): New routine.
1831 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
1832 views of states and variables. Match the abstract view of a state
1833 against its corresponding non-abstract view.
1834 (Is_Matching_Input):
1835 Handle abstract views of states and variables. Match the abstract
1836 view of a state against its corresponding non-abstract view.
1837 (Process_Global_Item): Handle abstract views of states and
1840 2014-01-20 Bob Duff <duff@adacore.com>
1842 * sem_ch10.adb (Expand_With_Clause): Don't
1843 recurse on the prefix if the current with-ed name refers to a
1844 package that renames its own parent, eg "package P.Q renames P;".
1846 2014-01-20 Yannick Moy <moy@adacore.com>
1848 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
1849 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
1850 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
1851 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
1852 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
1855 2014-01-20 Yannick Moy <moy@adacore.com>
1857 * sinfo.ads Update documentation of GNATprove mode.
1859 2014-01-20 Yannick Moy <moy@adacore.com>
1861 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
1862 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
1863 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
1864 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
1866 * sem_ch13.adb: Remove blank.
1867 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
1868 subprograms by alias for renamings, not for inherited primitive
1870 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
1872 (Remove_Side_Effects): Apply the removal in
1873 GNATprove mode, for the full analysis of expressions.
1874 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
1876 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
1877 save/restore actions for Expander_Active flag in GNATprove mode,
1878 similar to what is done in ASIS mode.
1879 * frontend.adb (Frontend): Generic bodies are instantiated in
1881 * gnat1drv.adb (Adjust_Global_Switches): Set operating
1882 mode to Check_Semantics in GNATprove mode, although a light
1883 expansion is still performed.
1884 (Gnat1drv): Set Back_End_Mode to
1885 Declarations_Only in GNATprove mode, and later on special case
1886 the GNATprove mode to continue analysis anyway.
1887 * lib-writ.adb (Write_ALI): Always generate ALI files in
1889 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
1891 (SPARK_Mode): Renamed as GNATprove_Mode.
1892 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
1893 tree in GNATprove_Mode.
1894 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
1895 body in GNATprove mode.
1896 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
1898 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1899 Make sure side effects are removed in GNATprove mode.
1901 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1903 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
1904 for aliased objects with an unconstrained nominal subtype.
1905 * gcc-interface/trans.c (Call_to_gnu): Likewise.
1906 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
1907 <case N_Op_Minus>: Remove useless code.
1908 (Exception_Handler_to_gnu_zcx): Minor tweaks.
1910 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1912 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
1913 Tidy up. For a subtype with discriminants and variant part, if a
1914 variant is statically selected and the fields all have a constant
1915 position, put them in order of increasing position. Likewise if
1916 no variant part but representation clause is present.
1917 * gcc-interface/utils.c (make_packable_type): Robustify.
1918 (maybe_pad_type): Use local variable and tidy up condition. If no
1919 alignment is specified, use the original one.
1920 (create_type_stub_decl): Minor tweak.
1921 (convert) <case VECTOR_CST>: Fix typo.
1922 <case CONSTRUCTOR>: Deal with padding types around the same type.
1923 Do not punt on missing fields.
1924 (unchecked_convert): Call finish_record_type to lay out the special
1925 record types made for conversions from/to problematic integer types.
1926 Bump the alignment of CONSTRUCTORs before converting them to a more
1929 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1931 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
1932 obsolete code for type_annotate_only mode, simplify code and slightly
1933 improve wording of comments.
1935 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
1938 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
1939 as intermediate type.
1940 (UI_To_gnu): Likewise.
1942 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
1944 * gnatvsn.ads (Current_Year): Bump to 2014.
1946 2014-01-02 Tobias Burnus <burnus@net-b.de>
1948 * gnat_ugn.texi: Bump @copying's copyright year.
1950 Copyright (C) 2014 Free Software Foundation, Inc.
1952 Copying and distribution of this file, with or without modification,
1953 are permitted in any medium without royalty provided the copyright
1954 notice and this notice are preserved.