1 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
4 (build_vector_type_for_size): New function.
5 (build_vector_type_for_array): Likewise.
6 (unchecked_convert): Build an intermediate vector type to convert
7 from a generic array type to a vector type.
8 (handle_vector_size_attribute): Reimplement.
9 (handle_vector_type_attribute): Likewise.
11 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
13 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
14 Is_OK_Static_Expression in lieu of Is_Static_Expression to
15 detect valid arguments.
17 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
19 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
21 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
23 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
24 (components_to_record): Likewise.
25 * gcc-interface/utils.c (make_aligning_type): Likewise.
26 (maybe_pad_type): Likewise.
27 (finish_record_type): Likewise.
28 (rest_of_record_type_compilation): Likewise.
30 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
32 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
33 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
35 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
36 hint for Loop_Optimize.
37 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
38 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
40 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
41 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
43 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
45 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
46 Robert Dewar <dewar@adacore.com>
48 * opt.ads (Suppress_Back_Annotation): Remove as unused.
49 * fe.h (Back_Annotate_Rep_Info): Likewise.
50 (Global_Discard_Names): Likewise.
51 (List_Representation_Info): Declare.
52 * types.h (Uint_Minus_1): Likewise.
53 * repinfo.ads: Document back-annotation change.
54 * gcc-interface/gigi.h (init_gnat_decl): Declare.
55 (destroy_gnat_decl): Likewise.
56 * gcc-interface/decl.c (annotate_value): Do not create the cache of
57 annotated values here but...
58 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
60 (init_gnat_decl): ...here instead. New function.
61 (destroy_gnat_decl): Likewise.
62 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
63 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
65 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
67 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
68 offset for the field, if any.
70 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
71 Svante Signell <svante.signell@gmail.com>
75 * s-osinte-x32.adb: New file.
76 * s-linux.ads (Time): New section.
77 * s-linux-alpha.ads (Time): Likewise.
78 * s-linux-android.ads (Time: Likewise.
79 * s-linux-hppa.ads (Time): Likewise.
80 * s-linux-mipsel.ads (Time): Likewise.
81 * s-linux-sparc.ads (Time): Likewise.
82 * s-linux-x32.ads (Time): Likewise.
83 * s-osprim-x32.ads (timespec): Adjust.
85 (To_Timespec): Likewise.
86 * s-osinte-linux.ads (Time): Define local subtypes for those defined
88 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
89 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
90 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
91 * s-osinte-solaris-posix.ads (timespec): Likewise.
92 * s-osinte-posix.adb (To_Timespec): Likewise.
93 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
95 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
98 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
99 * s-linux-android.ads: New file.
100 * s-intman-android.adb: Likewise.
101 * s-osinte-android.ads: Adjust.
102 * sigtramp-armdroid.c: Likewise.
103 * sigtramp.h: Add Android support.
105 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
107 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
109 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
112 * system-linux-alpha.ads: Adjust for Ada 2005.
113 * system-linux-mips.ads: Likewise.
114 * system-linux-mips64el.ads: Likewise.
115 * system-linux-mipsel.ads: Likewise.
116 * system-linux-s390.ads: Likewise.
117 * system-linux-s390x.ads: Likewise.
118 * system-linux-sparc.ads: Likewise.
119 * system-linux-sparcv9.ads: Likewise.
120 * system-rtems.ads: Likewise.
121 * system-vxworks-arm.ads: Likewise.
123 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
126 * gcc-interface/Makefile.in (target_cpu_default): Revert
129 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
132 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
133 it to set the RM size. Use directly 'size' for the Esize.
134 (Create_Back_End_Float_Types): Adjust call to above.
135 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
136 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
137 (Write_Target_Dependent_Values): Adjust comment.
138 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
140 (Write_Target_Dependent_Values): Write the precision in lieu of size.
141 (Initialization): Read the precision in lieu of size and compute the
142 size from the precision and the alignment.
143 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
144 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
145 types for vector modes, pass the size in addition to the precision.
147 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
149 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
151 2014-03-07 Doug Rupp <rupp@adacore.com>
154 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
155 (Support_64_Bit_Divides): Removed, no longer used.
156 (ZCX_By_Default): Enabled.
158 2014-02-25 Doug Rupp <rupp@adacore.com>
160 * gcc-interface/Makefile.in (arm-linux):
161 (EH_MECHANISM): Use ARM unwinder (-arm)
162 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
164 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
165 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
166 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
167 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
168 Add dependencies for sigtramp-armvxw.o.
170 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
172 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
174 2014-02-25 Robert Dewar <dewar@adacore.com>
176 * rtsfind.adb (Is_RTE): Protect against entity with no scope
177 field (previously this call blew up on the Standard entity).
178 * sem_attr.adb (Analyze_Attribute, case Access): Remove
179 test for No_Abort_Statements, this is now handled in
180 Set_Entity_With_Checks.
181 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
182 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
183 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
184 Set_Entity_With_Checks.
185 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
186 Add checks for No_Abort_Statements.
188 2014-02-25 Robert Dewar <dewar@adacore.com>
190 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
191 Check_Restriction is OK.
193 2014-02-25 Ed Schonberg <schonberg@adacore.com>
195 * sem_ch3.adb (Process_Full_View): Better error message when
196 the full view of a private type without discriminants is an
198 * sem_ch7.adb (Uninstall_Declarations): Ditto.
200 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
202 * sigtramp-armvxw.c: Also restore r0.
204 2014-02-25 Robert Dewar <dewar@adacore.com>
206 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
207 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
209 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
210 any more (Output_Msg_Text): Rewritten with new convention on
211 output of warnings that are treated as errors.
212 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
214 * gnat_rm.texi: Updates to documentation on pragma
216 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
217 set Warning_Doc_Switch.
218 * lib-writ.ads: Add documentation note on ALI file generation
220 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
222 * sem_attr.adb (Resolve_Attribute, case Access):
223 Abort_Task'Access violates the No_Abort_Statements restriction.
224 * sem_res.adb (Resolve_Call): Check restriction
225 No_Abort_Statements for call to Abort_Task or a renaming of it.
227 2014-02-25 Robert Dewar <dewar@adacore.com>
229 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
231 * lib.ads: Minor reformatting.
232 * einfo.ads: Minor reformatting.
234 2014-02-25 Doug Rupp <rupp@adacore.com>
236 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
237 use Short_Descriptor(S) as the argument passing mechanism.
239 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
241 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
243 2014-02-25 Robert Dewar <dewar@adacore.com>
245 * atree.ads (Warnings_Treated_As_Errors): New variable.
246 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
247 error object (Initialize): Initialize Warnings_As_Errors_Count
248 (Write_Error_Summary): Include count of warnings treated as errors.
249 * erroutc.adb (Warning_Treated_As_Error): New function.
250 (Matches): Function moved to outer level of package.
251 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
252 (Warning_Treated_As_Error): New function.
253 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
254 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
255 * opt.ads (Config_Switches_Type): Add entry for
256 Warnings_As_Errors_Count.
257 (Warnings_As_Errors_Count): New variable.
258 (Warnings_As_Errors): New array.
259 * par-prag.adb: Add dummy entry for Warning_As_Error.
260 * sem_prag.adb (Analyze_Pragma): Implement new pragma
262 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
264 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
266 * sigtramp.h: Fix minor inaccuracy.
268 2014-02-25 Ben Brosgol <brosgol@adacore.com>
270 * gnat_ugn.texi: Added description of kill command.
272 2014-02-25 Robert Dewar <dewar@adacore.com>
274 * gnat_rm.texi (Address_Clauses): Add a section discussing the
275 problem of address clauses causing unexpected initialization,
276 including the effect of Initialize_Scalars.
278 2014-02-25 Robert Dewar <dewar@adacore.com>
280 * errout.adb: Various changes for better msgs for anonmous access
282 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
284 (Buffer_Remove): Version with character argument.
285 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
286 of mismatching conventions for access-to-subprogram case.
287 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
288 access types in record.
289 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
290 types, including in records.
292 2014-02-25 Doug Rupp <rupp@adacore.com>
294 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
295 enhancements and corrections.
297 2014-02-25 Robert Dewar <dewar@adacore.com>
299 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
301 2014-02-25 Robert Dewar <dewar@adacore.com>
303 * gnat_rm.texi: First set of documentation additions for
305 * checks.adb: Minor reformatting.
306 * sem_elab.adb (Check_Task_Activation): Minor fix to error
308 * sem_util.adb: Minor reformatting.
310 2014-02-25 Arnaud Charlet <charlet@adacore.com>
312 * usage.adb (Usage): Add help on -gnateC.
313 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
314 * opt.ads (Generate_CodePeer_Messages): New flag.
315 * gnat_ugn.texi: Document new switch -gnateC.
317 2014-02-25 Ben Brosgol <brosgol@adacore.com>
319 * gnat_rm.texi: Corrected minor typos in Implementation Defined
321 * opt.ads: Minor reformatting.
323 2014-02-25 Robert Dewar <dewar@adacore.com>
325 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
326 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
328 * opt.ads (Warn_Info_Messages): New flag.
329 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
331 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
333 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
334 * usage.adb: Add documentation of -gnatel/-gnateL Update
335 documentation of -gnatwl/-gnatwL.
336 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
337 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
339 2014-02-25 Robert Dewar <dewar@adacore.com>
341 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
342 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
343 * interfac.ads: Minor code reorganization (add pragma
344 Compiler_Unit_Warning).
345 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
346 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
347 Has_Shift_Operator flag.
348 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
349 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
350 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
351 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
352 Add entry for Name_Amount.
353 * checks.adb (Selected_Range_Checks): When checking for a null
354 range, make sure we use the base type, and not the subtype for
355 deciding a range is null.
356 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
357 for suspicious loop bound which is outside the range of the
359 * gnat_ugn.texi: Add documentation section "Determining the
360 Chosen Elaboration Order"
361 * sem_ch13.adb (UC_Entry): Add field Act_Unit
362 (Validate_Unchecked_Conversion): Store Act_Unit
363 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
364 * treepr.adb: Minor reformatting.
366 2014-02-25 Arnaud Charlet <charlet@adacore.com>
368 * usage.adb: Minor: fix typo.
370 2014-02-25 Robert Dewar <dewar@adacore.com>
372 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
373 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
374 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
375 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
376 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
377 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
378 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
379 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
380 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
381 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
382 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
383 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
384 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
385 Compiler_Unit_Warning, change Compiler_Unit everywhere to
386 Compiler_Unit_Warning.
388 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
390 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
391 in ASIS mode aggregates that are used as aspect definitions.
393 2014-02-25 Robert Dewar <dewar@adacore.com>
395 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
398 2014-02-25 Ed Schonberg <schonberg@adacore.com>
400 * freeze.adb (Freeze_Entity): If the return type of a function
401 is a limited view, and the non-limited view has not been seen yet,
402 defer freezing to some later point.
404 2014-02-25 Robert Dewar <dewar@adacore.com>
406 * sem_ch3.adb: Minor reformatting.
408 2014-02-25 Robert Dewar <dewar@adacore.com>
410 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
411 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
412 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
413 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
414 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
415 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
416 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
417 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
418 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
419 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
420 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
421 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
422 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
423 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
424 snames.ads-tmpl: Change Compiler_Unit everywhere to
425 Compiler_Unit_Warning.
427 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
429 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
430 (Collect_Body_Postconditions_In_Decls): New routine.
431 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
432 postcondition aspects or pragmas that appear on a subprogram
434 (Collect_Spec_Preconditions): Factor out code. Handle
435 precondition aspects or pragmas that appear on a subprogram
437 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
438 aspects that apply to a subprogram body stub is no longer delayed,
439 the aspects are analyzed on the spot.
440 (SPARK_Aspect_Error):
441 Aspects that apply to a subprogram declaration cannot appear in
443 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
444 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
445 is now a local variable. Code cleanup. Analysis related to
446 the aspects of a subprogram body stub is now carried out by
447 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
448 and/or pragmas of a subprogram body stub to the proper body
449 as this is no longer needed. Do not analyze the aspects of a
450 subprogram stub when the corresponding source unit is missing.
451 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
453 (Analyze_Task_Body_Stub): Flag the illegal use of
455 (Optional_Subunit): Add local variable Unum.
456 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
457 pragma when it applies to a subprogram body stub.
458 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
459 Depends and Global can now apply to a subprogram body stub as
460 long as it acts as its own spec.
461 (Analyze_Refined_Pragma):
462 Code reformatting. Refinement pragmas cannot apply to a subunit.
464 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
466 * einfo.ads Update the usage of flag
467 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
468 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
469 now starts with the letter 'C'. This makes reading expanded
471 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
472 Iter_Loop. Signal that an Ada 2012 iterator loop requires
473 secondary stack management when creating a transient scope for
474 an element reference.
475 * exp_util.adb (Process_Statements_For_Controlled_Objects):
476 When wrapping the statements of a loop, pass the E_Loop entity
477 to the wrapping machinery.
478 (Wrap_Statements_In_Block): Add
479 formal parameter Scop along with comment on usage. Add local
480 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
481 block as requiring secondary stack management when the block is
482 created inside an Ada 2012 iterator loop. This ensures that any
483 reference objects are reclaimed on each iteration of the loop.
484 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
485 tasked with the handling of container iterators as requiring
486 secondary stack management. This ensures that iterators are
487 reclaimed when the loop terminates or is exited in any fashion.
488 * sem_util.adb (Add_Block_Identifier): New routine.
489 (Find_Enclosing_Iterator_Loop): New routine.
490 * sem_util.ads (Add_Block_Identifier): New routine.
491 (Find_Enclosing_Iterator_Loop): New routine.
493 2014-02-25 Robert Dewar <dewar@adacore.com>
495 * sinfo.ads: Minor reformatting.
497 2014-02-25 Tristan Gingold <gingold@adacore.com>
499 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
501 2014-02-25 Pascal Obry <obry@adacore.com>
503 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
505 2014-02-25 Tristan Gingold <gingold@adacore.com>
507 * sem_ch10.adb: Minor comment fix.
509 2014-02-25 Bob Duff <duff@adacore.com>
511 * s-tasdeb.adb: Misc cleanup of this package,
512 including printing addresses in hexadecimal.
513 (Write): Fix minor bug when taking 'Address of an empty string.
515 2014-02-25 Ed Schonberg <schonberg@adacore.com>
517 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
518 public child unit when it does not refer to the abstract state
519 of a public ancestor.
521 2014-02-25 Yannick Moy <moy@adacore.com>
523 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
524 Validity_Checks in GNATprove and CodePeer modes.
526 2014-02-25 Pascal Obry <obry@adacore.com>
528 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
531 2014-02-25 Yannick Moy <moy@adacore.com>
533 * sem_prag.adb: Minor reformatting to get consistent messages.
535 2014-02-25 Robert Dewar <dewar@adacore.com>
537 * checks.adb: Minor reformatting.
538 * sinfo.ads (Do_Range_Check): Document that this flag is never
539 passed to the back end.
541 2014-02-25 Yannick Moy <moy@adacore.com>
543 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
544 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
546 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
548 * sem_res.adb (Appears_In_Check): New routine.
549 (Resolve_Entity_Name): Remove local variables Prev and
550 Usage_OK. Par is now a constant. Remove the parent chain traversal
551 as the placement of a volatile object with enabled property
552 Async_Writers and/or Effective_Reads must appear immediately
553 within a legal construct.
555 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
557 * checks.adb (Apply_Selected_Range_Checks):
558 Alphabetize local constants and variables. Add comments.
559 Always insert a range check that requires runtime evaluation into
562 2014-02-25 Robert Dewar <dewar@adacore.com>
564 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
566 2014-02-25 Bob Duff <duff@adacore.com>
568 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
569 iterations while waiting for independent tasks to terminate;
570 if an independent task does not terminate, we do not want to
571 hang here. In that case, the thread will be terminated when the
573 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
575 2014-02-25 Ed Schonberg <schonberg@adacore.com>
577 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
578 used to perform pre-analysis of the expression for SPARK
579 aspects that have a non-standard syntax, such as GLobal and
580 Initializes. The procedure applies to the original expression
581 in an aspect specification, prior to the analysis of the
582 corresponding pragma, in order to provide semantic information
583 for ASIS navigation purposes.
584 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
587 2014-02-25 Yannick Moy <moy@adacore.com>
589 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
591 2014-02-25 Doug Rupp <rupp@adacore.com>
593 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
594 (__gnat_adjust_context_for_raise): Bump the PC by 2.
596 2014-02-25 Ed Schonberg <schonberg@adacore.com>
598 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
599 misplaced IS, add a statement sequence to improper body only if
600 one has not been parsed already.
602 2014-02-25 Ed Schonberg <schonberg@adacore.com>
604 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
605 mismatch when multidimensional array is updated with a single
608 2014-02-25 Yannick Moy <moy@adacore.com>
610 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
611 sem_ch6.adb: Mark most references to SPARK RM in error messages
614 2014-02-24 Ed Schonberg <schonberg@adacore.com>
616 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
617 appears in a list of basic declarations, complete the tree with
618 an empty statement list, to prevent cascaded errors and crashes
619 if semantic analysis is attempted.
621 2014-02-24 Thomas Quinot <quinot@adacore.com>
623 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
625 * erroutc.adb: Minor reformatting.
627 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
629 * sem_prag.adb (Check_Clause_Syntax): Account
630 for a solitary input item in a dependency list.
632 2014-02-24 Yannick Moy <moy@adacore.com>
634 * gnat1drv.adb (Adjust_Global_Switches): Do not
635 use validity checks at all in GNATprove_Mode.
637 2014-02-24 Robert Dewar <dewar@adacore.com>
639 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
640 atree.adb, atree.ads: Minor reformatting.
642 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
644 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
645 global and dependence refinement when SPARK_Mode is off.
646 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
647 state refinement when SPARK_Mode is off.
648 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
649 variable Decl. Insert the generated pragma for Refined_State
650 after a potential pragma SPARK_Mode.
651 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
652 constant Deps. Remove local variable Expr. Check the syntax
653 of pragma Depends when SPARK_Mode is off. Factor out the
654 processing for extra parenthesis around individual clauses.
655 (Analyze_Global_In_Decl_List): Items is now a constant. Check
656 the syntax of pragma Global when SPARK_Mode is off.
657 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
658 Initializes when SPARK_Mode is off.
659 (Analyze_Part_Of): Check
660 the syntax of the encapsulating state when SPARK_Mode is off.
661 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
662 SPARK_Mode is off. Move the declaration order check with respect
663 to pragma Initializes to the end of the processing. Do not verify
664 the declaration order for pragma Initial_Condition when SPARK_Mode
665 is off. Do not complain about a useless package refinement when
667 (Analyze_Refined_Depends_In_Decl_Part): Refs
668 is now a constant. Check the syntax of pragma Refined_Depends
669 when SPARK_Mode is off.
670 (Analyze_Refined_Global_In_Decl_Part):
671 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
672 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
673 Refined_State when SPARK_Mode is off.
674 (Check_Dependence_List_Syntax): New routine.
675 (Check_Global_List_Syntax): New routine.
676 (Check_Initialization_List_Syntax): New routine.
677 (Check_Item_Syntax): New routine.
678 (Check_State_Declaration_Syntax): New routine.
679 (Check_Refinement_List_Syntax): New routine.
680 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
682 2014-02-24 Robert Dewar <dewar@adacore.com>
684 * a-tags.adb, s-os_lib.adb: Minor reformatting.
686 2014-02-24 Thomas Quinot <quinot@adacore.com>
688 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
689 strerror message, not just numeric errno value.
691 2014-02-24 Doug Rupp <rupp@adacore.com>
693 * raise-gcc.c (exception_class_eq): Make endian neutral.
695 2014-02-24 Ed Schonberg <schonberg@adacore.com>
697 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
698 flag, and reset Etype and Analyzed attributes unconditionally
699 when copying a tree that may be partly analyzed.
700 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
701 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
702 within a subprogram body and applies to it, remove it from the
703 body before making a copy of it, to prevent spurious errors when
704 analyzing the copied body.
706 2014-02-24 Thomas Quinot <quinot@adacore.com>
708 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
709 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
710 vxWorks.h has been included. Also ensure that file attributes
711 related definitions are output even in cases where socket support
713 * a-tags.adb: Code clean up.
714 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
715 instead of -I to add the main ada source directory to the header
716 search path, in order to avoid conflict between our own "types.h"
717 and VxWork's <types.h>.
719 2014-02-24 Robert Dewar <dewar@adacore.com>
721 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
722 * debug.adb: Remove documentation of -gnatd.X, no longer used.
723 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
725 2014-02-24 Bob Duff <duff@adacore.com>
727 * gnat_ugn.texi: Improve documentation of gnatpp.
729 2014-02-24 Thomas Quinot <quinot@adacore.com>
731 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
732 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
733 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
734 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
735 a chars_ptr, because on Windows this is a renaming of
736 Socket_Error_Message.
738 2014-02-24 Robert Dewar <dewar@adacore.com>
740 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
741 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
742 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
745 2014-02-24 Thomas Quinot <quinot@adacore.com>
747 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
748 that the source directory containing s-oscons-tmplt.c is on the
749 include path, so that all internal header files are available.
751 2014-02-24 Ed Schonberg <schonberg@adacore.com>
753 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
754 domain of iteration is an attribute reference 'Old, this is an
755 Ada 2012 iterator and the loop must be rewritten as such.
757 2014-02-24 Thomas Quinot <quinot@adacore.com>
759 * s-fileio.adb (Errno_Message): Remove, use shared version from
761 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
762 * g-stseme (Socket_Error_Message): Reimplement in terms of new
764 * g-socthi.ads, g-socthi.adb: Change profile of
765 Socket_Error_Message to return String to allow the above.
766 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
767 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
768 * g-socthi-vxworks.ads: Update to account for the above profile
770 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
771 * s-crtl.ads (strncpy): New procedure.
772 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
773 Use import from s-crtl.
774 * a-envvar.adb, osint.adb: Use imports of C runtime functions
775 from s-crtl instead of re-importing locally.
777 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
779 * sem_prag.adb (Analyze_Global_Item): Emit the
780 variable related checks concerning volatile objects only when
783 2014-02-24 Robert Dewar <dewar@adacore.com>
785 * sem_ch5.adb (Analyze_Iterator_Specification): use
786 Error_Msg_Ada_2012_Feature.
788 2014-02-24 Jose Ruiz <ruiz@adacore.com>
790 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
791 No_Local_Timing_Events and No_Specific_Termination_Handlers
792 must be set, according to the Ravenscar profile definition
795 2014-02-24 Ed Schonberg <schonberg@adacore.com>
797 * sem_ch6.adb (Analyze_Expression_Function): If this is a
798 completion, freeze return type and its designated type if needed.
800 2014-02-24 Thomas Quinot <quinot@adacore.com>
802 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
803 'Address): When moving initialization statements to a freeze
804 entity, keep them under a single node (i.e. do not unwrap
805 expressions with actions), and set the Initialization_Statements
806 attribute again so that processing of a later pragma Import can
809 2014-02-24 Claire Dross <dross@adacore.com>
811 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
812 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
813 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
814 Left/Right to First_To_Previous/Current_To_Last.
816 2014-02-24 Thomas Quinot <quinot@adacore.com>
818 * adaint.h (struct file_attributes): New component "error"
819 (__gnat_error_attributes): Accessor for the above.
820 * adaint.c (__gnat_error_attributes): New subprogram
821 (__gnat_stat): Fix returned value (expect errno value)
822 (__gnat_stat_to_attr): Add management of error component (set to
823 stat errno value, except for missing files where it is set to 0,
824 and exists is set to 0).
825 * osint.ads (File_Attributes_Size): Update per change above,
826 also clarify documentation.
827 * s-filatt.ads: New file, binding to file attributes related
829 * Makefile.rtl (s-filatt): New runtime unit.
830 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
831 to library function if not available on target).
832 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
833 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
834 SIZEOF_struct_dirent_alloc): New constants.
835 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
836 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
837 Perform appropriate error checking if stat fails (do not just
838 ignore existing files if stat fails)
839 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
842 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
844 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
845 the use of volatile objects as global items in a function to
846 the variable related checks section.
847 * sem_util.adb (Async_Readers_Enabled): Directly call
848 Has_Enabled_Property.
849 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
850 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
851 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
852 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
853 Update the comment on usage. State_Has_Enabled_Property how handles
854 the original logic of the routine. Add processing for variables.
855 (State_Has_Enabled_Property): New routine.
856 (Variable_Has_Enabled_Property): New routine.
858 2014-02-24 Robert Dewar <dewar@adacore.com>
860 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
862 * atree.ads, atree.adb (Node35): New function.
863 (Set_Node35): New procedure.
864 * debug.adb: Define new debug flag -gnatd.X.
865 * einfo.ads, einfo.adb (Import_Pragma): New field.
866 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
867 really active yet, has to be activated with -gnatd.X.
868 * sem_prag.adb (Set_Imported): Set new Import_Pragma
869 field (Set_Imported): Don't set Is_Public (see
870 Freeze.Wrap_Imported_Subprogram)
871 * par-ch3.adb (P_Component_List): Handle unexpected null component.
873 2014-02-24 Yannick Moy <moy@adacore.com>
875 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
876 * gnat_rm.texi: Correct documentation of attribute Update.
878 2014-02-24 Ed Schonberg <schonberg@adacore.com>
880 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
881 iterator in older versions of Ada.
883 2014-02-24 Gary Dismukes <dismukes@adacore.com>
885 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
886 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
888 2014-02-24 Ed Schonberg <schonberg@adacore.com>
890 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
891 indexed_components that are instances of Ada 2012 container
892 indexing operations. Analysis and resolution of such nodes
893 is performed on the attribute, and the original source is
894 preserved for ASIS operations. If expansion is enabled, the
895 indexed component is replaced by the value of this attribute,
896 which is in a call to an Indexing aspect, in most case wrapped
897 in a dereference operation.
898 * sem_ch4.adb (Analyze_Indexed_Component): Create
899 Generalized_Indexing attribute when appropriate.
900 (Analyze_Call): If prefix is not overloadable and has an indexing
901 aspect, transform into an indexed component so it can be analyzed
902 as a potential container indexing.
903 (Analyze_Expression): If node is an indexed component with a
904 Generalized_ Indexing, do not re-analyze.
905 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
906 of an indexed_component that has been transformed into a container
908 (Resolve_Indexed_Component): Call the above when required.
909 (Resolve): Do not insert an explicit dereference operation on
910 an indexed_component whose type has an implicit dereference:
911 the operation is inserted when resolving the related
912 Generalized_Indexing.
914 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
916 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
919 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
921 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
923 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
924 Merge the expected and available mode errors.
925 (Report_Unused_Constituents): Remove leading spaces in error messages.
926 (Report_Unused_States): Remove leading spaces in error messages.
928 2014-02-24 Thomas Quinot <quinot@adacore.com>
930 * par_sco.adb (Traverse_One): Refine categorization of statement
933 2014-02-24 Robert Dewar <dewar@adacore.com>
935 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
936 Pure_05, Pure_12 and Preelaborate_05.
937 * gnat_rm.texi: Update accordingly.
938 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
939 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
940 Recognize one argument form of these pragmas only in GNAT mode
943 2014-02-24 Ed Schonberg <schonberg@adacore.com>
945 * s-dimmks.ads: Replace symbol for temperature, previously the
946 Greek letter Theta, by the ASCII @ sign.
947 * s-diflio.ads: ditto.
949 2014-02-24 Robert Dewar <dewar@adacore.com>
951 * exp_ch4.adb: Minor code reorganization (use OR for boolean
953 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
955 2014-02-24 Ben Brosgol <brosgol@adacore.com>
957 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
958 so that references to gnatmem and ASIS tools do not appear in the FSF
959 edition of the GNAT User's Guide.
961 2014-02-24 Yannick Moy <moy@adacore.com>
963 * freeze.adb (Freeze_Entity): Do not issue warning
964 for pre/post being ignored on imported subprogram in GNATprove
967 2014-02-24 Robert Dewar <dewar@adacore.com>
969 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
970 stand.ads, sem_eval.adb: Minor reformatting.
972 2014-02-24 Yannick Moy <moy@adacore.com>
974 * sem_prag.adb: Minor rewording in error message.
976 2014-02-24 Johannes Kanig <kanig@adacore.com>
978 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
979 GNATprove_mode, gnat2why doesn't need nor use these types.
981 2014-02-24 Gary Dismukes <dismukes@adacore.com>
983 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
984 target, in the case of signed integer exponentiation that uses a
985 run-time routine, always select the Exp_* versions, since overflow
986 checking is automatically done by AAMP arithmetic instructions.
988 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
990 * sem_ch13.adb (Analyze_Aspect_Specifications):
991 When the related context is a package instace, insert pragma
992 Abstract_State after all internally-generated renamings related
993 to the instance "header".
995 2014-02-24 Ed Schonberg <schonberg@adacore.com>
997 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
999 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
1000 call to an abstract subprogram is legal if it appears in a
1001 pre/postcondition of another abstract operation.
1003 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
1005 * gnat_ugn.texi: Misc updates.
1007 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1009 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
1011 2014-02-24 Gary Dismukes <dismukes@adacore.com>
1013 * layout.adb (Layout_Variant_Record): Instantiate
1014 Generic_Check_Choices and call Check_Choices before calling
1015 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
1016 set to prevent generating incorrect discriminant-checking
1017 functions for 'others' variants (functions that unconditionally
1018 return True rather than accounting for the values covered by the
1020 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
1021 Formal_Derived_Matching.
1022 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
1023 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
1024 Formal_Derived_Matching formal to Subtypes_Statically_Match.
1025 (Subtypes_Statically_Match): Suppress the Object_Size matching
1026 test in the case where Formal_Derived_Matching is True.
1027 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
1028 True for Formal_Derived_Matching_Formal on the call to
1029 Subtypes_Statically_Compatible.
1031 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
1033 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
1035 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
1037 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
1038 Look through a conversion between original and packable version to get
1040 (build_component_ref): Rework comment and fix formatting.
1042 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
1044 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
1045 project-specific options.
1047 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1049 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
1050 not Constraint_Error.
1051 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
1052 * sem_ch5.adb: Code clean up.
1054 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
1056 * sem_prag.adb (Usage_Error): Remove local
1057 constant Typ. Remove the specialized diagnostics for unconstrained
1058 or tagged items as those are not part of the explicit input set
1059 of the related subprogram and should not be flagged.
1061 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1063 * sem_attr.adb: Add guard to preserve all errors.
1065 2014-02-20 Vincent Celier <celier@adacore.com>
1067 * switch-m.adb (Normalize_Compiler_Switches): Take into account
1068 switches that are recorded in ALI files: -gnateA, -gnateE,
1069 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
1071 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1073 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
1074 of an element iterator form over a formal container with an
1076 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
1077 to create declaration and loop statements for both forms of
1078 container iterators.
1079 (Expand_Formal_Container_Element_Iterator): New procedure
1080 to handle loops of the form "for E of C" when C is a formal
1082 (Expand_Formal_Container_Iterator): Code cleanup.
1084 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
1086 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
1087 (Analyze_Contract_Case): Remove the use of
1088 "may". Replace "aspect Contract_Cases" to avoid categorization
1089 of aspect vs pragma.
1090 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
1091 (Analyze_Global_Item): Remove
1092 the use of "formal", specify the subprogram. Split the
1093 error message about a state with visible refinement into
1094 two. Remove the use of "global" from "volatile global item".
1095 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
1097 (Analyze_Input_Output): Update the call to
1098 Check_Mode. Specify the duplicated item. Reword the error
1099 message concerning an input of a null output list. Use "\"
1100 for error message continuation.
1101 (Analyze_Part_Of): Remove
1102 the use of "may". Use "\" for error message continuation.
1103 (Analyze_Refined_Depends_In_Decl_Part): Update the error
1104 message concerning a useless refinement to match the format
1106 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
1107 concerning a useless refinement.
1108 (Analyze_Refinement_Clause): Use "\" for error message continuation.
1109 (Check_Constituent_Usage): Use "\" for error message continuation.
1110 (Check_Dependency_Clause): Use "\" for error message continuation.
1111 (Check_Matching_Constituent): Use "\" for error message continuation.
1112 (Check_Missing_Part_Of): Use "\" for error message continuation.
1113 (Check_Mode): Renamed to
1114 Check_Role. Update the comment on usage. Redo the error reporting
1116 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
1117 message continuation.
1118 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
1119 with comment on usage. Update all occurrences of Is_Input and Is_Output.
1120 (Inconsistent_Mode_Error): Use "\" for error message continuation.
1121 (Input_Match): Use "\" for error message continuation.
1122 (Role_Error): New routine.
1123 (Set_Convention_From_Pragma): Use "\" for error message continuation.
1124 (Usage_Error): Add local variable Error_Msg. Build specialized error
1125 message showcasing the offending item kind. Redo the diagnostics for
1126 unconstrained types.
1128 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1130 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
1131 to determine whether a type is a container type, rather than
1132 examining only its type declaration, so that subtypes and derived
1133 types are handled properly.
1135 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
1137 * gnat_ugn.texi: gnatmetric: add description of project-specific
1140 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1142 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
1143 all choices in an association for a record type have the same
1144 type, as is done for record aggregates.
1146 2014-02-20 Robert Dewar <dewar@adacore.com>
1148 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
1149 Unmodified rather than Warnings (Off). Make comments
1150 uniform in the four affected units.
1152 2014-02-20 Robert Dewar <dewar@adacore.com>
1154 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1155 Object_Size): For non-scalar types allow any value that is a
1157 * gnat_rm.texi: Document Object_Size for composites more clearly.
1159 2014-02-20 Yannick Moy <moy@adacore.com>
1161 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
1163 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1165 * stand.ads: Raise_Type: new predefined entity, used as the type
1166 of a Raise_Expression prior to resolution.
1167 * cstand.adb: Build entity for Raise_Type.
1168 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
1169 initial type of the node.
1170 * sem_type.adb (Covers): Raise_Type is compatible with all
1172 * sem_res.adb (Resolve): Remove special handling of Any_Type on
1173 Raise_Expression nodes.
1174 (Resolve_Raise_Expression): Signal ambiguity if the type of the
1175 context is still Raise_Type.
1177 2014-02-20 Robert Dewar <dewar@adacore.com>
1179 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
1180 mismatching predicates.
1181 * sem_ch6.adb (Check_Conformance): Give better messages on
1183 * sem_eval.adb (Predicates_Match): Move to spec.
1184 * sem_eval.ads (Predicates_Match): Moved here from body.
1186 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1188 * a-cbmutr.adb: Use default value in Insert_Child.
1190 2014-02-20 Vincent Celier <celier@adacore.com>
1192 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
1193 Stringt.Initialize in all project aware tools.
1195 2014-02-20 Doug Rupp <rupp@adacore.com>
1197 * gnat_ugn.texi: Document gnatbind -X option.
1198 * vms_data.ads: Minor warnings documentation reformatting.
1200 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1202 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
1203 procedure for a base type.
1205 2014-02-20 Robert Dewar <dewar@adacore.com>
1207 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
1208 expression with type info.
1209 * sem_ch13.adb: Minor reformatting.
1210 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
1211 False if predicates do not match on the two types.
1213 2014-02-20 Arnaud Charlet <charlet@adacore.com>
1215 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
1216 In Relaxed_RM_Semantics mode, allow any static integer value,
1217 for compatibility with other compilers.
1219 2014-02-20 Vincent Celier <celier@adacore.com>
1221 * errutil.adb (Initialize): Properly initialize entry in table
1222 Warnings when warnings are suppressed.
1224 2014-02-20 Robert Dewar <dewar@adacore.com>
1226 * s-os_lib.ads: Add warning about non-portability of Rename_File.
1227 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
1228 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
1229 * gnat_ugn.texi: Document no warnings on junk variable names.
1230 * layout.adb: Minor code reorganization (use Ekind_In).
1231 * stringt.adb: Move initialization of Null_String_Id to Initialize
1234 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1236 * sem_ch13.adb: Initialize optional Element_Id.
1238 2014-02-20 Robert Dewar <dewar@adacore.com>
1240 * s-os_lib.ads (Rename_File): Minor commment addition.
1242 2014-02-20 Thomas Quinot <quinot@adacore.com>
1244 * einfo.ads: Minor reformatting.
1246 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
1248 * aspects.adb (Exchange_Aspects): New routine.
1249 * aspects.ads (Exchange_Aspects): New routine.
1250 * atree.adb (Rewrite): Do not check whether the save node has
1251 aspects as it never will, instead check the node about to be clobbered.
1252 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
1253 entities of generic packages.
1254 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
1255 pointer of an aspect specification list after rewriting takes place.
1256 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
1257 specifications of the generic template and the copy used for analysis.
1258 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
1259 the aspect specifications of the generic template and the
1260 copy used for analysis.
1261 (Analyze_Package_Instantiation): Propagate the aspect specifications
1262 from the generic template to the instantiation.
1263 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
1264 specifications from the generic template to the instantiation.
1265 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
1266 Abstract_State, Initializes and Initial_Condition when they
1267 apply to a package instantiation.
1269 2014-02-20 Robert Dewar <dewar@adacore.com>
1271 * stringt.adb: Add call to Initialize in package initialization.
1273 2014-02-20 Robert Dewar <dewar@adacore.com>
1275 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
1276 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
1277 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
1278 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
1281 2014-02-20 Bob Duff <duff@adacore.com>
1283 * s-os_lib.ads: Minor: Remove incorrect comment.
1285 2014-02-20 Robert Dewar <dewar@adacore.com>
1287 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
1289 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1291 * a-cborma.adb (Assign): When creating a node without a specified
1292 element, insert an uninitialized element in the map, because
1293 the instance may provide an element type with a default
1294 initialization, e.g a scalar with a Default_Value aspect.
1295 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
1296 (Insert): In the version without explicit element, provide an
1297 uninitialized element, as above.
1298 * a-cbdlli.adb (Append): In the version without explicit element,
1299 provide an uninitalized element, as above.
1300 (Allocate): Remove unused version.
1302 2014-02-20 Robert Dewar <dewar@adacore.com>
1304 * sem_elab.adb: Minor code reorganization (use Nkind_In).
1305 * stringt.adb: Remove temporary pragma Warnings (Off).
1306 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
1309 2014-02-20 Matthew Heaney <heaney@adacore.com>
1311 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
1314 2014-02-20 Ed Schonberg <schonberg@adacore.com>
1316 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
1317 properly the cursor type for subsequent volatile testing in SPARK
1318 mode, when domain is a formal container with an Iterabe aspect.
1320 2014-02-20 Robert Dewar <dewar@adacore.com>
1322 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
1323 (Set_Specific_Warning_Off): Add Reason argument.
1324 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
1325 (Set_Specific_Warning_Off): Add Reason argument.
1326 * erroutc.adb (Warnings_Entry): Add Reason field
1327 (Specific_Warning_Entry): Add Reason field.
1328 (Warnings_Suppressed): return String_Id for Reason.
1329 (Warning_Specifically_Suppressed): return String_Id for Reason.
1330 * erroutc.ads (Warnings_Entry): Add Reason field.
1331 (Specific_Warning_Entry): Add Reason field.
1332 (Set_Specific_Warning_Off): Add Reason argument.
1333 (Set_Warnings_Mode_Off): Add Reason argument.
1334 (Warnings_Suppressed): return String_Id for Reason.
1335 (Warning_Specifically_Suppressed): return String_Id for Reason.
1336 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
1337 (Warning_Specifically_Suppressed): returns String_Id for Reason
1338 * gnat_rm.texi: Document that Warning parameter is string literal
1339 or a concatenation of string literals.
1340 * par-prag.adb: New handling for Reason argument.
1341 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
1342 for Reason argument.
1343 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
1344 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
1345 * stringt.adb: Set Null_String_Id.
1346 * stringt.ads (Null_String_Id): New constant.
1348 2014-02-20 Robert Dewar <dewar@adacore.com>
1350 * einfo.ads: Minor comment addition: Etype of package is
1352 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
1353 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
1354 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
1355 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
1356 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
1357 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1358 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
1359 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
1360 Replace all calls with calls to New_Occurrence_Of.
1362 2014-02-20 Robert Dewar <dewar@adacore.com>
1364 * par-util.adb (Ignore, case of right paren): Make this a
1367 2014-02-19 Robert Dewar <dewar@adacore.com>
1369 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
1370 * debug.adb: Remove -gnatd.X switch, no longer used.
1371 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
1374 2014-02-19 Bob Duff <duff@adacore.com>
1376 * g-socket.ads: Minor: Correct some comments.
1378 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1380 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
1382 2014-02-19 Arnaud Charlet <charlet@adacore.com>
1384 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
1385 an error on out of range priorities if Relaxed_RM_Semantics.
1386 * sem_prag.adb (Analyze_Pragma): Ditto.
1388 2014-02-19 Bob Duff <duff@adacore.com>
1390 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
1391 where F denotes the renaming of an enumeration literal, and
1392 issue a specialized error message.
1394 2014-02-19 Matthew Heaney <heaney@adacore.com>
1396 * a-chtgop.ads (Checked_Index): New operation.
1397 (Next): Changed mode of hash table.
1398 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
1399 (Generic_Read, Reserve_Capacity): Ditto.
1400 (Generic_Equal): Detect tampering.
1401 (Next): Changed mode of hash table, detect tampering.
1402 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
1404 (Find): Changed mode of hash table.
1405 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
1406 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
1408 (Find): Changed mode of hash table, check for tampering.
1409 (Generic_Replace_Element): Check for tampering.
1410 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
1411 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
1412 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
1414 (Find, Generic_Replace_Element): Check for tampering.
1415 * a-chtgbo.ads (Checked_Index): New operation.
1416 * a-chtgbo.adb (Checked_Index): New operation
1417 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
1418 (Generic_Read, Next): Ditto.
1419 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
1420 table (Difference, Intersection): Use variable view of
1421 source, detect tampering (Find, Is_Subset, Overlap): Use
1422 variable view of container (Symmetric_Difference, Union):
1423 Detect tampering (Vet): Use Checked_Index to detect tampering
1424 (Constant_Reference, Element, Find): Use variable view of
1426 (Update_Element_Preserving_Key): Detect tampering.
1427 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
1430 (Equivalent_Sets, Overlap): Use Node's Next component.
1431 (Vet): Use Checked_Index to detect tampering.
1432 (Constant_Reference, Element, Find): Use variable view of container.
1433 (Update_Element_Preserving_Key): Detect tampering.
1434 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
1435 Element, Find): Use variable view of container.
1436 (Reference): Rename hash table component.
1437 (Vet): Use Checked_Index to detect tampering.
1439 2014-02-19 Arnaud Charlet <charlet@adacore.com>
1441 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
1444 2014-02-19 Thomas Quinot <quinot@adacore.com>
1446 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
1447 against calls without Def_Id.
1449 2014-02-19 Claire Dross <dross@adacore.com>
1451 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1452 a-cofove.ads: Add global annotations to subprograms.
1454 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1456 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
1457 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
1458 Initial_Condition no longer requires the presence of pragma
1459 Initialized. Do not try to diagnose whether all variables mentioned in
1460 pragma Initializes also appear in Initial_Condition.
1461 (Collect_Variables): Removed.
1462 (Match_Variable): Removed.
1463 (Match_Variables): Removed.
1464 (Report_Unused_Variables): Removed.
1466 2014-02-19 Thomas Quinot <quinot@adacore.com>
1468 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
1470 2014-02-19 Robert Dewar <dewar@adacore.com>
1472 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
1475 2014-02-19 Vincent Celier <celier@adacore.com>
1477 * prj-part.adb (Parse_Single_Project): Use the fully resolved
1478 project path, with all symbolic links resolved, to check if the
1479 same project is imported with a different unresolved path.
1480 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
1481 changed to Resolved_Path to reflect that all symbolic links
1484 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1486 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
1487 from sem_ch13, for use elsewhere.
1488 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
1489 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
1490 cursor type on the loop variable when the iteration is over o
1493 2014-02-19 Vincent Celier <celier@adacore.com>
1495 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
1496 for an empty Target (Check_Target): Never fail when an empty
1497 target is declared in the configuration project.
1499 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1501 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
1502 the pragma comes fron a predicate aspect and the context is a
1503 record declaration within the scope that declares the type.
1505 2014-02-19 Robert Dewar <dewar@adacore.com>
1507 * gnat_rm.texi: Minor clarifications.
1508 * expander.adb, sem_aggr.adb: Add comments.
1510 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1512 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
1513 applies to a subprogram body, the name is the current scope,
1514 rather than being declared in the current scope.
1515 (Analyze_Pragma, case No_Return): Handle properly a No_Return
1516 aspect applied to a subprogram body.
1518 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1520 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
1521 of overloaded subprograms, and fix bug in handling of primitive
1524 2014-02-19 Pascal Obry <obry@adacore.com>
1526 * s-os_lib.adb: Minor reformatting.
1528 2014-02-19 Yannick Moy <moy@adacore.com>
1530 * expander.adb (Expand): Do nothing inside generics.
1531 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
1534 2014-02-19 Yannick Moy <moy@adacore.com>
1536 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
1538 2014-02-19 Robert Dewar <dewar@adacore.com>
1540 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
1541 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
1544 2014-02-19 Claire Dross <dross@adacore.com>
1546 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1547 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
1549 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1551 * sem_ch3.adb (Analyze_Declarations): Analyze
1552 a package contract at the end of the private declarations (if
1553 applicable), otherwise analyze it and the end of the visible
1556 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1558 * style.adb (Missing_Overriding): If subprogram is an
1559 instantiation, place warning on the instance node itself,
1560 without mention of the original generic. Do not emit message
1561 if explicit Ada version is older than the introduction of the
1562 overriding indicator.
1564 2014-02-19 Yannick Moy <moy@adacore.com>
1566 * gnat_rm.texi: Doc clarifications.
1568 2014-02-19 Yannick Moy <moy@adacore.com>
1570 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
1573 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1575 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
1576 specified First primitive, rather than by name.
1577 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
1578 and extend error checking for missing primitives and incorrect
1581 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1583 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
1584 errors when a Synchronization aspect on an overriding protected
1585 operation does not match the given aspect on the overridden
1586 operation of an ancestor interface.
1588 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1590 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
1591 (Check_Loop_Pragma_Placement): Update
1592 comment on usage. Remove local variables Orig_Stmt and
1593 Within_Same_Sequence. Check that the current Loop_Invariant or
1594 Loop_Variant pragma is grouped together with other such pragmas.
1595 (Is_Loop_Pragma): New routine.
1596 (Prev_In_Loop): Removed.
1598 2014-02-19 Robert Dewar <dewar@adacore.com>
1600 * par-ch6.adb (P_Return): For extended return, end column lines
1602 * par.adb: Minor documentation clarification.
1604 2014-02-19 Yannick Moy <moy@adacore.com>
1606 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
1607 that Loop_Invariant and Loop_Variant appear consecutively.
1608 * gnat_rm.texi Update documentation of Loop_Invariant and
1609 Loop_Variant pragmas.
1611 2014-02-19 Robert Dewar <dewar@adacore.com>
1613 * debug.adb: Document -gnatd.X.
1614 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
1616 (Check_Then_Column): Ditto.
1617 * styleg.adb (Check_Then): Allow THEN on line after IF.
1618 (Check_Then): Check THEN placement under control of -gnatd.X
1619 * styleg.ads (Check_Then): Now called even if THEN is not first
1621 * stylesw.ads (Style_Check_If_Then_Layout): Document new
1623 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
1625 2014-02-19 Robert Dewar <dewar@adacore.com>
1627 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
1628 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
1629 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
1630 vms_conv.adb: Fix bad layout of IF statements
1632 2014-02-19 Robert Dewar <dewar@adacore.com>
1634 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
1636 2014-02-19 Robert Dewar <dewar@adacore.com>
1638 * exp_util.adb: Update comments.
1640 2014-02-19 Doug Rupp <rupp@adacore.com>
1642 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
1643 * init.c (__gl_float_format): [VMS] New global.
1644 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
1645 representation in effect.
1647 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1649 * exp_ch6.adb Add with and use clause for Exp_Prag.
1650 (Expand_Contract_Cases): Relocated to Exp_Prag.
1651 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
1652 * exp_prag.adb Add with and use clauses for Checks and Validsw.
1653 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
1654 structure of the expanded code to showcase the evaluation of
1655 attribute 'Old prefixes. Add local variable Old_Evals. Expand
1656 any attribute 'Old references found within a consequence. Add
1657 circuitry to evaluate the prefixes of attribute 'Old that
1658 belong to a selected consequence.
1659 (Expand_Old_In_Consequence): New routine.
1660 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
1661 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
1662 potentially unevaluated prefix is always evaluated.
1664 2014-02-19 Robert Dewar <dewar@adacore.com>
1666 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
1667 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
1668 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
1669 handling for the case of Modify_Tree_For_C, this approach did
1671 * exp_util.adb (Matching_Standard_Type): New function
1672 (Side_Effect_Free): New top level functions (from
1673 Remove_Side_Effects).
1674 * exp_util.ads (Side_Effect_Free): New top level functions
1676 * sinfo.ads: Minor comment updates.
1678 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1680 * exp_ch6.adb (Expand_Simple_Function_Return): If return
1681 type is unconstrained and uses the secondary stack, mark the
1682 enclosing function accordingly, to ensure that the value is not
1683 prematurely removed.
1685 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1687 * par.adb Alphabetize the routines in Par.Sync.
1688 (Resync_Past_Malformed_Aspect): New routine.
1689 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
1690 variables. Code and comment reformatting. Detect missing
1691 parentheses on aspects [Refined_]Global and [Refined_]Depends
1692 with a non-null definition.
1693 * par-sync.adb: Alphabetize all routines in this separate unit.
1694 (Resync_Past_Malformed_Aspect): New routine.
1696 2014-02-19 Robert Dewar <dewar@adacore.com>
1698 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
1699 if Esize values do not match.
1701 2014-02-19 Yannick Moy <moy@adacore.com>
1703 * sinfo.ads: Minor comment update.
1705 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1707 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
1709 2014-02-19 Thomas Quinot <quinot@adacore.com>
1711 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
1712 that has the No_Ctrl_Actions flag is a suitable node to be
1713 wrapped if the assigned expression has no finalization actions.
1714 * sem_eval.adb (Eval_Entity_Name): For a compile time known
1715 boolean value, mark the corresponding condition SCO as constant.
1717 2014-02-19 Robert Dewar <dewar@adacore.com>
1719 * exp_util.adb: Minor reformatting.
1720 * exp_util.ads (Matching_Standard_Type): New function.
1721 * exp_ch7.adb: Minor reformatting.
1723 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1725 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
1726 to find declaration for Cursor, to handle properly the case of
1727 a discriminated iterable type.
1729 2014-02-19 Vincent Celier <celier@adacore.com>
1731 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
1732 imported library projects with the library ALI dirs, when setting
1734 * prj-env.ads (Ada_Objects_Path): Correct comments about
1735 argument Including_Libraries.
1737 2014-02-19 Gary Dismukes <dismukes@adacore.com>
1739 * gnat_rm.texi: Minor spelling fixes.
1741 2014-02-19 Doug Rupp <rupp@adacore.com>
1743 * init.c: Remove unneeded code.
1744 * fe.h (Float_Format): New macro
1745 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
1747 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1749 * sem_prag.adb (Check_Refined_Global_Item):
1750 A state or variable acts as a constituent only it is part of an
1751 encapsulating state and the state has visible refinement.
1753 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1755 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
1756 postcondition for a function when the expression does not mention
1757 'Result but the function has in-out parameters.
1759 2014-02-19 Robert Dewar <dewar@adacore.com>
1761 * gnat_rm.texi: Add documentation on Value_Size forcing biased
1764 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1766 * lib-xref.ads Remove the small table of letter and symbol usage as we
1769 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1771 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
1772 messages depending on the offending misplaced aspect specifications.
1773 (Diagnose_Misplaced_Aspect_Specifications): New routine.
1775 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1777 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
1778 for iterable aspect primitives.
1779 (Resolve_Iterable_Operation): Use expected signature of iterable
1780 aspect to resolve primitive when overloading is present.
1781 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
1782 (Check_Signature): Removed.
1784 2014-02-19 Yannick Moy <moy@adacore.com>
1786 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
1787 subunit in GNATprove_Mode.
1788 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
1790 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1792 * lib-xref.ads Alphabetize the contents of table
1793 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
1794 for E_Abstract_State. List all letters and symbols in use.
1795 * sem_prag.adb (Analyze_Abstract_State): Update all calls
1796 to Create_Abstract_State to reflect the new signature.
1797 (Create_Abstract_State): Change subprogram profile and update
1798 the comment on usage. Use the proper location of the state
1799 declaration when creating a new abstract state entity. Do not
1800 generate an external name, but simply reuse the name coming from
1801 the state declaration.
1803 2014-02-19 Robert Dewar <dewar@adacore.com>
1805 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
1806 declarations get properly inserted in Modify_Tree_For_C mode.
1807 * sinfo.ads: Minor comment addition.
1809 2014-02-19 Robert Dewar <dewar@adacore.com>
1811 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
1812 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
1814 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1816 * style.adb (Missing_Overriding): Warning does not apply in
1817 language versions prior to Ada 2005.
1818 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
1819 * sem_attr.adb: Add Attribute_Iterable where needed.
1820 * exp_attr.adb: ditto.
1821 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
1822 handle loops and quantified expressions over types that have an
1823 iterable aspect. Called from Expand_Iterator_Loop.
1824 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
1825 with Iterable aspect.
1826 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
1827 subprograms specified in the Iterable aspect have the proper
1828 signature involving container and cursor.
1829 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
1830 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
1831 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
1832 New procedure to retrieve one of the primitives First, Last,
1833 or Has_Element, from the value of the iterable aspect of a
1835 (Is_Container_Element): Predicate to recognize expressions
1836 that denote an element of one of the predefined containers,
1837 for possible optimization. This subprogram is not currently
1838 used, pending ARG discussions on the legality of the proposed
1839 optimization. Worth preserving for eventual use.
1840 (Is_Iterator): Recognize formal container types.
1841 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
1843 2014-02-19 Robert Dewar <dewar@adacore.com>
1845 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
1846 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
1847 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
1848 declarations from list of actions.
1849 * output.ads, output.adb (Delete_Last_Char): New procedure.
1850 * sinfo.ads: Document handling of Mod and expression with actions
1851 in Modify_Tree_For_C mode.
1853 2014-02-19 Ed Schonberg <schonberg@adacore.com>
1855 * par-ch9.adb (P_Task): Add a null statement to produce a
1856 well-formed task body when due to a previous syntax error the
1857 statement list is empty.
1859 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1861 * sem_prag.adb (Check_Dependency_Clause): Account
1862 for the case where a state with a non-null refinement matches a
1863 null output list. Comment reformatting.
1864 (Inputs_Match): Copy a solitary input to avoid an assertion failure
1865 when trying to match the same input in multiple clauses.
1867 2014-02-19 Gary Dismukes <dismukes@adacore.com>
1869 * sem_attr.adb: Minor typo fix.
1871 2014-02-18 Robert Dewar <dewar@adacore.com>
1873 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
1874 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
1875 (Create_Standard): Create new unsigned types.
1876 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
1877 mode (Expand_N_Reference): Removed, problematic and not needed
1879 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
1881 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
1882 * expander.adb: Remove call to Expand_N_Reference (problematic,
1883 and not needed now).
1884 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
1885 * stand.adb: Read and write unsigned type entities.
1886 * stand.ads: Add new unsigned types.
1888 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
1890 * sem_ch4.adb (Analyze_Call): Do not mark a function call
1891 as being inside an assertion expression as the flag is now removed.
1892 (Check_Ghost_Subprogram_Call): Do not query the
1893 In_Assertion_Expression flag as it is now removed, instead use
1894 a predicate function.
1895 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
1896 In_Assertion_Expression flag as it is now removed, instead use
1897 a predicate function.
1898 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
1899 * sem_util.adb Add with and use clause for Sem_Prag.
1900 (In_Assertion_Expression_Pragma): New routine.
1901 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
1902 * sinfo.adb (In_Assertion_Expression): Removed.
1903 (Set_In_Assertion_Expression): Removed.
1904 * sinfo.ads Remove flag In_Assertion_Expression along with its
1906 (In_Assertion_Expression): Removed along with
1907 pragma Inline. (Set_In_Assertion_Expression): Removed along
1910 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
1912 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
1913 used together with '-r', '-rf' or '-rnb' options.
1915 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
1917 * sem_attr.adb (Analyze_Attribute): Comment
1918 and code reformatting. Use separate routines to check the
1919 legality of attribute 'Old in certain pragmas. Verify
1920 the use of 'Old, 'Result and locally declared entities
1921 within the prefix of 'Old.
1922 (Check_References_In_Prefix): New routine.
1923 (Check_Use_In_Contract_Cases): New routine.
1924 (Check_Use_In_Test_Case): New routine.
1926 2014-02-18 Vincent Celier <celier@adacore.com>
1928 * sem_aux.adb (Is_By_Reference_Type): For each components of
1929 a record type, check also if the component is volatile as it
1930 may have an aspect that makes it volatile. If it is, then the
1931 record type is a by reference type.
1933 2014-02-18 Robert Dewar <dewar@adacore.com>
1935 * exp_attr.adb: Minor reformatting.
1936 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
1937 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
1938 as another case where we don't generate N_Reference nodes for
1940 * expander.adb (Expand): Add call to Expand_N_Reference.
1942 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
1944 * sem_prag.adb (Analyze_Refined_Pragma): Remove
1945 local variable Pack_Spec. Refinement pragmas may now apply to
1946 bodies of both visible and private subprograms.
1948 2014-02-06 Robert Dewar <dewar@adacore.com>
1950 * exp_attr.adb (Expand_Loop_Entry_Attribute):
1951 Minor change (Attr => N) (Expand_Pred_Succ): New name
1952 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
1953 Max): Expand into if expression if Modify_Tree_For_C mode.
1954 (Expand_N_Attribute_Reference, case Min): ditto
1955 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
1958 2014-02-06 Ed Schonberg <schonberg@adacore.com>
1960 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
1961 predicate check if this is an internal declaration with
1962 No_Initialization set, as for an expanded aggregate component.
1964 2014-02-06 Doug Rupp <rupp@adacore.com>
1966 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
1967 conditions with severity of "SUCCESS" or "INFORMATIONAL".
1969 2014-02-06 Yannick Moy <moy@adacore.com>
1971 * sem_prag.adb (Analyze_Pragma): Analyze pragma
1972 Debug rewritten node before rewriting it as a null statement in
1975 2014-02-06 Robert Dewar <dewar@adacore.com>
1977 * sem_attr.adb (Min_Max): New procedure.
1978 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
1981 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
1983 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
1986 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
1988 * sem_prag.adb (Analyze_Abstract_State): Update
1989 all calls to Create_Abstract_State to pass the proper state
1991 (Create_Abstract_State): Add new formal parameter
1992 State_Decl along with comment on usage. Establish a link between
1993 the abstract state entity and the state declaration.
1995 2014-02-06 Robert Dewar <dewar@adacore.com>
1997 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
1998 comparison of unordered enumeration type.
1999 (Analyze_Attribute, case Max): Check for improper comparison of
2000 unordered enumeration type.
2001 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
2003 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
2004 Moved here from Sem_Res.
2006 2014-02-06 Robert Dewar <dewar@adacore.com>
2008 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
2011 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2013 * sem_ch6.adb (Process_Formals): Error message reformatting.
2015 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2017 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
2018 variable Spec. Do not inherit the null indicator from the
2019 subprogram body when generating the spec.
2021 2014-02-06 Robert Dewar <dewar@adacore.com>
2023 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
2026 2014-02-06 Ed Schonberg <schonberg@adacore.com>
2028 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
2029 when the function has a foreign convention, but not if only the
2030 limited return type has such a convention.
2032 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2034 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
2035 variable Spec. Comment reformatting. Use Copy_Separate_Tree
2036 rather than New_Copy_Tree when building the corresponding
2037 subprogram declaration.
2039 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2041 * sem_prag.adb (Analyze_Global_Item): Remove
2042 the mode-related checks on abstract states with enabled external
2044 (Property_Error): Removed.
2046 2014-02-06 Javier Miranda <miranda@adacore.com>
2048 * lib-xref.adb (Generate_Reference): When
2049 generating the reference to the first private entity take care
2050 of handling swapped entities.
2052 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
2054 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2057 2014-02-06 Robert Dewar <dewar@adacore.com>
2059 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
2060 than the word size when operating in Modify_Tree_For_C mode.
2061 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
2063 2014-02-06 Robert Dewar <dewar@adacore.com>
2065 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
2066 compare is case insensitive.
2067 * gnat_rm.texi: Document that string compare for Warnings Off
2068 is now case insensitive.
2070 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
2072 * gnat_rm.texi: Small wording tweak.
2074 2014-02-06 Pascal Obry <obry@adacore.com>
2076 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
2077 and Included_Artifact_Patterns attribute definitions.
2079 2014-02-06 Yannick Moy <moy@adacore.com>
2081 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2082 SPARK_Mode pragma component for all subprograms, including stubs.
2084 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2086 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
2087 the configuration options of the enclosing context in a
2089 (Analyze_Subprogram_Body_Stub): Maintain the
2090 configuration options of the enclosing context in a stack-like
2093 2014-02-06 Robert Dewar <dewar@adacore.com>
2095 * debug.adb: -gnatd.u sets Modify_Tree_For C
2096 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
2097 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
2098 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
2099 * exp_intr.adb (Expand_Shift): Call expander so we do
2100 Modify_Tree_For_C expansions.
2101 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2104 2014-02-06 Fedor Rybin <frybin@adacore.com>
2106 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
2107 after the phase 1 of the processing of each aggregated project
2108 to get access to project trees of aggregated projects.
2109 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
2110 If specified, On_New_Tree_Loaded is called after each aggregated
2111 project has been processed succesfully.
2112 (Process): new parameter On_New_Tree_Loaded.
2113 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
2114 callback added after processing of each aggregated project.
2115 (Recursive_Process): new parameter On_New_Tree_Loaded.
2116 (Process): new parameter On_New_Tree_Loaded.
2117 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
2118 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
2120 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
2123 2014-02-06 Bob Duff <duff@adacore.com>
2125 * gnat_ugn.texi: Implement --insert-blank-lines and
2126 --preserve-blank-lines switches.
2128 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
2130 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2133 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
2135 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
2136 of the pragma on individual objects.
2138 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2140 * einfo.adb Node29 is now used as BIP_Initialization_Call.
2141 (BIP_Initialization_Call): New routine.
2142 (Set_BIP_Initialization_Call): New routine.
2143 (Write_Field29_Name): Add an entry for constants and variables.
2144 * einfo.ads Add new attribute BIP_Initialization_Call and update
2146 (BIP_Initialization_Call): New routine along with pragma Inline.
2147 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
2148 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2149 Add local declaration Res_Decl. Capture the build-in-place
2150 initialization call when the related object declaration has
2151 created a transient block.
2152 * exp_ch7.adb (Process_Transient_Objects): Add local variable
2153 Fin_Insrt. Recognize a scenario where an object declaration acts
2154 as a transient context and is initialized by a build-in-place
2157 2014-02-06 Pascal Obry <obry@adacore.com>
2159 * prj-util.adb (For_Interface_Sources): Fix handling of required
2160 bodies for aggregate libs.
2162 2014-02-06 Robert Dewar <dewar@adacore.com>
2164 * nlists.ads: Minor comment clarifications.
2166 2014-02-06 Robert Dewar <dewar@adacore.com>
2168 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2170 * opt.ads (Modify_Tree_For_C): New flag.
2171 * output.ads, output.adb (Last_Char): New function.
2173 2014-02-06 Pascal Obry <obry@adacore.com>
2175 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
2176 share/gpr for cross-builds.
2178 2014-02-06 Robert Dewar <dewar@adacore.com>
2180 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
2181 Minor reformatting and code clean ups.
2183 2014-02-06 Pascal Obry <obry@adacore.com>
2185 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
2186 * prj.ads: Minor typo fix in comment.
2188 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2190 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
2191 local variable Expr. Flag clauses with extra parenthesis as this
2192 is not allowed by the syntax of the pragma. Code reformatting.
2194 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2196 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
2197 variables. Rename variabme Tnn to Temp. Do not create a temporary
2198 if assertions are disabled. Find enclosing routine _Postconditions
2199 and insert the temporary that captures the value of the prefix
2201 * exp_ch6.adb (Build_Postconditions_Procedure):
2202 Insert the generated _Postconditions routine
2203 before the first source declaration of the related
2205 (Insert_After_Last_Declaration): Removed.
2206 (Insert_Before_First_Source_Declaration): New routine.
2208 2014-02-06 Ed Schonberg <schonberg@adacore.com>
2210 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
2211 Utility to determine whether current expansion is for the body
2212 of a predefined primitive operation.
2213 (Make_Predicate_Check): Use Within_Internal_Subpgram
2214 * checks.adb (Apply_Predicate_Check): Use
2215 Within_Internal_Subprogram
2216 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
2218 2014-02-06 Pascal Obry <obry@adacore.com>
2220 * prj.ads, prj-util.adb: Minor reformatting.
2222 2014-02-06 Ed Schonberg <schonberg@adacore.com>
2224 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
2225 Take into account the Split_PPC flag to ensure that conjuncts
2226 in a composite postcondition aspect are tested in source order.
2228 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2230 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
2232 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
2233 illegal use of SPARK_Mode.
2234 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
2235 * sem_prag.adb (Analyze_Pragma): Code reformatting.
2236 * sem_util.adb Add with and use clause for Aspects.
2237 (Check_SPARK_Mode_In_Generic): New routine.
2238 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
2240 2014-02-06 Thomas Quinot <quinot@adacore.com>
2242 * a-calend.adb (Formatting_Operations.Split): Ensure that
2243 Time_Error is raised for invalid time values.
2245 2014-02-06 Arnaud Charlet <charlet@adacore.com>
2247 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
2250 2014-02-06 Robert Dewar <dewar@adacore.com>
2252 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
2253 * exp_ch3.adb (Build_Dcheck_Function): Set
2254 Is_Discriminant_Check_Function.
2256 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2258 * exp_ch7.adb (Is_Subprogram_Call): Inspect
2259 the original tree in certain cases where a construct has been
2260 factored out and replaced by a reference to a temporary.
2262 2014-02-06 Ed Schonberg <schonberg@adacore.com>
2264 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
2265 parameters when propagating predicate function to full view.
2266 (Find_Type_Of_Object): Freeze base type of object type to catch
2267 premature use of discriminated private type without a full view.
2269 2014-02-06 Robert Dewar <dewar@adacore.com>
2271 * sprint.adb: Minor reformatting.
2273 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2275 * exp_ch4.adb (Process_Transient_Object): Add local variable
2276 Temp_Ins. When the transient object is initialized by an
2277 aggregate, the hook must capture the object after the last
2278 component assignment takes place.
2279 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
2280 routine Is_Subprogram_Call.
2281 (Is_Subprogram_Call): Inspect an
2282 aggregate that has been heavily expanded for subprogram calls.
2283 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
2284 and Temp_Ins. Remove the nested declare block and adjust the
2285 indentation. When the transient object is initialized by an
2286 aggregate, the hook must capture the object after the last
2287 component assignment takes place.
2289 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2291 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
2292 external states with enabled properties that do not match the
2294 (Property_Error): New routine.
2295 * sem_res.adb (Property_Error): New routine.
2296 (Resolve_Actuals): Detect illegal uses of external variables with
2297 enabled properties in procedure calls that do not match the mode of
2298 the corresponding formal parameter.
2300 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2302 * sem_util.adb (Has_Enabled_Property): Rename
2303 formal parameter Prop_Nam to Property. Update the comment on usage
2304 and all occurrences in the body. Add local variable Prop_Nam. When
2305 inspecting a property with an expression, the property name
2306 appears as the first choice of the component association.
2308 2014-02-04 Robert Dewar <dewar@adacore.com>
2310 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
2312 2014-02-04 Gary Dismukes <dismukes@adacore.com>
2314 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
2315 for consistency with other messages.
2317 2014-02-04 Ed Schonberg <schonberg@adacore.com>
2319 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
2320 iterator, indicate that the element is a constant if the container
2321 type does not have a variable indexing aspect.
2322 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
2323 marked as constant, do not reset its Ekind, to ensure that
2324 container elements in an element loop are not modified if the
2325 container (e.g. a hashed set) only has a constant indexing aspect.
2327 2014-02-04 Arnaud Charlet <charlet@adacore.com>
2329 * g-souinf.ads: Subprograms in this unit are actually not pure.
2330 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
2331 * einfo.ads (Is_Pure): Update doc to match implementation.
2333 2014-02-04 Gary Dismukes <dismukes@adacore.com>
2335 * exp_ch13.adb: Minor spelling fix.
2337 2014-02-04 Robert Dewar <dewar@adacore.com>
2339 * opt.ads: Minor comment update.
2341 2014-02-04 Robert Dewar <dewar@adacore.com>
2343 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
2346 2014-02-04 Ed Schonberg <schonberg@adacore.com>
2348 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
2349 on null expressions if component type is non-null, when the
2350 corresponding association covers an empty range of index values.
2352 2014-02-04 Robert Dewar <dewar@adacore.com>
2354 * sinfo.ads: Further comments on N_Expression_With_Actions node.
2356 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
2358 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2359 variables Out_Items and Ref_Global. Remove local constant
2360 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
2361 and D8. Remove the useless collection of global items as this
2362 was a leftover from an earlier version of the routine. Move
2363 several routines out to avoid deep nesting and indentation.
2364 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
2365 parameter Do_Checks to Post_Errors. Update the comment on usage.
2366 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
2367 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
2368 to Post_Errors. Update the comment on usage. Account for the
2369 case where a self referential state may have a null input_list.
2370 (Is_Self_Referential): New routine.
2372 2014-02-04 Ed Schonberg <schonberg@adacore.com>
2374 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
2375 entity renames an expression, as in the case of an object of
2376 an unconstrained type initialized by a function call, defer the
2377 rewriting of the expression to the expander.
2378 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2379 'Alignment): If the entity renames an expression, introduce
2380 temporary to capture value, and rewrite original declaration to
2383 2014-02-04 Gary Dismukes <dismukes@adacore.com>
2385 * g-comlin.adb: Minor typo fix.
2387 2014-02-04 Ed Schonberg <schonberg@adacore.com>
2389 * freeze.adb (Freeze_All): Types derived from a formal
2390 access_to_classwide type do not have a finalization master.
2392 2014-02-04 Robert Dewar <dewar@adacore.com>
2394 * sprint.adb: Minor reformatting.
2396 2014-02-04 Robert Dewar <dewar@adacore.com>
2398 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
2399 cases where Actions is a null list.
2400 * sinfo.ads (N_Expression_With_Actions): Actions can be
2401 temporarily empty during semantic analysis, but must be non-empty
2402 in the final expanded tree.
2404 2014-01-31 Robert Dewar <dewar@adacore.com>
2406 * exp_ch9.adb: Minor reformatting.
2408 2014-01-31 Emmanuel Briot <briot@adacore.com>
2410 * g-comlin.adb (Set_Command_Line): Take the switches
2411 configuration from the Command_Line_Config.
2413 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
2415 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
2418 2014-01-31 Vincent Celier <celier@adacore.com>
2420 * projects.texi: Add more documentation about others used as an
2421 index in indexed attributes.
2423 2014-01-31 Robert Dewar <dewar@adacore.com>
2425 * gnat_ugn.texi: Minor update.
2426 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
2427 * exp_util.adb: Minor reformatting.
2429 2014-01-31 Ed Schonberg <schonberg@adacore.com>
2431 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
2432 depends on data that is not private to the protected object,
2433 and potentially modifiable in unsynchronized fashion.
2435 2014-01-31 Yannick Moy <moy@adacore.com>
2437 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
2440 2014-01-31 Robert Dewar <dewar@adacore.com>
2442 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
2443 for Unknown_Package.
2444 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
2446 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
2448 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
2449 the logic that generates a runtime check to determine the
2450 controlled status of the object about to be allocated or
2451 deallocated. Class-wide types now always use a runtime check
2452 even if they appear as generic actuals.
2453 (Find_Object): Detect
2454 a special case that involves interface class-wide types because
2455 the object appears as a complex expression.
2457 2014-01-31 Ed Schonberg <schonberg@adacore.com>
2459 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
2460 subprogram with an incomplete untagged formals on the list of
2461 private dependents, to verify that the type is properly completed
2462 in the private part.
2463 * sem_attr.adb: Code clean up.
2465 2014-01-31 Robert Dewar <dewar@adacore.com>
2467 * exp_ch6.adb: Minor reformatting.
2469 2014-01-31 Vincent Celier <celier@adacore.com>
2471 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
2472 when Pkg is unknown.
2474 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
2476 * sem_res.adb (Resolve_Entity_Name): Comment
2477 reformatting. Allow volatile objects in various generated checks.
2479 2014-01-31 Ed Schonberg <schonberg@adacore.com>
2481 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
2482 component association, set the etype of the identifier, for
2485 2014-01-31 Ed Schonberg <schonberg@adacore.com>
2487 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
2488 declared in a package, not checks can apply to the subprogram.
2490 2014-01-31 Robert Dewar <dewar@adacore.com>
2492 * erroutc.adb (Validate_Specific_Warnings): Warnings are
2493 controlled -gnatw.W.
2494 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
2495 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
2497 2014-01-31 Arnaud Charlet <charlet@adacore.com>
2499 * exp_disp.adb: Update comments.
2501 2014-01-31 Yannick Moy <moy@adacore.com>
2503 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
2504 Save_Global_References): Guard access to expression in aspect.
2506 2014-01-31 Yannick Moy <moy@adacore.com>
2508 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
2509 Issue an error when the pragma is applied to a generic unit,
2510 a generic declaration, or inside a generic.
2512 2014-01-31 Yannick Moy <moy@adacore.com>
2514 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
2517 2014-01-31 Robert Dewar <dewar@adacore.com>
2519 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
2522 2014-01-31 Tristan Gingold <gingold@adacore.com>
2524 * exp_disp.adb: Add a historic note.
2526 2014-01-31 Robert Dewar <dewar@adacore.com>
2528 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
2529 Process_Deferred_References.
2531 2014-01-31 Yannick Moy <moy@adacore.com>
2533 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
2534 ineffective pragma Warnings(Off) in GNATprove_Mode.
2536 2014-01-31 Bob Duff <duff@adacore.com>
2538 * s-taskin.ads: Minor comment fix.
2539 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
2540 just direct dependents. If this is actually an abort, each task
2541 will take care of aborting its dependents, so all dependents will
2542 get aborted, as before. However, when this is called the second
2543 time from Vulnerable_Complete_Master "for convenience" (i.e. to
2544 kill off tasks waiting at terminate alternatives), aborting
2545 indirect dependents is wrong, because it causes some unrelated
2546 tasks to get aborted.
2548 2014-01-31 Robert Dewar <dewar@adacore.com>
2550 * sem_ch4.adb: Minor reformatting.
2552 2014-01-31 Robert Dewar <dewar@adacore.com>
2554 * exp_ch2.adb: New calling sequence for Is_LHS.
2555 * frontend.adb: Add call to Process_Deferred_References.
2556 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
2557 (Deferred_References): New table.
2558 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
2560 (Find_Expanded_Name): Ditto.
2561 * sem_res.adb: New calling sequence for Is_LHS.
2562 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
2563 * sem_warn.adb: Call Process_Deferred_References before issuing
2566 2014-01-31 Tristan Gingold <gingold@adacore.com>
2568 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
2569 use of System_Tasking_Protected_Objects_Single_Entry.
2570 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
2571 of Protected_Single_Entry_Call.
2572 (Expand_N_Timed_Entry_Call): Remove single_entry case.
2573 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
2575 (Make_Disp_Timed_Select_Body): Likewise.
2576 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
2577 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
2579 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
2580 (Wait_For_Completion_With_Timeout): Remove.
2581 (Protected_Single_Entry_Call): Remove Mode parameter
2582 (always Simple_Call).
2583 (Service_Entry): Remove Self_Id constant (not used anymore).
2584 (Timed_Protected_Single_Entry_Call): Remove.
2585 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
2586 (Protected_Single_Entry_Call): Remove Mode parameter.
2588 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
2590 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
2591 * einfo.ads (Get_Pragma): Update the comment on special pragmas
2592 handled by this routine.
2593 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
2594 to the contract of the related subprogram body.
2595 * sem_util.adb (Add_Contract_Item): Handle the insertion of
2596 pragma Refined_Post into the contract of a subprogram body.
2597 * sinfo.ads Update the documentation of node N_Contract.
2598 * sem_res.adb (Resolve_Entity_Name): Add a guard
2599 to detect abstract states and variables only when checking the
2600 SPARK 2014 rules concerning volatile object placement.
2602 2014-01-29 Ed Schonberg <schonberg@adacore.com>
2604 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
2605 null is compatible with any access type.
2607 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
2609 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
2610 placement is not in a package.
2612 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
2614 * sem_util.adb (Has_Enabled_Property): Compare the character field of
2617 2014-01-29 Robert Dewar <dewar@adacore.com>
2619 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
2620 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
2621 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
2623 2014-01-29 Robert Dewar <dewar@adacore.com>
2625 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
2626 * sem_warn.adb (Check_References): Suppress warnings if inside
2627 Initial_Condition pragma.
2629 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
2631 * sem_prag.adb (Check_Missing_Part_Of): List all values of
2632 State_Space_Kind for readability reasons. Do not emit an error on
2633 a private item when the enclosing package lacks aspect/pragma
2634 Abstract_State. Do not emit an error on a private package
2635 instantiation when the corresponding generic template lacks
2637 (Has_Visible_State): New routine.
2638 * sem_util.adb (Find_Placement_In_State_Space): The visible
2639 declarations of any kind of child units in general act as proper
2642 2014-01-29 Robert Dewar <dewar@adacore.com>
2644 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
2645 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
2646 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
2647 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
2648 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
2649 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
2650 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
2651 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
2652 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
2653 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
2654 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
2655 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
2656 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
2657 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
2658 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
2659 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
2660 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
2661 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
2662 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
2663 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
2664 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
2665 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
2666 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
2667 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
2668 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
2669 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
2670 s-regpat.adb, s-secsta.adb, s-stalib.ads,
2671 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
2672 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
2673 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
2674 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
2675 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
2677 2014-01-29 Robert Dewar <dewar@adacore.com>
2679 * expander.adb: Minor reformatting.
2681 2014-01-29 Javier Miranda <miranda@adacore.com>
2683 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
2686 2014-01-29 Javier Miranda <miranda@adacore.com>
2688 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
2689 that checks if an interface types defines the predefined "="
2690 function because the compiler was erroneously not generating the
2691 predefined "=" primitive as soon as the name of some interface
2692 primitive is "=" (formals were not checked).
2694 2014-01-29 Ed Schonberg <schonberg@adacore.com>
2696 * expander.adb (Expander): In GNATprove mode, do not process
2697 transient scopes: they are in general not created in this mode,
2698 and an attempt to examine them will lead to constraint errors when
2699 processing configuration pragmas that have analyzable expressions.
2701 2014-01-29 Vincent Celier <celier@adacore.com>
2703 * clean.adb (Gnatclean): Fail if main project is an aggregate
2704 project or if there is an aggregate library project in the
2706 * gnatcmd.adb: Fail if the main project is an aggregate project
2707 or if there is an aggegate library project in the project tree.
2708 * make.adb (Initialize): : Fail if main project is an aggregate
2709 project or if there is an aggregate library project in the
2711 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
2712 * prj-makr.adb (Initialize): Fail if the main project is an
2713 aggregate project or an aggregate library project.
2715 2014-01-29 Vincent Celier <celier@adacore.com>
2717 * prj-part.adb (Check_Import_Aggregate): New procedure
2718 to check if an imported project is an aggregate project.
2719 (Parse_Single_Project): Call Check_Import_Aggregate
2720 * projects.texi: Document that aggregate projects cannot be
2721 extended or imported.
2723 2014-01-29 Robert Dewar <dewar@adacore.com>
2725 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
2726 reformatting and code clean up.
2727 * gnat_ugn.texi: Add documentation section on Atomic Variables
2730 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
2732 * einfo.adb Flag264 is now unused.
2733 (Has_Body_References): Removed.
2734 (Set_Has_Body_References): Removed.
2735 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
2736 * einfo.ads Update the comment on usage of attribute
2737 Body_References. Remove attribute Has_Body_References and its
2739 (Has_Body_References): Removed along with pragma Inline.
2740 (Set_Has_Body_References): Removed along with pragma Inline.
2741 * sem_prag.adb (Analyze_Global_Item): Move the call to
2742 Record_Possible_Body_Reference in the state related checks
2743 section. Add a comment intended function.
2744 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
2745 in the state related checks section. Add a comment intended function.
2746 (Analyze_Refinement_Clause): Cleanup the illegal body reference
2747 reporting. Add a comment on timing of error reporting.
2748 (Record_Possible_Body_Reference): Reimplement the routine.
2750 2014-01-29 Vincent Celier <celier@adacore.com>
2752 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
2753 unit-based languages.
2754 (Mains.Complete_Mains.Do_Complete): Use the source file project
2755 tree when calling Find_File_Add_Extension. Use the correct
2756 project name when reporting an error.
2758 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
2760 * aspects.adb Add an entry for aspect Part_Of in table
2762 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
2763 Aspect_Argument, Aspect_Names and Aspect_Delay.
2764 * atree.h Define Elist9.
2765 * atree.adb (Elist9): New routine.
2766 (Set_Elist9): New routine.
2767 * atree.ads (Elist9): New routine.
2768 (Set_Elist9): New routine.
2769 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
2770 the list of node usage. Remove Refined_State from the list of
2772 (Encapsulating_State): New routine.
2774 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
2775 (Refined_State): Removed.
2776 (Set_Encapsulating_State): New routine.
2777 (Set_Part_Of_Constituents): New routine.
2778 (Set_Refined_State): Removed.
2779 (Write_Field9_Name): Add an entry
2780 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
2781 Encapsulating_State. Remove the entry for Refined_State.
2782 * einfo.ads Add new attributes Encapsulating_State
2783 and Part_Of_Constituents alond with their usage in
2784 entities. Remove attribute Refined_State along with its
2786 (Encapsulating_State): New routine and
2787 pragma Inline. (Get_Pragma): Update the comment on usage.
2788 (Part_Of_Constituents): New routine and pragma Inline.
2789 (Refined_State): Removed along with pragma Inline.
2790 (Set_Encapsulating_State): New routine and pragma Inline.
2791 (Set_Part_Of_Constituents): New routine and pragma Inline.
2792 (Set_Refined_State): Removed along with pragma Inline.
2793 * par-prag.adb Pragma Part_Of does not need any special processing
2795 * sem_ch3.adb (Analyze_Declarations): Remove local variables
2796 Body_Id and Prag. Call separate routines to analyze the
2797 contract of a package [body].
2798 (Analyze_Object_Contract):
2799 Update the comment on usage. Remove local variables
2800 Items and Nam. Use Get_Pragma rather than traversing the
2801 classification list. Verify whether the lack of indicator
2802 Part_Of agrees with the placement of the variable in state space.
2803 (Analyze_Object_Declaration): Initialize the encapsulating state
2804 of a variable. (Requires_State_Refinement): Moved to sem_util.
2805 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
2806 (Analyze_Package_Contract): New routine.
2807 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
2808 (Analyze_Package_Contract): New routine.
2809 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
2810 state and Part_Of constituents.
2811 * sem_ch13.adb (Analyze_Aspect_Specifications):
2812 Add processing for aspect Part_Of. Update all
2813 calls to Decorate_Delayed_Aspect_And_Pragma.
2814 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
2815 not need any special processing at freeze time.
2816 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
2817 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
2818 update the associated comment.
2819 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
2820 (Analyze_Abstract_State): Add new global variable State_Id. Remove
2821 local constants Errors and Loc. Remove local variables Is_Null
2822 and State_Nam. Create the entity of the abstract state on the
2823 spot, before all remaining checks are performed. Verify that a
2824 missing Part_Of option agrees with the placement of the abstract
2825 state within the state space.
2826 (Analyze_Depends_In_Decl_Part):
2827 Add new global variables Constits_Seen and States_Seen. Check
2828 that a state and a corresponding constituent do not appear
2829 in pragma [Refined_]Depends.
2830 (Analyze_Global_In_Decl_Part):
2831 Add new global variables Constits_Seen and States_Seen. Check
2832 that a state and a corresponding constituent do not appear
2833 in pragma [Refined_]Global.
2834 (Analyze_Global_Item):
2835 Remove the now obsolete code that deals with Part_Of.
2836 Add the entity of the global item to the list of processed
2837 items. (Analyze_Initializes_In_Decl_Part): Add new global
2838 variables Constits_Seen and States_Seen. Check that a state
2839 and a corresponding constituent do not appear in pragma
2841 (Analyze_Initialization_Item): Add the entity
2842 of the initialization item to the list of processed items.
2843 (Analyze_Input_Item): Add the entity of the initialization
2844 item to the list of processed items.
2845 (Analyze_Input_Output):
2846 Remove the now obsolete code that deals with Part_Of. Add the
2847 entity of the input/output to the list of processed items.
2848 (Analyze_Part_Of): New routine.
2849 (Analyze_Part_Of_Option): Remove
2850 local constant Par_State. Add local constant Encaps and local
2851 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
2852 the option. Turn the related state into a Part_Of constituent
2853 if the option is legal.
2854 (Analyze_Pragma): Add processing
2856 (Analyze_Refined_State_In_Decl_Part):
2857 Remove global constants Pack_Body and Spec_Id. Remove
2858 global variables Abstr_States and Hidden_States. Add new
2859 global variables Available_States, Body_Id, Body_States and
2860 Spec_Id. Add new local constant Body_Decl. Reimplement the
2861 logic that extracts the states available for refinement from
2862 the related package and the body hidden states of the said
2864 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
2865 (Check_Applicable_Policy): Alphabetize body.
2866 (Check_Dependency_Clause): Replace Refined_State
2867 with Encapsulating_State.
2868 (Check_Matching_Constituent):
2869 Reimplement the logic that determines whether an item is a valid
2870 / invalid constituent of the current refined state. Return when
2871 a construct does not denote a valid abstract state. Extract the
2872 list of Part_Of constituents for further analysis. Check that all
2873 Part_Of constituents of a state have been used in its refinement.
2874 (Check_Matching_State): Update the comment on usage. Operate
2875 on the list of available states.
2876 (Check_Missing_Part_Of): New routine.
2877 (Check_Refined_Global_Item): Replace Refined_State
2878 with Encapsulating_State.
2879 (Check_State_And_Constituent_Use): New routine.
2880 (Create_Abstract_State): New routine.
2881 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
2882 (Is_Part_Of): Removed.
2883 (Collect_Body_States): New routine.
2884 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
2885 (Collect_Hidden_States): Removed.
2886 (Report_Unrefined_States): Change the profile of the procedure along
2887 with the comment on usage.
2888 (Report_Unused_Constituents): New routine.
2889 (Report_Unused_Hidden_States): Removed.
2890 (Report_Unused_States): New routine.
2891 * sem_prag.ads (Check_Missing_Part_Of): New routine.
2892 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
2893 appear in the classification pragmas of a package instantiation
2895 (Find_Placement_In_State_Space): New routine.
2896 (Is_Child): Removed.
2897 (Is_Child_Or_Sibling): Remove formal
2898 parameter Private_Child. Remove the private child checks.
2899 (Requires_State_Refinement): Moved from sem_ch3.
2900 * sem_util.ads Add new type State_Space_Kind along with
2901 comment on its usage and values.
2902 (Add_Contract_Item): Update the comment on usage.
2903 (Find_Body_Discriminal): Alphabetize spec.
2904 (Find_Placement_In_State_Space): New routine.
2905 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
2906 and update the comment on usage.
2907 (Requires_State_Refinement): Moved from sem_ch3.
2908 * sinfo.ads: Update the documentation of N_Contract.
2909 * snames.ads-tmpl The predefined name for Part_Of is now used
2910 to denote a pragma. Add Pragma_Id for Part_Of.
2912 2014-01-29 Emmanuel Briot <briot@adacore.com>
2914 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
2916 (Dump): New subprogram.
2918 2014-01-29 Tristan Gingold <gingold@adacore.com>
2920 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
2921 Expand_Entry_Declaration to factorize code.
2923 2014-01-29 Ed Schonberg <schonberg@adacore.com>
2925 * checks.adb: minor clarification.
2926 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
2927 search for primitive operations to the entities that immediately
2928 follow the type declaration.
2930 2014-01-29 Tristan Gingold <gingold@adacore.com>
2932 * exp_ch9.adb (Build_Protected_Entry): Do not call
2933 Complete_Entry_Body anymore.
2934 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
2935 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
2937 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
2939 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
2940 string when the Name input bigger than allowed. Adapt the function
2943 2014-01-29 Ed Schonberg <schonberg@adacore.com>
2945 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
2946 if expression is within a case_expression of if_expression.
2948 2014-01-29 Robert Dewar <dewar@adacore.com>
2950 * exp_ch9.adb, inline.ads: Minor reformatting.
2952 2014-01-29 Tristan Gingold <gingold@adacore.com>
2954 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
2956 2014-01-29 Yannick Moy <moy@adacore.com>
2958 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
2959 SPARK_Mode_Pragma components to be able to analyze generic
2961 * sem_ch12.adb (Analyze_Package_Instantiation,
2962 Inline_Instance_Body, Need_Subprogram_Instance_Body,
2963 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
2964 for future analysis of the instance.
2965 (Instantiate_Package_Body,
2966 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
2967 from instantiation to analyze the instance.
2969 2014-01-29 Robert Dewar <dewar@adacore.com>
2971 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
2974 2014-01-29 Yannick Moy <moy@adacore.com>
2976 * gnat_rm.texi: Update description of SPARK_Mode pragma.
2978 2014-01-29 Tristan Gingold <gingold@adacore.com>
2980 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
2982 2014-01-29 Thomas Quinot <quinot@adacore.com>
2984 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
2986 2014-01-29 Ed Schonberg <schonberg@adacore.com>
2988 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
2989 resulting string is an internal entity. and thus requires no
2990 initialization. This is relevant when Initialize_ Scalars is
2991 enabled, because the resultant spurious initialization may lead to
2992 secondary stack anomalies that produce a mangled name for a task.
2994 2014-01-29 Yannick Moy <moy@adacore.com>
2996 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
2997 not inherited from spec anymore. Check consistency
2998 rules after processing of declarations.
2999 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
3000 from spec anymore. Check consistency rules after processing of
3002 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
3004 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
3007 2014-01-27 Robert Dewar <dewar@adacore.com>
3009 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
3011 (Resolve_Range): Add type name/location to unordered msg.
3013 2014-01-27 Claire Dross <dross@adacore.com>
3015 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
3016 Capacity) is only called with Capacity >= Length (Source) and
3017 Capacity in Capacity_Range.
3018 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
3019 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
3020 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
3021 in the code is this is not the case.
3023 2014-01-27 Thomas Quinot <quinot@adacore.com>
3025 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
3026 selected component in an instance where the component of the
3027 actual is not visibile at instantiation.
3029 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3031 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
3032 has a dynamic predicate, generate freeze node for Actual_Subtype
3033 at once, because the declaration of the corresponding predicate
3034 function will make reference to it.
3036 2014-01-27 Tristan Gingold <gingold@adacore.com>
3038 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
3040 2014-01-27 Robert Dewar <dewar@adacore.com>
3042 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
3043 for 2**X optimization.
3045 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3047 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
3048 explicitly whether value is in range of Character, because the
3049 library is typically compiled with range checks disabled, and
3050 we cannot rely on the implicit check on the argument of 'Val.
3052 2014-01-27 Vincent Celier <celier@adacore.com>
3054 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
3055 not the Target to itself.
3057 2014-01-27 Robert Dewar <dewar@adacore.com>
3059 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
3060 changes to avoid incorrect use of unordered enum types.
3062 2014-01-27 Thomas Quinot <quinot@adacore.com>
3064 * sem_ch4.adb: Minor reformatting.
3066 2014-01-27 Robert Dewar <dewar@adacore.com>
3068 * scn.adb (Check_End_Of_Line): Removed.
3069 (Error_Long_Line): Removed.
3070 (Determine_License): Use versions of above routines from Scanner.
3071 * scng.adb (Check_End_Of_Line): Moved to spec.
3072 (Error_Long_Line): Removed, no longer used.
3073 * scng.ads (Check_End_Of_Line): Moved here from body.
3075 2014-01-27 Tristan Gingold <gingold@adacore.com>
3077 * exp_ch7.adb (Build_Cleanup_Statements): Call
3078 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
3080 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
3081 Remove Service_Name variable.
3082 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
3083 factorize code from the above subprograms.
3084 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
3086 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
3088 * einfo.adb (Has_Option): Reimplemented.
3089 * sem_prag.adb (Analyze_Refinement_Clause): Add global
3090 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
3091 External_Constit_Seen and State. Add local variables Body_Ref,
3092 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
3093 avoid a cumbersome while pool. Verify the legality of an external
3094 state and relevant properties.
3095 (Check_External_Property): New routine.
3096 (Check_Matching_State): Remove parameter profile
3097 and update comment on usage.
3098 (Collect_Constituent): Store the
3099 relevant external property of a constituent.
3100 * sem_util.adb (Async_Readers_Enabled): Update the call to
3101 Has_Enabled_Property.
3102 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
3103 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
3104 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
3105 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
3106 Update comment on usage. Reimplement the logic to recognize the various
3107 formats of properties.
3109 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3111 * par-ch5.adb: Minor reformatting.
3113 2014-01-27 Tristan Gingold <gingold@adacore.com>
3115 * s-tposen.ads: Harmonize style and comments.
3117 2014-01-27 Vincent Celier <celier@adacore.com>
3119 * projects.texi: Document that shared library projects, by
3120 default, cannot import projects that are not shared library
3123 2014-01-27 Robert Dewar <dewar@adacore.com>
3125 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
3128 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3130 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
3131 any other exception is raised.
3132 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
3133 still necessary to perform a conversion in order to remove overlong
3136 2014-01-27 Robert Dewar <dewar@adacore.com>
3138 * exp_smem.adb: Minor reformatting.
3140 2014-01-27 Thomas Quinot <quinot@adacore.com>
3142 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
3144 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3146 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
3147 nodes for operands to the original node for the call, to preserve
3148 Original_Node pointers within the resolved operands, given that
3149 they may have been rewritten as well. Previous approach copied
3150 the operands into a new tree and lost those pointers.
3152 2014-01-27 Claire Dross <dross@adacore.com>
3155 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
3157 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3159 * sem_util.adb (Check_Internal_Protected_Use): A call through
3160 an anonymous access parameter of the current protected function
3161 is not a potential modification of the current object.
3163 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3165 * a-cobove.adb (Reserve_Capacity): Procedure raises
3166 Capacity_Error, not Constraint_Error, when request cannot be
3169 2014-01-27 Vincent Celier <celier@adacore.com>
3171 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
3172 not the Target to itself.
3174 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3176 * exp_ch4.adb (Expand_Concatenate): If the target of the
3177 concatenation is a library-level entity, always use the off-line
3178 version of concatenation, regardless of optimization level. This
3179 is space-efficient, and prevents linking problems when some
3180 units are compiled with different optimization levels.
3182 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3184 * sem_ch5.adb: Code clean up.
3186 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3188 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
3189 when an array or container iterator includes a subtype indication,
3190 which is only legal in an element iterator.
3192 2014-01-27 Thomas Quinot <quinot@adacore.com>
3194 * exp_ch7.adb: Minor reformatting.
3196 2014-01-27 Robert Dewar <dewar@adacore.com>
3198 * opt.adb (SPARK_Mode): Default for library units is None rather
3200 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
3202 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
3204 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
3206 2014-01-27 Robert Dewar <dewar@adacore.com>
3208 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
3209 Suspicious_Labels table if we have identifier; followed by loop
3211 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
3212 * par.adb (Suspicious_Labels): New table.
3214 2014-01-27 Robert Dewar <dewar@adacore.com>
3216 * exp_aggr.adb (Check_Bounds): Reason is range check, not
3219 2014-01-27 Yannick Moy <moy@adacore.com>
3221 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
3223 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
3225 (Add_SPARK_Xrefs): Include references to constants.
3226 * spark_xrefs.ads Document new character 'c' for references to
3229 2014-01-27 Thomas Quinot <quinot@adacore.com>
3231 * exp_smem.adb (Add_Write_After): For a function call, insert write as
3232 an after action in a transient scope.
3234 2014-01-27 Thomas Quinot <quinot@adacore.com>
3236 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
3237 to a shared variable as an OUT formal in a call to an init proc,
3238 the 'Read call must be emitted after, not before, the call.
3240 2014-01-27 Robert Dewar <dewar@adacore.com>
3242 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
3244 2014-01-27 Robert Dewar <dewar@adacore.com>
3246 * a-wichha.adb (Character_Set_Version): Change to output proper
3249 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
3251 * einfo.adb (Is_Input_Only_State): Removed.
3252 (Is_Non_Volatile_State): Removed.
3253 (Is_Output_State): Removed.
3254 * einfo.ads (Is_Input_Only_State): Remove attribute and
3255 subprogram. Update related entity.
3256 (Is_Non_Volatile_State):
3257 Remove attribute and subprogram. Update related entity.
3258 (Is_Output_State): Removed attribute and subprogram. Update
3260 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
3262 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3263 an object, not just variables.
3264 (Analyze_Object_Contract): New routine.
3265 (Analyze_Variable_Contract): Removed.
3266 (Process_Discriminants): Detect an illegal use of volatile
3267 discriminant in SPARK mode.
3268 * sem_ch5.adb (Analyze_Iterator_Specification):
3269 Detect an illegal use of volatile loop variable.
3270 (Analyze_Loop_Parameter_Specification): Detect an illegal use
3271 of volatile loop variable.
3272 * sem_ch6.adb (Process_Formals): Update the volatile object
3273 detection. Detect an illegal formal of mode IN OUT or OUT in
3274 SPARK mode. Enhance the error messages with references.
3275 * sem_ch12.adb (Instantiate_Object): Update the volatile object
3276 detection. Enhance the error messages with references.
3277 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
3278 messages with references.
3279 (Analyze_Contract_Case): Enhance the error messages with references.
3280 (Analyze_External_Property): Call Check_Duplicate_Property to process
3281 an external property.
3282 (Analyze_External_Property_In_Decl_Part): New routine.
3283 (Analyze_External_State_In_Decl_Part): Removed.
3284 (Analyze_Global_Item): Detect an illegal
3285 use of a volatile constant. Detect an illegal use
3286 of a variable with enabled Effective_Reads. Enhance
3287 the error messages with references. Remove obsolete
3288 checks concerning Input_Only and Output_Only states.
3289 (Analyze_Initialization_Item): Enhance the error messages
3291 (Analyze_Initializes_In_Decl_Part): Do not
3292 collect the states and variables when the initialization list
3294 (Analyze_Input_Item): Enhance the error messages with references.
3295 (Analyze_Input_Output): Enhance the error messages with references.
3296 (Analyze_Pragma): Enhance the error messages with references.
3297 (Analyze_Refinement_Clause): Code reformatting.
3298 (Analyze_Refined_Depends_In_Decl_Part):
3299 Rename global variable Global to Reg_Global and update all
3300 occurrences. Add local variables D7 and D8. Update the error
3301 messages with references. Update the call to Collect_Global_Items.
3302 (Analyze_Refined_Global_In_Decl_Part): Add local variables
3303 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
3304 the call to Collect_Global_Items. Account for a Proof_In state
3305 in null / useless refinement checks. Verify the coverage of
3307 (Check_Dependency_Clause): Remove local variable
3308 Out_Constits. Remove the retrieval and removal of constituents
3309 for an Output_Only state. Remove the reporting of unused
3310 Output_Only state constituents.
3311 (Check_Duplicate_Mode): Enhance
3312 the error message with a reference.
3313 (Check_Duplicate_Property): New routine.
3314 (Check_Duplicate_Option): Enhance the error message with a reference.
3315 (Check_External_Properties): Enhance the error message with a reference.
3316 (Check_Function_Return): Enhance the error message with a reference.
3317 (Check_In_Out_States): Update
3318 comment on usage. Add a specialized error message for Proof_In
3319 constituents. Enhance the error message with a reference.
3320 (Check_Input_States): Update comment on usage. Account for
3321 possible Proof_In constituents. Enhance the error message
3323 (Check_Matching_Constituent): Enhance the error message with a
3325 (Check_Matching_State): Enchance the error message with a reference.
3326 (Check_Mode): Add local variable From_Global. Update the call to
3327 Find_Mode. Emit more precise error messages concerning extra items
3328 (Check_Mode_Restriction_In_Enclosing_Context): Consider
3329 pragma Refined_Global. Enhance the error message with a
3331 (Check_Mode_Restriction_In_Function): Enhance the error message with
3333 (Check_Output_States): Update comment on usage. Add local variable
3334 Posted. Account for possible Proof_In constituents. Produce a detailed
3335 list of missing constituents.
3336 (Check_Proof_In_States): New routine.
3337 (Check_Refined_Global_Item): Handle Proof_In
3338 constituents. Enchance the error message with a reference.
3339 (Collect_Global_Items): Add formal parameters Proof_In_Items
3340 and Has_Proof_In_State. Update the comment on usage. Account
3342 (Create_Or_Modify_Clause): Enchance
3343 the error message with a reference.
3345 formal parameter From_Global. Update the comment on usage.
3346 Detect when the mode is governed by pragma [Refined_]Global.
3347 (Output_Constituents): Removed.
3348 (Report_Extra_Constituents):
3349 Report extra Proof_In constituents.
3350 (Report_Unused_Constituents): Removed.
3351 (Usage_Error): Code reformatting. Enhance the error
3352 messages with reference.
3353 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
3354 (Analyze_External_State_In_Decl_Part): Removed.
3355 * sem_res.adb (Resolve_Actuals): Update the volatile object
3356 detection. Enhance the error message with a reference.
3357 (Resolve_Entity_Name): Update the volatile object
3358 detection. Enhance the error message with a reference.
3359 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
3360 (Is_SPARK_Volatile_Object): New routine.
3361 (Has_Volatile_Component): New routine.
3362 * sem_util.ads (Is_Delegate): Alphabetized.
3363 (Is_SPARK_Volatile_Object): New routine.
3364 (Has_Volatile_Component): New routine.
3365 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
3367 2014-01-27 Ed Schonberg <schonberg@adacore.com>
3369 * sem_attr.adb: Resolve fully prefix of 'Update.
3371 2014-01-27 Ben Brosgol <brosgol@adacore.com>
3373 * gnat_rm.texi: Minor clarifications.
3375 2014-01-27 Robert Dewar <dewar@adacore.com>
3377 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
3378 about call that is generated as part of an Initial_Condition
3380 * sem_prag.adb: Minor spelling correction.
3382 2014-01-27 Robert Dewar <dewar@adacore.com>
3384 * sem_prag.adb (Set_Convention_From_Pragma): Check that
3385 convention Ghost can only apply to functions.
3386 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
3388 2014-01-27 Robert Dewar <dewar@adacore.com>
3390 * gnat_ugn.texi: Add Short_Enums to documentation of
3393 2014-01-27 Robert Dewar <dewar@adacore.com>
3395 * sem_prag.adb (Analyze_Input_Item): Correct check for input
3396 item in same package.
3397 * sem_util.ads, sem_util.adb (Within_Scope): New function.
3399 2014-01-26 Arnaud Charlet <charlet@adacore.com>
3401 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
3402 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
3403 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
3404 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
3407 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
3409 * gcc-interface/Makefile.in: Fix oversight.
3411 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
3413 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
3414 conversion from a thin pointer with a shifted value.
3415 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
3416 read-only flag from the values onto the result.
3417 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
3419 2014-01-25 Tristan Gingold <gingold@adacore.com>
3421 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
3422 for E_Variable with a pragma Linker_Section.
3424 2014-01-25 Robert Dewar <dewar@adacore.com>
3426 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
3427 with Default_Value aspect is passed in by copy.
3429 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
3431 * set_targ.adb: Set Short_Enums.
3432 * gcc-interface/lang.opt (fshort-enums): New option.
3433 * gcc-interface/misc.c (gnat_handle_option): Handle it.
3434 (gnat_post_options): Do not modify the global settings.
3436 2014-01-24 Robert Dewar <dewar@adacore.com>
3438 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
3440 (Random_Decimal_Fixed): New generic function.
3441 * s-rannum.ads: Minor comment clarifications.
3443 2014-01-24 Robert Dewar <dewar@adacore.com>
3445 * back_end.adb: Remove Short_Enums handling (handled in
3446 Ttypes/Get_Targ now) Minor added comments.
3447 * freeze.adb: Change name Short_Enums_On_Target to
3449 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
3450 * opt.ads: Minor comment updates.
3451 * sem_ch13.adb: Change name Short_Enums_On_Target to
3453 * set_targ.adb: Set Short_Enums from gcc back end.
3454 * set_targ.ads (Short_Enums): New variable.
3455 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
3456 Ttypes/Get_Targ now).
3457 * ttypes.ads (Target_Short_Enums): New constant boolean switch
3459 2014-01-24 Pascal Obry <obry@adacore.com>
3461 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
3463 2014-01-24 Gary Dismukes <dismukes@adacore.com>
3465 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
3466 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
3469 2014-01-24 Robert Dewar <dewar@adacore.com>
3471 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
3473 2014-01-24 Vincent Celier <celier@adacore.com>
3475 * prj.adb (Add_Aggregated_Project): Do not add a project in
3476 the list if it is already there.
3478 2014-01-24 Yannick Moy <moy@adacore.com>
3480 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
3481 Correct the search for a subrogram declaration to which a pragma is
3484 2014-01-24 Bob Duff <duff@adacore.com>
3486 * gnat_ugn.texi: Document --decimal-grouping and
3487 --based-grouping switches in gnatpp.
3489 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3491 * sinfo.ads: Documentation update.
3493 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3495 * sem_ch3.adb (Constant_Redeclaration): New declaration is
3496 illegal if previous one has an initial expression that is an
3497 aggregate expanded into assignments.
3499 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3501 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
3502 code reorganization to remove spurious warning on a loop with
3503 an array element iterator that has a null range.
3505 2014-01-24 Vincent Celier <celier@adacore.com>
3507 * make.adb (Binding_Phase): When setting the Ada paths, use
3508 the library ALI dir, not the object dir in libraries.
3510 2014-01-24 Yannick Moy <moy@adacore.com>
3512 * sinfo.ads: Add documentation of check flag fields.
3514 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3516 * sem_res.adb (Resolve_Actuals): If an actual is a view
3517 conversion of a discriminated object, and the formal type is
3518 discriminated and constrained, apply a discriminant check to
3521 2014-01-24 Robert Dewar <dewar@adacore.com>
3523 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
3525 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3527 * sem_ch3.adb (Analyze_Declarations): At the end of an
3528 appropriate declarative part, call Freeze_All from the first
3529 declaration in the scope, not from the first unfrozen one. This
3530 is necessary to apply visibility checks to entities with delayed
3531 aspects. Otherwise, in the presence of instantiations and cleanups
3532 that they may generate, the delayed aspects may be analyzed too
3533 late and produce spurious visibility errors.
3534 * sem_attr.adb: Place etype on range.
3535 * sem_ch6.adb: Documentation expression functions.
3537 2014-01-24 Robert Dewar <dewar@adacore.com>
3539 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
3540 terminology in compiler).
3542 2014-01-24 Robert Dewar <dewar@adacore.com>
3544 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
3545 categories, now that Ada 95 supports raise expressions.
3547 2014-01-24 Robert Dewar <dewar@adacore.com>
3549 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
3550 Short_Enums_On_Target.
3551 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
3553 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
3555 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3557 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
3558 indication is given explicity, check that it matches the array
3559 component type or the container element type of the domain
3562 2014-01-24 Tristan Gingold <gingold@adacore.com>
3564 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
3565 * gcc-interface/misc.c (flag_short_enums): Declare.
3566 (gnat_post_options): Set it.
3568 2014-01-24 Vincent Celier <celier@adacore.com>
3570 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
3571 to cache the result when Including_Libraries is False.
3572 * prj-env.ads (Ada_Objects_Path): Update documentation
3573 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
3574 (Get_Object_Directory): Return the Library_Ali_Dir only when
3575 when Including_Libraries is True.
3576 * prj.ads (Get_Object_Directory): Fix and complete documentation
3577 (Project_Data): New component Ada_Objects_Path_No_Libs
3579 2014-01-24 Robert Dewar <dewar@adacore.com>
3581 * checks.adb (Expr_Known_Valid): Result of fpt operator never
3584 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
3586 * back_end.adb: Minor fix in comment.
3588 2014-01-24 Javier Miranda <miranda@adacore.com>
3590 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
3591 required to report the error in case of task types.
3593 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3595 * sem_attr.adb: Additional index checking.
3597 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3599 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
3600 expressions in each component association, and for records note
3601 the entity in each association choice, for subsequent resolution.
3602 (Resolve_Attribute, case 'Update): Complete resolution of
3603 expressions in each component association.
3605 2014-01-24 Robert Dewar <dewar@adacore.com>
3607 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
3608 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
3609 leading to wrong handling of SPARK_Mode for library units).
3611 2014-01-24 Robert Dewar <dewar@adacore.com>
3613 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
3614 on generic instances (do not consider them to be internally
3617 2014-01-24 Doug Rupp <rupp@adacore.com>
3619 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
3620 vice pthread_sigmask.
3622 2014-01-24 Vincent Celier <celier@adacore.com>
3624 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
3627 2014-01-24 Vincent Celier <celier@adacore.com>
3629 * prj-ext.adb (Add): Do not output anything when Silent is True,
3630 whatever the verbosity. When Source is From_External_Attribute,
3631 set the corresponding environment variable if it is not already set.
3632 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
3634 * prj-proc.adb (Process_Expression_For_Associative_Array):
3635 For attribute External, call Prj.Ext.Add with Silent set to
3636 True for the child environment, to avoid useless output in non
3639 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3641 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
3642 range given by a subtype indication, and force evaluation of
3643 the bounds, as for a simple range.
3644 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
3645 of bounds of slice for various kinds of discrete ranges.
3646 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
3647 Evaluate_Slice_Bounds.
3649 2014-01-24 Bob Duff <duff@adacore.com>
3651 * s-taskin.ads (Activator): Make this Atomic, because
3652 Activation_Is_Complete reads it, and that can be called
3653 from any task. Previously, this component was only
3654 modified by the activator before activation, and by
3655 Self after activation.
3656 * a-taside.ads, a-taside.adb (Environment_Task,
3657 Activation_Is_Complete): Implement these missing functions.
3659 2014-01-24 Doug Rupp <rupp@adacore.com>
3661 * init.c: Add a handler section for Android.
3663 2014-01-24 Arnaud Charlet <charlet@adacore.com>
3665 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
3667 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3669 * sem_ch4.adb (Operator_Check): If one operand is a
3670 Raise_Expression, set its type to that of the other operand.
3671 * sem_res.adb (Resolve_Raise_Expression): new procedure.
3672 (Resolve_Actuals): For an actual that is a Raise_Expression,
3673 set the type to that of the formal.
3674 * sem_type.adb (Find_Unique_Type): If one of the operands is a
3675 Raise_Expression, return type of the other operand.
3677 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3679 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
3680 component of the record has a type with a default aspect, and
3681 the corresponding aggregate component is initiaized with a box,
3682 use the default value in the rewritten aggregate.
3684 2014-01-24 Tristan Gingold <gingold@adacore.com>
3686 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
3687 s-interr-sigaction.adb,
3688 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
3689 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
3690 to the call to Install_Restricted_Handlers.
3692 2014-01-24 Emmanuel Briot <briot@adacore.com>
3694 * prj-nmsc.adb (Check_File): Add protection when the source is
3695 not fully initialized.
3697 2014-01-24 Ed Schonberg <schonberg@adacore.com>
3699 * sem_util.adb (Is_Post_State): In a postcondition, a selected
3700 component that denotes an implicit dereference is a reference
3701 to the post state of the subprogram.
3703 2014-01-24 Robert Dewar <dewar@adacore.com>
3705 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
3706 for generated subprograms.
3707 (Analyze_Subprogram_Specification): Ditto.
3709 2014-01-24 Vincent Celier <celier@adacore.com>
3711 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
3712 attributes in package Builder of aggregate and aggregate library
3714 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
3715 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
3716 Remove parameters. Change error message from "... externally
3717 build library ..." to "... externally built project ...".
3718 (Process_Naming_Scheme.Check): Do not do any check in aggregate
3719 project, as attribute Library_Dir and Library_Name have already
3720 been detected as forbidden.
3722 2014-01-24 Vincent Celier <celier@adacore.com>
3724 * prj-env.adb (Find_Project): If cached project path is not in
3725 project directory, look in current directory first and use cached
3726 project path only if project is not found in project directory.
3728 2014-01-24 Robert Dewar <dewar@adacore.com>
3730 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
3732 2014-01-24 Vincent Celier <celier@adacore.com>
3734 * projects.texi: Document that aggregate projects are only
3735 supported by gprbuild, but not by gnatmake. Document that the
3736 only attribute Switches in package Binder of aggregate projects
3737 will be ignored if its index is not others. Document that
3738 attribute Global_Config_File is allowed in package Binder of
3741 2014-01-24 Robert Dewar <dewar@adacore.com>
3743 * sem_prag.adb: Minor code reorganization.
3744 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
3746 2014-01-24 Pascal Obry <obry@adacore.com>
3748 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
3749 attribute definition.
3751 2014-01-24 Vincent Celier <celier@adacore.com>
3753 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
3754 in the Queue the same source (same path, same multi-source index)
3755 from the same project file, to avoid compiling several times
3758 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
3760 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
3761 (Has_Gigi_Rep_Item): Likewise.
3762 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
3763 Has_Gigi_Rep_Item for objects.
3764 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
3765 (prepend_one_attribute): ...this.
3766 (prepend_one_attribute_pragma): New function extracted from...
3767 (prepend_attributes): ...here. Swap the parameters for consistency.
3768 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
3770 <object>: Deal with a pragma Linker_Section on a constant
3771 or variable. <E_Function>: Deal with a pragma Linker_Section
3773 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
3775 2014-01-24 Vincent Celier <celier@adacore.com>
3777 * opt.ads: Minor comment update.
3779 2014-01-24 Robert Dewar <dewar@adacore.com>
3781 * sem_prag.adb (Analyze_Input_Output): Add missing error check
3783 * sem_util.adb (Is_Refined_State): Add defense against junk
3786 2014-01-24 Pascal Obry <obry@adacore.com>
3788 * projects.texi: Removes Build_Slaves attribute documentation.
3790 2014-01-23 Robert Dewar <dewar@adacore.com>
3792 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
3795 2014-01-23 Ed Schonberg <schonberg@adacore.com>
3797 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
3798 applies to expressions that come from source.
3799 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
3801 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
3802 rule regarding potentially unevaluated expressions, to prefix
3805 2014-01-23 Ed Schonberg <schonberg@adacore.com>
3807 * exp_util.adb (Make_Invqriant_Call): If type of expression is
3808 a private extension, get invariant from base type.
3810 2014-01-23 Robert Dewar <dewar@adacore.com>
3812 * sem_util.adb, sem_attr.adb: Minor reformatting.
3814 2014-01-23 Robert Dewar <dewar@adacore.com>
3816 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
3817 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
3818 * sem.adb (Semantics): Remove save/restore of
3819 SPARK_Mode[_Pragma]. Not needed since already done in
3820 Save/Restore_Opt_Config_Switches.
3822 2014-01-23 Robert Dewar <dewar@adacore.com>
3824 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
3825 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
3826 Linker_Section enhancements.
3828 2014-01-23 Tristan Gingold <gingold@adacore.com>
3830 * gnat_rm.texi: Minor editing.
3832 2014-01-23 Robert Dewar <dewar@adacore.com>
3834 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
3835 with'ed internal units.
3836 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
3838 2014-01-23 Javier Miranda <miranda@adacore.com>
3840 * lib-xref.adb (Generate_Reference): As part of processing the
3841 "end-of-spec" reference generate an extra reference to the first
3842 private entity of the package.
3843 * xr_tabls.adb (Add_Reference): No action needed for the extra
3844 'E' reference associated; similar to the processing of the
3847 2014-01-23 Bob Duff <duff@adacore.com>
3849 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
3851 2014-01-23 Ed Schonberg <schonberg@adacore.com>
3853 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
3854 predicate to implement rule given in 6.1.1 (20/3).
3855 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
3856 'Old in a postcondition, if it is potentially unevaluated and
3857 it is not an entity name.
3859 2014-01-23 Bob Duff <duff@adacore.com>
3861 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
3863 2014-01-23 Robert Dewar <dewar@adacore.com>
3865 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
3868 2014-01-23 Bob Duff <duff@adacore.com>
3870 * g-dynhta.ads: Minor comment fix.
3872 2014-01-23 Yannick Moy <moy@adacore.com>
3874 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
3875 from spec on body only when not already inherited on spec. Set
3876 SPARK_Mode from context on body without previous spec. *
3877 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
3878 library-level entities. Correct retrieval of entity from
3879 declaration, for cases where the declaration is not a unit.
3880 * sem_ch12.adb (Instantiate_Object): Avoid
3881 calling Is_Volatile_Object on an empty node.
3883 2014-01-23 Robert Dewar <dewar@adacore.com>
3885 * gnatlink.adb (Gnatlink): Check for suspicious executable file
3888 2014-01-23 Robert Dewar <dewar@adacore.com>
3890 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
3891 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
3892 style errors in instances.
3893 * g-dynhta.ads (Static_HTable): Comment updates.
3895 2014-01-23 Vincent Celier <celier@adacore.com>
3897 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
3898 to find a configuration project file when Config_File_Name is
3899 No_Configuration_File.
3900 * prj-conf.ads (No_Configuration_File): New constant String.
3901 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
3902 with Config_File_Name set to No_Configuration_File, so that
3903 no existing configuration project file will be used, and the
3904 configuration project will be only created in memory when
3905 Add_Default_GNAT_Naming_Scheme is called.
3906 * projects.texi: Minor reformatting.
3908 2014-01-23 Vincent Celier <celier@adacore.com>
3910 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
3911 a config project file if On_Load_Config is not null.
3912 * prj-pars.adb: Minor comment changes.
3914 2014-01-23 Ed Schonberg <schonberg@adacore.com>
3916 * lib-xref.adb (Output_References): Output progenitors of
3917 synchronized tagged types, for source navigation.
3919 2014-01-23 Robert Dewar <dewar@adacore.com>
3921 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
3922 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
3923 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
3925 2014-01-23 Emmanuel Briot <briot@adacore.com>
3927 * prj-conf.adb (Get_Or_Create_Configuration_File): call
3928 On_Load_Config later.
3930 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3932 * sem_ch3.adb (Analyze_Declarations): Do not
3933 generate the spec of the late primitive in ASIS mode. Add two
3934 comments to explain the special cases when the expansion is
3937 2014-01-23 Robert Dewar <dewar@adacore.com>
3939 * sem_util.adb (Note_Possible_Modification): Fix error of
3940 misbehaving for implicit dereference cases in -gnatc mode.
3942 2014-01-23 Emmanuel Briot <briot@adacore.com>
3944 * prj-pars.adb: Minor reformatting.
3946 2014-01-22 Ed Schonberg <schonberg@adacore.com>
3948 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
3949 body generated for an expression function within a protected body
3950 needs a set of renaming declarations if the expression function
3953 2014-01-22 Ed Schonberg <schonberg@adacore.com>
3955 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
3956 list interface progenitor of a tagged concurrent type, for better
3959 2014-01-22 Robert Dewar <dewar@adacore.com>
3961 * lib.adb (In_Extended_Main_Code_Unit): Return False for
3963 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
3964 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
3965 treatment of Slocs No_Location and Standard_Location.
3966 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
3967 check for entity with Standard_Location Sloc, rather than relying
3968 on Lib routines to do that.
3969 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
3970 that a call cannot occur before a later occuring body within
3973 2014-01-22 Thomas Quinot <quinot@adacore.com>
3975 * rtsfind.adb: Update comment.
3977 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
3979 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
3980 * sem_ch3.adb (Analyze_Declarations): Add local variable
3981 Body_Seen. Generate the spec of a late controlled
3982 primitive body that is about to freeze its related type.
3983 (Handle_Late_Controlled_Primitive): New routine.
3985 2014-01-22 Robert Dewar <dewar@adacore.com>
3987 * a-stream.adb: Minor reformatting.
3989 2014-01-22 Ed Schonberg <schonberg@adacore.com>
3991 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
3992 sub-procedure Declared_In_Actual to handle properly the visibility
3993 of actuals in actual packages, that are themselves actuals to a
3994 actual package of the current instance. This mimics properly the
3995 visibility of formals of formal packages declared with a box,
3996 within the corresponding generic unit.
3998 2014-01-22 Robert Dewar <dewar@adacore.com>
4000 * checks.adb: Do not assume that a volatile variable is valid.
4002 2014-01-22 Thomas Quinot <quinot@adacore.com>
4004 * g-catiio.ads (Image, Value): Clarify that these functions
4005 operate in the local time zone. Minor documentation update.
4007 2014-01-22 Thomas Quinot <quinot@adacore.com>
4009 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
4011 2014-01-22 Robert Dewar <dewar@adacore.com>
4013 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
4014 Moved to sem_aux.adb.
4016 2014-01-22 Robert Dewar <dewar@adacore.com>
4018 * vms_data.ads: Minor reformatting.
4020 2014-01-22 Robert Dewar <dewar@adacore.com>
4022 * debug.adb: Document messages affected by -gnatd.E including
4023 the new ones that relate to late definition of equality.
4024 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
4025 debug flag -gnatd.E is set, then generate warnings rather than
4027 (Check_Untagged_Equality): In earlier versions of Ada,
4028 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
4030 2014-01-22 Robert Dewar <dewar@adacore.com>
4032 * sem_prag.adb (Usage_Error): Output additional messages for
4033 unconstrained OUT parameters lacking an input dependency.
4035 2014-01-22 Robert Dewar <dewar@adacore.com>
4037 * sem_ch4.adb: Minor reformatting.
4039 2014-01-22 Robert Dewar <dewar@adacore.com>
4041 * restrict.ads: Minor reformatting.
4042 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
4043 forbids a call from within a subprogram to the same subprogram.
4045 2014-01-22 Thomas Quinot <quinot@adacore.com>
4047 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
4048 stream attributes for Stream_Element_Array.
4049 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
4050 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
4051 defined in the current scope.
4053 2014-01-22 Robert Dewar <dewar@adacore.com>
4055 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
4057 2014-01-22 Thomas Quinot <quinot@adacore.com>
4059 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
4061 2014-01-22 Thomas Quinot <quinot@adacore.com>
4063 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
4064 declaration initialized with a function call, whose type
4065 has variable size, need to remove side effects so that the
4066 initialization expression becomes a dereference of a temporary
4067 reference to the function result.
4069 2014-01-22 Yannick Moy <moy@adacore.com>
4071 * errout.adb (Initialize): Remove trick to add dummy entry
4073 * erroutc.adb (Set_Warnings_Mode_Off,
4074 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
4075 command line switch.
4076 * opt.ads (Warning_Mode): Document behavior
4077 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
4079 2014-01-22 Robert Dewar <dewar@adacore.com>
4081 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
4083 2014-01-22 Robert Dewar <dewar@adacore.com>
4085 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
4086 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
4087 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
4088 case Storage_Size): call Check_Pool_Size_Clash.
4090 2014-01-22 Robert Dewar <dewar@adacore.com>
4092 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
4093 sem_eval.ads: Minor reformatting.
4095 2014-01-22 Thomas Quinot <quinot@adacore.com>
4097 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
4098 Any_Composite to prevent cascaded errors.
4100 2014-01-22 Yannick Moy <moy@adacore.com>
4102 * errout.adb (Initialize): Do not insert special entry in Warnings
4103 table in GNATprove_Mode.
4104 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
4106 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
4109 2014-01-22 Robert Dewar <dewar@adacore.com>
4111 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
4114 2014-01-22 Robert Dewar <dewar@adacore.com>
4116 * snames.ads-tmpl: Update header.
4118 2014-01-22 Thomas Quinot <quinot@adacore.com>
4120 * exp_util.adb (Insert_Actions): When inserting actions on a
4121 short circuit operator that has already been analyzed, do not park
4122 actions in node; instead introduce an N_Expression_With_Actions
4123 and insert actions immediately.
4124 Add guard for unexpected case of climbing up through statement
4125 in Actions list of an N_Expression_With_Actions.
4126 * sem_elab.adb (Insert_Elab_Check): Remove complex
4127 specialized circuitry for the case where the context is already
4128 analyzed, as it is not needed and introduces irregularities in
4129 finalization. Instead rely on the above change to Insert_Actions
4130 to ensure that late insertion on short circuit operators works
4133 2014-01-22 Ed Schonberg <schonberg@adacore.com>
4135 * sem_ch4.adb (Operator_Check): Improve error message when an
4136 operand of concatenation is an access type.
4138 2014-01-22 Thomas Quinot <quinot@adacore.com>
4140 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
4143 2014-01-22 Ed Schonberg <schonberg@adacore.com>
4145 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
4146 of an expanded name in a proper body, whose prefix is a package
4147 in the context of the proper body, when there is a homonym of
4148 the package declared in the parent unit.
4150 2014-01-22 Robert Dewar <dewar@adacore.com>
4152 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
4153 msg if errors found.
4154 (Check_One_Unit): Same change.
4156 2014-01-22 Robert Dewar <dewar@adacore.com>
4158 * ug_words: Add missing/wrong entries for VMS warning switches.
4159 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
4161 2014-01-22 Jerome Guitton <guitton@adacore.com>
4163 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
4166 2014-01-22 Robert Dewar <dewar@adacore.com>
4168 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
4170 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
4172 * gcc-interface/Makefile.in: Minor fixes.
4174 2014-01-21 Robert Dewar <dewar@adacore.com>
4176 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
4177 * par-ch5.adb (P_Condition): New version with expression prescanned.
4178 * par.adb (P_Condition): New version with expression prescanned.
4180 2014-01-21 Robert Dewar <dewar@adacore.com>
4182 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
4183 if Address is not a private type.
4184 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4185 Ignore pragma if System.Address is not a private type.
4187 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4189 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
4190 uninitialized value.
4192 2014-01-21 Thomas Quinot <quinot@adacore.com>
4194 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
4196 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4198 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
4199 the value of Assertions_Enabled flag when compiling an instance of
4200 an internal unit. This facilitates the use of pre/postconditions
4201 in generic internal units, such as the new elementary function
4204 2014-01-21 Robert Dewar <dewar@adacore.com>
4206 * exp_aggr.adb: Minor reformatting.
4207 * sem_attr.adb: Minor reformatting.
4208 * sem_res.adb: Minor comment addition.
4209 * einfo.adb: Minor comment updates.
4210 * freeze.adb: Minor reformatting and code reorganization.
4212 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4214 * par-ch4.adb (P_If_Expression): Handle more gracefully an
4215 elsif clause that does not have an else part.
4217 2014-01-21 Robert Dewar <dewar@adacore.com>
4219 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
4220 * gcc-interface/Makefile.in: clean up target pairs.
4222 2014-01-21 Pascal Obry <obry@adacore.com>
4224 * projects.texi: Minor typo fix.
4226 2014-01-21 Thomas Quinot <quinot@adacore.com>
4228 * freeze.adb (Check_Component_Storage_Order): If a record type
4229 has an explicit Scalar_Storage_Order attribute definition clause,
4230 reject any component that itself is of a composite type and does
4233 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4235 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
4236 can be used to generate proper cross-reference information for
4237 the parent units of proper bodies.
4239 2014-01-21 Thomas Quinot <quinot@adacore.com>
4241 * exp_pakd.adb (Expand_Packed_Element_Set,
4242 Expand_Packed_Element_Reference): No byte swapping required in
4243 the front-end for the case of a reverse storage order array,
4244 as this is now handled uniformly in the back-end. However we
4245 still need to swap back an extracted element if it is itself a
4246 nested composite with reverse storage order.
4248 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
4250 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
4251 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
4254 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4256 * gnat_ugn.texi: Minor updates.
4258 2014-01-21 Thomas Quinot <quinot@adacore.com>
4260 * exp_pakd.adb: Update comment, minor reformatting.
4262 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
4264 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
4265 object check when SPARK_Mode is on.
4266 * sem_ch6.adb (Process_Formals): Trigger the volatile object
4267 check when SPARK_Mode is on.
4268 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
4269 check when SPARK_Mode is on.
4270 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
4271 corresponding pragma of aspect SPARK_Mode in the visible
4272 declarations of a package declaration.
4273 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
4274 check when SPARK_Mode is on.
4275 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
4276 check when SPARK_Mode is on.
4277 (Resolve_Entity_Name): Trigger
4278 the volatile object check when SPARK_Mode is on.
4280 2014-01-21 Robert Dewar <dewar@adacore.com>
4282 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
4283 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
4285 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4287 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
4288 object is declared, it is rewritten as a renaming of an dynamic
4289 expression that wraps the initial value. The renaming declaration
4290 is first given an internal name, to prevent collisions with the
4291 entity already declared, and then the name is modified to reflect
4292 the original one. the modification of the name must preserve
4293 the source location of the original, to prevent spurious errors
4294 when compiling with style checks if the declaration involves
4295 more than one entity.
4297 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
4299 * aspects.adb Add entries for Async_Readers, Async_Writers,
4300 Effective_Reads and Effective_Writes in table Canonical_Aspect.
4301 * aspects.ads Add entries for Async_Readers, Async_Writers,
4302 Effective_Reads and Effective_Writes in tables Aspect_Id,
4303 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
4304 * atree.adb (Ekind_In): New version with 8 parameters.
4305 (Node34): New routine.
4306 (Set_Node34): New routine.
4307 * atree.ads (Ekind_In): New version with 8 parameters.
4308 (Node34): New routine.
4309 (Set_Node34): New routine.
4310 * einfo.adb Contract is now Node34.
4311 (Contract): Update the assertion and node usage.
4312 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
4313 Effective_Reads and Effective_Writes.
4314 (Set_Contract): Update the assertion and node usage.
4315 (Write_Field24_Name): Remove the output for a contract.
4316 (Write_Field34_Name): Add output for a contract.
4317 * einfo.ads Contract is now Node34. Update the comment on
4318 attribute usage and related node structures.
4319 (Get_Pragma): Update the comment on usage.
4320 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
4321 Effective_Reads and Effective_Writes do not require special
4322 processing by the parser.
4323 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
4324 (Analyze_Declarations): Analyze the contract of a variable at
4325 the end of the declarative region.
4326 (Analyze_Object_Declaration): Create a contract for a variable.
4327 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
4328 of classification pragmas.
4329 (Process_Formals): Detect an illegal
4330 use of a volatile object as a formal in a function.
4331 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
4332 a volatile object as an actual in generic instantiation.
4333 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
4334 Effective_Reads and Effective_Writes in table Sig_Flags.
4335 (Analyze_External_State_In_Decl_Part): New routine.
4336 (Analyze_Global_Item): Detect an illegal use of a volatile object
4337 as a global item of a function.
4338 (Analyze_Pragma): Reimplement
4339 pragma Abstract_State. Add support for pragmas Async_Readers,
4340 Async_Writers, Effective_Reads and Effective_Writes.
4341 (Check_External_Properties): New routine.
4342 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
4343 (Check_External_Properties): New routine.
4344 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
4345 volatile object as an actual in a call.
4346 (Resolve_Entity_Name):
4347 Add local variables Par, Prev and Usage_OK. Detect illegal
4348 contexts of volatile objects.
4349 * sem_util.adb (Add_Contract_Item): Add support for
4350 pragmas associated with the contract of a variable.
4351 (Async_Readers_Enabled): New routine.
4352 (Async_Writers_Enabled): New routine.
4353 (Effective_Reads_Enabled): New routine.
4354 (Effective_Writes_Enabled): New routine.
4355 (Has_Enabled_Property):
4357 (Is_Unchecked_Conversion_Instance): New routine.
4358 (Is_Volatile_Object): Add support for entities that may denote
4360 * sem_util.ads (Add_Contract_Item): Update the
4362 (Async_Readers_Enabled): New routine.
4363 (Async_Writers_Enabled): New routine.
4364 (Effective_Reads_Enabled): New routine.
4365 (Effective_Writes_Enabled): New routine.
4366 (Is_Unchecked_Conversion_Instance): New routine.
4367 * sinfo.ads Update the comment on the structure of N_Contract.
4368 * snames.ads-tmpl Add predefined names for Async_Readers,
4369 Async_Writers, Effective_Reads and Effective_Writes. Add
4370 pragma ids for Async_Readers, Async_Writers, Effective_Reads
4371 and Effective_Writes.
4373 2014-01-21 Robert Dewar <dewar@adacore.com>
4375 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
4376 * sem_eval.adb (Compile_Time_Known_Value): Remove special
4377 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
4378 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
4379 (Test_Foldable): Add CRT_Safe parameter
4380 * sem_eval.ads (Compile_Time_Known_Value): Remove special
4381 handling of CRT mode.
4382 (CRT_Safe_Compile_Time_Known_Value): New function.
4384 2014-01-21 Robert Dewar <dewar@adacore.com>
4386 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
4387 with pragma or aspect that applies to package spec or subprogram
4390 2014-01-21 Robert Dewar <dewar@adacore.com>
4392 * exp_aggr.adb: Minor reformatting.
4394 2014-01-21 Johannes Kanig <kanig@adacore.com>
4396 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
4398 2014-01-21 Bob Duff <duff@adacore.com>
4400 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
4402 2014-01-21 Steve Baird <baird@adacore.com>
4404 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
4406 2014-01-21 Vincent Celier <celier@adacore.com>
4408 * prj-part.adb (Parse_Single_Project): Accept to extend a project
4409 if it has only be imported by an project being extended. When a
4410 project that has only been imported by a project being extended
4411 is imported by another project that is not being extended,
4412 reset the previous indication, so that it will be an error if
4413 this project is extended later.
4414 * prj-tree.adb (Create_Project): Include component From_Extended
4415 in table Projects_HT
4416 * prj-tree.ads (Project_Name_And_Node): New Boolean component
4419 2014-01-21 Robert Dewar <dewar@adacore.com>
4421 * atree.ads, atree.adb: Add Node33 and Set_Node33.
4422 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
4423 New field (SPARK_Pragma_Inherited): New flag
4424 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
4426 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
4427 * opt.ads (SPARK_Mode_Pragma): New global variable.
4428 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
4429 * sem_ch3.adb: Use new SPARK_Mode data structures.
4430 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
4431 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
4432 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
4433 (Pop_Scope): Restore SPARK_Mode_Pragma.
4434 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
4435 new data structures.
4437 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4439 * back_end.adb: Undo previous change, not needed. Minor reformatting.
4441 2014-01-21 Thomas Quinot <quinot@adacore.com>
4443 * exp_ch5.adb: Fix comment.
4444 * switch-c.adb: Minor comment update.
4445 * exp_ch3.adb: Minor reformatting.
4447 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4449 * back_end.adb (Scan_Compiler_Arguments): Do not store object
4450 filename in gnatprove mode.
4452 2014-01-21 Thomas Quinot <quinot@adacore.com>
4454 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
4455 suppresses usage of primitive _assign for tagged types).
4456 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
4457 No_Ctrl_Actions for a tagged type that does not require
4458 finalization, as we want to disable usage of _assign (which
4459 may cause undesirable discriminant checks on an uninitialized,
4462 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4464 * sem_prag.adb: Reject invariant'class on completion.
4466 2014-01-21 Javier Miranda <miranda@adacore.com>
4468 * exp_ch3.adb (Build_Init_Procedure): For
4469 derivations of interfaces, do not move the the initialization
4470 of the _parent field since such assignment is not generated.
4472 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4474 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
4475 with the operator it renames if we are within an expression of
4476 a pre/postcondition, because the expression will be reanalyzed
4477 at a later point, and the analysis of the renaming may affect
4478 the visibility of the operator when in an instance.
4480 2014-01-21 Robert Dewar <dewar@adacore.com>
4482 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
4483 Add this flag to type conversion nodes and assignment nodes.
4484 * treepr.adb: Deal properly with Flag 1,2,3.
4485 * treeprs.adt: Minor comment update.
4487 2014-01-21 Robert Dewar <dewar@adacore.com>
4489 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
4491 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
4492 parameter, completely rewrite spec.
4494 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4496 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
4497 instance that is inlined, it may have been rewritten as a wrapper
4498 package. In that case the unit that must be made visible is the
4499 related instance of the package.
4501 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4503 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
4504 previous change in codepeer mode.
4506 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4508 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
4509 call to Abort_Undefer, as expected by the runtime.
4510 * s-tasren.adb (Local_Complete_Rendezvous): Replace
4511 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
4512 deferred at this point. Update comments.
4514 2014-01-21 Thomas Quinot <quinot@adacore.com>
4516 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
4518 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4520 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
4523 2014-01-21 Robert Dewar <dewar@adacore.com>
4525 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
4527 2014-01-21 Thomas Quinot <quinot@adacore.com>
4529 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
4530 this is value is used in Node_Id arithmetic operations.
4531 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
4532 instead of hard-coded unrolled code.
4534 2014-01-21 Yannick Moy <moy@adacore.com>
4536 * gnat1drv.adb: Minor code cleanup, removing useless code.
4538 2014-01-21 Arnaud Charlet <charlet@adacore.com>
4540 * opt.ads (SPARK_Switches_File_Name): New.
4541 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
4542 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
4543 * gnat_ugn.texi: Document -gnates.
4545 2014-01-21 Yannick Moy <moy@adacore.com>
4547 * errout.adb (Special_Msg_Delete): Update comment. Remove
4548 special case for GNATprove which should not ignore mismatch
4549 in sizes for representation clauses.
4550 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
4551 which should not ignore pragma Pack.
4553 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4555 * sem_ch4.adb: Code clean up.
4557 2014-01-21 Steve Baird <baird@adacore.com>
4559 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
4561 2014-01-21 Robert Dewar <dewar@adacore.com>
4563 * gcc-interface/gigi.h: Get Flags array address.
4564 * gcc-interface/trans.c: Acquire Flags array address.
4565 * atree.adb: Add support for Flags array and Flag0,1,2,3.
4566 * atree.ads: Add support for Flags array and Flag0,1,2,3.
4567 * atree.h: Add support for Flags array and Flag0,1,2,3.
4568 * back_end.adb: Pass Flags array address to gigi.
4570 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4572 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
4573 reference to generated body so that legality checks on stream
4574 attributes are properly applied. If type is tagged and already
4575 frozen, insert generated body at the point of the renaming
4578 2014-01-21 Ed Schonberg <schonberg@adacore.com>
4580 * sem_ch12.adb: Code clean up.
4581 * sem_ch8.adb: Minor reformatting
4583 2014-01-20 Robert Dewar <dewar@adacore.com>
4585 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
4586 converting warnings on inevitable exceptions to errors.
4587 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4588 converting warnings on inevitable exceptions to errors.
4589 * opt.adb (SPARK_Mode_Config): Handled like other config flags
4590 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
4591 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
4592 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
4593 New flag (Config_Switches_Type): Add SPARK_Mode field
4594 * sem.adb: Minor code reorganization (remove unnecessary with)
4595 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
4596 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4597 converting warnings on inevitable exceptions to errors.
4598 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
4599 converting warnings on inevitable exceptions to errors.
4600 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
4601 converting warnings on inevitable exceptions to errors.
4602 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
4603 converting warnings on inevitable exceptions to errors.
4604 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
4606 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
4608 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
4610 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
4611 converting warnings on inevitable exceptions to errors.
4612 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
4613 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
4614 of Get_SPARK_Mode_Id
4615 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
4616 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
4617 converting warnings on inevitable exceptions to errors.
4618 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
4619 converting warnings on inevitable exceptions to errors.
4620 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
4623 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4625 * sem_ch13.adb: Add semantic information to rewritten type
4628 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4630 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
4631 are of a type with unknown discriminants, convert both to the
4632 underlying view of the type, so that the proper constraint check
4633 can be applied to the right-hand side.
4635 2014-01-20 Robert Dewar <dewar@adacore.com>
4637 * atree.adb (Copy_Node): Fix failure to copy last component
4638 (Exchange_Entities): Fix failure to exchange last entity
4640 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4642 * sem_ch12.adb: Code clean up.
4644 2014-01-20 Robert Dewar <dewar@adacore.com>
4646 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
4648 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4650 * sem_ch4.adb (Analyze_Quantified_Expression): If after
4651 pre-analysis the loop parameter specification has been
4652 rewritten as a iterator specification, propagate the change to
4653 the quantified expression, for ASIS navigtion needs.
4655 2014-01-20 Vincent Celier <celier@adacore.com>
4657 * par-ch10.adb: Minor error message change: escape [ and ].
4659 2014-01-20 Robert Dewar <dewar@adacore.com>
4661 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
4662 * errout.adb: Implement [ and ] insertion characters.
4663 * errout.ads: Document new [ and ] insertion characters.
4664 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
4665 addition of ??? comment.
4666 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
4667 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
4668 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
4669 Make warnings on exceptions into errors in GNATprove mode.
4670 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
4673 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4675 * sem_ch13.adb: Code clean up.
4677 2014-01-20 Robert Dewar <dewar@adacore.com>
4679 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
4681 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
4682 error in GNATprove mode.
4684 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4686 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
4687 reference 'Old takes no parameters, and thus can appear as a
4690 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
4692 * exp_aggr.adb: Fix minor typos.
4694 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4696 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
4697 instance the attribute is legal, and its value is determined
4698 statically if the type has no discriminants. This choice is
4699 more useful than rechecking the legality rule in the instance,
4700 is consistent with older usage, and is also consistent with all
4703 2014-01-20 Arnaud Charlet <charlet@adacore.com>
4705 * sem_cat.adb (Validate_Static_Object_Name): Change error into
4706 warning in Relaxed_Semantic_Mode.
4708 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4710 * sem_attr.adb: Code and comments cleanup.
4712 2014-01-20 Yannick Moy <moy@adacore.com>
4714 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
4715 * errout.adb (Compilation_Errors): Remove special handling in
4717 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
4718 removed debug flags.
4719 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
4720 Global, Initial_Condition, Initializes and Refined_State pragmas and
4722 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
4723 SPARK_Strict_Mode): Remove global flags.
4724 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
4725 always performed now, on packages declaring a null state.
4726 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
4727 at providing pedantic mode for bounds of integer types.
4728 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
4729 "some" quantified expression now issued under control of -gnatw.t,
4730 like the other warning on unused bound variable.
4731 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
4733 (Analyze_Pragma): Remove tests for SPARK 2014
4734 pragmas, not officially allowed by GNAT.
4736 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4738 * sem_prag.adb (Analyze_Pragma): Ensure that
4739 the sole argument of pragmas Abstract_State, Contract_Cases,
4740 Depends, Global and Initializes in in aggregate form.
4741 (Analyze_Refined_Pragma): Ensure that the sole argument of
4742 pragmas Refined_Depends, Refined_Global and Refined_State is in
4744 (Ensure_Aggregate_Form): New routine.
4746 2014-01-20 Doug Rupp <rupp@adacore.com>
4748 * sem_attr.adb (Analyze_Attribute): case
4749 Attribute_Constrained => treat all prefixes as legal for Declib
4752 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4754 * sem_prag.adb (Check_Mode): Reimplement the routine.
4755 (Find_Mode): New routine.
4757 2014-01-20 Robert Dewar <dewar@adacore.com>
4759 * sem_ch4.adb (Operator_Check): Handle additional
4760 Allow_Integer_Address cases.
4762 2014-01-20 Robert Dewar <dewar@adacore.com>
4764 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
4765 allowed if address is non-private, no longer true.
4766 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4767 Remove check for address being private, causes difficulty when
4768 pragma used in gnat.adc file and is not needed, since we guard
4769 this in Address_Integer_Convert_OK.
4770 * exp_ch7.adb: Minor reformatting.
4771 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
4773 2014-01-20 Robert Dewar <dewar@adacore.com>
4775 * checks.adb (Apply_Range_Check): Remove gnatprove special
4776 casing of exponentiation.
4777 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
4778 operand for integer case to check range against Natural.
4780 2014-01-20 Robert Dewar <dewar@adacore.com>
4782 * s-tataat.adb: Minor reformatting.
4784 2014-01-20 Robert Dewar <dewar@adacore.com>
4786 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
4787 entities, and also fix documentation to remove mention of visible
4788 integer type, since this is not what the implementation does.
4789 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
4790 entities, and also fix documentation to remove mention of visible
4791 integer type, since this is not what the implementation does.
4792 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
4794 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
4795 case for parameter type check.
4796 * sem_res.adb (Resolve): Use new function
4797 Address_Integer_Convert_OK.
4798 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
4799 reformatting throughout.
4800 * sem_util.adb (Address_Integer_Convert_OK): New function.
4801 * sem_util.ads: Minor reformatting (put specs in alpha order)
4802 (Address_Integer_Convert_OK): New function.
4804 2014-01-20 Thomas Quinot <quinot@adacore.com>
4806 * exp_ch7.adb (Wrap_Transient_Expression):
4807 Insertion extra conditional expression only if
4808 Opt.Suppress_Control_Flow_Optimizations is set.
4810 2014-01-20 Arnaud Charlet <charlet@adacore.com>
4812 * s-tataat.adb (Initialize_Attributes): Abort might already be
4813 deferred in Create_Task.
4815 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4817 * checks.adb (Apply_Scalar_Range_Check): Flag
4818 the exponent as requiring a range check when the expression is
4821 2014-01-20 Fedor Rybin <frybin@adacore.com>
4823 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
4825 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4827 * sem_util.adb (Default_Initialization): New routine.
4828 * sem_util.ads: Add new type Default_Initialization_Kind.
4829 (Default_Initialization): New routine.
4831 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4833 * sem_prag.adb (Check_Mode): Correct all error
4834 message logic dealing with in/in out parameters that may appear
4835 as inputs or have a self reference.
4837 2014-01-20 Robert Dewar <dewar@adacore.com>
4839 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
4840 * sem_res.adb (Resolve): Fix error causing infinite loop for
4841 integer used as address. Allow addresses as integers.
4843 2014-01-20 Arnaud Charlet <charlet@adacore.com>
4845 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
4847 2014-01-20 Bob Duff <duff@adacore.com>
4849 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
4850 error when "use all" is not followed by "type".
4852 2014-01-20 Bob Duff <duff@adacore.com>
4854 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
4857 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4859 * checks.adb (Apply_Address_Clause_Check): If there is an
4860 alignment check on the expression in an address clause, and there
4861 is no local exception propagation, add an additional explanatory
4862 message to clarify the cause of previous warning.
4864 2014-01-20 Robert Dewar <dewar@adacore.com>
4866 * exp_ch7.adb: Minor reformatting.
4867 * opt.ads: Minor comment updates.
4868 * sem.adb: Minor name change Is_Main_Unit =>
4869 Is_Main_Unit_Or_Main_Unit_Spec.
4870 * sem_ch6.adb: Minor reformatting and code reorganization.
4872 2014-01-20 Bob Duff <duff@adacore.com>
4874 * gnat_ugn.texi: Update gnatpp switches.
4876 2014-01-20 Thomas Quinot <quinot@adacore.com>
4878 * exp_ch9.adb: Minor comment edit.
4880 2014-01-20 Robert Dewar <dewar@adacore.com>
4882 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
4883 only if System.Address is a private type.
4884 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
4885 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4886 Allowed only if type System.Address is private, since otherwise
4888 * sem_res.adb: Fix failure to properly Analyze unchecked
4889 conversions that were introduced by Allow_Integer_Address.
4890 * switch-c.adb: Remove -gnates switch.
4891 * usage.adb: Remove -gnates switch.
4892 * gnat_ugn.texi: Remove documentation of -gnates flag.
4894 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4896 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
4897 resolve expression to perform proper name capture.
4899 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4901 * sem.adb (Semantics): When saving/restoring configuration
4902 switches, the spec of a pre- defined unit that is the main unit
4903 must be treated as a predefined unit as well.
4905 2014-01-20 Thomas Quinot <quinot@adacore.com>
4907 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
4908 expression, insert an extra conditional expression when saving
4909 the value of the expression, for the benefit of control flow
4910 graph based coverage analysis.
4911 * exp_ch3.adb: Minor reformatting.
4913 2014-01-20 Robert Dewar <dewar@adacore.com>
4915 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
4916 * gnat_rm.texi: Document pragma Allow_Integer_Address.
4917 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
4918 * opt.ads: New flag Allow_Integer_Address.
4919 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
4920 * sem_ch5.adb: Minor reformatting.
4921 * sem_prag.adb: Implement pragma Allow_Integer_Address.
4922 * sem_res.adb (Resolve): Allow integer address value if
4924 * sem_util.adb: Minor reformatting.
4925 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
4926 * switch-c.adb: Recognize flag -gnates.
4927 * usage.adb: Document flag -gnates.
4929 2014-01-20 Thomas Quinot <quinot@adacore.com>
4931 * s-tadeca.adb: Fix minor typos in comment.
4933 2014-01-20 Pascal Obry <obry@adacore.com>
4935 * s-win32.ads (FreeLibrary): New import.
4937 2014-01-20 Robert Dewar <dewar@adacore.com>
4939 * sem_res.adb, sem_cat.adb: Minor reformatting.
4940 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
4941 assigning to OUT parameters for the current subprogram scope.
4942 * exp_ch4.adb: Minor reformatting.
4944 2014-01-20 Ed Schonberg <schonberg@adacore.com>
4946 * exp_ch4.adb (Process_Transient_Object,
4947 Find_Enclosing_Contexts): If the top-level if-expression that
4948 generated the transient object is an actual in a call, the proper
4949 Hook_Context is a construct enclosing the call.
4950 * einfo.ads: Indicate that Related_Expression is used to link a
4951 loop variable to the container expression over which the loop
4953 (Analyze_Iterator_Specification): Set the Related_Expression of
4954 the loop variable in a container element iterator.
4955 (Note_Possible_Modification): If the variable is the loop
4956 variable in a container element iterator, indicate that the
4957 enclosing container is also modified.
4959 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4961 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
4963 2014-01-20 Robert Dewar <dewar@adacore.com>
4965 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
4966 Minor reformatting and code clean up.
4968 2014-01-20 Arnaud Charlet <charlet@adacore.com>
4970 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
4971 of objects of private type if Relaxed_RM_Semantics.
4973 2014-01-20 Claire Dross <dross@adacore.com>
4975 * a-cofove.ads (Vector): Capacity discriminant
4976 should be in range of the index.
4978 2014-01-20 Thomas Quinot <quinot@adacore.com>
4980 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
4981 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
4982 possible difference between epoch of Ada.Calendar clock and Ada
4983 real-time/tasking clock.
4984 * s-taprop-posix.adb: Minor comment fix.
4986 2014-01-20 Doug Rupp <rupp@adacore.com>
4988 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
4990 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4992 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
4993 checks on the prefix of attribute 'Old.
4994 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
4995 generation of validity checks on a range that belongs to the
4996 iteration scheme of a quantified expression.
4997 * sem_ch5.adb (One_Bound): Suppress the generation of validity
4998 checks on a bound that belongs to the iteration scheme of a
4999 quantified expression, generate the check in all other cases.
5001 2014-01-20 Bob Duff <duff@adacore.com>
5003 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
5005 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5007 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
5008 interpretations that do not come from other predefined units,
5009 to prevent spurious ambiguities in the presence of user-defined
5010 operators in the context of (an instance of) a predefined unit.
5012 2014-01-20 Robert Dewar <dewar@adacore.com>
5014 * gnat_rm.texi: Document that Loop_Variant is included in
5015 Statement_Assertions.
5016 * sem_prag.adb (Check_Kind): Add Loop_Variant to
5017 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
5018 to Statement_Assertions.
5020 2014-01-20 Doug Rupp <rupp@adacore.com>
5022 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
5023 for errno ENOENT from RTP on NFS mounted file system.
5025 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5027 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
5028 examine code that does not come from source. The check does not
5029 apply to code generated for constraint checks, and such code may
5030 generate spurious error messages when compiled with expansion
5031 disabled (as in a generic unit) because side effects may not
5033 2) Make error messages more explicit: indicate the component
5034 of the construct whose value is indeterminate because of a
5035 call to a function with in-out parameter in another component,
5036 when there is no mandated order of execution between the two
5037 components (actuals, aggregate components, alternatives).
5039 2014-01-20 Robert Dewar <dewar@adacore.com>
5041 * gnat_rm.texi: Minor cleanup.
5043 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5045 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
5046 can now apply to a refined postcondition.
5047 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
5048 variable Result_Seen. Add variables Case_Prag, Post_Prag,
5049 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
5050 whether postconditions and/or constract-cases mention attribute
5051 'Result and introduce a post-state when applied to functions.
5052 (Check_Result_And_Post_State): Removed.
5053 * sem_prag.adb (Analyze_Pragma): Add local variable
5054 Result_Seen. Verify that the expression of pragma Refined_Post
5055 mentions attribute 'Result and introduces a post-state.
5056 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
5058 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5060 * exp_ch7.adb (Is_Subprogram_Call): New routine.
5061 (Process_Transient_Objects): Make variable Must_Hook global with
5062 respect to all locally declared subprograms. Search the context
5063 for at least one subprogram call.
5064 (Requires_Hooking): Removed.
5066 2014-01-20 Claire Dross <dross@adacore.com>
5068 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
5069 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
5070 External_Axiomatization);
5072 2014-01-20 Robert Dewar <dewar@adacore.com>
5074 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
5075 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
5076 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
5077 Allow Loop_Entry to be used in these pragmas if they appear in
5078 an appropriate context.
5079 (Placement_Error): Specialize error
5080 message for pragma Assert[_And_Cut] or pragma Assume containing
5081 Loop_Entry attribute.
5082 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
5083 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
5086 2014-01-20 Robert Dewar <dewar@adacore.com>
5088 * gnat1drv.adb: Minor comment update.
5090 2014-01-20 Tristan Gingold <gingold@adacore.com>
5092 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
5093 variables, comment out unused code.
5094 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
5095 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
5096 * s-excmac-arm.ads: New file.
5098 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5100 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
5101 Drange and Index_Typ. Remove the circuitry which creates a
5102 range check to compare the index type of the array against the
5104 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
5105 the circuitry which creates a range check to handle a
5106 discrete_range denoted by a subtype indication.
5108 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
5110 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
5111 nodes to get the original sloc range.
5113 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5115 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
5116 entity of a [library level] package.
5118 2014-01-20 Tristan Gingold <gingold@adacore.com>
5120 * raise-gcc.c (exception_class_eq): New function.
5121 (is_handled_by): Use it to compare exception classes.
5122 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
5123 be called to return URC_CONTINUE_UNWIND.
5124 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
5125 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
5127 2014-01-20 Robert Dewar <dewar@adacore.com>
5129 * opt.ads: Minor comment update.
5131 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5133 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
5134 constants to the "Local variables" area. Add new constant D. Add
5135 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
5136 to Pref_Typ and update all occurrences. Add circuitry to extract
5137 the discrete_range and the index type and build a range check.
5139 2014-01-20 Arnaud Charlet <charlet@adacore.com>
5141 * gnat1drv.adb (Adjust_Global_Switches): Enable
5142 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
5145 2014-01-20 Thomas Quinot <quinot@adacore.com>
5147 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
5149 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5151 * sem_ch13.adb (Analyze_Aspect_Specifications):
5152 When aspect SPARK_Mode appears on a package body, insert the
5153 generated pragma at the top of the body declarations.
5155 2014-01-20 Robert Dewar <dewar@adacore.com>
5157 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
5158 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
5159 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
5160 sem_ch8.adb, exp_dist.adb: Minor reformatting.
5162 2014-01-20 Yannick Moy <moy@adacore.com>
5164 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
5167 2014-01-20 Pascal Obry <obry@adacore.com>
5169 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
5171 * g-arrspl.adb: Adapt all routine to this new implementation.
5172 (Set): Copy the Slice_Set definition before reusing it.
5174 2014-01-20 Arnaud Charlet <charlet@adacore.com>
5176 * sem_prag.adb (Process_Import_Or_Interface): In
5177 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
5178 (Analyze_Pragma): Ditto for pragma Export.
5179 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
5182 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5184 * einfo.ads: E_Abstract_State is now part of the entities that
5185 can be overloaded. Update type Overloadable_Kind to reflect the
5186 inclusion of abstract states.
5187 * sem_ch6.adb (New_Overloaded_Entity): A function can now
5188 overload an abstract state.
5189 * sem_prag.adb (Analyze_Constituent): Handle the overloading
5190 of states by functions. Use Entity_Of to obtain the entity of
5191 a constituent. (Analyze_Global_Item): Handle the overloading of
5192 states by functions.
5193 (Analyze_Initialization_Item): Handle the
5194 overloading of states by functions. Use Entity_Of to obtain the
5196 (Analyze_Input_Item): Handle the overloading
5197 of states by functions. Use Entity_Of to obtain the entity of an item.
5198 (Analyze_Input_Output): Handle the overloading of states by functions.
5199 (Analyze_Refinement_Clause): Handle the overloading
5200 of states by functions. Use Entity_Of to obtain the entity of an item.
5201 (Appears_In): Use Entity_Of to obtain the entity of an element.
5202 (Check_Usage): Use Entity_Of to obtain the entity of
5203 an item. Add a guard to prevent a crash due to a previous error.
5204 (Resolve_State): New routine.
5206 2014-01-20 Yannick Moy <moy@adacore.com>
5208 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
5209 opt.ads: Minor comments updates.
5211 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5213 * einfo.adb (Non_Limited_View): Applies to abstract states.
5214 (Set_From_Limited_With): Applies to abstract states.
5215 (Set_Non_Limited_View): Applies to abstract states.
5216 (Write_Field17): Output the non-limited view of an abstract state.
5217 * einfo.ads: Update the comment on usage and occurrences in
5218 nodes for attributes From_Limited_With and Non_Limited_View.
5219 * sem_aux.adb (Available_View): This routine can now handle
5221 * sem_aux.ads (Available_View): This routine can now handle
5222 abstract states. Update the comment on usage.
5223 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
5224 of states and variables.
5225 (In_Pragmas_Depends_Or_Global): New routine.
5226 * sem_ch10.adb (Build_Limited_Views): Implement
5227 abstract (limited) views of variables and states.
5228 (Build_Shadow_Entity): This routine is now a procedure. Add
5229 formal parameter Shadow. Update the comment on usage. Add
5230 context-specific decoration for states and variables.
5231 (Decorate_State): New routine. (Decorate_Variable): New routine.
5232 (Find_And_Process_States): New routine.
5233 (Process_Declarations): Renamed to Process_Declarations_And_States.
5234 (Process_Declarations_And_States): Add formal parameters
5235 Pack and Create_Abstract_Views. Update the comment on usage.
5236 (Process_States): New routine.
5237 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
5238 views of states and variables. Match the abstract view of a state
5239 against its corresponding non-abstract view.
5240 (Is_Matching_Input):
5241 Handle abstract views of states and variables. Match the abstract
5242 view of a state against its corresponding non-abstract view.
5243 (Process_Global_Item): Handle abstract views of states and
5246 2014-01-20 Bob Duff <duff@adacore.com>
5248 * sem_ch10.adb (Expand_With_Clause): Don't
5249 recurse on the prefix if the current with-ed name refers to a
5250 package that renames its own parent, eg "package P.Q renames P;".
5252 2014-01-20 Yannick Moy <moy@adacore.com>
5254 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
5255 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
5256 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
5257 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
5258 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
5261 2014-01-20 Yannick Moy <moy@adacore.com>
5263 * sinfo.ads Update documentation of GNATprove mode.
5265 2014-01-20 Yannick Moy <moy@adacore.com>
5267 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
5268 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
5269 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
5270 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
5272 * sem_ch13.adb: Remove blank.
5273 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
5274 subprograms by alias for renamings, not for inherited primitive
5276 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
5278 (Remove_Side_Effects): Apply the removal in
5279 GNATprove mode, for the full analysis of expressions.
5280 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
5282 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
5283 save/restore actions for Expander_Active flag in GNATprove mode,
5284 similar to what is done in ASIS mode.
5285 * frontend.adb (Frontend): Generic bodies are instantiated in
5287 * gnat1drv.adb (Adjust_Global_Switches): Set operating
5288 mode to Check_Semantics in GNATprove mode, although a light
5289 expansion is still performed.
5290 (Gnat1drv): Set Back_End_Mode to
5291 Declarations_Only in GNATprove mode, and later on special case
5292 the GNATprove mode to continue analysis anyway.
5293 * lib-writ.adb (Write_ALI): Always generate ALI files in
5295 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
5297 (SPARK_Mode): Renamed as GNATprove_Mode.
5298 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
5299 tree in GNATprove_Mode.
5300 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
5301 body in GNATprove mode.
5302 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
5304 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
5305 Make sure side effects are removed in GNATprove mode.
5307 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5309 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
5310 for aliased objects with an unconstrained nominal subtype.
5311 * gcc-interface/trans.c (Call_to_gnu): Likewise.
5312 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
5313 <case N_Op_Minus>: Remove useless code.
5314 (Exception_Handler_to_gnu_zcx): Minor tweaks.
5316 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5318 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
5319 Tidy up. For a subtype with discriminants and variant part, if a
5320 variant is statically selected and the fields all have a constant
5321 position, put them in order of increasing position. Likewise if
5322 no variant part but representation clause is present.
5323 * gcc-interface/utils.c (make_packable_type): Robustify.
5324 (maybe_pad_type): Use local variable and tidy up condition. If no
5325 alignment is specified, use the original one.
5326 (create_type_stub_decl): Minor tweak.
5327 (convert) <case VECTOR_CST>: Fix typo.
5328 <case CONSTRUCTOR>: Deal with padding types around the same type.
5329 Do not punt on missing fields.
5330 (unchecked_convert): Call finish_record_type to lay out the special
5331 record types made for conversions from/to problematic integer types.
5332 Bump the alignment of CONSTRUCTORs before converting them to a more
5335 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5337 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
5338 obsolete code for type_annotate_only mode, simplify code and slightly
5339 improve wording of comments.
5341 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
5344 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
5345 as intermediate type.
5346 (UI_To_gnu): Likewise.
5348 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
5350 * gnatvsn.ads (Current_Year): Bump to 2014.
5352 2014-01-02 Tobias Burnus <burnus@net-b.de>
5354 * gnat_ugn.texi: Bump @copying's copyright year.
5356 Copyright (C) 2014 Free Software Foundation, Inc.
5358 Copying and distribution of this file, with or without modification,
5359 are permitted in any medium without royalty provided the copyright
5360 notice and this notice are preserved.