1 2014-07-18 Pascal Obry <obry@adacore.com>
3 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
4 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
5 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
6 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
8 2014-07-18 Pascal Obry <obry@adacore.com>
10 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
11 * a-ztexio.adb: Likewise.
12 * a-witeio.adb: Likewise.
13 (Open): Pass file's translation mode to set_text_mode.
14 * s-ficobl.ads (Content_Encoding): New type.
15 (Text_Content_Encoding): New subtype.
16 (AFCB): Rename Is_Text_File to Text_Encoding.
17 * s-fileio.adb (Open): Handles new text_translation
18 values. Remove Is_Text_File which is equivalent to Text_Encoding
19 in Text_Content_Encoding.
20 * adaint.h (__gnat_set_mode): New routine.
21 * sysdep.c (__gnat_set_wide_text_mode): Removed.
22 (__gnat_set_mode): New routine.
24 2014-07-18 Arnaud Charlet <charlet@adacore.com>
26 * gcc-interface/decl.c, gcc-interface/trans.c,
27 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
28 Is_Packed_Array_Impl_Type.
30 2014-07-18 Gary Dismukes <dismukes@adacore.com>
32 * sem_util.adb: Minor typo correction.
34 2014-07-18 Ben Brosgol <brosgol@adacore.com>
36 * gnat_rm.texi: Complete previous change.
38 2014-07-18 Pascal Obry <obry@adacore.com>
40 * s-fileio.adb: Minor style fix.
42 2014-07-18 Ed Schonberg <schonberg@adacore.com>
44 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
45 specification of stream attributes for subtypes that are not
46 first subtypes, to prevent malformed rep_item chains in the case
47 of such illegal specifications for discriminated private subtypes.
48 (Check_Overloaded_Name): Verify that the name is an entity name
51 2014-07-18 Pascal Obry <obry@adacore.com>
53 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
55 2014-07-18 Robert Dewar <dewar@adacore.com>
57 * sem_prag.adb, sem_attr.adb,
58 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
60 2014-07-18 Pascal Obry <obry@adacore.com>
62 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
63 * initialize.c (__gnat_wide_text_translation_required): Defined here.
65 2014-07-18 Pascal Obry <obry@adacore.com>
67 * adaint.c (__gnat_fputwc): New routine.
68 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
70 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
72 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
73 (Set_Stores_Attribute_Old_Prefix): New routine.
74 (Stores_Attribute_Old_Prefix): New routine.
76 Output flag Stores_Attribute_Old_Prefix.
77 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
79 (Set_Stores_Attribute_Old_Prefix): New routine
80 along with pragma Inline.
81 (Stores_Attribute_Old_Prefix): New
82 routine along with pragma Inline.
83 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
84 constant which captures the result of attribute 'Old's prefix.
85 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
86 relocated expression which acted as a prefix of attribute 'Old.
88 2014-07-18 Bob Duff <duff@adacore.com>
90 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
91 null before dispatching to Deallocate_Subpool.
92 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
93 parameter of Default_Subpool_For_Pool to 'in out'.
94 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
95 a message to the raise.
96 * sem_util.adb: Minor reformatting.
98 2014-07-18 Robert Dewar <dewar@adacore.com>
100 * sem_util.adb (Check_Expression_Against_Static_Predicate):
101 Mark expression as non-static if it fails static predicate check,
102 and issue additional warning.
104 2014-07-18 Pascal Obry <obry@adacore.com>
106 * a-witeio.adb (Put): Control translation based on
107 wide_text_translation_required.
108 * adaint.c (CurrentCCSEncoding): New variable.
109 * initialize.c (__gnat_initialize): On Windows initialize
110 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
111 environment variable.
112 * mingw32.h (CurrentCCSEncoding): New external.
113 (__gnat_wide_text_translation_required): Likewise.
114 * sysdep.c (wide_text_translation_required): New variable.
115 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
117 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
119 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
120 variable Refined_States. Add global variable Matched_Items.
121 (Check_Dependency_Clause): Account for dependency
122 clauses utilizing states with visible null refinements.
123 (Is_Null_Refined_State): New routine.
124 (Match_Items): Record each successfully matched item of pragma Depends.
125 (Record_Item): New routine.
127 2014-07-18 Ed Schonberg <schonberg@adacore.com>
129 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
130 Do_Range_Check flag on a dynamic index expression used in a
131 component association in the argument of Update.
133 2014-07-18 Gary Dismukes <dismukes@adacore.com>
135 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
137 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
139 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
140 of enclosing blocks, loops and the enclosing function using a
141 parent-based traversal.
142 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
143 stack reclamation if the iterator loop contains a return statement
145 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
146 patch up the scope stack as the secondary stack management now
147 takes into account the enclosing function of the iterator loop.
149 2014-07-18 Robert Dewar <dewar@adacore.com>
151 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
153 2014-07-18 Robert Dewar <dewar@adacore.com>
155 * einfo.adb (Has_Static_Predicate): New function.
156 (Set_Has_Static_Predicate): New procedure.
157 * einfo.ads (Has_Static_Predicate): New flag.
158 * sem_ch13.adb (Is_Predicate_Static): New function
159 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
160 (Add_Call): Minor change in Sloc of generated expression
161 (Add_Predicates): Remove setting of Static_Pred, no longer used.
162 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
163 replace by use of the entity flag Has_Static_Predicate_Aspect.
164 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
165 and issue warning that predicate is not checked for now.
166 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
168 * sem_util.adb (Check_Expression_Against_Static_Predicate):
169 Carry out check for any case where there is a static predicate,
170 and output appropriate message.
171 * sinfo.ads: Minor comment corrections.
173 2014-07-18 Ed Schonberg <schonberg@adacore.com>
175 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
176 from an untagged private type whose full view is tagged, the type
177 is marked tagged for layout reasons, but it has no dispatch table,
178 so Set_All_DT_Position must not be called.
179 * exp_ch13.adb: If the freeze node is for a type internal to a
180 record declaration, as is the case for a class-wide subtype
181 of a parent component, the relevant scope is the scope of the
184 2014-07-18 Thomas Quinot <quinot@adacore.com>
186 * g-memdum.adb, g-memdum.ads: Code clean ups.
188 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
190 * sem_prag.adb (Check_Dependency_Clause):
191 Update the comment on usage. Reimplement the mechanism which
192 attempts to match a single clause of Depends against one or
193 more clauses of Refined_Depends.
194 (Input_Match): Removed.
195 (Inputs_Match): Removed.
196 (Is_Self_Referential): Removed.
197 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
198 (Normalize_Outputs): Rename variable Split to New_Claue and update
200 (Report_Extra_Clauses): Update the comment on usage.
201 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
203 2014-07-18 Gary Dismukes <dismukes@adacore.com>
205 * i-cstrea.ads: Minor reformatting.
207 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
209 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
210 secondary stack-related flags to the generated block.
211 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
212 once the loop is relocated in a block.
214 2014-07-18 Robert Dewar <dewar@adacore.com>
216 * repinfo.ads: Add documentation on handling of back annotation
219 2014-07-18 Ed Schonberg <schonberg@adacore.com>
221 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
222 of full type declaration, denotes previous declaration for
223 incomplete view of the type.
224 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
225 of declaration if one is present.
226 (Replace_Type): When constructing the signature of an inherited
227 operation, handle properly the case where the operation has a
228 formal whose type is an incomplete view.
229 * sem_util.adb (Collect_Primitive_Operations): Handle properly
230 the case of an operation declared after an incomplete declaration
231 for a type T and before the full declaration of T.
233 2014-07-18 Pascal Obry <obry@adacore.com>
235 * i-cstrea.ads: Add documentation for set_wide_text_mode.
237 2014-07-18 Robert Dewar <dewar@adacore.com>
239 * a-witeio.adb: Minor code reorganization.
240 * i-cstrea.ads: Add comment.
242 2014-07-18 Thomas Quinot <quinot@adacore.com>
244 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
247 2014-07-18 Robert Dewar <dewar@adacore.com>
249 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
251 2014-07-18 Pascal Obry <obry@adacore.com>
253 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
254 * a-witeio.adb (Put): On platforms where there is translation
255 done by the OS output the raw text.
256 (New_Line): Use Put above to properly handle the LM wide characters.
258 2014-07-18 Thomas Quinot <quinot@adacore.com>
260 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
263 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
265 * opt.ads (Suppress_Back_Annotation): Remove as unused.
266 * fe.h (Back_Annotate_Rep_Info): Likewise.
267 (Global_Discard_Names): Likewise.
269 2014-07-18 Robert Dewar <dewar@adacore.com>
271 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
274 2014-07-18 Vincent Celier <celier@adacore.com>
276 * s-osinte-vms.ads: Fix style errors.
278 2014-07-18 Thomas Quinot <quinot@adacore.com>
280 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
281 NAME_MAX and PATH_MAX.
283 2014-07-18 Bob Duff <duff@adacore.com>
285 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
286 Build_Record_Or_Elementary_Output_Procedure): For Input and
287 Output attributes, do not read/write the discriminants if they
288 have default values; that will be done by Read/Write.
290 2014-07-18 Robert Dewar <dewar@adacore.com>
292 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
293 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
294 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
295 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
296 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
298 2014-07-18 Robert Dewar <dewar@adacore.com>
300 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
302 2014-07-18 Vincent Celier <celier@adacore.com>
304 * lib-writ.ads: Update documentation about the D lines.
306 2014-07-18 Ed Schonberg <schonberg@adacore.com>
308 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
309 as a parameter, rather than its Chars field, in order to locate
310 freeze node of type. If the predicate or invariant has references
311 to types other than the one to which the contract applies, these
312 types must be frozen, and the corresponding predicate functions
313 created, before that freeze node.
315 2014-07-18 Robert Dewar <dewar@adacore.com>
317 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
318 * par_sco.adb: Minor reformatting.
320 2014-07-18 Gary Dismukes <dismukes@adacore.com>
322 * exp_ch4.adb (Real_Range_Check): Turn off
323 the Do_Range_Check flag on the conversion's current Expression
324 argument rather than on the originally captured Operand node,
325 as Expression may reflect a rewriting (as in conversions to a
328 2014-07-18 Vincent Celier <celier@adacore.com>
330 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
332 * ali.ads (Sdep_Record): New component Unit_Name.
333 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
334 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
335 dependent unit is in a project and the source file name is not
338 2014-07-18 Bob Duff <duff@adacore.com>
340 * s-addima.ads: Minor: add comment.
342 2014-07-18 Thomas Quinot <quinot@adacore.com>
344 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
345 of nesting rules for composites with different SSOs.
347 2014-07-18 Thomas Quinot <quinot@adacore.com>
349 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
350 a proper logical operator.
351 (Has_Decision): An If_Expression indicates the presence of a decision
352 although it is not a logical operator.
354 2014-07-18 Robert Dewar <dewar@adacore.com>
356 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
357 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
359 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
361 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
362 on the null statement.
364 2014-07-18 Thomas Quinot <quinot@adacore.com>
366 * adaint.c: Minor comment rewording.
367 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
368 use of errno in this file is thread safe.
370 2014-07-18 Arnaud Charlet <charlet@adacore.com>
372 * gnat_ugn.texi: Doc clarification.
373 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
374 * sem_ch13.ads: Minor comment update.
376 2014-07-18 Robert Dewar <dewar@adacore.com>
378 * repinfo.ads: Minor comment fix.
380 2014-07-18 Robert Dewar <dewar@adacore.com>
382 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
383 * sem_prag.adb: Add dummy implementation of
384 Default_Scalar_Storage_Order.
385 * snames.ads-tmpl: Add dummy entry for
386 Default_Scalar_Storage_Order pragma.
388 2014-07-18 Robert Dewar <dewar@adacore.com>
390 * opt.adb (Tree_Read): Read Address_Is_Private,
391 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
392 (Tree_Write): Corresponding writes
393 * opt.ads: Minor comment reformatting and fixes.
394 * tree_io.ads: Increment ASIS_Version_Number.
396 2014-07-18 Robert Dewar <dewar@adacore.com>
398 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
401 2014-07-18 Robert Dewar <dewar@adacore.com>
403 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
405 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
407 * sem_ch13.adb (Kill_Rep_Clause): New procedure
408 (Analyze_Attribute_Definition_Clause): Use
409 Kill_Rep_Clause. This is just a cleanup, no functional effect.
410 (Analyze_Enumeration_Representation_Clause):
411 Use Kill_Rep_Clause. This means that enum rep
412 clauses are now properly removed from -gnatct trees.
413 (Analyze_Record_Representation_Clause): Same change.
414 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
416 2014-07-18 Pascal Obry <obry@adacore.com>
418 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
419 OS_Time from time parts.
420 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
422 2014-07-18 Ed Schonberg <schonberg@adacore.com>
424 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
425 indexing over containers that are derived types: check whether
426 signature of found operation has the correct first parameter
427 before retrieving directly a primitive operation.
429 2014-07-18 Ed Schonberg <schonberg@adacore.com>
431 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
432 Do_Range_Check flag on dynamic bounds of a range used in a
433 component association in the argument of Update.
435 2014-07-18 Thomas Quinot <quinot@adacore.com>
437 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
438 accesses to errno(3) to be thread safe.
440 2014-07-18 Vincent Celier <celier@adacore.com>
442 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
443 limited imported project that is an extending project, return
444 a project being extended if it has the expected name.
446 2014-07-18 Pascal Obry <obry@adacore.com>
448 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
449 routine to set the last modification time stamp for the given file.
450 * gnatchop.adb (File_Time_Stamp): Removed.
452 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
454 2014-07-18 Ed Schonberg <schonberg@adacore.com>
456 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
457 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
458 Moved here, so it can be shared with the resolution of 'Update,
459 whose argument shares some features with aggregates.
460 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
461 Aggregate_Constraint_Checks with the expression of each
462 association, so that the Do_Range_Check flag is set when needed.
464 2014-07-18 Ed Schonberg <schonberg@adacore.com>
466 * sem_ch4.adb (Try_Container_Indexing): If the container
467 type is a derived type, the value of the inherited aspect is
468 the Reference operation declared for the parent type. However,
469 Reference is also a primitive operation of the new type, and
470 the inherited operation has a different signature. We retrieve
471 the right one from the list of primitive operations of the
474 2014-07-18 Vincent Celier <celier@adacore.com>
476 * debug.adb: Update comment.
478 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
480 * exp_util.adb (Needs_Finalization): There is no reason why a
481 C type should not benefit from finalization actions.
483 2014-07-18 Thomas Quinot <quinot@adacore.com>
485 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
486 (FILENAME_MAX): Remove unneeded definition.
488 2014-07-18 Robert Dewar <dewar@adacore.com>
490 * exp_attr.adb, debug.adb: Update comments.
492 2014-07-18 Vincent Celier <celier@adacore.com>
494 * par-ch4.adb (Simple_Expression): Add missing style check
495 for binary adding operators.
496 (Term): Add missing style check for multiplying operators.
498 2014-07-18 Robert Dewar <dewar@adacore.com>
500 * impunit.adb: Minor comment correction.
501 * widechar.adb, s-wchcon.ads: Minor comment corrections.
503 2014-07-18 Robert Dewar <dewar@adacore.com>
505 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
506 for Build_Static_Predicate (Build_Predicate_Functions):
507 Don't try to build discrete predicate for real type.
508 (Build_Predicate_Functions): Report attempt to use
509 Static_Predicate function on real type as unimplemented.
510 * sem_util.adb (Check_Expression_Against_Static_Predicate):
511 Add guard to prevent blow up on predicate for real type.
513 2014-07-18 Ed Schonberg <schonberg@adacore.com>
515 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
516 properly static predicate on enumeration types and modular types
519 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
521 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
522 the corresponding source file index.
523 * get_scos.ads (Get_SCOs): Add a default value for it.
524 * par_sco.adb (SCO_Record): Fill the corresponding value.
527 2014-07-18 Vincent Celier <celier@adacore.com>
529 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
530 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
532 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
534 2014-07-18 Thomas Quinot <quinot@adacore.com>
536 * g-sercom.ads (Set): document possible data loss.
538 2014-07-18 Ed Schonberg <schonberg@adacore.com>
540 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
541 Output, Read, Write): If the restriction No_Streams is active,
542 replace each occurrence of a stream attribute by an explicit
545 2014-07-18 Robert Dewar <dewar@adacore.com>
547 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
550 2014-07-18 Robert Dewar <dewar@adacore.com>
552 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
554 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
555 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
556 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
557 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
559 2014-07-18 Robert Dewar <dewar@adacore.com>
561 * bcheck.adb (Check_Consistent_Restrictions):
562 Remove obsolete code checking for violation of
563 No_Standard_Allocators_After_Elaboration (main program)
564 * bindgen.adb (Gen_Adainit): Handle
565 No_Standard_Allocators_After_Elaboration
566 (Gen_Output_File_Ada): ditto.
567 * exp_ch4.adb (Expand_N_Allocator): Handle
568 No_Standard_Allocators_After_Elaboration.
569 * Makefile.rtl: Add entry for s-elaall
570 * rtsfind.ads: Add entry for Check_Standard_Allocator.
571 * s-elaall.ads, s-elaall.adb: New files.
572 * sem_ch4.adb (Analyze_Allocator): Handle
573 No_Standard_Allocators_After_Elaboration.
575 2014-07-18 Robert Dewar <dewar@adacore.com>
577 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
578 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
579 Remove AB parameter from ali files and all uses.
580 Remove Allocator_In_Body and all uses.
582 2014-07-18 Robert Dewar <dewar@adacore.com>
584 * g-expect-vms.adb: Add comment.
586 2014-07-18 Thomas Quinot <quinot@adacore.com>
588 * par_sco.adb (Is_Logical_Operation): return True for
591 2014-07-18 Ed Schonberg <schonberg@adacore.com>
593 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
594 analysis and resolution of each choice in the associations within
595 the argument of Update, because they may be variable names.
597 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
599 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
600 actions before the generated if statement.
602 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
604 * gnat_ugn.texi Enhance the documentation of
605 switches -gnateA and -gnateV.
607 2014-07-18 Ed Schonberg <schonberg@adacore.com>
609 * sem_util.adb (Build_Default_Subtype): Add missing condition
610 so that code matches description: use the full view of the base
611 only if the base is private and the subtype is not.
613 2014-07-17 Gary Dismukes <dismukes@adacore.com>
615 * exp_disp.adb: Minor reformatting.
616 * exp_disp.adb: Minor code reorganization.
618 2014-07-17 Thomas Quinot <quinot@adacore.com>
620 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
621 require an explicit SSO attribute definition clause on a composite type
622 just because one of its components has one.
624 2014-07-17 Robert Dewar <dewar@adacore.com>
626 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
627 attribute out of existence if the enclosing pragma is ignored.
628 * sem_util.adb: Minor reformatting.
630 2014-07-17 Ed Schonberg <schonberg@adacore.com>
632 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
633 array aggregate expanded into assignments when it appears as a
634 local declaration in an inlined body.
636 2014-07-17 Doug Rupp <rupp@adacore.com>
638 * init.c [__ANDROID__]: Modify for ZCX.
639 * exp_aggr.adb: Minor reformatting
640 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
642 2014-07-17 Robert Dewar <dewar@adacore.com>
644 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
645 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
646 scng.adb: Remove incorrect usage "allow to" and "allows to".
648 2014-07-17 Robert Dewar <dewar@adacore.com>
650 * exp_dist.adb: Minor reformatting.
652 2014-07-17 Bob Duff <duff@adacore.com>
654 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
656 2014-07-17 Robert Dewar <dewar@adacore.com>
658 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
659 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
661 2014-07-17 Thomas Quinot <quinot@adacore.com>
663 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
664 non-bit-packed array, propagate Reverse_Storage_Order to the
667 2014-07-17 Javier Miranda <miranda@adacore.com>
669 * exp_disp.adb: Fix comment.
670 * exp_pakd.adb: Minor reformatting.
672 2014-07-17 Robert Dewar <dewar@adacore.com>
674 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
675 entity if none exists (Gen_Elab_Calls): Complain if clash with
676 No_Multiple_Elaboration.
677 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
678 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
680 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
681 * sem_ch4.adb: Minor comment updates.
683 2014-07-17 Ed Schonberg <schonberg@adacore.com>
685 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
686 of function call for later use when shared passive objects
689 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
691 * par-ch13.adb (Get_Aspect_Specifications):
692 Catch a case where the argument of SPARK aspect Refined_State
693 is not properly parenthesized.
695 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
697 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
698 the lifetime of a reference to an Ada 2012 container element.
699 (Is_Element_Reference): New routine.
701 2014-07-17 Robert Dewar <dewar@adacore.com>
703 * ali.ads: Minor comment fix.
704 * lib-writ.adb: Minor reformatting.
706 2014-07-17 Ed Schonberg <schonberg@adacore.com>
708 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
709 in ASIS mode, load another subunit only if it a subunit of the
710 current one, not a sibling that has been reached through the
711 analysis of an ancestor. This allows the construction of the
712 ASIS tree for the subunit even when sibling subunits have errors.
714 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
716 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
717 prevents the analysis of various contracts when the associated
718 construct is erroneous.
719 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
720 SPARK_Pragma of an illegal or a partially decorated construct.
722 2014-07-17 Robert Dewar <dewar@adacore.com>
724 * s-imguns.ads: Minor reformatting.
726 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
728 * exp_ch7.adb (Build_Finalization_Master): Move all local
729 variables to the proper code section. When looking for an existing
730 finalization master, inspect the ultimate ancestor type of the
732 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
734 2014-07-17 Robert Dewar <dewar@adacore.com>
736 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
737 * gnat_rm.texi: Document Entity argument for pragma Annotate and
739 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
741 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
742 Entity argument at end.
743 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
745 2014-07-17 Tristan Gingold <gingold@adacore.com>
747 * s-imguns.ads: Fix minor typo.
749 2014-07-17 Thomas Quinot <quinot@adacore.com>
751 * sprint.adb: Minor reformatting.
753 2014-07-17 Robert Dewar <dewar@adacore.com>
755 * sprint.adb (Write_Itype): Print proper header for string
758 2014-07-17 Steve Baird <baird@adacore.com>
760 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
762 2014-07-17 Vincent Celier <celier@adacore.com>
764 * gnatbind.adb: Change in message "try ... for more information".
766 2014-07-17 Robert Dewar <dewar@adacore.com>
768 * sprint.adb: Code clean up.
770 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
772 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
773 the relevant code section. Add new local constant Obj_Id. When
774 a limited controlled object is initialized by a function call,
775 the build-in-place object access function call acts as the last
776 initialization statement.
777 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
778 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
779 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
781 2014-07-17 Ed Schonberg <schonberg@adacore.com>
783 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
784 propagate intrinsic flag to renamed entity, to allow e.g. renaming
785 of Unchecked_Conversion.
786 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
787 if the declaration has errors.
789 2014-07-17 Ed Schonberg <schonberg@adacore.com>
791 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
792 container is busy before checking whether capacity allows for
793 a further insertion. Insertion in a busy container that is full
794 raises Program_Error rather than Capacity_Error. Previous to that
795 patch which exception was raised varied among container types.
797 2014-07-17 Robert Dewar <dewar@adacore.com>
799 * g-comlin.ads, g-comlin.adb: Minor clean up.
801 2014-07-17 Bob Duff <duff@adacore.com>
803 * gnat_ugn.texi: Update gnatpp doc.
805 2014-07-17 Robert Dewar <dewar@adacore.com>
807 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
808 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
809 could do this by actually expanding a real generic.
810 * a-tags.ads: Add comments about performance.
811 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
812 Print Etype of defining identifier, rather than the object
813 definition. More information.
815 2014-07-17 Thomas Quinot <quinot@adacore.com>
817 * exp_dist.adb: Minor documentation clarification.
819 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
821 * exp_util.adb (Is_Aliased): Revert previous change.
823 2014-07-17 Vincent Celier <celier@adacore.com>
825 * g-comlin.adb (Try_Help): New procedure.
826 (Getopt): Use new procedure Try_Help.
827 * g-comlin.ads (Try_Help): New procedure.
829 2014-07-17 Bob Duff <duff@adacore.com>
831 * gnat_ugn.texi: Minor update.
833 2014-07-17 Robert Dewar <dewar@adacore.com>
835 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
836 * sinfo.ads: Document restriction on aggregates (must expand to
837 assignments if one or more assignments needs expansion, e.g. for
839 * sem_ch13.adb: All warning messages regarding bit order should
841 * gnat_ugn.texi: Minor correction of missing @ on @code
843 2014-07-17 Robert Dewar <dewar@adacore.com>
845 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
846 * s-rident.ads (Partition_Boolean_Restrictions): Add
847 No_Long_Long_Integer.
848 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
849 Long_Integer'Size if restriction No_Long_Long_Integer is active.
850 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
851 as the implicit base type for a signed integer type declaration
852 if restriction No_Long_Long_Integer is active.
853 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
854 No_Long_Long_Integer.
856 2014-07-17 Robert Dewar <dewar@adacore.com>
858 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
859 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
860 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
861 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
862 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
864 2014-07-17 Robert Dewar <dewar@adacore.com>
866 * debug.adb: Remove -gnatdQ.
867 * exp_disp.adb: Remove -gnatdQ.
868 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
869 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
870 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
871 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
872 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
873 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
875 2014-07-17 Robert Dewar <dewar@adacore.com>
877 * back_end.adb: Minor reformatting and comment additions.
878 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
880 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
881 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
882 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
883 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
884 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
885 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
887 2014-07-17 Robert Dewar <dewar@adacore.com>
889 * gnat_rm.texi: Minor comment updates.
891 2014-07-17 Ed Schonberg <schonberg@adacore.com>
893 * sem_util.adb (Make_Explicit_Dereference): If the expression
894 being dereferenced is a generalized indexing, reset the overloaded
895 flag on the generalized indexing call, consistent with the
896 resetting of the flag on the original indexed component.
898 2014-07-17 Robert Dewar <dewar@adacore.com>
900 * gnat_ugn.texi: Document advise not to mix -gnatV? and
903 2014-07-17 Robert Dewar <dewar@adacore.com>
905 * checks.adb (Insert_Valid_Check): Don't insist on a name
906 for the prefix when we make calls to Force_Evaluation and
907 Duplicate_Subexpr_No_Checks.
908 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
909 (Remove_Side_Effects): Handle all volatile references right
910 (Side_Effect_Free): Volatile reference is never side effect free
911 * sinfo.ads (N_Attribute_Reference): Add comments explaining
912 that in the tree, the prefix can be a general expression.
914 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
916 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
917 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
918 * sem_ch7.adb (Analyze_Package_Body_Contract,
919 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
921 2014-07-17 Robert Dewar <dewar@adacore.com>
923 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
924 Store_After_Actions_In_Scope.
926 2014-07-17 Robert Dewar <dewar@adacore.com>
928 * sem_aux.ads: Minor comment addition.
930 2014-07-17 Ed Schonberg <schonberg@adacore.com>
932 * sem_res.adb (Make_Call_Into_Operator): If the call is already
933 a rewriting of an operator node, there are no actuals to be
934 propagated from original node to rewritten node when in ASIS mode.
936 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
938 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
939 Analyze_Subprogram_Contract): Add new local variable Mode. Save
940 and restore the SPARK mode of the related construct in a
942 * sem_ch7.adb (Analyze_Package_Body_Contract,
943 Analyze_Package_Contract): Add new local variable Mode. Save and
944 restore the SPARK mode of the related construct in a stack-like fashion.
945 * sem_util.adb Remove with and use clause for Opt.
946 (Restore_SPARK_Mode): New routine.
947 (Save_SPARK_Mode_And_Set): New routine.
948 * sem_util.ads Add with and use clause for Opt.
949 (Restore_SPARK_Mode): New routine.
950 (Save_SPARK_Mode_And_Set): New routine.
952 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
954 * exp_util.adb (Is_Aliased): Transient objects
955 within an expression with actions cannot be considered aliased.
957 2014-07-17 Thomas Quinot <quinot@adacore.com>
959 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
960 introduce a new list (cleanup actions) for each (transient) scope.
961 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
963 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
964 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
965 processing for Store_xxx_Actions_In_Scope.
966 (Build_Cleanup_Statements): Allow for a list of additional
967 cleanup statements to be passed by the caller.
968 (Expand_Cleanup_Actions): Take custom cleanup actions associated
969 with an N_Block_Statement into account.
970 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
971 reorganization (refactoring only, no behaviour change).
972 (Make_Transient_Block): Add assertion to ensure that the current
973 scope is indeed a block (namely, the entity for the transient
974 block being constructed syntactically, which has already been
975 established as a scope). If cleanup actions are present in the
976 transient scope, transfer them now to the transient block.
977 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
978 called function while it is still present as the name in a call
979 in the tree. This may not be the case later on if the call is
980 rewritten into a transient block.
981 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
982 inserted after calling a protected operation on a shared passive
983 protected must be performed in a block finalizer, not just
984 inserted in the tree, so that they are executed even in case of
985 a normal (RETURN) or abnormal (exception) transfer of control
986 outside of the current scope.
987 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
988 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
989 Scope_Stack_Entry reorganization.
991 2014-07-17 Thomas Quinot <quinot@adacore.com>
993 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
994 call for types that do not have an explicit attribute definition
995 clause for External_Tag, as their default tag may clash with an
996 explicit tag defined for some other type.
998 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1000 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
1001 controlled function call with multiple actual parameters that
1002 appears in Object.Operation form.
1004 2014-07-17 Thomas Quinot <quinot@adacore.com>
1006 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
1008 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1009 External_Tag): No need to set entity flag.
1010 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
1011 Reimplement correctly in terms of Has_Rep_Item.
1013 2014-07-17 Thomas Quinot <quinot@adacore.com>
1015 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
1016 Start examining the tree at the node passed to
1017 Establish_Transient_Scope (not its parent).
1018 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1019 The access type for the variable storing the reference to
1020 the call must be declared and frozen prior to establishing a
1022 * exp_ch9.adb: Minor reformatting.
1024 2014-07-17 Pascal Obry <obry@adacore.com>
1026 * s-os_lib.ads: Minor comment update.
1028 2014-07-17 Tristan Gingold <gingold@adacore.com>
1030 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
1032 * socket.c: Remove #warning to avoid warning.
1033 * expect.c: Indent some preprocessor directives to clarify
1034 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
1036 * env.c: Fix indentation. Port to PikeOS.
1037 * gsocket.h: Port to PikeOS. Remove #warning.
1038 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
1039 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
1040 of stubbed __gnat_setup_parent_communication.
1041 * adaint.c: Port to PikeOS. Reindent some preprocessor
1042 directives to clarify nested if. Fix indentation. Add missing
1045 2014-07-17 Robert Dewar <dewar@adacore.com>
1047 * sem_attr.adb: Minor reformatting.
1049 2014-07-17 Robert Dewar <dewar@adacore.com>
1051 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
1053 2014-07-17 Ed Schonberg <schonberg@adacore.com>
1055 * sem_case.adb (Check_Choice_Set): If the case expression is the
1056 expression in a predicate, do not recheck coverage against itself,
1057 to prevent spurious errors.
1058 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
1059 expression comes from an aspect specification, to prevent spurious
1060 errors when expression is a case expression in a predicate.
1062 2014-07-17 Pascal Obry <obry@adacore.com>
1064 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
1065 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
1067 2014-07-17 Vincent Celier <celier@adacore.com>
1069 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
1070 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
1071 the usage for an erroneous invocation of a gnat tool.
1073 2014-07-16 Vincent Celier <celier@adacore.com>
1075 * gnatls.adb: Get the target parameters only if -nostdinc was
1078 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1080 * checks.adb (Insert_Valid_Check): If the expression is a packed
1081 component of a modular type of the right size the data is always
1082 valid. This os particularly useful if the component is part of
1083 a volatile variable.
1085 2014-07-16 Robert Dewar <dewar@adacore.com>
1087 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
1089 2014-07-16 Thomas Quinot <quinot@adacore.com>
1091 * exp_ch7.ads: Minor documentation fix.
1093 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1095 * sem_ch3.adb (Find_Type_Name): Diagnose properly
1096 a private extension completion that is an interface definition
1097 with an interface list.
1099 2014-07-16 Arnaud Charlet <charlet@adacore.com>
1101 * gnatls.adb (Gnatls): Code clean ups.
1103 2014-07-16 Thomas Quinot <quinot@adacore.com>
1105 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
1106 * sem.adb (Analyze): Handle N_Compound_Statement.
1107 * sprint.adb (Sprint_Node_Actual): Ditto.
1108 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
1109 procedure to handle N_Compound_Statement.
1110 * exp_aggr.adb (Collect_Initialization_Statements):
1111 Use a proper compound statement node, instead of a bogus
1112 expression-with-actions with a NULL statement as its expression,
1113 to wrap collected initialization statements.
1114 * freeze.ads, freeze.adb
1115 (Explode_Initialization_Compound_Statement): New public procedure,
1116 lifted from Freeze_Entity.
1117 (Freeze_Entity): When freezing
1118 an object with captured initialization statements and without
1119 delayed freezing, explode compount statement.
1120 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
1121 case that used to handle bogus EWAs with NULL statement as
1123 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
1124 delayed freezing and captured initialization statements, explode
1127 2014-07-16 Gary Dismukes <dismukes@adacore.com>
1129 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
1131 2014-07-16 Doug Rupp <rupp@adacore.com>
1133 * s-interr-hwint.adb: Casing error on parameter.
1135 2014-07-16 Pascal Obry <obry@adacore.com>
1137 * Makefile.rtl: Add g-rewdat.o dependencies in
1138 GNATRTL_NONTASKING_OBJS.
1140 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1142 * sem_case.adb: Code clean up.
1144 2014-07-16 Vincent Celier <celier@adacore.com>
1146 * make.adb: Do not read gnat.adc when gnatmake is invoked
1149 2014-07-16 Pascal Obry <obry@adacore.com>
1151 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
1152 implementation of GNAT.Rewrite_Data.
1154 2014-07-16 Vincent Celier <celier@adacore.com>
1156 * gnatls.adb (Normalize): New function.
1157 (Gnatls): Get the target parameters. On targets other than VMS,
1158 normalize the path names in the source search path, the object search
1159 path and the project search path.
1161 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1163 * sem_case.adb: Avoid self-checking of case expressions in
1166 2014-07-16 Robert Dewar <dewar@adacore.com>
1168 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
1171 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
1173 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
1175 2014-07-16 Ben Brosgol <brosgol@adacore.com>
1177 * gnat_ugn.texi: Fix typo.
1179 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1181 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
1182 expression if it is the specification of a subtype predicate:
1183 it will be expanded when the return statement is analyzed, or
1184 when a static predicate is transformed into a static expression
1185 for evaluation by the front-end.
1186 * sem_ch13.adb (Get_RList): If the expression for a static
1187 predicate is a case expression, extract the alternatives of the
1188 branches with a True value to create the required statically
1189 evaluable expression.
1191 2014-07-16 Thomas Quinot <quinot@adacore.com>
1193 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
1194 expression, not the location of the aspect, for all generated
1195 code, so that in particular the call to raise_assert_failure
1196 gets the sloc of the associated condition.
1198 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
1199 Set an explicit End_Label on the handled sequence of statements
1200 for the _Postconditions procedure so that the implicit return
1201 statement does not erroneously get associated with code generated
1202 for the last condition in postconditions.
1204 2014-07-16 Thomas Quinot <quinot@adacore.com>
1206 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
1207 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
1208 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
1211 2014-07-16 Robert Dewar <dewar@adacore.com>
1213 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
1214 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
1215 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
1217 * par-ch4.adb (At_Start_Of_Attribute): New function
1218 (P_Simple_Expression): Better msg for bad attribute prefix.
1219 * scans.ads: Minor reformatting.
1221 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1223 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
1224 static constant, check that in belongs to the corresponding index
1225 subtype, to produce the proer warning when expansion is disabled.
1227 2014-07-16 Robert Dewar <dewar@adacore.com>
1229 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
1230 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
1231 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
1232 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
1233 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
1235 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
1236 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
1239 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1241 * exp_ch7.adb (Process_Declarations): Reinstate the check on
1242 a hook object to ensure that the related transient declaration
1244 * exp_util.adb (Is_Aliased): Do not consider expresison with
1245 actions as a special context.
1246 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
1247 ensure that the related transient declaration is finalizable.
1249 2014-07-16 Robert Dewar <dewar@adacore.com>
1251 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
1252 * snames.ads-tmpl: Add Allocation_Check to list of check names.
1253 * types.ads: Add Allocation_Check to list of check names.
1255 2014-07-16 Thomas Quinot <quinot@adacore.com>
1257 * sem_util.adb (Enter_Name): replace bogus test for presence of
1258 Corresponding_Remote_Type with correct test on Ekind.
1259 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
1260 of calls to Corresponding_ Remote_Type (documentation fix).
1262 2014-07-16 Robert Dewar <dewar@adacore.com>
1264 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
1265 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
1267 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
1268 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
1270 2014-07-16 Robert Dewar <dewar@adacore.com>
1272 * gnat_ugn.texi: Document binder switch -Ra.
1273 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
1275 * opt.ads (List_Closure_All): New switch.
1276 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
1279 2014-07-16 Ben Brosgol <brosgol@adacore.com>
1281 * gnat_rm.texi: Minor edits, to make case consistent in names
1282 of types and fields.
1284 2014-07-16 Robert Dewar <dewar@adacore.com>
1286 * gnat_rm.texi: Document erroneous mixing of thin pointers and
1288 * gnat_ugn.texi: Add note on size of access types about thin
1289 pointers and the use of attribute Unrestricted_Access.
1291 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1293 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
1294 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
1295 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
1296 machinery to detect tampering on bounded vectors.
1298 2014-07-16 Robert Dewar <dewar@adacore.com>
1300 * gnat_rm.texi: Document that leading/trailing asterisks are
1301 now implied for the pattern match string for pragma Warnings
1302 and Warning_As_Error.
1303 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
1304 (Analyze_Pragma, case Warning_As_Error): Call
1305 Acquire_Warning_Match_String.
1306 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
1308 2014-07-16 Bob Duff <duff@adacore.com>
1310 * gnat_ugn.texi: Document need for project file
1311 for --incremental switch for gnat2xml.
1313 2014-07-16 Robert Dewar <dewar@adacore.com>
1315 * gnat_rm.texi: Fix example of non-packable components in packed
1318 2014-07-16 Robert Dewar <dewar@adacore.com>
1320 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
1321 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
1322 upper case in exception messages.
1324 2014-07-16 Robert Dewar <dewar@adacore.com>
1326 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
1327 is renamed Has_Same_Storage.
1328 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
1329 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
1332 2014-07-16 Robert Dewar <dewar@adacore.com>
1334 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
1335 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
1337 2014-07-16 Robert Dewar <dewar@adacore.com>
1339 * gnat_ugn.texi: Add note that integrated
1340 preprocessing cannot be applied to configuration pragma files.
1342 2014-07-16 Yannick Moy <moy@adacore.com>
1344 * sem_attr.adb (Analyze_Attribute/cases Pred
1345 and Succ): Always enable range check on fixed-point types if
1346 not suppressed for the type.
1348 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1350 * sem_util.adb (State_Has_Enabled_Property):
1351 Account for an external property denoted by an others choice.
1353 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1355 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
1356 * exp_ch7.adb (Process_Declarations): There is no need to check
1357 that a transient object being hooked is controlled as it would
1358 not have been hooked in the first place.
1359 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
1360 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
1361 (Is_Aliased): A renaming of a transient controlled object is
1362 not considered aliasing when it occurs within an expression
1364 (Requires_Cleanup_Actions): There is no need to
1365 check that a transient object being hooked is controlled as it
1366 would not have been hooked in the first place.
1367 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
1369 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1371 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
1372 the outer level of routine Analyze_Aspect_Specifications. Ensure
1373 that the corresponding pragmas of aspects Initial_Condition and
1374 Initializes are inserted after pragma SPARK_Mode.
1376 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1378 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
1379 properly a choice list with more than one choice, where each
1380 is an aggregate denoting a sequence of array indices for a
1381 multidimentional array. For SPARK use.
1383 2014-07-16 Vadim Godunko <godunko@adacore.com>
1385 * a-coinho-shared.adb (Adjust): Create
1386 copy of internal shared object and element when source container
1389 (Query_Element): Likewise.
1390 (Update_Element): Likewise.
1391 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
1392 to get reference for empty holder.
1393 (Reference): Likewise.
1395 2014-07-16 Thomas Quinot <quinot@adacore.com>
1397 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
1398 from Process_Transient_Oject.
1399 * exp_ch4.ads: Ditto.
1400 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
1401 declaration as an action on the topmost enclosing expression,
1402 not on a possibly conditional subexpreession.
1404 2014-07-16 Vadim Godunko <godunko@adacore.com>
1406 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
1407 Fix parameter mode of Update_Element.
1409 2014-07-16 Robert Dewar <dewar@adacore.com>
1411 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
1414 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1416 * a-cohase.ads: Type Iterator must be controlled, so that the
1417 tampering bit is properly set through an iteration.
1418 * a-cohase.adb: Add Finalize operation for type Iterator.
1420 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1422 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
1425 2014-07-16 Ed Schonberg <schonberg@adacore.com>
1427 * a-coinho-shared.adb: Fix spurious accessibility check.
1429 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1431 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
1433 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1436 * gnat_rm.texi: Fix errors with makeinfo 5.1.
1438 2014-06-14 Arnaud Charlet <charlet@adacore.com>
1441 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
1443 2014-06-13 Yannick Moy <moy@adacore.com>
1445 * exp_attr.adb: Fix typo in comment.
1446 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
1447 checking in GNATprove_Mode.
1449 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1451 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
1453 2014-06-13 Robert Dewar <dewar@adacore.com>
1455 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
1458 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1460 * sem_prag.adb (Analyze_Pragma): Add local
1461 variable Missing_Parentheses. Emit an error when a state
1462 declaration with options appears without parentheses. Add a
1463 guard to prevent a bogus error when a state declaration may be
1464 interpreted as an option if a previous declaration with options
1465 was not parenthesized.
1467 2014-06-13 Robert Dewar <dewar@adacore.com>
1469 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
1470 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
1471 * checks.ads (Alignment_Warnings_Record): New type.
1472 (Alignment_Warnings): New table
1473 (Validate_Alignment_Check_Warnings): New procedure.
1474 * errout.adb (Delete_Warning_And_Continuations): New procedure
1475 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
1476 Warnings_Treated_As_Errors (Finalize): Minor reformatting
1477 * errout.ads (Warning_Msg): New variable
1478 (Delete_Warning_And_Continuations): New procedure
1479 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
1480 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
1482 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1484 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
1486 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1488 * errout.adb (SPARK_Msg_N): New routine.
1489 (SPARK_Msg_NE): New routine.
1490 * errout.ads Add a section on SPARK-related error routines.
1491 (SPARK_Msg_N): New routine.
1492 (SPARK_Msg_NE): New routine.
1493 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
1494 pragma Abstract_State is always inserted after SPARK_Mode.
1495 (Insert_After_SPARK_Mode): New routine.
1496 * sem_prag.adb (Analyze_Abstract_State,
1497 Analyze_Constituent, Analyze_External_Property,
1498 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
1499 Analyze_Global_List, Analyze_Initialization_Item,
1500 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
1501 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
1502 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
1503 Analyze_Refined_Global_In_Decl_Part,
1504 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
1505 Check_Aspect_Specification_Order, Check_Constituent_Usage,
1506 Check_Declaration_Order, Check_Dependency_Clause,
1507 Check_Duplicate_Mode, Check_Duplicate_Option,
1508 Check_Duplicate_Property, Check_External_Properties,
1509 Check_External_Property, Check_Function_Return,
1510 Check_Matching_Constituent, Check_Matching_State,
1511 Check_Mode_Restriction_In_Enclosing_Context,
1512 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
1513 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
1514 Has_Extra_Parentheses, Inconsistent_Mode_Error,
1515 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
1516 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
1517 Report_Unrefined_States, Report_Unused_Constituents,
1518 Report_Unused_States, Role_Error, Usage_Error):
1519 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
1520 to report semantic errors only when SPARK_Mode is on.
1521 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
1522 pragma Depends explicitly, this is now done by the analysis.
1523 (Analyze_Global_In_Decl_List): Do not check the syntax of
1524 pragma Global explicitly, this is now done by the analysis.
1525 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
1526 pragma Initializes explicitly, this is now done by the analysis.
1527 (Analyze_Part_Of): Do not check the syntax of the encapsulating
1528 state, this is now done by the analysis.
1529 (Analyze_Pragma): Do
1530 not check the syntax of a state declaration, this is now done
1532 (Analyze_Refined_Depends_In_Decl_Part): Do not
1533 check the syntax of pragma Refined_Depends explicitly, this is now
1534 done by the analysis.
1535 (Analyze_Refined_Global_In_Decl_Part): Do
1536 not check the syntax of pragma Refined_Global explicitly, this is
1537 now done by the analysis.
1538 (Analyze_Refined_State_In_Decl_Part):
1539 Do not check the syntax of pragma Refined_State explicitly, this
1540 is now done by the analysis.
1541 (Check_Dependence_List_Syntax): Removed.
1542 (Check_Global_List_Syntax): Removed.
1543 (Check_Initialization_List_Syntax): Removed.
1544 (Check_Item_Syntax): Removed.
1545 (Check_Missing_Part_Of): Do not consider items from an instance.
1546 (Check_Refinement_List_Syntax): Removed.
1547 (Check_State_Declaration_Syntax): Removed.
1548 (Collect_Global_List): Do not raise Program_Error when the input is
1550 (Process_Global_List): Do not raise Program_Error when the input
1552 * sem_ch13.adb: Minor reformatting.
1554 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1556 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
1557 that is an interface definition with an interface list.
1558 (Process_Full_View): Move error message on missmatched interfaces
1559 between views to the declaration of full view, for clarity.
1560 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
1563 2014-06-13 Robert Dewar <dewar@adacore.com>
1565 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
1568 2014-06-13 Robert Dewar <dewar@adacore.com>
1570 * makeutl.adb: Minor reformatting.
1572 2014-06-13 Gail Schenker <schenker@adacore.com>
1574 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
1575 associated flag (d.z), no longer needed.
1577 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1579 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
1580 Export aspects, do not check whether a corresponding Convention
1581 aspect has been specified. Convention is optional in Ada2012,
1582 and defaults to Convention_Ada.
1584 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
1586 * checks.adb (Apply_Address_Clause_Check): Only issue the new
1587 warning if the propagation warning is issued.
1589 2014-06-13 Thomas Quinot <quinot@adacore.com>
1591 * exp_ch4.adb: Minor reformatting.
1593 2014-06-13 Robert Dewar <dewar@adacore.com>
1595 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
1596 Handle float range check case (Expand_N_Attribute_Reference,
1597 case Succ): Handle float range check case.
1598 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
1601 2014-06-13 Vincent Celier <celier@adacore.com>
1603 * makeutl.ads (Compute_Builder_Switches): Change name of
1604 parameter Root_Environment to Env.
1605 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
1606 Env parameter of procedure Get_Or_Create_Configuration_File.
1607 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
1608 of new parameter Env.
1609 * prj-conf.ads (Locate_Runtime): New parameter Env of type
1610 Prj.Tree.Environment.
1612 2014-06-13 Robert Dewar <dewar@adacore.com>
1614 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
1616 2014-06-13 Robert Dewar <dewar@adacore.com>
1618 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
1620 * sem_attr.adb: Minor code reformatting and simplification.
1621 * checks.adb: Fix minor typo.
1623 2014-06-13 Emmanuel Briot <briot@adacore.com>
1625 * g-comlin.adb (Get_Argument): fix expansion
1626 of command line arguments (e.g. "*.adb") when using a custom
1627 parser. The parser was not passed to the recursive call, and
1628 thus we were trying to do the expansion on the default command
1631 2014-06-13 Thomas Quinot <quinot@adacore.com>
1633 * exp_ch9.adb: Minor reformatting.
1635 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1637 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
1638 To determine whether the attribute should be expanded, examine
1639 whether the enclosing postcondition pragma is to be checked,
1640 rather than using the internal flag Assertions_Enabled.
1642 2014-06-13 Ben Brosgol <brosgol@adacore.com>
1644 * gnat_rm.texi: Minor fixes.
1645 * gnat_ugn.texi: Added a missing "@itemize".
1647 2014-06-13 Robert Dewar <dewar@adacore.com>
1649 * debug.adb: Remove -gnatd.1 flag documentation.
1650 * layout.adb (Layout_Type): Remove special handling of size
1651 for anonymous access type.
1652 * sem_ch3.adb (Replace_Type): Remove special handling of size
1653 for anonymous access type.
1655 2014-06-13 Robert Dewar <dewar@adacore.com>
1657 * debug.adb: Document debug flag -gnatd.1.
1658 * layout.adb (Layout_Type): Size change for anonymous access
1659 types under -gnatd.1.
1660 * sem_ch3.adb (Replace_Type): Size change for anonymous access
1661 types under -gnatd.1.
1663 2014-06-13 Robert Dewar <dewar@adacore.com>
1665 * layout.adb (Layout_Type): Anonymous access types designating
1666 unconstrained arrays are always thin pointers.
1667 * sem_ch3.adb (Replace_Type): Anonymous access types designating
1668 unconstrained arrays are always thin pointers.
1670 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1672 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
1673 to resolve the prefix of an attribute that is an entity name
1674 and may be a parameterless call. Minor code reorganization.
1676 2014-06-13 Robert Dewar <dewar@adacore.com>
1678 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
1680 * opt.ads (Compiler_Unit): New flag.
1681 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
1682 for null statement sequence (not allowed in compiler unit).
1683 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
1685 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
1687 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
1688 Check_Compiler_Unit.
1689 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
1690 Check_Compiler_Unit (this construct is not allowed in compiler
1692 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
1693 Set Opt.Compiler_Unit.
1695 2014-06-13 Geert Bosch <bosch@adacore.com>
1697 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
1698 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
1699 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
1701 2014-06-13 Robert Dewar <dewar@adacore.com>
1703 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
1705 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1707 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
1708 types in SPARK as it is poorly placed and poorly formulated. The
1709 check was flagging ALL volatile entities as illegal in SPARK.
1710 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
1711 types as illegal in SPARK.
1713 2014-06-13 Robert Dewar <dewar@adacore.com>
1715 * sem_cat.adb: Minor reformatting.
1717 2014-06-13 Yannick Moy <moy@adacore.com>
1719 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
1721 2014-06-13 Arnaud Charlet <charlet@adacore.com>
1723 * gnat_rm.texi: Add detail on SPARK_05 restriction.
1725 2014-06-13 Bob Duff <duff@adacore.com>
1727 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
1728 Add assertions requiring the secondary stack to be initialized.
1729 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
1730 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
1731 secondary stack is initialized before calling Init_Tasking_Soft_Links,
1732 by adding pragmas Elaborate_Body.
1734 2014-06-13 Thomas Quinot <quinot@adacore.com>
1736 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
1737 kludge disabling new legality check.
1739 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1741 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
1743 (Freeze_Type): Volatile types are now illegal in SPARK.
1745 2014-06-13 Robert Dewar <dewar@adacore.com>
1747 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
1748 * gnat_rm.texi: Document aspect Thread_Local_Storage.
1750 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1752 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
1753 value is a temporary that renames an aggregate is legal in a
1754 preelaborated unit. Illegalities, if any will be detected in
1755 the aggregate components.
1757 2014-06-13 Ed Schonberg <schonberg@adacore.com>
1759 * einfo.ads: Minor reformatting an comment expansion.
1761 2014-06-13 Robert Dewar <dewar@adacore.com>
1763 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
1765 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
1767 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
1768 * sem_warn.adb: Minor reformatting.
1770 2014-06-13 Doug Rupp <rupp@adacore.com>
1772 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
1775 2014-06-13 Yannick Moy <moy@adacore.com>
1777 * sem_warn.adb (Check_Unset_References): Take
1778 case of Refined_Post into account in Within_Postcondition check.
1780 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
1782 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
1785 2014-06-13 Yannick Moy <moy@adacore.com>
1787 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
1788 Aspect_Export): Consider that variables may be set outside the program.
1790 2014-06-13 Robert Dewar <dewar@adacore.com>
1792 * back_end.adb (Make_Id): New function.
1793 (Make_SC): New function.
1794 (Set_RND): New procedure.
1795 * back_end.ads (Make_Id): New function.
1796 (Make_SC): New function.
1797 (Set_RND): New procedure.
1798 * einfo.ads: Minor comment updates.
1799 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
1800 * gnat1drv.adb (Gnat1drv): New calling sequence for
1801 Get_Target_Parameters.
1802 (Gnat1drv): Move Atree.Initialize here from Frontend.
1803 * targparm.adb (Get_Target_Parameters): New calling
1804 sequence (Get_Target_Parameters): Handle pragma Restriction
1806 * targparm.ads (Get_Target_Parameters): New calling sequence.
1808 2014-06-13 Gary Dismukes <dismukes@adacore.com>
1810 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
1811 loop if the pragma does not come from source, so that an implicit
1812 pragma Import only applies to the first declaration, avoiding
1813 possible conflicts with earlier explicit and implicit declarations
1814 due to multiple Provide_Shift_Operators pragmas.
1815 (Set_Imported): Remove previous fix that bypassed pragma duplication
1817 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
1818 of Provide_Shift_Operators.
1820 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
1822 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
1823 string pointer directly to set_decl_section_name.
1825 2014-06-11 Robert Dewar <dewar@adacore.com>
1827 * sem_ch13.adb: Minor reformatting.
1829 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1831 * sem_prag.adb (Check_Clause_Syntax): Add new
1832 local variable Outputs. Account for the case where multiple
1833 output items appear as an aggregate.
1835 2014-06-11 Robert Dewar <dewar@adacore.com>
1837 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1840 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1842 * einfo.ads: Minor reformatting.
1844 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1846 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1847 new variable First_Node. Update the position after all insertions have
1848 taken place to First_Node.
1850 2014-06-11 Robert Dewar <dewar@adacore.com>
1852 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1853 * layout.adb (Layout_Type): Remove test of -gnatd.1.
1855 2014-06-11 Robert Dewar <dewar@adacore.com>
1857 * sem_ch13.adb: Minor reformatting.
1859 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1861 * sem_prag.adb (Check_Clause_Syntax): Add new
1862 local variable Outputs. Account for the case where multiple
1863 output items appear as an aggregate.
1865 2014-06-11 Robert Dewar <dewar@adacore.com>
1867 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1870 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1872 * einfo.ads: Minor reformatting.
1874 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1876 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1877 new variable First_Node. Update the position after all insertions have
1878 taken place to First_Node.
1880 2014-06-11 Robert Dewar <dewar@adacore.com>
1882 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1883 * layout.adb (Layout_Type): Remove test of -gnatd.1.
1885 2014-06-11 Thomas Quinot <quinot@adacore.com>
1887 * freeze.ads: Minor reformatting.
1888 * checks.adb (Determine_Range): Do not attempt to determine
1889 the range of a deferred constant whose full view has not been
1891 * sem_res.adb (Resolve): Remove undesirable guard against
1892 resolving expressions from expression functions.
1894 2014-06-11 Robert Dewar <dewar@adacore.com>
1896 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
1898 * layout.adb (Layout_Type): Make anonymous access types for
1899 subprogram formal types and return types always thin. For now
1900 only enabled if -gnatd.1 set.
1902 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1904 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
1905 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
1906 subprogram must be a null procedure.
1908 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1910 * sem_prag.adb (Analyze_Input_Item): Allow formal
1911 parameters to appear as input_items in an initialization_list
1912 of pragma Initializes. Encapsulation now applies to states and
1913 variables only (as it should). Add RM references to key errors.
1914 * sem_prag.adb (Set_Imported): Suppress errors
1915 about preceding Imports when the pragma does not come from source,
1916 which can happen through use of pragma Provide_Shift_Operators.
1918 2014-06-11 Thomas Quinot <quinot@adacore.com>
1920 * sem_ch3.adb: Minor reformatting.
1921 * einfo.ads (Full_View): Minor comment update.
1923 2014-06-11 Robert Dewar <dewar@adacore.com>
1925 * einfo.adb (Is_Independent): New flag.
1926 * einfo.ads (Is_Independent): New flag.
1927 (Has_Independent_Components): Clean up and fix comments.
1928 * sem_prag.adb (Fix_Error): Deal with changing argument
1929 [of] to entity [for].
1930 (Analyze_Pragma, case Independent): Set Is_Independent flag
1931 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
1932 in all components of specified record.
1934 2014-06-11 Thomas Quinot <quinot@adacore.com>
1936 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
1937 Set proper Etype on bounds of dummy type created for analysis
1940 2014-06-11 Robert Dewar <dewar@adacore.com>
1942 * debug.adb: Minor comment fix (add missing section of dot
1945 2014-06-11 Robert Dewar <dewar@adacore.com>
1947 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
1948 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
1949 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
1950 * errout.adb (Output_Messages): Avoid duplicate output for
1951 library level instance.
1952 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
1953 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
1954 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
1955 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
1956 accomodate largest modulus value.
1957 * gnat_ugn.texi: Minor updates.
1959 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1961 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
1962 load body of generic package or its parent, if body is optional
1963 and the unit does not require a body.
1965 2014-06-11 Robert Dewar <dewar@adacore.com>
1967 * gnat_rm.texi: Document System.Unsigned_Types.
1968 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
1969 * s-unstyp.ads: Update comments (this is now user available unit).
1971 2014-06-11 Robert Dewar <dewar@adacore.com>
1973 * make.adb, sem_res.adb: Minor reformatting.
1975 2014-06-11 Thomas Quinot <quinot@adacore.com>
1977 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
1978 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
1979 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
1980 Preelaborate_05 to just Preelaborate in runtime units, and similarly
1981 change Pure_05 to just Pure.
1983 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1985 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
1986 analysis if error has been posted on subprogram body.
1988 2014-06-11 Ed Schonberg <schonberg@adacore.com>
1990 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
1991 rule given in RM 13.1 (8/1) for operational attributes to stream
1992 attributes: the attribute must apply to a first subtype. Fixes
1993 missing errors in ACATS test bdd2004.
1995 2014-06-11 Robert Dewar <dewar@adacore.com>
1997 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
1998 record type if restriction No_Implicit_Conditionals is active.
1999 (Expand_N_Object_Declaration): Don't allow default initialization
2000 for variant record type if restriction No_Implicit_Condition is active.
2001 (Build_Variant_Record_Equality): Don't build for variant
2002 record type if restriction No_Implicit_Conditionals is active.
2003 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
2004 No_Implicit_Conditionals.
2005 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
2007 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
2009 * i-cstrin.ads: Update comments.
2011 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2013 * sem_res.adb (Resolve_Selected_Component): Handle properly a
2014 selected component whose prefix is overloaded, when none of the
2015 interpretations matches the expected type.
2017 2014-06-11 Bob Duff <duff@adacore.com>
2019 * make.adb (Wait_For_Available_Slot): Give a more
2020 informative error message; if the ALI file is not found, print
2021 the full path of what it's looking for.
2023 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
2025 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
2026 option to specify the result file encoding.
2028 2014-06-11 Robert Dewar <dewar@adacore.com>
2030 * errout.ads, sem_ch12.adb: Minor reformatting.
2031 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
2032 * lib-xref.adb: Minor reformatting.
2033 * restrict.adb: Minor code reorganization (put routines in
2036 2014-06-11 Yannick Moy <moy@adacore.com>
2038 * einfo.ads: Minor typo in comment
2040 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2042 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
2043 formal private types and private type extensions, to indicate
2044 variable in a generic unit whose uninitialized use suggest that
2045 actual type should be fully initialized.
2046 Needs_Initialized_Actual: removed, functionaity replaced by
2048 * lib-xref.adb (Generate_Reference): Generate a reference for
2049 variables of a formal type when the unit is not the main unit,
2050 to enable appropriate warnings in an instance.
2051 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
2052 of variable in a generic unit that suggests that actual type
2053 should be full initialized.
2054 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
2055 and do not emot warning, which now only appears in an instance.
2057 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
2059 * gnat_ugn.texi: Fix minor typo.
2061 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2063 * sem_ch3.adb Add with and use clause for Sem_Ch10.
2064 (Analyze_Declarations): Code reformatting. Analyze the contract
2065 of a subprogram body stub at the end of the declarative region.
2066 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
2067 now a variable. Do not process the body if its contract is not
2068 available. Account for subprogram body stubs when extracting
2069 the corresponding spec.
2070 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
2072 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
2074 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2075 Account for subprogram body stubs when extracting the
2077 (Analyze_Global_In_Decl_List):
2078 Account for subprogram body stubs when extracting the
2080 (Analyze_Refined_Depends_In_Decl_Part):
2081 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
2082 of the related body. Spec_Is now a variable. Account for
2083 subprogram body stubs when extracting the corresponding spec.
2084 (Analyze_Refined_Global_In_Decl_Part): Use
2085 Find_Related_Subprogram_Or_Body to retrieve the declaration
2086 of the related body. Spec_Is now a variable. Account for
2087 subprogram body stubs when extracting the corresponding spec.
2088 (Collect_Subprogram_Inputs_Output): Account for subprogram body
2089 stubs when extracting the corresponding spec.
2091 2014-06-11 Vincent Celier <celier@adacore.com>
2093 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
2096 2014-06-11 Robert Dewar <dewar@adacore.com>
2098 * debug.adb: Add debug flag -gnatd.q.
2099 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
2101 * styleg.adb (Check_Xtra_Parens): Message should be a style
2103 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
2104 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
2105 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
2106 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
2108 2014-06-11 Ben Brosgol <brosgol@adacore.com>
2110 * gnat_rm.texi: Revised chapter on Implementation Defined
2113 2014-06-11 Geert Bosch <bosch@adacore.com>
2115 * s-exctab.adb: avoid race conditions in exception registration.
2117 2014-06-11 Robert Dewar <dewar@adacore.com>
2119 * errout.adb (Warn_Insertion): New function.
2120 (Error_Msg): Use Warn_Insertion and Prescan_Message.
2121 (Error_Msg_Internal): Set Info field of error object.
2122 (Error_Msg_NEL): Use Prescan_Message.
2123 (Set_Msg_Text): Don't store info: at start of message.
2124 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
2125 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
2126 * errout.ads: Document new ?$? and >$> insertion sequences
2127 Document use of "(style)" and "info: "
2128 * erroutc.adb (dmsg): Print several missing fields
2129 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
2130 Deal with new tagging of info messages
2131 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
2132 Add field Info (Prescan_Message): New procedure, this procedure
2133 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
2134 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
2135 sem_elab.adb: Follow new rules for info message (info belongs
2136 only at the start of a message, and only in the first message,
2137 not in any of the continuations).
2138 * gnat_ugn.texi: Document full set of warning tags.
2140 2014-06-11 Gary Dismukes <dismukes@adacore.com>
2142 * sem_util.adb: Minor typo fix.
2144 2014-06-11 Ed Schonberg <schonberg@adacore.com>
2146 * sem_warn.adb (Check_References): Do not emit spurious warnings
2147 on uninitialzed variable of a formal private type if variable
2150 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
2152 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
2153 set_decl_section_name accessor.
2155 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2157 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2158 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2159 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2161 2014-05-21 Robert Dewar <dewar@adacore.com>
2163 * layout.adb: Minor reformatting.
2164 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
2167 2014-05-21 Robert Dewar <dewar@adacore.com>
2169 * restrict.ads (Implementation_Restriction): Add entry for
2171 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
2172 Ada.[Wide_[Wide_]Text_IO.
2173 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
2174 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
2175 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
2176 Wide_Wide_Value if restriction No_Fixed_IO is set.
2177 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
2179 2014-05-21 Robert Dewar <dewar@adacore.com>
2181 * gnatcmd.adb: Minor error msg changes (no upper case letter
2183 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
2186 2014-05-21 Robert Dewar <dewar@adacore.com>
2188 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
2189 via generic formals.
2190 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
2193 2014-05-21 Thomas Quinot <quinot@adacore.com>
2195 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
2196 more accurately describe that this subprogram needs to come into
2197 play also in cases where no byte swapping is involved, because
2198 it also takes care of some required shifts (left-justification
2201 2014-05-21 Thomas Quinot <quinot@adacore.com>
2203 * freeze.adb (Check_Component_Storage_Order): Indicate whether
2204 a Scalar_Storage_Order attribute definition is present for the
2206 (Freeze_Record_Type): Suppress junk warnings
2207 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
2210 2014-05-21 Robert Dewar <dewar@adacore.com>
2212 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
2213 to Kill_Elaboration_Checks.
2215 2014-05-21 Gary Dismukes <dismukes@adacore.com>
2217 * layout.adb (Assoc_Add): Suppress the optimization of the (E
2218 - C1) + C2 case, when the expression type is unsigned and C1 <
2219 C2, to avoid creating a negative literal when folding.
2221 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2223 * freeze.adb (Freeze_Record_Type): Update the use of
2225 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
2227 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
2228 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
2229 of Is_SPARK_Volatile.
2230 (Analyze_Loop_Parameter_Specification):
2231 Update the use of Is_SPARK_Volatile.
2232 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
2233 formal parameter when its type is volatile.
2234 * sem_prag.adb (Analyze_Global_Item): Update the use of
2236 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
2237 determines whether an entity is a volatile source SPARK object.
2238 * sem_util.adb (Has_Enabled_Property): Accout for external
2239 properties being set on objects other than abstract states
2240 and variables. An example would be a formal parameter.
2241 (Is_SPARK_Volatile): New routine.
2242 (Is_SPARK_Volatile_Object):
2243 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
2244 when checking entities and/or types.
2245 * sem_util.ads (Is_SPARK_Volatile): New routine.
2247 2014-05-21 Robert Dewar <dewar@adacore.com>
2249 * sem_warn.adb: Minor fix to warning messages (use ?? instead
2252 2014-05-21 Vincent Celier <celier@adacore.com>
2254 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
2255 switch --version and --help.
2257 2014-05-21 Robert Dewar <dewar@adacore.com>
2259 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
2261 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2263 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
2264 iterator variable when the domain of iteration is a formal
2265 container and this is an element iterator.
2267 2014-05-21 Bob Duff <duff@adacore.com>
2269 * sem_ch12.adb: Minor reformatting.
2271 2014-05-21 Robert Dewar <dewar@adacore.com>
2273 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
2275 2014-05-21 Robert Dewar <dewar@adacore.com>
2277 * sem_elab.adb: Minor reformatting.
2278 * s-taprop.ads: Minor comment fix.
2279 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
2280 Kill_Elaboration_Checks.
2281 * errout.adb, erroutc.adb: Minor reformatting.
2283 2014-05-21 Thomas Quinot <quinot@adacore.com>
2285 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
2286 component. No byte swapping occurs, but this procedure also takes
2287 care of appropriately justifying the argument.
2289 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2291 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
2293 (Analyze_Subprogram_Body_Helper): Move the
2294 analysis of aspect specifications and the processing of the
2295 subprogram body contract after inlining has taken place.
2296 (Diagnose_Misplaced_Aspect_Specifications): Removed.
2298 2014-05-21 Javier Miranda <miranda@adacore.com>
2300 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
2302 2014-05-21 Robert Dewar <dewar@adacore.com>
2304 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
2305 continuations any more.
2307 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2309 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
2310 present in formal_Private_Definitions and on private extension
2311 declarations of a formal derived type. Set when the use of the
2312 formal type in a generic suggests that the actual should be a
2313 fully initialized type.
2314 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
2315 to indicate that an entity of a generic type has default
2316 initialization, and that the corresponing actual type in any
2317 subsequent instantiation should be fully initialized.
2318 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
2319 to emit a warning if the actual for a generic type on which
2320 Needs_Initialized_Actual is set is not a fully initialized type.
2322 2014-05-21 Robert Dewar <dewar@adacore.com>
2324 * sem_elab.adb, prj-dect.adb: Minor reformatting.
2326 2014-05-21 Robert Dewar <dewar@adacore.com>
2328 * erroutc.ads: Minor comment addition.
2330 2014-05-21 Robert Dewar <dewar@adacore.com>
2332 * errout.ads: Add documentation for use of >*> tag.
2333 * restrict.adb: Make sure we use >*> tag for restriction warnings.
2335 2014-05-21 Gary Dismukes <dismukes@adacore.com>
2337 * debug.adb: Add case of illegal overriding_indicator for a
2338 protected subprogram body to description of -gnatd.E switch.
2339 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
2340 for cases of giving overriding_indicators on protected subprogram
2341 bodies, but change this to a warning if -gnatd.E is enabled. No
2342 longer give a style warning about missing indicators on protected
2345 2014-05-21 Robert Dewar <dewar@adacore.com>
2347 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
2348 sem_elab.ads: Minor reformatting.
2349 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
2352 2014-05-21 Pascal Obry <obry@adacore.com>
2354 * prj-dect.adb: Allow package Install in aggregate project.
2356 2014-05-21 Robert Dewar <dewar@adacore.com>
2358 * sem_ch13.adb (Analyze_Aspect_Specifications):
2359 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
2360 * sem_prag.adb: Minor comment improvements.
2362 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2364 * sem_ch12.adb (Install_Body): When checking whether freezing of
2365 instantiation must be delayed, verify that the common enclosing
2366 subprogram to generic and instance is in fact an overloadable
2369 2014-05-21 Vincent Celier <celier@adacore.com>
2371 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
2372 mains with the same name and fail if there is more than one.
2373 * prj.ads, prj.adb (Find_All_Sources): New function
2375 2014-05-21 Robert Dewar <dewar@adacore.com>
2377 * sem_ch13.adb: Minor reformatting.
2378 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
2379 * sem_prag.adb: Minor error message improvement.
2381 2014-05-21 Yannick Moy <moy@adacore.com>
2383 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
2384 (Enclosing_Subprogram_Or_Package): Only return a library-level
2387 2014-05-21 Javier Miranda <miranda@adacore.com>
2389 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
2390 to the full view of the parent type when processing a derived type
2391 which is the full view of a private type not defined in a generic
2392 unit which is derived from a private type with discriminants
2393 whose full view is a non-tagged record type.
2395 2014-05-21 Javier Miranda <miranda@adacore.com>
2397 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
2398 Complete previous patch.
2400 2014-05-21 Thomas Quinot <quinot@adacore.com>
2403 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
2404 Provide a behaviour more consistent with underlying datagram
2405 socket: do not attempt to loop over Send_Socket/Receive_Socket
2406 iterating along the buffer.
2408 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2410 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
2411 or a tagged type is not labelled as volatile. Ensure that a
2412 non-volatile type has no volatile components.
2413 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
2414 Obj_Typ. Code reformatting. Ensure that a discriminated or
2415 tagged object is not labelled as volatile.
2416 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
2417 pragma Volatile applies to a full type declaration or an object
2418 declaration when SPARK mode is on.
2420 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
2422 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
2423 providing options needed for compiling the argument source for
2424 the situation when a project file can be used as a tool parameter.
2426 2014-05-21 Gary Dismukes <dismukes@adacore.com>
2428 * gnat_rm.texi: Minor typo fix.
2430 2014-05-21 Robert Dewar <dewar@adacore.com>
2432 * stand.adb (Tree_Read): Read missing entities.
2433 (Tree_Write): Write missing entities.
2435 2014-05-21 Ben Brosgol <brosgol@adacore.com>
2437 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
2438 section in gnatmetric chapter.
2440 2014-05-21 Robert Dewar <dewar@adacore.com>
2442 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
2443 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
2444 post-call copy write back (see detailed comment in code).
2445 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
2447 * tbuild.ads: Minor reformatting.
2449 2014-05-21 Robert Dewar <dewar@adacore.com>
2451 * stand.ads: Add warning about adding new entities and
2452 Tree_Read/Tree_Write.
2454 2014-05-21 Robert Dewar <dewar@adacore.com>
2456 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
2457 references to restricted entities within the units in which they
2460 2014-05-21 Robert Dewar <dewar@adacore.com>
2462 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
2463 simplify the needed test, and also deal with failure to catch
2464 situations with non-standard names.
2465 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
2466 (Source_File_Is_Subunit): Removed, no longer used.
2468 2014-05-21 Javier Miranda <miranda@adacore.com>
2471 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
2472 renaming of an access to interface object there is no need to
2473 generate extra code to reference the tag.
2475 2014-05-21 Robert Dewar <dewar@adacore.com>
2477 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
2478 Warnings (Off, string).
2480 2014-05-21 Robert Dewar <dewar@adacore.com>
2482 * osint.adb: Fix three error messages to say invalid instead
2484 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
2485 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
2486 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
2488 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2490 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
2491 sem_ch9.ads: Move discriminant manipulation routines for analysis of
2492 aspect specifications from sem_ch9 to sem_ch13, where they belong.
2494 2014-05-21 Robert Dewar <dewar@adacore.com>
2496 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
2497 Clearly document -gnatyg (GNAT style switches).
2498 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
2499 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
2500 available for VMS after all.
2501 * warnsw.adb: Reorganize to eliminate duplicated code
2502 (Restore_Warnings): Add a couple of missing entries
2503 (Save_Warnings): Add a couple of missing entries.
2504 * warnsw.ads: Add missing entries to Warning_Record (not clear
2505 what the impact is).
2507 2014-05-21 Robert Dewar <dewar@adacore.com>
2509 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
2511 * errout.ads: Document ?*? (restriction warning) insertion.
2512 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
2514 * erroutc.ads: Document use of * for restriction warning tag.
2515 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
2517 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2519 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
2520 make discriminants immediately visible when analyzing an aspect
2521 of a subtype declaration.
2522 (Uninstall_Discriminants): Do not apply to the entity in a
2523 subtype declaration.
2525 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2527 * sem_util.adb: Code clean up.
2529 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
2531 * gnat_ugn.texi: Document -Werror.
2533 2014-05-21 Bob Duff <duff@adacore.com>
2535 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
2536 This was returning False if the Object is a constant view. Fix
2537 it to return True in that case, because it might be a view of
2539 (Has_Discriminant_Dependent_Constraint): Fix latent
2540 bug; this function was crashing when passed a discriminant.
2542 2014-05-21 Robert Dewar <dewar@adacore.com>
2544 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
2545 * s-arit64.adb: Minor code reorganization.
2546 * sem_prag.adb: Minor comment fix (remove erroneous use of the
2549 2014-05-21 Robert Dewar <dewar@adacore.com>
2551 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
2552 computing new table size.
2554 2014-05-21 Robert Dewar <dewar@adacore.com>
2556 * einfo.ads: Minor reformatting.
2557 * ceinfo.adb: Deal with slight format change of einfo.ads.
2559 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2561 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
2562 implementation of the SPARK 2014 rule concerning private child
2565 2014-05-21 Vincent Celier <celier@adacore.com>
2567 * makeusg.adb: Add switch -d to usage.
2569 2014-05-21 Ed Schonberg <schonberg@adacore.com>
2571 * sem_util.adb (Find_Actual): If an actual that is the prefix
2572 of an enclosing prefixed call has been rewritten, use Nkind
2573 and Sloc to identify the corresponding formal, when handling
2574 deferred references.
2576 2014-05-21 Robert Dewar <dewar@adacore.com>
2578 * debug.adb: Document -gnatd.z switch.
2579 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
2581 2014-05-21 Robert Dewar <dewar@adacore.com>
2583 * einfo.ads (Can_Never_Be_Null): Minor comment update.
2584 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
2585 error message change.
2586 * s-arit64.adb ("abs"): New function. Use expression functions
2587 for the simple conversions and arithmetic.
2589 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2591 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
2592 set function_start_locus.
2594 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2596 * utils.c (gnat_write_global_declarations): Adjust the flags put on
2599 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2601 * gcc-interface/decl.c (change_qualified_type): New static function.
2602 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
2603 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
2604 <E_Array_Subtype>: Likewise.
2605 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
2606 (gnat_to_gnu_component_type): Likewise.
2607 (gnat_to_gnu_param): Likewise.
2609 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2611 * fe.h (Set_Present_Expr): Move around.
2612 (End_Location): New macro.
2613 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
2615 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2617 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
2618 lieu of more verbose construct.
2619 * gcc-interface/trans.c (Call_to_gnu): Likewise.
2620 (gnat_to_gnu): Likewise. Remove obsolete code.
2622 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
2624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
2625 consider that regular packed arrays can never be superflat.
2627 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2629 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
2631 * gcc-interface/decl.c (annotate_value): Adjust.
2632 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
2633 (push_range_check_info): Likewise.
2634 (Loop_Statement_to_gnu): Likewise.
2635 (Subprogram_Body_to_gnu): Likewise.
2636 (Compilation_Unit_to_gnu): Likewise.
2637 (start_stmt_group): Likewise.
2638 * gcc-interface/utils.c (init_gnat_utils): Likewise.
2639 (gnat_pushlevel): Likewise.
2640 (maybe_pad_type): Likewise.
2642 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
2644 * seh_init.c: Fix copyright year.
2646 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2648 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
2649 are defined. Move include windows.h before system.h.
2650 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
2651 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
2653 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2655 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
2656 to the appropriate type.
2657 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
2658 (pos_to_constructor): Likewise.
2660 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
2662 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
2664 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2665 Mike Stump <mikestump@comcast.net>
2666 Richard Sandiford <rdsandiford@googlemail.com>
2668 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
2669 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
2670 (annotate_value): Use wide-int interfaces.
2671 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
2673 2014-04-28 Richard Henderson <rth@redhat.com>
2675 * gcc-interface/Makefile.in: Support aarch64-linux.
2677 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
2679 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
2680 add 'Suffix' parameter and adjust comment.
2681 (Get_External_Name_With_Suffix): Delete.
2682 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
2683 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
2685 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
2686 Call Get_External_Name instead of Get_External_Name_With_Suffix.
2687 (Get_Secondary_DT_External_Name): Likewise.
2688 * exp_cg.adb (Write_Call_Info): Likewise.
2689 * exp_disp.adb (Export_DT): Likewise.
2690 (Import_DT): Likewise.
2691 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
2692 parameter with False default.
2693 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
2694 * types.h (Fat_Pointer): Rename into...
2695 (String_Pointer): ...this. Add comment on interfacing rules.
2696 * fe.h (Compiler_Abort): Adjust for above renaming.
2697 (Error_Msg_N): Likewise.
2698 (Error_Msg_NE): Likewise.
2699 (Get_External_Name): Likewise. Add third parameter.
2700 (Get_External_Name_With_Suffix): Delete.
2701 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
2702 (create_concat_name): Adjust call to Get_External_Name, remove call to
2703 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
2704 * gcc-interface/trans.c (post_error): Likewise.
2705 (post_error_ne): Likewise.
2706 * gcc-interface/misc.c (internal_error_function): Likewise.
2708 2014-04-28 Richard Biener <rguenther@suse.de>
2711 * gcc-interface/utils.c: Define flag_isoc11.
2713 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
2715 * gnatvsn.ads (Library_Version): Bump to 4.10.
2717 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
2720 2014-04-22 Richard Henderson <rth@redhat.com>
2722 * gcc-interface/Makefile.in: Support aarch64-linux.
2724 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
2726 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2727 (Error_Msg_N): Likewise.
2728 (Error_Msg_NE): Likewise.
2729 (Get_External_Name_With_Suffix): Likewise.
2730 * types.h (Fat_Pointer): Delete.
2731 (String_Pointer): New type.
2732 (DECLARE_STRING_POINTER): New macro.
2733 * gcc-interface/decl.c (create_concat_name): Adjust.
2734 * gcc-interface/trans.c (post_error): Likewise.
2735 (post_error_ne): Likewise.
2736 * gcc-interface/misc.c (internal_error_function): Likewise.
2738 2014-04-22 Richard Henderson <rth@redhat.com>
2740 * gcc-interface/Makefile.in: Support aarch64-linux.
2742 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
2743 (__gnat_alternate_stack): Enable for all linux except ia64.
2745 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
2747 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2748 (Error_Msg_N): Likewise.
2749 (Error_Msg_NE): Likewise.
2750 (Get_External_Name_With_Suffix): Likewise.
2751 * types.h (Fat_Pointer): Delete.
2752 (String_Pointer): New type.
2753 (DECLARE_STRING_POINTER): New macro.
2754 * gcc-interface/decl.c (create_concat_name): Adjust.
2755 * gcc-interface/trans.c (post_error): Likewise.
2756 (post_error_ne): Likewise.
2757 * gcc-interface/misc.c (internal_error_function): Likewise.
2759 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2760 Pierre-Marie de Rodat <derodat@adacore.com>
2762 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
2763 scalar constant instead of a reference for renaming of scalar literal.
2764 Do not create a new object for constant renaming except for a function
2765 call. Make sure a VAR_DECL is created for the renaming pointer.
2766 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
2767 (fold_constant_decl_in_expr): New function.
2768 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
2769 For a constant renaming, try to fold a constant DECL in the result.
2770 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
2771 (Identifier_to_gnu): Reference the renamed object of constant renaming
2773 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
2774 invalidate constant renaming pointers.
2776 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2778 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
2779 (build_vector_type_for_size): New function.
2780 (build_vector_type_for_array): Likewise.
2781 (unchecked_convert): Build an intermediate vector type to convert
2782 from a generic array type to a vector type.
2783 (handle_vector_size_attribute): Reimplement.
2784 (handle_vector_type_attribute): Likewise.
2786 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2788 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
2789 Is_OK_Static_Expression in lieu of Is_Static_Expression to
2790 detect valid arguments.
2792 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
2794 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
2796 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2798 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
2799 (components_to_record): Likewise.
2800 * gcc-interface/utils.c (make_aligning_type): Likewise.
2801 (maybe_pad_type): Likewise.
2802 (finish_record_type): Likewise.
2803 (rest_of_record_type_compilation): Likewise.
2805 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2807 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
2808 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
2810 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
2811 hint for Loop_Optimize.
2812 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
2813 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2814 with new Ivdep hint.
2815 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
2816 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2817 with new Ivdep hint.
2818 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
2820 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2821 Robert Dewar <dewar@adacore.com>
2823 * opt.ads (Suppress_Back_Annotation): Remove as unused.
2824 * fe.h (Back_Annotate_Rep_Info): Likewise.
2825 (Global_Discard_Names): Likewise.
2826 (List_Representation_Info): Declare.
2827 * types.h (Uint_Minus_1): Likewise.
2828 * repinfo.ads: Document back-annotation change.
2829 * gcc-interface/gigi.h (init_gnat_decl): Declare.
2830 (destroy_gnat_decl): Likewise.
2831 * gcc-interface/decl.c (annotate_value): Do not create the cache of
2832 annotated values here but...
2833 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
2835 (init_gnat_decl): ...here instead. New function.
2836 (destroy_gnat_decl): Likewise.
2837 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
2838 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
2840 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
2842 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
2843 offset for the field, if any.
2845 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
2846 Svante Signell <svante.signell@gmail.com>
2850 * s-osinte-x32.adb: New file.
2851 * s-linux.ads (Time): New section.
2852 * s-linux-alpha.ads (Time): Likewise.
2853 * s-linux-android.ads (Time: Likewise.
2854 * s-linux-hppa.ads (Time): Likewise.
2855 * s-linux-mipsel.ads (Time): Likewise.
2856 * s-linux-sparc.ads (Time): Likewise.
2857 * s-linux-x32.ads (Time): Likewise.
2858 * s-osprim-x32.ads (timespec): Adjust.
2860 (To_Timespec): Likewise.
2861 * s-osinte-linux.ads (Time): Define local subtypes for those defined
2863 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
2864 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
2865 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
2866 * s-osinte-solaris-posix.ads (timespec): Likewise.
2867 * s-osinte-posix.adb (To_Timespec): Likewise.
2868 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
2870 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
2873 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
2874 * s-linux-android.ads: New file.
2875 * s-intman-android.adb: Likewise.
2876 * s-osinte-android.ads: Adjust.
2877 * sigtramp-armdroid.c: Likewise.
2878 * sigtramp.h: Add Android support.
2880 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
2882 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
2884 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
2887 * system-linux-alpha.ads: Adjust for Ada 2005.
2888 * system-linux-mips.ads: Likewise.
2889 * system-linux-mips64el.ads: Likewise.
2890 * system-linux-mipsel.ads: Likewise.
2891 * system-linux-s390.ads: Likewise.
2892 * system-linux-s390x.ads: Likewise.
2893 * system-linux-sparc.ads: Likewise.
2894 * system-linux-sparcv9.ads: Likewise.
2895 * system-rtems.ads: Likewise.
2896 * system-vxworks-arm.ads: Likewise.
2898 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
2901 * gcc-interface/Makefile.in (target_cpu_default): Revert
2904 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
2907 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
2908 it to set the RM size. Use directly 'size' for the Esize.
2909 (Create_Back_End_Float_Types): Adjust call to above.
2910 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
2911 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
2912 (Write_Target_Dependent_Values): Adjust comment.
2913 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
2915 (Write_Target_Dependent_Values): Write the precision in lieu of size.
2916 (Initialization): Read the precision in lieu of size and compute the
2917 size from the precision and the alignment.
2918 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
2919 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
2920 types for vector modes, pass the size in addition to the precision.
2922 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
2924 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
2926 2014-03-07 Doug Rupp <rupp@adacore.com>
2929 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
2930 (Support_64_Bit_Divides): Removed, no longer used.
2931 (ZCX_By_Default): Enabled.
2933 2014-02-25 Doug Rupp <rupp@adacore.com>
2935 * gcc-interface/Makefile.in (arm-linux):
2936 (EH_MECHANISM): Use ARM unwinder (-arm)
2937 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
2939 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
2940 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
2941 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
2942 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
2943 Add dependencies for sigtramp-armvxw.o.
2945 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2947 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
2949 2014-02-25 Robert Dewar <dewar@adacore.com>
2951 * rtsfind.adb (Is_RTE): Protect against entity with no scope
2952 field (previously this call blew up on the Standard entity).
2953 * sem_attr.adb (Analyze_Attribute, case Access): Remove
2954 test for No_Abort_Statements, this is now handled in
2955 Set_Entity_With_Checks.
2956 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
2957 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
2958 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
2959 Set_Entity_With_Checks.
2960 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
2961 Add checks for No_Abort_Statements.
2963 2014-02-25 Robert Dewar <dewar@adacore.com>
2965 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
2966 Check_Restriction is OK.
2968 2014-02-25 Ed Schonberg <schonberg@adacore.com>
2970 * sem_ch3.adb (Process_Full_View): Better error message when
2971 the full view of a private type without discriminants is an
2973 * sem_ch7.adb (Uninstall_Declarations): Ditto.
2975 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
2977 * sigtramp-armvxw.c: Also restore r0.
2979 2014-02-25 Robert Dewar <dewar@adacore.com>
2981 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
2982 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
2983 set unconditionally.
2984 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
2985 any more (Output_Msg_Text): Rewritten with new convention on
2986 output of warnings that are treated as errors.
2987 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
2989 * gnat_rm.texi: Updates to documentation on pragma
2991 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
2992 set Warning_Doc_Switch.
2993 * lib-writ.ads: Add documentation note on ALI file generation
2995 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
2997 * sem_attr.adb (Resolve_Attribute, case Access):
2998 Abort_Task'Access violates the No_Abort_Statements restriction.
2999 * sem_res.adb (Resolve_Call): Check restriction
3000 No_Abort_Statements for call to Abort_Task or a renaming of it.
3002 2014-02-25 Robert Dewar <dewar@adacore.com>
3004 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
3006 * lib.ads: Minor reformatting.
3007 * einfo.ads: Minor reformatting.
3009 2014-02-25 Doug Rupp <rupp@adacore.com>
3011 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
3012 use Short_Descriptor(S) as the argument passing mechanism.
3014 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3016 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
3018 2014-02-25 Robert Dewar <dewar@adacore.com>
3020 * atree.ads (Warnings_Treated_As_Errors): New variable.
3021 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
3022 error object (Initialize): Initialize Warnings_As_Errors_Count
3023 (Write_Error_Summary): Include count of warnings treated as errors.
3024 * erroutc.adb (Warning_Treated_As_Error): New function.
3025 (Matches): Function moved to outer level of package.
3026 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
3027 (Warning_Treated_As_Error): New function.
3028 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
3029 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
3030 * opt.ads (Config_Switches_Type): Add entry for
3031 Warnings_As_Errors_Count.
3032 (Warnings_As_Errors_Count): New variable.
3033 (Warnings_As_Errors): New array.
3034 * par-prag.adb: Add dummy entry for Warning_As_Error.
3035 * sem_prag.adb (Analyze_Pragma): Implement new pragma
3037 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
3039 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
3041 * sigtramp.h: Fix minor inaccuracy.
3043 2014-02-25 Ben Brosgol <brosgol@adacore.com>
3045 * gnat_ugn.texi: Added description of kill command.
3047 2014-02-25 Robert Dewar <dewar@adacore.com>
3049 * gnat_rm.texi (Address_Clauses): Add a section discussing the
3050 problem of address clauses causing unexpected initialization,
3051 including the effect of Initialize_Scalars.
3053 2014-02-25 Robert Dewar <dewar@adacore.com>
3055 * errout.adb: Various changes for better msgs for anonmous access
3057 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
3059 (Buffer_Remove): Version with character argument.
3060 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
3061 of mismatching conventions for access-to-subprogram case.
3062 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
3063 access types in record.
3064 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
3065 types, including in records.
3067 2014-02-25 Doug Rupp <rupp@adacore.com>
3069 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
3070 enhancements and corrections.
3072 2014-02-25 Robert Dewar <dewar@adacore.com>
3074 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
3076 2014-02-25 Robert Dewar <dewar@adacore.com>
3078 * gnat_rm.texi: First set of documentation additions for
3079 predefined RM units.
3080 * checks.adb: Minor reformatting.
3081 * sem_elab.adb (Check_Task_Activation): Minor fix to error
3083 * sem_util.adb: Minor reformatting.
3085 2014-02-25 Arnaud Charlet <charlet@adacore.com>
3087 * usage.adb (Usage): Add help on -gnateC.
3088 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
3089 * opt.ads (Generate_CodePeer_Messages): New flag.
3090 * gnat_ugn.texi: Document new switch -gnateC.
3092 2014-02-25 Ben Brosgol <brosgol@adacore.com>
3094 * gnat_rm.texi: Corrected minor typos in Implementation Defined
3096 * opt.ads: Minor reformatting.
3098 2014-02-25 Robert Dewar <dewar@adacore.com>
3100 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
3101 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
3103 * opt.ads (Warn_Info_Messages): New flag.
3104 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
3106 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
3108 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
3109 * usage.adb: Add documentation of -gnatel/-gnateL Update
3110 documentation of -gnatwl/-gnatwL.
3111 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
3112 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
3114 2014-02-25 Robert Dewar <dewar@adacore.com>
3116 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
3117 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
3118 * interfac.ads: Minor code reorganization (add pragma
3119 Compiler_Unit_Warning).
3120 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
3121 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
3122 Has_Shift_Operator flag.
3123 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
3124 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
3125 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
3126 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
3127 Add entry for Name_Amount.
3128 * checks.adb (Selected_Range_Checks): When checking for a null
3129 range, make sure we use the base type, and not the subtype for
3130 deciding a range is null.
3131 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
3132 for suspicious loop bound which is outside the range of the
3134 * gnat_ugn.texi: Add documentation section "Determining the
3135 Chosen Elaboration Order"
3136 * sem_ch13.adb (UC_Entry): Add field Act_Unit
3137 (Validate_Unchecked_Conversion): Store Act_Unit
3138 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
3139 * treepr.adb: Minor reformatting.
3141 2014-02-25 Arnaud Charlet <charlet@adacore.com>
3143 * usage.adb: Minor: fix typo.
3145 2014-02-25 Robert Dewar <dewar@adacore.com>
3147 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
3148 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
3149 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
3150 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
3151 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
3152 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
3153 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
3154 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
3155 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
3156 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
3157 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
3158 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
3159 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
3160 Compiler_Unit_Warning, change Compiler_Unit everywhere to
3161 Compiler_Unit_Warning.
3163 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
3165 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
3166 in ASIS mode aggregates that are used as aspect definitions.
3168 2014-02-25 Robert Dewar <dewar@adacore.com>
3170 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
3173 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3175 * freeze.adb (Freeze_Entity): If the return type of a function
3176 is a limited view, and the non-limited view has not been seen yet,
3177 defer freezing to some later point.
3179 2014-02-25 Robert Dewar <dewar@adacore.com>
3181 * sem_ch3.adb: Minor reformatting.
3183 2014-02-25 Robert Dewar <dewar@adacore.com>
3185 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
3186 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
3187 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
3188 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
3189 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
3190 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
3191 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
3192 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
3193 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
3194 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
3195 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
3196 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
3197 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
3198 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
3199 snames.ads-tmpl: Change Compiler_Unit everywhere to
3200 Compiler_Unit_Warning.
3202 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3204 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
3205 (Collect_Body_Postconditions_In_Decls): New routine.
3206 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
3207 postcondition aspects or pragmas that appear on a subprogram
3209 (Collect_Spec_Preconditions): Factor out code. Handle
3210 precondition aspects or pragmas that appear on a subprogram
3212 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
3213 aspects that apply to a subprogram body stub is no longer delayed,
3214 the aspects are analyzed on the spot.
3215 (SPARK_Aspect_Error):
3216 Aspects that apply to a subprogram declaration cannot appear in
3218 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
3219 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
3220 is now a local variable. Code cleanup. Analysis related to
3221 the aspects of a subprogram body stub is now carried out by
3222 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
3223 and/or pragmas of a subprogram body stub to the proper body
3224 as this is no longer needed. Do not analyze the aspects of a
3225 subprogram stub when the corresponding source unit is missing.
3226 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
3228 (Analyze_Task_Body_Stub): Flag the illegal use of
3230 (Optional_Subunit): Add local variable Unum.
3231 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
3232 pragma when it applies to a subprogram body stub.
3233 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
3234 Depends and Global can now apply to a subprogram body stub as
3235 long as it acts as its own spec.
3236 (Analyze_Refined_Pragma):
3237 Code reformatting. Refinement pragmas cannot apply to a subunit.
3239 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3241 * einfo.ads Update the usage of flag
3242 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
3243 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
3244 now starts with the letter 'C'. This makes reading expanded
3246 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
3247 Iter_Loop. Signal that an Ada 2012 iterator loop requires
3248 secondary stack management when creating a transient scope for
3249 an element reference.
3250 * exp_util.adb (Process_Statements_For_Controlled_Objects):
3251 When wrapping the statements of a loop, pass the E_Loop entity
3252 to the wrapping machinery.
3253 (Wrap_Statements_In_Block): Add
3254 formal parameter Scop along with comment on usage. Add local
3255 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
3256 block as requiring secondary stack management when the block is
3257 created inside an Ada 2012 iterator loop. This ensures that any
3258 reference objects are reclaimed on each iteration of the loop.
3259 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
3260 tasked with the handling of container iterators as requiring
3261 secondary stack management. This ensures that iterators are
3262 reclaimed when the loop terminates or is exited in any fashion.
3263 * sem_util.adb (Add_Block_Identifier): New routine.
3264 (Find_Enclosing_Iterator_Loop): New routine.
3265 * sem_util.ads (Add_Block_Identifier): New routine.
3266 (Find_Enclosing_Iterator_Loop): New routine.
3268 2014-02-25 Robert Dewar <dewar@adacore.com>
3270 * sinfo.ads: Minor reformatting.
3272 2014-02-25 Tristan Gingold <gingold@adacore.com>
3274 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
3276 2014-02-25 Pascal Obry <obry@adacore.com>
3278 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
3280 2014-02-25 Tristan Gingold <gingold@adacore.com>
3282 * sem_ch10.adb: Minor comment fix.
3284 2014-02-25 Bob Duff <duff@adacore.com>
3286 * s-tasdeb.adb: Misc cleanup of this package,
3287 including printing addresses in hexadecimal.
3288 (Write): Fix minor bug when taking 'Address of an empty string.
3290 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3292 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
3293 public child unit when it does not refer to the abstract state
3294 of a public ancestor.
3296 2014-02-25 Yannick Moy <moy@adacore.com>
3298 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
3299 Validity_Checks in GNATprove and CodePeer modes.
3301 2014-02-25 Pascal Obry <obry@adacore.com>
3303 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
3304 Artifacts attribute.
3306 2014-02-25 Yannick Moy <moy@adacore.com>
3308 * sem_prag.adb: Minor reformatting to get consistent messages.
3310 2014-02-25 Robert Dewar <dewar@adacore.com>
3312 * checks.adb: Minor reformatting.
3313 * sinfo.ads (Do_Range_Check): Document that this flag is never
3314 passed to the back end.
3316 2014-02-25 Yannick Moy <moy@adacore.com>
3318 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
3319 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
3321 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3323 * sem_res.adb (Appears_In_Check): New routine.
3324 (Resolve_Entity_Name): Remove local variables Prev and
3325 Usage_OK. Par is now a constant. Remove the parent chain traversal
3326 as the placement of a volatile object with enabled property
3327 Async_Writers and/or Effective_Reads must appear immediately
3328 within a legal construct.
3330 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
3332 * checks.adb (Apply_Selected_Range_Checks):
3333 Alphabetize local constants and variables. Add comments.
3334 Always insert a range check that requires runtime evaluation into
3337 2014-02-25 Robert Dewar <dewar@adacore.com>
3339 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
3341 2014-02-25 Bob Duff <duff@adacore.com>
3343 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
3344 iterations while waiting for independent tasks to terminate;
3345 if an independent task does not terminate, we do not want to
3346 hang here. In that case, the thread will be terminated when the
3348 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
3350 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3352 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
3353 used to perform pre-analysis of the expression for SPARK
3354 aspects that have a non-standard syntax, such as GLobal and
3355 Initializes. The procedure applies to the original expression
3356 in an aspect specification, prior to the analysis of the
3357 corresponding pragma, in order to provide semantic information
3358 for ASIS navigation purposes.
3359 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
3360 Call new subprogram.
3362 2014-02-25 Yannick Moy <moy@adacore.com>
3364 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
3366 2014-02-25 Doug Rupp <rupp@adacore.com>
3368 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
3369 (__gnat_adjust_context_for_raise): Bump the PC by 2.
3371 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3373 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
3374 misplaced IS, add a statement sequence to improper body only if
3375 one has not been parsed already.
3377 2014-02-25 Ed Schonberg <schonberg@adacore.com>
3379 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
3380 mismatch when multidimensional array is updated with a single
3383 2014-02-25 Yannick Moy <moy@adacore.com>
3385 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
3386 sem_ch6.adb: Mark most references to SPARK RM in error messages
3389 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3391 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
3392 appears in a list of basic declarations, complete the tree with
3393 an empty statement list, to prevent cascaded errors and crashes
3394 if semantic analysis is attempted.
3396 2014-02-24 Thomas Quinot <quinot@adacore.com>
3398 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
3400 * erroutc.adb: Minor reformatting.
3402 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3404 * sem_prag.adb (Check_Clause_Syntax): Account
3405 for a solitary input item in a dependency list.
3407 2014-02-24 Yannick Moy <moy@adacore.com>
3409 * gnat1drv.adb (Adjust_Global_Switches): Do not
3410 use validity checks at all in GNATprove_Mode.
3412 2014-02-24 Robert Dewar <dewar@adacore.com>
3414 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
3415 atree.adb, atree.ads: Minor reformatting.
3417 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3419 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
3420 global and dependence refinement when SPARK_Mode is off.
3421 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
3422 state refinement when SPARK_Mode is off.
3423 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
3424 variable Decl. Insert the generated pragma for Refined_State
3425 after a potential pragma SPARK_Mode.
3426 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
3427 constant Deps. Remove local variable Expr. Check the syntax
3428 of pragma Depends when SPARK_Mode is off. Factor out the
3429 processing for extra parenthesis around individual clauses.
3430 (Analyze_Global_In_Decl_List): Items is now a constant. Check
3431 the syntax of pragma Global when SPARK_Mode is off.
3432 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
3433 Initializes when SPARK_Mode is off.
3434 (Analyze_Part_Of): Check
3435 the syntax of the encapsulating state when SPARK_Mode is off.
3436 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
3437 SPARK_Mode is off. Move the declaration order check with respect
3438 to pragma Initializes to the end of the processing. Do not verify
3439 the declaration order for pragma Initial_Condition when SPARK_Mode
3440 is off. Do not complain about a useless package refinement when
3442 (Analyze_Refined_Depends_In_Decl_Part): Refs
3443 is now a constant. Check the syntax of pragma Refined_Depends
3444 when SPARK_Mode is off.
3445 (Analyze_Refined_Global_In_Decl_Part):
3446 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
3447 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
3448 Refined_State when SPARK_Mode is off.
3449 (Check_Dependence_List_Syntax): New routine.
3450 (Check_Global_List_Syntax): New routine.
3451 (Check_Initialization_List_Syntax): New routine.
3452 (Check_Item_Syntax): New routine.
3453 (Check_State_Declaration_Syntax): New routine.
3454 (Check_Refinement_List_Syntax): New routine.
3455 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
3457 2014-02-24 Robert Dewar <dewar@adacore.com>
3459 * a-tags.adb, s-os_lib.adb: Minor reformatting.
3461 2014-02-24 Thomas Quinot <quinot@adacore.com>
3463 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
3464 strerror message, not just numeric errno value.
3466 2014-02-24 Doug Rupp <rupp@adacore.com>
3468 * raise-gcc.c (exception_class_eq): Make endian neutral.
3470 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3472 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
3473 flag, and reset Etype and Analyzed attributes unconditionally
3474 when copying a tree that may be partly analyzed.
3475 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
3476 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
3477 within a subprogram body and applies to it, remove it from the
3478 body before making a copy of it, to prevent spurious errors when
3479 analyzing the copied body.
3481 2014-02-24 Thomas Quinot <quinot@adacore.com>
3483 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
3484 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
3485 vxWorks.h has been included. Also ensure that file attributes
3486 related definitions are output even in cases where socket support
3488 * a-tags.adb: Code clean up.
3489 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
3490 instead of -I to add the main ada source directory to the header
3491 search path, in order to avoid conflict between our own "types.h"
3492 and VxWork's <types.h>.
3494 2014-02-24 Robert Dewar <dewar@adacore.com>
3496 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
3497 * debug.adb: Remove documentation of -gnatd.X, no longer used.
3498 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
3500 2014-02-24 Bob Duff <duff@adacore.com>
3502 * gnat_ugn.texi: Improve documentation of gnatpp.
3504 2014-02-24 Thomas Quinot <quinot@adacore.com>
3506 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
3507 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
3508 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
3509 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
3510 a chars_ptr, because on Windows this is a renaming of
3511 Socket_Error_Message.
3513 2014-02-24 Robert Dewar <dewar@adacore.com>
3515 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
3516 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
3517 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
3520 2014-02-24 Thomas Quinot <quinot@adacore.com>
3522 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
3523 that the source directory containing s-oscons-tmplt.c is on the
3524 include path, so that all internal header files are available.
3526 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3528 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
3529 domain of iteration is an attribute reference 'Old, this is an
3530 Ada 2012 iterator and the loop must be rewritten as such.
3532 2014-02-24 Thomas Quinot <quinot@adacore.com>
3534 * s-fileio.adb (Errno_Message): Remove, use shared version from
3536 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
3537 * g-stseme (Socket_Error_Message): Reimplement in terms of new
3539 * g-socthi.ads, g-socthi.adb: Change profile of
3540 Socket_Error_Message to return String to allow the above.
3541 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
3542 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
3543 * g-socthi-vxworks.ads: Update to account for the above profile
3545 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
3546 * s-crtl.ads (strncpy): New procedure.
3547 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
3548 Use import from s-crtl.
3549 * a-envvar.adb, osint.adb: Use imports of C runtime functions
3550 from s-crtl instead of re-importing locally.
3552 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3554 * sem_prag.adb (Analyze_Global_Item): Emit the
3555 variable related checks concerning volatile objects only when
3558 2014-02-24 Robert Dewar <dewar@adacore.com>
3560 * sem_ch5.adb (Analyze_Iterator_Specification): use
3561 Error_Msg_Ada_2012_Feature.
3563 2014-02-24 Jose Ruiz <ruiz@adacore.com>
3565 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
3566 No_Local_Timing_Events and No_Specific_Termination_Handlers
3567 must be set, according to the Ravenscar profile definition
3570 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3572 * sem_ch6.adb (Analyze_Expression_Function): If this is a
3573 completion, freeze return type and its designated type if needed.
3575 2014-02-24 Thomas Quinot <quinot@adacore.com>
3577 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3578 'Address): When moving initialization statements to a freeze
3579 entity, keep them under a single node (i.e. do not unwrap
3580 expressions with actions), and set the Initialization_Statements
3581 attribute again so that processing of a later pragma Import can
3584 2014-02-24 Claire Dross <dross@adacore.com>
3586 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
3587 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
3588 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
3589 Left/Right to First_To_Previous/Current_To_Last.
3591 2014-02-24 Thomas Quinot <quinot@adacore.com>
3593 * adaint.h (struct file_attributes): New component "error"
3594 (__gnat_error_attributes): Accessor for the above.
3595 * adaint.c (__gnat_error_attributes): New subprogram
3596 (__gnat_stat): Fix returned value (expect errno value)
3597 (__gnat_stat_to_attr): Add management of error component (set to
3598 stat errno value, except for missing files where it is set to 0,
3599 and exists is set to 0).
3600 * osint.ads (File_Attributes_Size): Update per change above,
3601 also clarify documentation.
3602 * s-filatt.ads: New file, binding to file attributes related
3604 * Makefile.rtl (s-filatt): New runtime unit.
3605 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
3606 to library function if not available on target).
3607 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
3608 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
3609 SIZEOF_struct_dirent_alloc): New constants.
3610 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
3611 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
3612 Perform appropriate error checking if stat fails (do not just
3613 ignore existing files if stat fails)
3614 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
3617 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3619 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
3620 the use of volatile objects as global items in a function to
3621 the variable related checks section.
3622 * sem_util.adb (Async_Readers_Enabled): Directly call
3623 Has_Enabled_Property.
3624 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
3625 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
3626 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
3627 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
3628 Update the comment on usage. State_Has_Enabled_Property how handles
3629 the original logic of the routine. Add processing for variables.
3630 (State_Has_Enabled_Property): New routine.
3631 (Variable_Has_Enabled_Property): New routine.
3633 2014-02-24 Robert Dewar <dewar@adacore.com>
3635 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
3637 * atree.ads, atree.adb (Node35): New function.
3638 (Set_Node35): New procedure.
3639 * debug.adb: Define new debug flag -gnatd.X.
3640 * einfo.ads, einfo.adb (Import_Pragma): New field.
3641 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
3642 really active yet, has to be activated with -gnatd.X.
3643 * sem_prag.adb (Set_Imported): Set new Import_Pragma
3644 field (Set_Imported): Don't set Is_Public (see
3645 Freeze.Wrap_Imported_Subprogram)
3646 * par-ch3.adb (P_Component_List): Handle unexpected null component.
3648 2014-02-24 Yannick Moy <moy@adacore.com>
3650 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
3651 * gnat_rm.texi: Correct documentation of attribute Update.
3653 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3655 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
3656 iterator in older versions of Ada.
3658 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3660 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
3661 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
3663 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3665 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
3666 indexed_components that are instances of Ada 2012 container
3667 indexing operations. Analysis and resolution of such nodes
3668 is performed on the attribute, and the original source is
3669 preserved for ASIS operations. If expansion is enabled, the
3670 indexed component is replaced by the value of this attribute,
3671 which is in a call to an Indexing aspect, in most case wrapped
3672 in a dereference operation.
3673 * sem_ch4.adb (Analyze_Indexed_Component): Create
3674 Generalized_Indexing attribute when appropriate.
3675 (Analyze_Call): If prefix is not overloadable and has an indexing
3676 aspect, transform into an indexed component so it can be analyzed
3677 as a potential container indexing.
3678 (Analyze_Expression): If node is an indexed component with a
3679 Generalized_ Indexing, do not re-analyze.
3680 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
3681 of an indexed_component that has been transformed into a container
3683 (Resolve_Indexed_Component): Call the above when required.
3684 (Resolve): Do not insert an explicit dereference operation on
3685 an indexed_component whose type has an implicit dereference:
3686 the operation is inserted when resolving the related
3687 Generalized_Indexing.
3689 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
3691 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
3694 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3696 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
3698 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
3699 Merge the expected and available mode errors.
3700 (Report_Unused_Constituents): Remove leading spaces in error messages.
3701 (Report_Unused_States): Remove leading spaces in error messages.
3703 2014-02-24 Thomas Quinot <quinot@adacore.com>
3705 * par_sco.adb (Traverse_One): Refine categorization of statement
3708 2014-02-24 Robert Dewar <dewar@adacore.com>
3710 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
3711 Pure_05, Pure_12 and Preelaborate_05.
3712 * gnat_rm.texi: Update accordingly.
3713 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
3714 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
3715 Recognize one argument form of these pragmas only in GNAT mode
3718 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3720 * s-dimmks.ads: Replace symbol for temperature, previously the
3721 Greek letter Theta, by the ASCII @ sign.
3722 * s-diflio.ads: ditto.
3724 2014-02-24 Robert Dewar <dewar@adacore.com>
3726 * exp_ch4.adb: Minor code reorganization (use OR for boolean
3728 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
3730 2014-02-24 Ben Brosgol <brosgol@adacore.com>
3732 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
3733 so that references to gnatmem and ASIS tools do not appear in the FSF
3734 edition of the GNAT User's Guide.
3736 2014-02-24 Yannick Moy <moy@adacore.com>
3738 * freeze.adb (Freeze_Entity): Do not issue warning
3739 for pre/post being ignored on imported subprogram in GNATprove
3742 2014-02-24 Robert Dewar <dewar@adacore.com>
3744 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
3745 stand.ads, sem_eval.adb: Minor reformatting.
3747 2014-02-24 Yannick Moy <moy@adacore.com>
3749 * sem_prag.adb: Minor rewording in error message.
3751 2014-02-24 Johannes Kanig <kanig@adacore.com>
3753 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
3754 GNATprove_mode, gnat2why doesn't need nor use these types.
3756 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3758 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
3759 target, in the case of signed integer exponentiation that uses a
3760 run-time routine, always select the Exp_* versions, since overflow
3761 checking is automatically done by AAMP arithmetic instructions.
3763 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3765 * sem_ch13.adb (Analyze_Aspect_Specifications):
3766 When the related context is a package instace, insert pragma
3767 Abstract_State after all internally-generated renamings related
3768 to the instance "header".
3770 2014-02-24 Ed Schonberg <schonberg@adacore.com>
3772 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
3774 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
3775 call to an abstract subprogram is legal if it appears in a
3776 pre/postcondition of another abstract operation.
3778 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
3780 * gnat_ugn.texi: Misc updates.
3782 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
3784 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
3786 2014-02-24 Gary Dismukes <dismukes@adacore.com>
3788 * layout.adb (Layout_Variant_Record): Instantiate
3789 Generic_Check_Choices and call Check_Choices before calling
3790 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
3791 set to prevent generating incorrect discriminant-checking
3792 functions for 'others' variants (functions that unconditionally
3793 return True rather than accounting for the values covered by the
3795 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
3796 Formal_Derived_Matching.
3797 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
3798 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
3799 Formal_Derived_Matching formal to Subtypes_Statically_Match.
3800 (Subtypes_Statically_Match): Suppress the Object_Size matching
3801 test in the case where Formal_Derived_Matching is True.
3802 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
3803 True for Formal_Derived_Matching_Formal on the call to
3804 Subtypes_Statically_Compatible.
3806 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
3808 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
3810 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
3812 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
3813 Look through a conversion between original and packable version to get
3815 (build_component_ref): Rework comment and fix formatting.
3817 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
3819 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
3820 project-specific options.
3822 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3824 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
3825 not Constraint_Error.
3826 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
3827 * sem_ch5.adb: Code clean up.
3829 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3831 * sem_prag.adb (Usage_Error): Remove local
3832 constant Typ. Remove the specialized diagnostics for unconstrained
3833 or tagged items as those are not part of the explicit input set
3834 of the related subprogram and should not be flagged.
3836 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3838 * sem_attr.adb: Add guard to preserve all errors.
3840 2014-02-20 Vincent Celier <celier@adacore.com>
3842 * switch-m.adb (Normalize_Compiler_Switches): Take into account
3843 switches that are recorded in ALI files: -gnateA, -gnateE,
3844 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
3846 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3848 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
3849 of an element iterator form over a formal container with an
3851 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
3852 to create declaration and loop statements for both forms of
3853 container iterators.
3854 (Expand_Formal_Container_Element_Iterator): New procedure
3855 to handle loops of the form "for E of C" when C is a formal
3857 (Expand_Formal_Container_Iterator): Code cleanup.
3859 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
3861 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
3862 (Analyze_Contract_Case): Remove the use of
3863 "may". Replace "aspect Contract_Cases" to avoid categorization
3864 of aspect vs pragma.
3865 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
3866 (Analyze_Global_Item): Remove
3867 the use of "formal", specify the subprogram. Split the
3868 error message about a state with visible refinement into
3869 two. Remove the use of "global" from "volatile global item".
3870 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
3872 (Analyze_Input_Output): Update the call to
3873 Check_Mode. Specify the duplicated item. Reword the error
3874 message concerning an input of a null output list. Use "\"
3875 for error message continuation.
3876 (Analyze_Part_Of): Remove
3877 the use of "may". Use "\" for error message continuation.
3878 (Analyze_Refined_Depends_In_Decl_Part): Update the error
3879 message concerning a useless refinement to match the format
3881 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
3882 concerning a useless refinement.
3883 (Analyze_Refinement_Clause): Use "\" for error message continuation.
3884 (Check_Constituent_Usage): Use "\" for error message continuation.
3885 (Check_Dependency_Clause): Use "\" for error message continuation.
3886 (Check_Matching_Constituent): Use "\" for error message continuation.
3887 (Check_Missing_Part_Of): Use "\" for error message continuation.
3888 (Check_Mode): Renamed to
3889 Check_Role. Update the comment on usage. Redo the error reporting
3891 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
3892 message continuation.
3893 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
3894 with comment on usage. Update all occurrences of Is_Input and Is_Output.
3895 (Inconsistent_Mode_Error): Use "\" for error message continuation.
3896 (Input_Match): Use "\" for error message continuation.
3897 (Role_Error): New routine.
3898 (Set_Convention_From_Pragma): Use "\" for error message continuation.
3899 (Usage_Error): Add local variable Error_Msg. Build specialized error
3900 message showcasing the offending item kind. Redo the diagnostics for
3901 unconstrained types.
3903 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3905 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
3906 to determine whether a type is a container type, rather than
3907 examining only its type declaration, so that subtypes and derived
3908 types are handled properly.
3910 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
3912 * gnat_ugn.texi: gnatmetric: add description of project-specific
3915 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3917 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
3918 all choices in an association for a record type have the same
3919 type, as is done for record aggregates.
3921 2014-02-20 Robert Dewar <dewar@adacore.com>
3923 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
3924 Unmodified rather than Warnings (Off). Make comments
3925 uniform in the four affected units.
3927 2014-02-20 Robert Dewar <dewar@adacore.com>
3929 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3930 Object_Size): For non-scalar types allow any value that is a
3932 * gnat_rm.texi: Document Object_Size for composites more clearly.
3934 2014-02-20 Yannick Moy <moy@adacore.com>
3936 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
3938 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3940 * stand.ads: Raise_Type: new predefined entity, used as the type
3941 of a Raise_Expression prior to resolution.
3942 * cstand.adb: Build entity for Raise_Type.
3943 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
3944 initial type of the node.
3945 * sem_type.adb (Covers): Raise_Type is compatible with all
3947 * sem_res.adb (Resolve): Remove special handling of Any_Type on
3948 Raise_Expression nodes.
3949 (Resolve_Raise_Expression): Signal ambiguity if the type of the
3950 context is still Raise_Type.
3952 2014-02-20 Robert Dewar <dewar@adacore.com>
3954 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
3955 mismatching predicates.
3956 * sem_ch6.adb (Check_Conformance): Give better messages on
3958 * sem_eval.adb (Predicates_Match): Move to spec.
3959 * sem_eval.ads (Predicates_Match): Moved here from body.
3961 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3963 * a-cbmutr.adb: Use default value in Insert_Child.
3965 2014-02-20 Vincent Celier <celier@adacore.com>
3967 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
3968 Stringt.Initialize in all project aware tools.
3970 2014-02-20 Doug Rupp <rupp@adacore.com>
3972 * gnat_ugn.texi: Document gnatbind -X option.
3973 * vms_data.ads: Minor warnings documentation reformatting.
3975 2014-02-20 Ed Schonberg <schonberg@adacore.com>
3977 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
3978 procedure for a base type.
3980 2014-02-20 Robert Dewar <dewar@adacore.com>
3982 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
3983 expression with type info.
3984 * sem_ch13.adb: Minor reformatting.
3985 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
3986 False if predicates do not match on the two types.
3988 2014-02-20 Arnaud Charlet <charlet@adacore.com>
3990 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
3991 In Relaxed_RM_Semantics mode, allow any static integer value,
3992 for compatibility with other compilers.
3994 2014-02-20 Vincent Celier <celier@adacore.com>
3996 * errutil.adb (Initialize): Properly initialize entry in table
3997 Warnings when warnings are suppressed.
3999 2014-02-20 Robert Dewar <dewar@adacore.com>
4001 * s-os_lib.ads: Add warning about non-portability of Rename_File.
4002 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
4003 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
4004 * gnat_ugn.texi: Document no warnings on junk variable names.
4005 * layout.adb: Minor code reorganization (use Ekind_In).
4006 * stringt.adb: Move initialization of Null_String_Id to Initialize
4009 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4011 * sem_ch13.adb: Initialize optional Element_Id.
4013 2014-02-20 Robert Dewar <dewar@adacore.com>
4015 * s-os_lib.ads (Rename_File): Minor commment addition.
4017 2014-02-20 Thomas Quinot <quinot@adacore.com>
4019 * einfo.ads: Minor reformatting.
4021 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
4023 * aspects.adb (Exchange_Aspects): New routine.
4024 * aspects.ads (Exchange_Aspects): New routine.
4025 * atree.adb (Rewrite): Do not check whether the save node has
4026 aspects as it never will, instead check the node about to be clobbered.
4027 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
4028 entities of generic packages.
4029 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
4030 pointer of an aspect specification list after rewriting takes place.
4031 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
4032 specifications of the generic template and the copy used for analysis.
4033 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
4034 the aspect specifications of the generic template and the
4035 copy used for analysis.
4036 (Analyze_Package_Instantiation): Propagate the aspect specifications
4037 from the generic template to the instantiation.
4038 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
4039 specifications from the generic template to the instantiation.
4040 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
4041 Abstract_State, Initializes and Initial_Condition when they
4042 apply to a package instantiation.
4044 2014-02-20 Robert Dewar <dewar@adacore.com>
4046 * stringt.adb: Add call to Initialize in package initialization.
4048 2014-02-20 Robert Dewar <dewar@adacore.com>
4050 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
4051 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
4052 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
4053 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
4056 2014-02-20 Bob Duff <duff@adacore.com>
4058 * s-os_lib.ads: Minor: Remove incorrect comment.
4060 2014-02-20 Robert Dewar <dewar@adacore.com>
4062 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
4064 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4066 * a-cborma.adb (Assign): When creating a node without a specified
4067 element, insert an uninitialized element in the map, because
4068 the instance may provide an element type with a default
4069 initialization, e.g a scalar with a Default_Value aspect.
4070 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
4071 (Insert): In the version without explicit element, provide an
4072 uninitialized element, as above.
4073 * a-cbdlli.adb (Append): In the version without explicit element,
4074 provide an uninitalized element, as above.
4075 (Allocate): Remove unused version.
4077 2014-02-20 Robert Dewar <dewar@adacore.com>
4079 * sem_elab.adb: Minor code reorganization (use Nkind_In).
4080 * stringt.adb: Remove temporary pragma Warnings (Off).
4081 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
4084 2014-02-20 Matthew Heaney <heaney@adacore.com>
4086 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
4089 2014-02-20 Ed Schonberg <schonberg@adacore.com>
4091 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
4092 properly the cursor type for subsequent volatile testing in SPARK
4093 mode, when domain is a formal container with an Iterabe aspect.
4095 2014-02-20 Robert Dewar <dewar@adacore.com>
4097 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
4098 (Set_Specific_Warning_Off): Add Reason argument.
4099 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
4100 (Set_Specific_Warning_Off): Add Reason argument.
4101 * erroutc.adb (Warnings_Entry): Add Reason field
4102 (Specific_Warning_Entry): Add Reason field.
4103 (Warnings_Suppressed): return String_Id for Reason.
4104 (Warning_Specifically_Suppressed): return String_Id for Reason.
4105 * erroutc.ads (Warnings_Entry): Add Reason field.
4106 (Specific_Warning_Entry): Add Reason field.
4107 (Set_Specific_Warning_Off): Add Reason argument.
4108 (Set_Warnings_Mode_Off): Add Reason argument.
4109 (Warnings_Suppressed): return String_Id for Reason.
4110 (Warning_Specifically_Suppressed): return String_Id for Reason.
4111 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
4112 (Warning_Specifically_Suppressed): returns String_Id for Reason
4113 * gnat_rm.texi: Document that Warning parameter is string literal
4114 or a concatenation of string literals.
4115 * par-prag.adb: New handling for Reason argument.
4116 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
4117 for Reason argument.
4118 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
4119 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
4120 * stringt.adb: Set Null_String_Id.
4121 * stringt.ads (Null_String_Id): New constant.
4123 2014-02-20 Robert Dewar <dewar@adacore.com>
4125 * einfo.ads: Minor comment addition: Etype of package is
4127 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
4128 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
4129 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
4130 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
4131 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
4132 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4133 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
4134 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
4135 Replace all calls with calls to New_Occurrence_Of.
4137 2014-02-20 Robert Dewar <dewar@adacore.com>
4139 * par-util.adb (Ignore, case of right paren): Make this a
4142 2014-02-19 Robert Dewar <dewar@adacore.com>
4144 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
4145 * debug.adb: Remove -gnatd.X switch, no longer used.
4146 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
4149 2014-02-19 Bob Duff <duff@adacore.com>
4151 * g-socket.ads: Minor: Correct some comments.
4153 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4155 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
4157 2014-02-19 Arnaud Charlet <charlet@adacore.com>
4159 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
4160 an error on out of range priorities if Relaxed_RM_Semantics.
4161 * sem_prag.adb (Analyze_Pragma): Ditto.
4163 2014-02-19 Bob Duff <duff@adacore.com>
4165 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
4166 where F denotes the renaming of an enumeration literal, and
4167 issue a specialized error message.
4169 2014-02-19 Matthew Heaney <heaney@adacore.com>
4171 * a-chtgop.ads (Checked_Index): New operation.
4172 (Next): Changed mode of hash table.
4173 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
4174 (Generic_Read, Reserve_Capacity): Ditto.
4175 (Generic_Equal): Detect tampering.
4176 (Next): Changed mode of hash table, detect tampering.
4177 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
4179 (Find): Changed mode of hash table.
4180 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
4181 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
4183 (Find): Changed mode of hash table, check for tampering.
4184 (Generic_Replace_Element): Check for tampering.
4185 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
4186 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
4187 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
4189 (Find, Generic_Replace_Element): Check for tampering.
4190 * a-chtgbo.ads (Checked_Index): New operation.
4191 * a-chtgbo.adb (Checked_Index): New operation
4192 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
4193 (Generic_Read, Next): Ditto.
4194 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
4195 table (Difference, Intersection): Use variable view of
4196 source, detect tampering (Find, Is_Subset, Overlap): Use
4197 variable view of container (Symmetric_Difference, Union):
4198 Detect tampering (Vet): Use Checked_Index to detect tampering
4199 (Constant_Reference, Element, Find): Use variable view of
4201 (Update_Element_Preserving_Key): Detect tampering.
4202 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
4205 (Equivalent_Sets, Overlap): Use Node's Next component.
4206 (Vet): Use Checked_Index to detect tampering.
4207 (Constant_Reference, Element, Find): Use variable view of container.
4208 (Update_Element_Preserving_Key): Detect tampering.
4209 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
4210 Element, Find): Use variable view of container.
4211 (Reference): Rename hash table component.
4212 (Vet): Use Checked_Index to detect tampering.
4214 2014-02-19 Arnaud Charlet <charlet@adacore.com>
4216 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
4219 2014-02-19 Thomas Quinot <quinot@adacore.com>
4221 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
4222 against calls without Def_Id.
4224 2014-02-19 Claire Dross <dross@adacore.com>
4226 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4227 a-cofove.ads: Add global annotations to subprograms.
4229 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4231 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
4232 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
4233 Initial_Condition no longer requires the presence of pragma
4234 Initialized. Do not try to diagnose whether all variables mentioned in
4235 pragma Initializes also appear in Initial_Condition.
4236 (Collect_Variables): Removed.
4237 (Match_Variable): Removed.
4238 (Match_Variables): Removed.
4239 (Report_Unused_Variables): Removed.
4241 2014-02-19 Thomas Quinot <quinot@adacore.com>
4243 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
4245 2014-02-19 Robert Dewar <dewar@adacore.com>
4247 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
4250 2014-02-19 Vincent Celier <celier@adacore.com>
4252 * prj-part.adb (Parse_Single_Project): Use the fully resolved
4253 project path, with all symbolic links resolved, to check if the
4254 same project is imported with a different unresolved path.
4255 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
4256 changed to Resolved_Path to reflect that all symbolic links
4259 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4261 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
4262 from sem_ch13, for use elsewhere.
4263 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
4264 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
4265 cursor type on the loop variable when the iteration is over o
4268 2014-02-19 Vincent Celier <celier@adacore.com>
4270 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
4271 for an empty Target (Check_Target): Never fail when an empty
4272 target is declared in the configuration project.
4274 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4276 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
4277 the pragma comes fron a predicate aspect and the context is a
4278 record declaration within the scope that declares the type.
4280 2014-02-19 Robert Dewar <dewar@adacore.com>
4282 * gnat_rm.texi: Minor clarifications.
4283 * expander.adb, sem_aggr.adb: Add comments.
4285 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4287 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
4288 applies to a subprogram body, the name is the current scope,
4289 rather than being declared in the current scope.
4290 (Analyze_Pragma, case No_Return): Handle properly a No_Return
4291 aspect applied to a subprogram body.
4293 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4295 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
4296 of overloaded subprograms, and fix bug in handling of primitive
4299 2014-02-19 Pascal Obry <obry@adacore.com>
4301 * s-os_lib.adb: Minor reformatting.
4303 2014-02-19 Yannick Moy <moy@adacore.com>
4305 * expander.adb (Expand): Do nothing inside generics.
4306 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
4309 2014-02-19 Yannick Moy <moy@adacore.com>
4311 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
4313 2014-02-19 Robert Dewar <dewar@adacore.com>
4315 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
4316 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
4319 2014-02-19 Claire Dross <dross@adacore.com>
4321 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4322 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
4324 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4326 * sem_ch3.adb (Analyze_Declarations): Analyze
4327 a package contract at the end of the private declarations (if
4328 applicable), otherwise analyze it and the end of the visible
4331 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4333 * style.adb (Missing_Overriding): If subprogram is an
4334 instantiation, place warning on the instance node itself,
4335 without mention of the original generic. Do not emit message
4336 if explicit Ada version is older than the introduction of the
4337 overriding indicator.
4339 2014-02-19 Yannick Moy <moy@adacore.com>
4341 * gnat_rm.texi: Doc clarifications.
4343 2014-02-19 Yannick Moy <moy@adacore.com>
4345 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
4348 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4350 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
4351 specified First primitive, rather than by name.
4352 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
4353 and extend error checking for missing primitives and incorrect
4356 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4358 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
4359 errors when a Synchronization aspect on an overriding protected
4360 operation does not match the given aspect on the overridden
4361 operation of an ancestor interface.
4363 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4365 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
4366 (Check_Loop_Pragma_Placement): Update
4367 comment on usage. Remove local variables Orig_Stmt and
4368 Within_Same_Sequence. Check that the current Loop_Invariant or
4369 Loop_Variant pragma is grouped together with other such pragmas.
4370 (Is_Loop_Pragma): New routine.
4371 (Prev_In_Loop): Removed.
4373 2014-02-19 Robert Dewar <dewar@adacore.com>
4375 * par-ch6.adb (P_Return): For extended return, end column lines
4377 * par.adb: Minor documentation clarification.
4379 2014-02-19 Yannick Moy <moy@adacore.com>
4381 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
4382 that Loop_Invariant and Loop_Variant appear consecutively.
4383 * gnat_rm.texi Update documentation of Loop_Invariant and
4384 Loop_Variant pragmas.
4386 2014-02-19 Robert Dewar <dewar@adacore.com>
4388 * debug.adb: Document -gnatd.X.
4389 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
4391 (Check_Then_Column): Ditto.
4392 * styleg.adb (Check_Then): Allow THEN on line after IF.
4393 (Check_Then): Check THEN placement under control of -gnatd.X
4394 * styleg.ads (Check_Then): Now called even if THEN is not first
4396 * stylesw.ads (Style_Check_If_Then_Layout): Document new
4398 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
4400 2014-02-19 Robert Dewar <dewar@adacore.com>
4402 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
4403 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
4404 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
4405 vms_conv.adb: Fix bad layout of IF statements
4407 2014-02-19 Robert Dewar <dewar@adacore.com>
4409 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
4411 2014-02-19 Robert Dewar <dewar@adacore.com>
4413 * exp_util.adb: Update comments.
4415 2014-02-19 Doug Rupp <rupp@adacore.com>
4417 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
4418 * init.c (__gl_float_format): [VMS] New global.
4419 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
4420 representation in effect.
4422 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4424 * exp_ch6.adb Add with and use clause for Exp_Prag.
4425 (Expand_Contract_Cases): Relocated to Exp_Prag.
4426 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
4427 * exp_prag.adb Add with and use clauses for Checks and Validsw.
4428 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
4429 structure of the expanded code to showcase the evaluation of
4430 attribute 'Old prefixes. Add local variable Old_Evals. Expand
4431 any attribute 'Old references found within a consequence. Add
4432 circuitry to evaluate the prefixes of attribute 'Old that
4433 belong to a selected consequence.
4434 (Expand_Old_In_Consequence): New routine.
4435 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
4436 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
4437 potentially unevaluated prefix is always evaluated.
4439 2014-02-19 Robert Dewar <dewar@adacore.com>
4441 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
4442 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
4443 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
4444 handling for the case of Modify_Tree_For_C, this approach did
4446 * exp_util.adb (Matching_Standard_Type): New function
4447 (Side_Effect_Free): New top level functions (from
4448 Remove_Side_Effects).
4449 * exp_util.ads (Side_Effect_Free): New top level functions
4451 * sinfo.ads: Minor comment updates.
4453 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4455 * exp_ch6.adb (Expand_Simple_Function_Return): If return
4456 type is unconstrained and uses the secondary stack, mark the
4457 enclosing function accordingly, to ensure that the value is not
4458 prematurely removed.
4460 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4462 * par.adb Alphabetize the routines in Par.Sync.
4463 (Resync_Past_Malformed_Aspect): New routine.
4464 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
4465 variables. Code and comment reformatting. Detect missing
4466 parentheses on aspects [Refined_]Global and [Refined_]Depends
4467 with a non-null definition.
4468 * par-sync.adb: Alphabetize all routines in this separate unit.
4469 (Resync_Past_Malformed_Aspect): New routine.
4471 2014-02-19 Robert Dewar <dewar@adacore.com>
4473 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
4474 if Esize values do not match.
4476 2014-02-19 Yannick Moy <moy@adacore.com>
4478 * sinfo.ads: Minor comment update.
4480 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4482 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
4484 2014-02-19 Thomas Quinot <quinot@adacore.com>
4486 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
4487 that has the No_Ctrl_Actions flag is a suitable node to be
4488 wrapped if the assigned expression has no finalization actions.
4489 * sem_eval.adb (Eval_Entity_Name): For a compile time known
4490 boolean value, mark the corresponding condition SCO as constant.
4492 2014-02-19 Robert Dewar <dewar@adacore.com>
4494 * exp_util.adb: Minor reformatting.
4495 * exp_util.ads (Matching_Standard_Type): New function.
4496 * exp_ch7.adb: Minor reformatting.
4498 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4500 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
4501 to find declaration for Cursor, to handle properly the case of
4502 a discriminated iterable type.
4504 2014-02-19 Vincent Celier <celier@adacore.com>
4506 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
4507 imported library projects with the library ALI dirs, when setting
4509 * prj-env.ads (Ada_Objects_Path): Correct comments about
4510 argument Including_Libraries.
4512 2014-02-19 Gary Dismukes <dismukes@adacore.com>
4514 * gnat_rm.texi: Minor spelling fixes.
4516 2014-02-19 Doug Rupp <rupp@adacore.com>
4518 * init.c: Remove unneeded code.
4519 * fe.h (Float_Format): New macro
4520 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
4522 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4524 * sem_prag.adb (Check_Refined_Global_Item):
4525 A state or variable acts as a constituent only it is part of an
4526 encapsulating state and the state has visible refinement.
4528 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4530 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
4531 postcondition for a function when the expression does not mention
4532 'Result but the function has in-out parameters.
4534 2014-02-19 Robert Dewar <dewar@adacore.com>
4536 * gnat_rm.texi: Add documentation on Value_Size forcing biased
4539 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4541 * lib-xref.ads Remove the small table of letter and symbol usage as we
4544 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4546 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
4547 messages depending on the offending misplaced aspect specifications.
4548 (Diagnose_Misplaced_Aspect_Specifications): New routine.
4550 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4552 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
4553 for iterable aspect primitives.
4554 (Resolve_Iterable_Operation): Use expected signature of iterable
4555 aspect to resolve primitive when overloading is present.
4556 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
4557 (Check_Signature): Removed.
4559 2014-02-19 Yannick Moy <moy@adacore.com>
4561 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
4562 subunit in GNATprove_Mode.
4563 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
4565 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4567 * lib-xref.ads Alphabetize the contents of table
4568 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
4569 for E_Abstract_State. List all letters and symbols in use.
4570 * sem_prag.adb (Analyze_Abstract_State): Update all calls
4571 to Create_Abstract_State to reflect the new signature.
4572 (Create_Abstract_State): Change subprogram profile and update
4573 the comment on usage. Use the proper location of the state
4574 declaration when creating a new abstract state entity. Do not
4575 generate an external name, but simply reuse the name coming from
4576 the state declaration.
4578 2014-02-19 Robert Dewar <dewar@adacore.com>
4580 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
4581 declarations get properly inserted in Modify_Tree_For_C mode.
4582 * sinfo.ads: Minor comment addition.
4584 2014-02-19 Robert Dewar <dewar@adacore.com>
4586 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
4587 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
4589 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4591 * style.adb (Missing_Overriding): Warning does not apply in
4592 language versions prior to Ada 2005.
4593 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
4594 * sem_attr.adb: Add Attribute_Iterable where needed.
4595 * exp_attr.adb: ditto.
4596 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
4597 handle loops and quantified expressions over types that have an
4598 iterable aspect. Called from Expand_Iterator_Loop.
4599 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
4600 with Iterable aspect.
4601 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
4602 subprograms specified in the Iterable aspect have the proper
4603 signature involving container and cursor.
4604 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
4605 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
4606 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
4607 New procedure to retrieve one of the primitives First, Last,
4608 or Has_Element, from the value of the iterable aspect of a
4610 (Is_Container_Element): Predicate to recognize expressions
4611 that denote an element of one of the predefined containers,
4612 for possible optimization. This subprogram is not currently
4613 used, pending ARG discussions on the legality of the proposed
4614 optimization. Worth preserving for eventual use.
4615 (Is_Iterator): Recognize formal container types.
4616 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
4618 2014-02-19 Robert Dewar <dewar@adacore.com>
4620 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
4621 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
4622 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
4623 declarations from list of actions.
4624 * output.ads, output.adb (Delete_Last_Char): New procedure.
4625 * sinfo.ads: Document handling of Mod and expression with actions
4626 in Modify_Tree_For_C mode.
4628 2014-02-19 Ed Schonberg <schonberg@adacore.com>
4630 * par-ch9.adb (P_Task): Add a null statement to produce a
4631 well-formed task body when due to a previous syntax error the
4632 statement list is empty.
4634 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
4636 * sem_prag.adb (Check_Dependency_Clause): Account
4637 for the case where a state with a non-null refinement matches a
4638 null output list. Comment reformatting.
4639 (Inputs_Match): Copy a solitary input to avoid an assertion failure
4640 when trying to match the same input in multiple clauses.
4642 2014-02-19 Gary Dismukes <dismukes@adacore.com>
4644 * sem_attr.adb: Minor typo fix.
4646 2014-02-18 Robert Dewar <dewar@adacore.com>
4648 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
4649 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
4650 (Create_Standard): Create new unsigned types.
4651 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
4652 mode (Expand_N_Reference): Removed, problematic and not needed
4654 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
4656 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
4657 * expander.adb: Remove call to Expand_N_Reference (problematic,
4658 and not needed now).
4659 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
4660 * stand.adb: Read and write unsigned type entities.
4661 * stand.ads: Add new unsigned types.
4663 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
4665 * sem_ch4.adb (Analyze_Call): Do not mark a function call
4666 as being inside an assertion expression as the flag is now removed.
4667 (Check_Ghost_Subprogram_Call): Do not query the
4668 In_Assertion_Expression flag as it is now removed, instead use
4669 a predicate function.
4670 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
4671 In_Assertion_Expression flag as it is now removed, instead use
4672 a predicate function.
4673 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
4674 * sem_util.adb Add with and use clause for Sem_Prag.
4675 (In_Assertion_Expression_Pragma): New routine.
4676 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
4677 * sinfo.adb (In_Assertion_Expression): Removed.
4678 (Set_In_Assertion_Expression): Removed.
4679 * sinfo.ads Remove flag In_Assertion_Expression along with its
4681 (In_Assertion_Expression): Removed along with
4682 pragma Inline. (Set_In_Assertion_Expression): Removed along
4685 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
4687 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
4688 used together with '-r', '-rf' or '-rnb' options.
4690 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
4692 * sem_attr.adb (Analyze_Attribute): Comment
4693 and code reformatting. Use separate routines to check the
4694 legality of attribute 'Old in certain pragmas. Verify
4695 the use of 'Old, 'Result and locally declared entities
4696 within the prefix of 'Old.
4697 (Check_References_In_Prefix): New routine.
4698 (Check_Use_In_Contract_Cases): New routine.
4699 (Check_Use_In_Test_Case): New routine.
4701 2014-02-18 Vincent Celier <celier@adacore.com>
4703 * sem_aux.adb (Is_By_Reference_Type): For each components of
4704 a record type, check also if the component is volatile as it
4705 may have an aspect that makes it volatile. If it is, then the
4706 record type is a by reference type.
4708 2014-02-18 Robert Dewar <dewar@adacore.com>
4710 * exp_attr.adb: Minor reformatting.
4711 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
4712 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
4713 as another case where we don't generate N_Reference nodes for
4715 * expander.adb (Expand): Add call to Expand_N_Reference.
4717 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4719 * sem_prag.adb (Analyze_Refined_Pragma): Remove
4720 local variable Pack_Spec. Refinement pragmas may now apply to
4721 bodies of both visible and private subprograms.
4723 2014-02-06 Robert Dewar <dewar@adacore.com>
4725 * exp_attr.adb (Expand_Loop_Entry_Attribute):
4726 Minor change (Attr => N) (Expand_Pred_Succ): New name
4727 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
4728 Max): Expand into if expression if Modify_Tree_For_C mode.
4729 (Expand_N_Attribute_Reference, case Min): ditto
4730 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
4733 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4735 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
4736 predicate check if this is an internal declaration with
4737 No_Initialization set, as for an expanded aggregate component.
4739 2014-02-06 Doug Rupp <rupp@adacore.com>
4741 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
4742 conditions with severity of "SUCCESS" or "INFORMATIONAL".
4744 2014-02-06 Yannick Moy <moy@adacore.com>
4746 * sem_prag.adb (Analyze_Pragma): Analyze pragma
4747 Debug rewritten node before rewriting it as a null statement in
4750 2014-02-06 Robert Dewar <dewar@adacore.com>
4752 * sem_attr.adb (Min_Max): New procedure.
4753 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
4756 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4758 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
4761 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4763 * sem_prag.adb (Analyze_Abstract_State): Update
4764 all calls to Create_Abstract_State to pass the proper state
4766 (Create_Abstract_State): Add new formal parameter
4767 State_Decl along with comment on usage. Establish a link between
4768 the abstract state entity and the state declaration.
4770 2014-02-06 Robert Dewar <dewar@adacore.com>
4772 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
4773 comparison of unordered enumeration type.
4774 (Analyze_Attribute, case Max): Check for improper comparison of
4775 unordered enumeration type.
4776 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
4778 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
4779 Moved here from Sem_Res.
4781 2014-02-06 Robert Dewar <dewar@adacore.com>
4783 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
4786 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4788 * sem_ch6.adb (Process_Formals): Error message reformatting.
4790 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4792 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
4793 variable Spec. Do not inherit the null indicator from the
4794 subprogram body when generating the spec.
4796 2014-02-06 Robert Dewar <dewar@adacore.com>
4798 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
4801 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4803 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
4804 when the function has a foreign convention, but not if only the
4805 limited return type has such a convention.
4807 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4809 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
4810 variable Spec. Comment reformatting. Use Copy_Separate_Tree
4811 rather than New_Copy_Tree when building the corresponding
4812 subprogram declaration.
4814 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4816 * sem_prag.adb (Analyze_Global_Item): Remove
4817 the mode-related checks on abstract states with enabled external
4819 (Property_Error): Removed.
4821 2014-02-06 Javier Miranda <miranda@adacore.com>
4823 * lib-xref.adb (Generate_Reference): When
4824 generating the reference to the first private entity take care
4825 of handling swapped entities.
4827 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4829 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
4832 2014-02-06 Robert Dewar <dewar@adacore.com>
4834 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
4835 than the word size when operating in Modify_Tree_For_C mode.
4836 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
4838 2014-02-06 Robert Dewar <dewar@adacore.com>
4840 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
4841 compare is case insensitive.
4842 * gnat_rm.texi: Document that string compare for Warnings Off
4843 is now case insensitive.
4845 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
4847 * gnat_rm.texi: Small wording tweak.
4849 2014-02-06 Pascal Obry <obry@adacore.com>
4851 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
4852 and Included_Artifact_Patterns attribute definitions.
4854 2014-02-06 Yannick Moy <moy@adacore.com>
4856 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
4857 SPARK_Mode pragma component for all subprograms, including stubs.
4859 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4861 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
4862 the configuration options of the enclosing context in a
4864 (Analyze_Subprogram_Body_Stub): Maintain the
4865 configuration options of the enclosing context in a stack-like
4868 2014-02-06 Robert Dewar <dewar@adacore.com>
4870 * debug.adb: -gnatd.u sets Modify_Tree_For C
4871 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
4872 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
4873 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
4874 * exp_intr.adb (Expand_Shift): Call expander so we do
4875 Modify_Tree_For_C expansions.
4876 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
4879 2014-02-06 Fedor Rybin <frybin@adacore.com>
4881 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
4882 after the phase 1 of the processing of each aggregated project
4883 to get access to project trees of aggregated projects.
4884 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
4885 If specified, On_New_Tree_Loaded is called after each aggregated
4886 project has been processed succesfully.
4887 (Process): new parameter On_New_Tree_Loaded.
4888 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
4889 callback added after processing of each aggregated project.
4890 (Recursive_Process): new parameter On_New_Tree_Loaded.
4891 (Process): new parameter On_New_Tree_Loaded.
4892 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
4893 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
4895 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
4898 2014-02-06 Bob Duff <duff@adacore.com>
4900 * gnat_ugn.texi: Implement --insert-blank-lines and
4901 --preserve-blank-lines switches.
4903 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
4905 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
4908 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
4910 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
4911 of the pragma on individual objects.
4913 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4915 * einfo.adb Node29 is now used as BIP_Initialization_Call.
4916 (BIP_Initialization_Call): New routine.
4917 (Set_BIP_Initialization_Call): New routine.
4918 (Write_Field29_Name): Add an entry for constants and variables.
4919 * einfo.ads Add new attribute BIP_Initialization_Call and update
4921 (BIP_Initialization_Call): New routine along with pragma Inline.
4922 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
4923 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4924 Add local declaration Res_Decl. Capture the build-in-place
4925 initialization call when the related object declaration has
4926 created a transient block.
4927 * exp_ch7.adb (Process_Transient_Objects): Add local variable
4928 Fin_Insrt. Recognize a scenario where an object declaration acts
4929 as a transient context and is initialized by a build-in-place
4932 2014-02-06 Pascal Obry <obry@adacore.com>
4934 * prj-util.adb (For_Interface_Sources): Fix handling of required
4935 bodies for aggregate libs.
4937 2014-02-06 Robert Dewar <dewar@adacore.com>
4939 * nlists.ads: Minor comment clarifications.
4941 2014-02-06 Robert Dewar <dewar@adacore.com>
4943 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
4945 * opt.ads (Modify_Tree_For_C): New flag.
4946 * output.ads, output.adb (Last_Char): New function.
4948 2014-02-06 Pascal Obry <obry@adacore.com>
4950 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
4951 share/gpr for cross-builds.
4953 2014-02-06 Robert Dewar <dewar@adacore.com>
4955 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
4956 Minor reformatting and code clean ups.
4958 2014-02-06 Pascal Obry <obry@adacore.com>
4960 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
4961 * prj.ads: Minor typo fix in comment.
4963 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4965 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
4966 local variable Expr. Flag clauses with extra parenthesis as this
4967 is not allowed by the syntax of the pragma. Code reformatting.
4969 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
4971 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
4972 variables. Rename variabme Tnn to Temp. Do not create a temporary
4973 if assertions are disabled. Find enclosing routine _Postconditions
4974 and insert the temporary that captures the value of the prefix
4976 * exp_ch6.adb (Build_Postconditions_Procedure):
4977 Insert the generated _Postconditions routine
4978 before the first source declaration of the related
4980 (Insert_After_Last_Declaration): Removed.
4981 (Insert_Before_First_Source_Declaration): New routine.
4983 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4985 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
4986 Utility to determine whether current expansion is for the body
4987 of a predefined primitive operation.
4988 (Make_Predicate_Check): Use Within_Internal_Subpgram
4989 * checks.adb (Apply_Predicate_Check): Use
4990 Within_Internal_Subprogram
4991 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
4993 2014-02-06 Pascal Obry <obry@adacore.com>
4995 * prj.ads, prj-util.adb: Minor reformatting.
4997 2014-02-06 Ed Schonberg <schonberg@adacore.com>
4999 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
5000 Take into account the Split_PPC flag to ensure that conjuncts
5001 in a composite postcondition aspect are tested in source order.
5003 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5005 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
5007 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
5008 illegal use of SPARK_Mode.
5009 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
5010 * sem_prag.adb (Analyze_Pragma): Code reformatting.
5011 * sem_util.adb Add with and use clause for Aspects.
5012 (Check_SPARK_Mode_In_Generic): New routine.
5013 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
5015 2014-02-06 Thomas Quinot <quinot@adacore.com>
5017 * a-calend.adb (Formatting_Operations.Split): Ensure that
5018 Time_Error is raised for invalid time values.
5020 2014-02-06 Arnaud Charlet <charlet@adacore.com>
5022 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
5025 2014-02-06 Robert Dewar <dewar@adacore.com>
5027 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
5028 * exp_ch3.adb (Build_Dcheck_Function): Set
5029 Is_Discriminant_Check_Function.
5031 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5033 * exp_ch7.adb (Is_Subprogram_Call): Inspect
5034 the original tree in certain cases where a construct has been
5035 factored out and replaced by a reference to a temporary.
5037 2014-02-06 Ed Schonberg <schonberg@adacore.com>
5039 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
5040 parameters when propagating predicate function to full view.
5041 (Find_Type_Of_Object): Freeze base type of object type to catch
5042 premature use of discriminated private type without a full view.
5044 2014-02-06 Robert Dewar <dewar@adacore.com>
5046 * sprint.adb: Minor reformatting.
5048 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5050 * exp_ch4.adb (Process_Transient_Object): Add local variable
5051 Temp_Ins. When the transient object is initialized by an
5052 aggregate, the hook must capture the object after the last
5053 component assignment takes place.
5054 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
5055 routine Is_Subprogram_Call.
5056 (Is_Subprogram_Call): Inspect an
5057 aggregate that has been heavily expanded for subprogram calls.
5058 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
5059 and Temp_Ins. Remove the nested declare block and adjust the
5060 indentation. When the transient object is initialized by an
5061 aggregate, the hook must capture the object after the last
5062 component assignment takes place.
5064 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5066 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
5067 external states with enabled properties that do not match the
5069 (Property_Error): New routine.
5070 * sem_res.adb (Property_Error): New routine.
5071 (Resolve_Actuals): Detect illegal uses of external variables with
5072 enabled properties in procedure calls that do not match the mode of
5073 the corresponding formal parameter.
5075 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5077 * sem_util.adb (Has_Enabled_Property): Rename
5078 formal parameter Prop_Nam to Property. Update the comment on usage
5079 and all occurrences in the body. Add local variable Prop_Nam. When
5080 inspecting a property with an expression, the property name
5081 appears as the first choice of the component association.
5083 2014-02-04 Robert Dewar <dewar@adacore.com>
5085 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
5087 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5089 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
5090 for consistency with other messages.
5092 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5094 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
5095 iterator, indicate that the element is a constant if the container
5096 type does not have a variable indexing aspect.
5097 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
5098 marked as constant, do not reset its Ekind, to ensure that
5099 container elements in an element loop are not modified if the
5100 container (e.g. a hashed set) only has a constant indexing aspect.
5102 2014-02-04 Arnaud Charlet <charlet@adacore.com>
5104 * g-souinf.ads: Subprograms in this unit are actually not pure.
5105 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
5106 * einfo.ads (Is_Pure): Update doc to match implementation.
5108 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5110 * exp_ch13.adb: Minor spelling fix.
5112 2014-02-04 Robert Dewar <dewar@adacore.com>
5114 * opt.ads: Minor comment update.
5116 2014-02-04 Robert Dewar <dewar@adacore.com>
5118 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
5121 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5123 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
5124 on null expressions if component type is non-null, when the
5125 corresponding association covers an empty range of index values.
5127 2014-02-04 Robert Dewar <dewar@adacore.com>
5129 * sinfo.ads: Further comments on N_Expression_With_Actions node.
5131 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
5133 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5134 variables Out_Items and Ref_Global. Remove local constant
5135 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
5136 and D8. Remove the useless collection of global items as this
5137 was a leftover from an earlier version of the routine. Move
5138 several routines out to avoid deep nesting and indentation.
5139 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
5140 parameter Do_Checks to Post_Errors. Update the comment on usage.
5141 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
5142 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
5143 to Post_Errors. Update the comment on usage. Account for the
5144 case where a self referential state may have a null input_list.
5145 (Is_Self_Referential): New routine.
5147 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5149 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
5150 entity renames an expression, as in the case of an object of
5151 an unconstrained type initialized by a function call, defer the
5152 rewriting of the expression to the expander.
5153 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
5154 'Alignment): If the entity renames an expression, introduce
5155 temporary to capture value, and rewrite original declaration to
5158 2014-02-04 Gary Dismukes <dismukes@adacore.com>
5160 * g-comlin.adb: Minor typo fix.
5162 2014-02-04 Ed Schonberg <schonberg@adacore.com>
5164 * freeze.adb (Freeze_All): Types derived from a formal
5165 access_to_classwide type do not have a finalization master.
5167 2014-02-04 Robert Dewar <dewar@adacore.com>
5169 * sprint.adb: Minor reformatting.
5171 2014-02-04 Robert Dewar <dewar@adacore.com>
5173 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
5174 cases where Actions is a null list.
5175 * sinfo.ads (N_Expression_With_Actions): Actions can be
5176 temporarily empty during semantic analysis, but must be non-empty
5177 in the final expanded tree.
5179 2014-01-31 Robert Dewar <dewar@adacore.com>
5181 * exp_ch9.adb: Minor reformatting.
5183 2014-01-31 Emmanuel Briot <briot@adacore.com>
5185 * g-comlin.adb (Set_Command_Line): Take the switches
5186 configuration from the Command_Line_Config.
5188 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5190 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
5193 2014-01-31 Vincent Celier <celier@adacore.com>
5195 * projects.texi: Add more documentation about others used as an
5196 index in indexed attributes.
5198 2014-01-31 Robert Dewar <dewar@adacore.com>
5200 * gnat_ugn.texi: Minor update.
5201 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
5202 * exp_util.adb: Minor reformatting.
5204 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5206 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
5207 depends on data that is not private to the protected object,
5208 and potentially modifiable in unsynchronized fashion.
5210 2014-01-31 Yannick Moy <moy@adacore.com>
5212 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
5215 2014-01-31 Robert Dewar <dewar@adacore.com>
5217 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
5218 for Unknown_Package.
5219 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
5221 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5223 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
5224 the logic that generates a runtime check to determine the
5225 controlled status of the object about to be allocated or
5226 deallocated. Class-wide types now always use a runtime check
5227 even if they appear as generic actuals.
5228 (Find_Object): Detect
5229 a special case that involves interface class-wide types because
5230 the object appears as a complex expression.
5232 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5234 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
5235 subprogram with an incomplete untagged formals on the list of
5236 private dependents, to verify that the type is properly completed
5237 in the private part.
5238 * sem_attr.adb: Code clean up.
5240 2014-01-31 Robert Dewar <dewar@adacore.com>
5242 * exp_ch6.adb: Minor reformatting.
5244 2014-01-31 Vincent Celier <celier@adacore.com>
5246 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
5247 when Pkg is unknown.
5249 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
5251 * sem_res.adb (Resolve_Entity_Name): Comment
5252 reformatting. Allow volatile objects in various generated checks.
5254 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5256 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
5257 component association, set the etype of the identifier, for
5260 2014-01-31 Ed Schonberg <schonberg@adacore.com>
5262 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
5263 declared in a package, not checks can apply to the subprogram.
5265 2014-01-31 Robert Dewar <dewar@adacore.com>
5267 * erroutc.adb (Validate_Specific_Warnings): Warnings are
5268 controlled -gnatw.W.
5269 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
5270 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
5272 2014-01-31 Arnaud Charlet <charlet@adacore.com>
5274 * exp_disp.adb: Update comments.
5276 2014-01-31 Yannick Moy <moy@adacore.com>
5278 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
5279 Save_Global_References): Guard access to expression in aspect.
5281 2014-01-31 Yannick Moy <moy@adacore.com>
5283 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
5284 Issue an error when the pragma is applied to a generic unit,
5285 a generic declaration, or inside a generic.
5287 2014-01-31 Yannick Moy <moy@adacore.com>
5289 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
5292 2014-01-31 Robert Dewar <dewar@adacore.com>
5294 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
5297 2014-01-31 Tristan Gingold <gingold@adacore.com>
5299 * exp_disp.adb: Add a historic note.
5301 2014-01-31 Robert Dewar <dewar@adacore.com>
5303 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
5304 Process_Deferred_References.
5306 2014-01-31 Yannick Moy <moy@adacore.com>
5308 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
5309 ineffective pragma Warnings(Off) in GNATprove_Mode.
5311 2014-01-31 Bob Duff <duff@adacore.com>
5313 * s-taskin.ads: Minor comment fix.
5314 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
5315 just direct dependents. If this is actually an abort, each task
5316 will take care of aborting its dependents, so all dependents will
5317 get aborted, as before. However, when this is called the second
5318 time from Vulnerable_Complete_Master "for convenience" (i.e. to
5319 kill off tasks waiting at terminate alternatives), aborting
5320 indirect dependents is wrong, because it causes some unrelated
5321 tasks to get aborted.
5323 2014-01-31 Robert Dewar <dewar@adacore.com>
5325 * sem_ch4.adb: Minor reformatting.
5327 2014-01-31 Robert Dewar <dewar@adacore.com>
5329 * exp_ch2.adb: New calling sequence for Is_LHS.
5330 * frontend.adb: Add call to Process_Deferred_References.
5331 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
5332 (Deferred_References): New table.
5333 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
5335 (Find_Expanded_Name): Ditto.
5336 * sem_res.adb: New calling sequence for Is_LHS.
5337 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
5338 * sem_warn.adb: Call Process_Deferred_References before issuing
5341 2014-01-31 Tristan Gingold <gingold@adacore.com>
5343 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
5344 use of System_Tasking_Protected_Objects_Single_Entry.
5345 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
5346 of Protected_Single_Entry_Call.
5347 (Expand_N_Timed_Entry_Call): Remove single_entry case.
5348 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
5350 (Make_Disp_Timed_Select_Body): Likewise.
5351 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
5352 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
5354 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
5355 (Wait_For_Completion_With_Timeout): Remove.
5356 (Protected_Single_Entry_Call): Remove Mode parameter
5357 (always Simple_Call).
5358 (Service_Entry): Remove Self_Id constant (not used anymore).
5359 (Timed_Protected_Single_Entry_Call): Remove.
5360 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
5361 (Protected_Single_Entry_Call): Remove Mode parameter.
5363 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5365 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
5366 * einfo.ads (Get_Pragma): Update the comment on special pragmas
5367 handled by this routine.
5368 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
5369 to the contract of the related subprogram body.
5370 * sem_util.adb (Add_Contract_Item): Handle the insertion of
5371 pragma Refined_Post into the contract of a subprogram body.
5372 * sinfo.ads Update the documentation of node N_Contract.
5373 * sem_res.adb (Resolve_Entity_Name): Add a guard
5374 to detect abstract states and variables only when checking the
5375 SPARK 2014 rules concerning volatile object placement.
5377 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5379 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
5380 null is compatible with any access type.
5382 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5384 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
5385 placement is not in a package.
5387 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5389 * sem_util.adb (Has_Enabled_Property): Compare the character field of
5392 2014-01-29 Robert Dewar <dewar@adacore.com>
5394 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
5395 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
5396 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
5398 2014-01-29 Robert Dewar <dewar@adacore.com>
5400 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
5401 * sem_warn.adb (Check_References): Suppress warnings if inside
5402 Initial_Condition pragma.
5404 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5406 * sem_prag.adb (Check_Missing_Part_Of): List all values of
5407 State_Space_Kind for readability reasons. Do not emit an error on
5408 a private item when the enclosing package lacks aspect/pragma
5409 Abstract_State. Do not emit an error on a private package
5410 instantiation when the corresponding generic template lacks
5412 (Has_Visible_State): New routine.
5413 * sem_util.adb (Find_Placement_In_State_Space): The visible
5414 declarations of any kind of child units in general act as proper
5417 2014-01-29 Robert Dewar <dewar@adacore.com>
5419 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
5420 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
5421 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
5422 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
5423 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
5424 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
5425 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
5426 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
5427 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
5428 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
5429 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
5430 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
5431 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
5432 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
5433 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
5434 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
5435 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
5436 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
5437 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
5438 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
5439 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
5440 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
5441 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
5442 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
5443 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
5444 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
5445 s-regpat.adb, s-secsta.adb, s-stalib.ads,
5446 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
5447 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
5448 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
5449 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
5450 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
5452 2014-01-29 Robert Dewar <dewar@adacore.com>
5454 * expander.adb: Minor reformatting.
5456 2014-01-29 Javier Miranda <miranda@adacore.com>
5458 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
5461 2014-01-29 Javier Miranda <miranda@adacore.com>
5463 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
5464 that checks if an interface types defines the predefined "="
5465 function because the compiler was erroneously not generating the
5466 predefined "=" primitive as soon as the name of some interface
5467 primitive is "=" (formals were not checked).
5469 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5471 * expander.adb (Expander): In GNATprove mode, do not process
5472 transient scopes: they are in general not created in this mode,
5473 and an attempt to examine them will lead to constraint errors when
5474 processing configuration pragmas that have analyzable expressions.
5476 2014-01-29 Vincent Celier <celier@adacore.com>
5478 * clean.adb (Gnatclean): Fail if main project is an aggregate
5479 project or if there is an aggregate library project in the
5481 * gnatcmd.adb: Fail if the main project is an aggregate project
5482 or if there is an aggegate library project in the project tree.
5483 * make.adb (Initialize): : Fail if main project is an aggregate
5484 project or if there is an aggregate library project in the
5486 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
5487 * prj-makr.adb (Initialize): Fail if the main project is an
5488 aggregate project or an aggregate library project.
5490 2014-01-29 Vincent Celier <celier@adacore.com>
5492 * prj-part.adb (Check_Import_Aggregate): New procedure
5493 to check if an imported project is an aggregate project.
5494 (Parse_Single_Project): Call Check_Import_Aggregate
5495 * projects.texi: Document that aggregate projects cannot be
5496 extended or imported.
5498 2014-01-29 Robert Dewar <dewar@adacore.com>
5500 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
5501 reformatting and code clean up.
5502 * gnat_ugn.texi: Add documentation section on Atomic Variables
5505 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5507 * einfo.adb Flag264 is now unused.
5508 (Has_Body_References): Removed.
5509 (Set_Has_Body_References): Removed.
5510 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
5511 * einfo.ads Update the comment on usage of attribute
5512 Body_References. Remove attribute Has_Body_References and its
5514 (Has_Body_References): Removed along with pragma Inline.
5515 (Set_Has_Body_References): Removed along with pragma Inline.
5516 * sem_prag.adb (Analyze_Global_Item): Move the call to
5517 Record_Possible_Body_Reference in the state related checks
5518 section. Add a comment intended function.
5519 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
5520 in the state related checks section. Add a comment intended function.
5521 (Analyze_Refinement_Clause): Cleanup the illegal body reference
5522 reporting. Add a comment on timing of error reporting.
5523 (Record_Possible_Body_Reference): Reimplement the routine.
5525 2014-01-29 Vincent Celier <celier@adacore.com>
5527 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
5528 unit-based languages.
5529 (Mains.Complete_Mains.Do_Complete): Use the source file project
5530 tree when calling Find_File_Add_Extension. Use the correct
5531 project name when reporting an error.
5533 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5535 * aspects.adb Add an entry for aspect Part_Of in table
5537 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
5538 Aspect_Argument, Aspect_Names and Aspect_Delay.
5539 * atree.h Define Elist9.
5540 * atree.adb (Elist9): New routine.
5541 (Set_Elist9): New routine.
5542 * atree.ads (Elist9): New routine.
5543 (Set_Elist9): New routine.
5544 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
5545 the list of node usage. Remove Refined_State from the list of
5547 (Encapsulating_State): New routine.
5549 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
5550 (Refined_State): Removed.
5551 (Set_Encapsulating_State): New routine.
5552 (Set_Part_Of_Constituents): New routine.
5553 (Set_Refined_State): Removed.
5554 (Write_Field9_Name): Add an entry
5555 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
5556 Encapsulating_State. Remove the entry for Refined_State.
5557 * einfo.ads Add new attributes Encapsulating_State
5558 and Part_Of_Constituents alond with their usage in
5559 entities. Remove attribute Refined_State along with its
5561 (Encapsulating_State): New routine and
5562 pragma Inline. (Get_Pragma): Update the comment on usage.
5563 (Part_Of_Constituents): New routine and pragma Inline.
5564 (Refined_State): Removed along with pragma Inline.
5565 (Set_Encapsulating_State): New routine and pragma Inline.
5566 (Set_Part_Of_Constituents): New routine and pragma Inline.
5567 (Set_Refined_State): Removed along with pragma Inline.
5568 * par-prag.adb Pragma Part_Of does not need any special processing
5570 * sem_ch3.adb (Analyze_Declarations): Remove local variables
5571 Body_Id and Prag. Call separate routines to analyze the
5572 contract of a package [body].
5573 (Analyze_Object_Contract):
5574 Update the comment on usage. Remove local variables
5575 Items and Nam. Use Get_Pragma rather than traversing the
5576 classification list. Verify whether the lack of indicator
5577 Part_Of agrees with the placement of the variable in state space.
5578 (Analyze_Object_Declaration): Initialize the encapsulating state
5579 of a variable. (Requires_State_Refinement): Moved to sem_util.
5580 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
5581 (Analyze_Package_Contract): New routine.
5582 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
5583 (Analyze_Package_Contract): New routine.
5584 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
5585 state and Part_Of constituents.
5586 * sem_ch13.adb (Analyze_Aspect_Specifications):
5587 Add processing for aspect Part_Of. Update all
5588 calls to Decorate_Delayed_Aspect_And_Pragma.
5589 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
5590 not need any special processing at freeze time.
5591 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
5592 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
5593 update the associated comment.
5594 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
5595 (Analyze_Abstract_State): Add new global variable State_Id. Remove
5596 local constants Errors and Loc. Remove local variables Is_Null
5597 and State_Nam. Create the entity of the abstract state on the
5598 spot, before all remaining checks are performed. Verify that a
5599 missing Part_Of option agrees with the placement of the abstract
5600 state within the state space.
5601 (Analyze_Depends_In_Decl_Part):
5602 Add new global variables Constits_Seen and States_Seen. Check
5603 that a state and a corresponding constituent do not appear
5604 in pragma [Refined_]Depends.
5605 (Analyze_Global_In_Decl_Part):
5606 Add new global variables Constits_Seen and States_Seen. Check
5607 that a state and a corresponding constituent do not appear
5608 in pragma [Refined_]Global.
5609 (Analyze_Global_Item):
5610 Remove the now obsolete code that deals with Part_Of.
5611 Add the entity of the global item to the list of processed
5612 items. (Analyze_Initializes_In_Decl_Part): Add new global
5613 variables Constits_Seen and States_Seen. Check that a state
5614 and a corresponding constituent do not appear in pragma
5616 (Analyze_Initialization_Item): Add the entity
5617 of the initialization item to the list of processed items.
5618 (Analyze_Input_Item): Add the entity of the initialization
5619 item to the list of processed items.
5620 (Analyze_Input_Output):
5621 Remove the now obsolete code that deals with Part_Of. Add the
5622 entity of the input/output to the list of processed items.
5623 (Analyze_Part_Of): New routine.
5624 (Analyze_Part_Of_Option): Remove
5625 local constant Par_State. Add local constant Encaps and local
5626 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
5627 the option. Turn the related state into a Part_Of constituent
5628 if the option is legal.
5629 (Analyze_Pragma): Add processing
5631 (Analyze_Refined_State_In_Decl_Part):
5632 Remove global constants Pack_Body and Spec_Id. Remove
5633 global variables Abstr_States and Hidden_States. Add new
5634 global variables Available_States, Body_Id, Body_States and
5635 Spec_Id. Add new local constant Body_Decl. Reimplement the
5636 logic that extracts the states available for refinement from
5637 the related package and the body hidden states of the said
5639 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
5640 (Check_Applicable_Policy): Alphabetize body.
5641 (Check_Dependency_Clause): Replace Refined_State
5642 with Encapsulating_State.
5643 (Check_Matching_Constituent):
5644 Reimplement the logic that determines whether an item is a valid
5645 / invalid constituent of the current refined state. Return when
5646 a construct does not denote a valid abstract state. Extract the
5647 list of Part_Of constituents for further analysis. Check that all
5648 Part_Of constituents of a state have been used in its refinement.
5649 (Check_Matching_State): Update the comment on usage. Operate
5650 on the list of available states.
5651 (Check_Missing_Part_Of): New routine.
5652 (Check_Refined_Global_Item): Replace Refined_State
5653 with Encapsulating_State.
5654 (Check_State_And_Constituent_Use): New routine.
5655 (Create_Abstract_State): New routine.
5656 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
5657 (Is_Part_Of): Removed.
5658 (Collect_Body_States): New routine.
5659 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
5660 (Collect_Hidden_States): Removed.
5661 (Report_Unrefined_States): Change the profile of the procedure along
5662 with the comment on usage.
5663 (Report_Unused_Constituents): New routine.
5664 (Report_Unused_Hidden_States): Removed.
5665 (Report_Unused_States): New routine.
5666 * sem_prag.ads (Check_Missing_Part_Of): New routine.
5667 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
5668 appear in the classification pragmas of a package instantiation
5670 (Find_Placement_In_State_Space): New routine.
5671 (Is_Child): Removed.
5672 (Is_Child_Or_Sibling): Remove formal
5673 parameter Private_Child. Remove the private child checks.
5674 (Requires_State_Refinement): Moved from sem_ch3.
5675 * sem_util.ads Add new type State_Space_Kind along with
5676 comment on its usage and values.
5677 (Add_Contract_Item): Update the comment on usage.
5678 (Find_Body_Discriminal): Alphabetize spec.
5679 (Find_Placement_In_State_Space): New routine.
5680 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
5681 and update the comment on usage.
5682 (Requires_State_Refinement): Moved from sem_ch3.
5683 * sinfo.ads: Update the documentation of N_Contract.
5684 * snames.ads-tmpl The predefined name for Part_Of is now used
5685 to denote a pragma. Add Pragma_Id for Part_Of.
5687 2014-01-29 Emmanuel Briot <briot@adacore.com>
5689 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
5691 (Dump): New subprogram.
5693 2014-01-29 Tristan Gingold <gingold@adacore.com>
5695 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
5696 Expand_Entry_Declaration to factorize code.
5698 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5700 * checks.adb: minor clarification.
5701 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
5702 search for primitive operations to the entities that immediately
5703 follow the type declaration.
5705 2014-01-29 Tristan Gingold <gingold@adacore.com>
5707 * exp_ch9.adb (Build_Protected_Entry): Do not call
5708 Complete_Entry_Body anymore.
5709 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
5710 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
5712 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
5714 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
5715 string when the Name input bigger than allowed. Adapt the function
5718 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5720 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
5721 if expression is within a case_expression of if_expression.
5723 2014-01-29 Robert Dewar <dewar@adacore.com>
5725 * exp_ch9.adb, inline.ads: Minor reformatting.
5727 2014-01-29 Tristan Gingold <gingold@adacore.com>
5729 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
5731 2014-01-29 Yannick Moy <moy@adacore.com>
5733 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
5734 SPARK_Mode_Pragma components to be able to analyze generic
5736 * sem_ch12.adb (Analyze_Package_Instantiation,
5737 Inline_Instance_Body, Need_Subprogram_Instance_Body,
5738 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
5739 for future analysis of the instance.
5740 (Instantiate_Package_Body,
5741 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
5742 from instantiation to analyze the instance.
5744 2014-01-29 Robert Dewar <dewar@adacore.com>
5746 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
5749 2014-01-29 Yannick Moy <moy@adacore.com>
5751 * gnat_rm.texi: Update description of SPARK_Mode pragma.
5753 2014-01-29 Tristan Gingold <gingold@adacore.com>
5755 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
5757 2014-01-29 Thomas Quinot <quinot@adacore.com>
5759 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
5761 2014-01-29 Ed Schonberg <schonberg@adacore.com>
5763 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
5764 resulting string is an internal entity. and thus requires no
5765 initialization. This is relevant when Initialize_ Scalars is
5766 enabled, because the resultant spurious initialization may lead to
5767 secondary stack anomalies that produce a mangled name for a task.
5769 2014-01-29 Yannick Moy <moy@adacore.com>
5771 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
5772 not inherited from spec anymore. Check consistency
5773 rules after processing of declarations.
5774 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
5775 from spec anymore. Check consistency rules after processing of
5777 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
5779 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
5782 2014-01-27 Robert Dewar <dewar@adacore.com>
5784 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
5786 (Resolve_Range): Add type name/location to unordered msg.
5788 2014-01-27 Claire Dross <dross@adacore.com>
5790 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
5791 Capacity) is only called with Capacity >= Length (Source) and
5792 Capacity in Capacity_Range.
5793 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
5794 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
5795 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
5796 in the code is this is not the case.
5798 2014-01-27 Thomas Quinot <quinot@adacore.com>
5800 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
5801 selected component in an instance where the component of the
5802 actual is not visibile at instantiation.
5804 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5806 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
5807 has a dynamic predicate, generate freeze node for Actual_Subtype
5808 at once, because the declaration of the corresponding predicate
5809 function will make reference to it.
5811 2014-01-27 Tristan Gingold <gingold@adacore.com>
5813 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
5815 2014-01-27 Robert Dewar <dewar@adacore.com>
5817 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
5818 for 2**X optimization.
5820 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5822 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
5823 explicitly whether value is in range of Character, because the
5824 library is typically compiled with range checks disabled, and
5825 we cannot rely on the implicit check on the argument of 'Val.
5827 2014-01-27 Vincent Celier <celier@adacore.com>
5829 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
5830 not the Target to itself.
5832 2014-01-27 Robert Dewar <dewar@adacore.com>
5834 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
5835 changes to avoid incorrect use of unordered enum types.
5837 2014-01-27 Thomas Quinot <quinot@adacore.com>
5839 * sem_ch4.adb: Minor reformatting.
5841 2014-01-27 Robert Dewar <dewar@adacore.com>
5843 * scn.adb (Check_End_Of_Line): Removed.
5844 (Error_Long_Line): Removed.
5845 (Determine_License): Use versions of above routines from Scanner.
5846 * scng.adb (Check_End_Of_Line): Moved to spec.
5847 (Error_Long_Line): Removed, no longer used.
5848 * scng.ads (Check_End_Of_Line): Moved here from body.
5850 2014-01-27 Tristan Gingold <gingold@adacore.com>
5852 * exp_ch7.adb (Build_Cleanup_Statements): Call
5853 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
5855 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
5856 Remove Service_Name variable.
5857 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
5858 factorize code from the above subprograms.
5859 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
5861 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
5863 * einfo.adb (Has_Option): Reimplemented.
5864 * sem_prag.adb (Analyze_Refinement_Clause): Add global
5865 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
5866 External_Constit_Seen and State. Add local variables Body_Ref,
5867 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
5868 avoid a cumbersome while pool. Verify the legality of an external
5869 state and relevant properties.
5870 (Check_External_Property): New routine.
5871 (Check_Matching_State): Remove parameter profile
5872 and update comment on usage.
5873 (Collect_Constituent): Store the
5874 relevant external property of a constituent.
5875 * sem_util.adb (Async_Readers_Enabled): Update the call to
5876 Has_Enabled_Property.
5877 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
5878 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
5879 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
5880 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
5881 Update comment on usage. Reimplement the logic to recognize the various
5882 formats of properties.
5884 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5886 * par-ch5.adb: Minor reformatting.
5888 2014-01-27 Tristan Gingold <gingold@adacore.com>
5890 * s-tposen.ads: Harmonize style and comments.
5892 2014-01-27 Vincent Celier <celier@adacore.com>
5894 * projects.texi: Document that shared library projects, by
5895 default, cannot import projects that are not shared library
5898 2014-01-27 Robert Dewar <dewar@adacore.com>
5900 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
5903 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5905 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
5906 any other exception is raised.
5907 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
5908 still necessary to perform a conversion in order to remove overlong
5911 2014-01-27 Robert Dewar <dewar@adacore.com>
5913 * exp_smem.adb: Minor reformatting.
5915 2014-01-27 Thomas Quinot <quinot@adacore.com>
5917 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
5919 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5921 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
5922 nodes for operands to the original node for the call, to preserve
5923 Original_Node pointers within the resolved operands, given that
5924 they may have been rewritten as well. Previous approach copied
5925 the operands into a new tree and lost those pointers.
5927 2014-01-27 Claire Dross <dross@adacore.com>
5930 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
5932 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5934 * sem_util.adb (Check_Internal_Protected_Use): A call through
5935 an anonymous access parameter of the current protected function
5936 is not a potential modification of the current object.
5938 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5940 * a-cobove.adb (Reserve_Capacity): Procedure raises
5941 Capacity_Error, not Constraint_Error, when request cannot be
5944 2014-01-27 Vincent Celier <celier@adacore.com>
5946 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
5947 not the Target to itself.
5949 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5951 * exp_ch4.adb (Expand_Concatenate): If the target of the
5952 concatenation is a library-level entity, always use the off-line
5953 version of concatenation, regardless of optimization level. This
5954 is space-efficient, and prevents linking problems when some
5955 units are compiled with different optimization levels.
5957 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5959 * sem_ch5.adb: Code clean up.
5961 2014-01-27 Ed Schonberg <schonberg@adacore.com>
5963 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
5964 when an array or container iterator includes a subtype indication,
5965 which is only legal in an element iterator.
5967 2014-01-27 Thomas Quinot <quinot@adacore.com>
5969 * exp_ch7.adb: Minor reformatting.
5971 2014-01-27 Robert Dewar <dewar@adacore.com>
5973 * opt.adb (SPARK_Mode): Default for library units is None rather
5975 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
5977 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
5979 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
5981 2014-01-27 Robert Dewar <dewar@adacore.com>
5983 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
5984 Suspicious_Labels table if we have identifier; followed by loop
5986 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
5987 * par.adb (Suspicious_Labels): New table.
5989 2014-01-27 Robert Dewar <dewar@adacore.com>
5991 * exp_aggr.adb (Check_Bounds): Reason is range check, not
5994 2014-01-27 Yannick Moy <moy@adacore.com>
5996 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
5998 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
6000 (Add_SPARK_Xrefs): Include references to constants.
6001 * spark_xrefs.ads Document new character 'c' for references to
6004 2014-01-27 Thomas Quinot <quinot@adacore.com>
6006 * exp_smem.adb (Add_Write_After): For a function call, insert write as
6007 an after action in a transient scope.
6009 2014-01-27 Thomas Quinot <quinot@adacore.com>
6011 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
6012 to a shared variable as an OUT formal in a call to an init proc,
6013 the 'Read call must be emitted after, not before, the call.
6015 2014-01-27 Robert Dewar <dewar@adacore.com>
6017 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
6019 2014-01-27 Robert Dewar <dewar@adacore.com>
6021 * a-wichha.adb (Character_Set_Version): Change to output proper
6024 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
6026 * einfo.adb (Is_Input_Only_State): Removed.
6027 (Is_Non_Volatile_State): Removed.
6028 (Is_Output_State): Removed.
6029 * einfo.ads (Is_Input_Only_State): Remove attribute and
6030 subprogram. Update related entity.
6031 (Is_Non_Volatile_State):
6032 Remove attribute and subprogram. Update related entity.
6033 (Is_Output_State): Removed attribute and subprogram. Update
6035 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
6037 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
6038 an object, not just variables.
6039 (Analyze_Object_Contract): New routine.
6040 (Analyze_Variable_Contract): Removed.
6041 (Process_Discriminants): Detect an illegal use of volatile
6042 discriminant in SPARK mode.
6043 * sem_ch5.adb (Analyze_Iterator_Specification):
6044 Detect an illegal use of volatile loop variable.
6045 (Analyze_Loop_Parameter_Specification): Detect an illegal use
6046 of volatile loop variable.
6047 * sem_ch6.adb (Process_Formals): Update the volatile object
6048 detection. Detect an illegal formal of mode IN OUT or OUT in
6049 SPARK mode. Enhance the error messages with references.
6050 * sem_ch12.adb (Instantiate_Object): Update the volatile object
6051 detection. Enhance the error messages with references.
6052 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
6053 messages with references.
6054 (Analyze_Contract_Case): Enhance the error messages with references.
6055 (Analyze_External_Property): Call Check_Duplicate_Property to process
6056 an external property.
6057 (Analyze_External_Property_In_Decl_Part): New routine.
6058 (Analyze_External_State_In_Decl_Part): Removed.
6059 (Analyze_Global_Item): Detect an illegal
6060 use of a volatile constant. Detect an illegal use
6061 of a variable with enabled Effective_Reads. Enhance
6062 the error messages with references. Remove obsolete
6063 checks concerning Input_Only and Output_Only states.
6064 (Analyze_Initialization_Item): Enhance the error messages
6066 (Analyze_Initializes_In_Decl_Part): Do not
6067 collect the states and variables when the initialization list
6069 (Analyze_Input_Item): Enhance the error messages with references.
6070 (Analyze_Input_Output): Enhance the error messages with references.
6071 (Analyze_Pragma): Enhance the error messages with references.
6072 (Analyze_Refinement_Clause): Code reformatting.
6073 (Analyze_Refined_Depends_In_Decl_Part):
6074 Rename global variable Global to Reg_Global and update all
6075 occurrences. Add local variables D7 and D8. Update the error
6076 messages with references. Update the call to Collect_Global_Items.
6077 (Analyze_Refined_Global_In_Decl_Part): Add local variables
6078 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
6079 the call to Collect_Global_Items. Account for a Proof_In state
6080 in null / useless refinement checks. Verify the coverage of
6082 (Check_Dependency_Clause): Remove local variable
6083 Out_Constits. Remove the retrieval and removal of constituents
6084 for an Output_Only state. Remove the reporting of unused
6085 Output_Only state constituents.
6086 (Check_Duplicate_Mode): Enhance
6087 the error message with a reference.
6088 (Check_Duplicate_Property): New routine.
6089 (Check_Duplicate_Option): Enhance the error message with a reference.
6090 (Check_External_Properties): Enhance the error message with a reference.
6091 (Check_Function_Return): Enhance the error message with a reference.
6092 (Check_In_Out_States): Update
6093 comment on usage. Add a specialized error message for Proof_In
6094 constituents. Enhance the error message with a reference.
6095 (Check_Input_States): Update comment on usage. Account for
6096 possible Proof_In constituents. Enhance the error message
6098 (Check_Matching_Constituent): Enhance the error message with a
6100 (Check_Matching_State): Enchance the error message with a reference.
6101 (Check_Mode): Add local variable From_Global. Update the call to
6102 Find_Mode. Emit more precise error messages concerning extra items
6103 (Check_Mode_Restriction_In_Enclosing_Context): Consider
6104 pragma Refined_Global. Enhance the error message with a
6106 (Check_Mode_Restriction_In_Function): Enhance the error message with
6108 (Check_Output_States): Update comment on usage. Add local variable
6109 Posted. Account for possible Proof_In constituents. Produce a detailed
6110 list of missing constituents.
6111 (Check_Proof_In_States): New routine.
6112 (Check_Refined_Global_Item): Handle Proof_In
6113 constituents. Enchance the error message with a reference.
6114 (Collect_Global_Items): Add formal parameters Proof_In_Items
6115 and Has_Proof_In_State. Update the comment on usage. Account
6117 (Create_Or_Modify_Clause): Enchance
6118 the error message with a reference.
6120 formal parameter From_Global. Update the comment on usage.
6121 Detect when the mode is governed by pragma [Refined_]Global.
6122 (Output_Constituents): Removed.
6123 (Report_Extra_Constituents):
6124 Report extra Proof_In constituents.
6125 (Report_Unused_Constituents): Removed.
6126 (Usage_Error): Code reformatting. Enhance the error
6127 messages with reference.
6128 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
6129 (Analyze_External_State_In_Decl_Part): Removed.
6130 * sem_res.adb (Resolve_Actuals): Update the volatile object
6131 detection. Enhance the error message with a reference.
6132 (Resolve_Entity_Name): Update the volatile object
6133 detection. Enhance the error message with a reference.
6134 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
6135 (Is_SPARK_Volatile_Object): New routine.
6136 (Has_Volatile_Component): New routine.
6137 * sem_util.ads (Is_Delegate): Alphabetized.
6138 (Is_SPARK_Volatile_Object): New routine.
6139 (Has_Volatile_Component): New routine.
6140 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
6142 2014-01-27 Ed Schonberg <schonberg@adacore.com>
6144 * sem_attr.adb: Resolve fully prefix of 'Update.
6146 2014-01-27 Ben Brosgol <brosgol@adacore.com>
6148 * gnat_rm.texi: Minor clarifications.
6150 2014-01-27 Robert Dewar <dewar@adacore.com>
6152 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
6153 about call that is generated as part of an Initial_Condition
6155 * sem_prag.adb: Minor spelling correction.
6157 2014-01-27 Robert Dewar <dewar@adacore.com>
6159 * sem_prag.adb (Set_Convention_From_Pragma): Check that
6160 convention Ghost can only apply to functions.
6161 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
6163 2014-01-27 Robert Dewar <dewar@adacore.com>
6165 * gnat_ugn.texi: Add Short_Enums to documentation of
6168 2014-01-27 Robert Dewar <dewar@adacore.com>
6170 * sem_prag.adb (Analyze_Input_Item): Correct check for input
6171 item in same package.
6172 * sem_util.ads, sem_util.adb (Within_Scope): New function.
6174 2014-01-26 Arnaud Charlet <charlet@adacore.com>
6176 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
6177 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
6178 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
6179 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
6182 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
6184 * gcc-interface/Makefile.in: Fix oversight.
6186 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
6188 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
6189 conversion from a thin pointer with a shifted value.
6190 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
6191 read-only flag from the values onto the result.
6192 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
6194 2014-01-25 Tristan Gingold <gingold@adacore.com>
6196 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
6197 for E_Variable with a pragma Linker_Section.
6199 2014-01-25 Robert Dewar <dewar@adacore.com>
6201 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
6202 with Default_Value aspect is passed in by copy.
6204 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
6206 * set_targ.adb: Set Short_Enums.
6207 * gcc-interface/lang.opt (fshort-enums): New option.
6208 * gcc-interface/misc.c (gnat_handle_option): Handle it.
6209 (gnat_post_options): Do not modify the global settings.
6211 2014-01-24 Robert Dewar <dewar@adacore.com>
6213 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
6215 (Random_Decimal_Fixed): New generic function.
6216 * s-rannum.ads: Minor comment clarifications.
6218 2014-01-24 Robert Dewar <dewar@adacore.com>
6220 * back_end.adb: Remove Short_Enums handling (handled in
6221 Ttypes/Get_Targ now) Minor added comments.
6222 * freeze.adb: Change name Short_Enums_On_Target to
6224 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
6225 * opt.ads: Minor comment updates.
6226 * sem_ch13.adb: Change name Short_Enums_On_Target to
6228 * set_targ.adb: Set Short_Enums from gcc back end.
6229 * set_targ.ads (Short_Enums): New variable.
6230 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
6231 Ttypes/Get_Targ now).
6232 * ttypes.ads (Target_Short_Enums): New constant boolean switch
6234 2014-01-24 Pascal Obry <obry@adacore.com>
6236 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
6238 2014-01-24 Gary Dismukes <dismukes@adacore.com>
6240 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
6241 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
6244 2014-01-24 Robert Dewar <dewar@adacore.com>
6246 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
6248 2014-01-24 Vincent Celier <celier@adacore.com>
6250 * prj.adb (Add_Aggregated_Project): Do not add a project in
6251 the list if it is already there.
6253 2014-01-24 Yannick Moy <moy@adacore.com>
6255 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
6256 Correct the search for a subrogram declaration to which a pragma is
6259 2014-01-24 Bob Duff <duff@adacore.com>
6261 * gnat_ugn.texi: Document --decimal-grouping and
6262 --based-grouping switches in gnatpp.
6264 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6266 * sinfo.ads: Documentation update.
6268 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6270 * sem_ch3.adb (Constant_Redeclaration): New declaration is
6271 illegal if previous one has an initial expression that is an
6272 aggregate expanded into assignments.
6274 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6276 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
6277 code reorganization to remove spurious warning on a loop with
6278 an array element iterator that has a null range.
6280 2014-01-24 Vincent Celier <celier@adacore.com>
6282 * make.adb (Binding_Phase): When setting the Ada paths, use
6283 the library ALI dir, not the object dir in libraries.
6285 2014-01-24 Yannick Moy <moy@adacore.com>
6287 * sinfo.ads: Add documentation of check flag fields.
6289 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6291 * sem_res.adb (Resolve_Actuals): If an actual is a view
6292 conversion of a discriminated object, and the formal type is
6293 discriminated and constrained, apply a discriminant check to
6296 2014-01-24 Robert Dewar <dewar@adacore.com>
6298 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
6300 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6302 * sem_ch3.adb (Analyze_Declarations): At the end of an
6303 appropriate declarative part, call Freeze_All from the first
6304 declaration in the scope, not from the first unfrozen one. This
6305 is necessary to apply visibility checks to entities with delayed
6306 aspects. Otherwise, in the presence of instantiations and cleanups
6307 that they may generate, the delayed aspects may be analyzed too
6308 late and produce spurious visibility errors.
6309 * sem_attr.adb: Place etype on range.
6310 * sem_ch6.adb: Documentation expression functions.
6312 2014-01-24 Robert Dewar <dewar@adacore.com>
6314 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
6315 terminology in compiler).
6317 2014-01-24 Robert Dewar <dewar@adacore.com>
6319 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
6320 categories, now that Ada 95 supports raise expressions.
6322 2014-01-24 Robert Dewar <dewar@adacore.com>
6324 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
6325 Short_Enums_On_Target.
6326 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
6328 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
6330 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6332 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
6333 indication is given explicity, check that it matches the array
6334 component type or the container element type of the domain
6337 2014-01-24 Tristan Gingold <gingold@adacore.com>
6339 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
6340 * gcc-interface/misc.c (flag_short_enums): Declare.
6341 (gnat_post_options): Set it.
6343 2014-01-24 Vincent Celier <celier@adacore.com>
6345 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
6346 to cache the result when Including_Libraries is False.
6347 * prj-env.ads (Ada_Objects_Path): Update documentation
6348 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
6349 (Get_Object_Directory): Return the Library_Ali_Dir only when
6350 when Including_Libraries is True.
6351 * prj.ads (Get_Object_Directory): Fix and complete documentation
6352 (Project_Data): New component Ada_Objects_Path_No_Libs
6354 2014-01-24 Robert Dewar <dewar@adacore.com>
6356 * checks.adb (Expr_Known_Valid): Result of fpt operator never
6359 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
6361 * back_end.adb: Minor fix in comment.
6363 2014-01-24 Javier Miranda <miranda@adacore.com>
6365 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
6366 required to report the error in case of task types.
6368 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6370 * sem_attr.adb: Additional index checking.
6372 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6374 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
6375 expressions in each component association, and for records note
6376 the entity in each association choice, for subsequent resolution.
6377 (Resolve_Attribute, case 'Update): Complete resolution of
6378 expressions in each component association.
6380 2014-01-24 Robert Dewar <dewar@adacore.com>
6382 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
6383 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
6384 leading to wrong handling of SPARK_Mode for library units).
6386 2014-01-24 Robert Dewar <dewar@adacore.com>
6388 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
6389 on generic instances (do not consider them to be internally
6392 2014-01-24 Doug Rupp <rupp@adacore.com>
6394 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
6395 vice pthread_sigmask.
6397 2014-01-24 Vincent Celier <celier@adacore.com>
6399 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
6402 2014-01-24 Vincent Celier <celier@adacore.com>
6404 * prj-ext.adb (Add): Do not output anything when Silent is True,
6405 whatever the verbosity. When Source is From_External_Attribute,
6406 set the corresponding environment variable if it is not already set.
6407 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
6409 * prj-proc.adb (Process_Expression_For_Associative_Array):
6410 For attribute External, call Prj.Ext.Add with Silent set to
6411 True for the child environment, to avoid useless output in non
6414 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6416 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
6417 range given by a subtype indication, and force evaluation of
6418 the bounds, as for a simple range.
6419 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
6420 of bounds of slice for various kinds of discrete ranges.
6421 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
6422 Evaluate_Slice_Bounds.
6424 2014-01-24 Bob Duff <duff@adacore.com>
6426 * s-taskin.ads (Activator): Make this Atomic, because
6427 Activation_Is_Complete reads it, and that can be called
6428 from any task. Previously, this component was only
6429 modified by the activator before activation, and by
6430 Self after activation.
6431 * a-taside.ads, a-taside.adb (Environment_Task,
6432 Activation_Is_Complete): Implement these missing functions.
6434 2014-01-24 Doug Rupp <rupp@adacore.com>
6436 * init.c: Add a handler section for Android.
6438 2014-01-24 Arnaud Charlet <charlet@adacore.com>
6440 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
6442 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6444 * sem_ch4.adb (Operator_Check): If one operand is a
6445 Raise_Expression, set its type to that of the other operand.
6446 * sem_res.adb (Resolve_Raise_Expression): new procedure.
6447 (Resolve_Actuals): For an actual that is a Raise_Expression,
6448 set the type to that of the formal.
6449 * sem_type.adb (Find_Unique_Type): If one of the operands is a
6450 Raise_Expression, return type of the other operand.
6452 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6454 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
6455 component of the record has a type with a default aspect, and
6456 the corresponding aggregate component is initiaized with a box,
6457 use the default value in the rewritten aggregate.
6459 2014-01-24 Tristan Gingold <gingold@adacore.com>
6461 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
6462 s-interr-sigaction.adb,
6463 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
6464 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
6465 to the call to Install_Restricted_Handlers.
6467 2014-01-24 Emmanuel Briot <briot@adacore.com>
6469 * prj-nmsc.adb (Check_File): Add protection when the source is
6470 not fully initialized.
6472 2014-01-24 Ed Schonberg <schonberg@adacore.com>
6474 * sem_util.adb (Is_Post_State): In a postcondition, a selected
6475 component that denotes an implicit dereference is a reference
6476 to the post state of the subprogram.
6478 2014-01-24 Robert Dewar <dewar@adacore.com>
6480 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
6481 for generated subprograms.
6482 (Analyze_Subprogram_Specification): Ditto.
6484 2014-01-24 Vincent Celier <celier@adacore.com>
6486 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
6487 attributes in package Builder of aggregate and aggregate library
6489 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
6490 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
6491 Remove parameters. Change error message from "... externally
6492 build library ..." to "... externally built project ...".
6493 (Process_Naming_Scheme.Check): Do not do any check in aggregate
6494 project, as attribute Library_Dir and Library_Name have already
6495 been detected as forbidden.
6497 2014-01-24 Vincent Celier <celier@adacore.com>
6499 * prj-env.adb (Find_Project): If cached project path is not in
6500 project directory, look in current directory first and use cached
6501 project path only if project is not found in project directory.
6503 2014-01-24 Robert Dewar <dewar@adacore.com>
6505 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
6507 2014-01-24 Vincent Celier <celier@adacore.com>
6509 * projects.texi: Document that aggregate projects are only
6510 supported by gprbuild, but not by gnatmake. Document that the
6511 only attribute Switches in package Binder of aggregate projects
6512 will be ignored if its index is not others. Document that
6513 attribute Global_Config_File is allowed in package Binder of
6516 2014-01-24 Robert Dewar <dewar@adacore.com>
6518 * sem_prag.adb: Minor code reorganization.
6519 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
6521 2014-01-24 Pascal Obry <obry@adacore.com>
6523 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
6524 attribute definition.
6526 2014-01-24 Vincent Celier <celier@adacore.com>
6528 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
6529 in the Queue the same source (same path, same multi-source index)
6530 from the same project file, to avoid compiling several times
6533 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
6535 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
6536 (Has_Gigi_Rep_Item): Likewise.
6537 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
6538 Has_Gigi_Rep_Item for objects.
6539 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
6540 (prepend_one_attribute): ...this.
6541 (prepend_one_attribute_pragma): New function extracted from...
6542 (prepend_attributes): ...here. Swap the parameters for consistency.
6543 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
6545 <object>: Deal with a pragma Linker_Section on a constant
6546 or variable. <E_Function>: Deal with a pragma Linker_Section
6548 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
6550 2014-01-24 Vincent Celier <celier@adacore.com>
6552 * opt.ads: Minor comment update.
6554 2014-01-24 Robert Dewar <dewar@adacore.com>
6556 * sem_prag.adb (Analyze_Input_Output): Add missing error check
6558 * sem_util.adb (Is_Refined_State): Add defense against junk
6561 2014-01-24 Pascal Obry <obry@adacore.com>
6563 * projects.texi: Removes Build_Slaves attribute documentation.
6565 2014-01-23 Robert Dewar <dewar@adacore.com>
6567 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
6570 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6572 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
6573 applies to expressions that come from source.
6574 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
6576 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
6577 rule regarding potentially unevaluated expressions, to prefix
6580 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6582 * exp_util.adb (Make_Invqriant_Call): If type of expression is
6583 a private extension, get invariant from base type.
6585 2014-01-23 Robert Dewar <dewar@adacore.com>
6587 * sem_util.adb, sem_attr.adb: Minor reformatting.
6589 2014-01-23 Robert Dewar <dewar@adacore.com>
6591 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
6592 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
6593 * sem.adb (Semantics): Remove save/restore of
6594 SPARK_Mode[_Pragma]. Not needed since already done in
6595 Save/Restore_Opt_Config_Switches.
6597 2014-01-23 Robert Dewar <dewar@adacore.com>
6599 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
6600 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
6601 Linker_Section enhancements.
6603 2014-01-23 Tristan Gingold <gingold@adacore.com>
6605 * gnat_rm.texi: Minor editing.
6607 2014-01-23 Robert Dewar <dewar@adacore.com>
6609 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
6610 with'ed internal units.
6611 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
6613 2014-01-23 Javier Miranda <miranda@adacore.com>
6615 * lib-xref.adb (Generate_Reference): As part of processing the
6616 "end-of-spec" reference generate an extra reference to the first
6617 private entity of the package.
6618 * xr_tabls.adb (Add_Reference): No action needed for the extra
6619 'E' reference associated; similar to the processing of the
6622 2014-01-23 Bob Duff <duff@adacore.com>
6624 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
6626 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6628 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
6629 predicate to implement rule given in 6.1.1 (20/3).
6630 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
6631 'Old in a postcondition, if it is potentially unevaluated and
6632 it is not an entity name.
6634 2014-01-23 Bob Duff <duff@adacore.com>
6636 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
6638 2014-01-23 Robert Dewar <dewar@adacore.com>
6640 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
6643 2014-01-23 Bob Duff <duff@adacore.com>
6645 * g-dynhta.ads: Minor comment fix.
6647 2014-01-23 Yannick Moy <moy@adacore.com>
6649 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
6650 from spec on body only when not already inherited on spec. Set
6651 SPARK_Mode from context on body without previous spec. *
6652 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
6653 library-level entities. Correct retrieval of entity from
6654 declaration, for cases where the declaration is not a unit.
6655 * sem_ch12.adb (Instantiate_Object): Avoid
6656 calling Is_Volatile_Object on an empty node.
6658 2014-01-23 Robert Dewar <dewar@adacore.com>
6660 * gnatlink.adb (Gnatlink): Check for suspicious executable file
6663 2014-01-23 Robert Dewar <dewar@adacore.com>
6665 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
6666 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
6667 style errors in instances.
6668 * g-dynhta.ads (Static_HTable): Comment updates.
6670 2014-01-23 Vincent Celier <celier@adacore.com>
6672 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
6673 to find a configuration project file when Config_File_Name is
6674 No_Configuration_File.
6675 * prj-conf.ads (No_Configuration_File): New constant String.
6676 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
6677 with Config_File_Name set to No_Configuration_File, so that
6678 no existing configuration project file will be used, and the
6679 configuration project will be only created in memory when
6680 Add_Default_GNAT_Naming_Scheme is called.
6681 * projects.texi: Minor reformatting.
6683 2014-01-23 Vincent Celier <celier@adacore.com>
6685 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
6686 a config project file if On_Load_Config is not null.
6687 * prj-pars.adb: Minor comment changes.
6689 2014-01-23 Ed Schonberg <schonberg@adacore.com>
6691 * lib-xref.adb (Output_References): Output progenitors of
6692 synchronized tagged types, for source navigation.
6694 2014-01-23 Robert Dewar <dewar@adacore.com>
6696 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
6697 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
6698 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
6700 2014-01-23 Emmanuel Briot <briot@adacore.com>
6702 * prj-conf.adb (Get_Or_Create_Configuration_File): call
6703 On_Load_Config later.
6705 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
6707 * sem_ch3.adb (Analyze_Declarations): Do not
6708 generate the spec of the late primitive in ASIS mode. Add two
6709 comments to explain the special cases when the expansion is
6712 2014-01-23 Robert Dewar <dewar@adacore.com>
6714 * sem_util.adb (Note_Possible_Modification): Fix error of
6715 misbehaving for implicit dereference cases in -gnatc mode.
6717 2014-01-23 Emmanuel Briot <briot@adacore.com>
6719 * prj-pars.adb: Minor reformatting.
6721 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6723 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
6724 body generated for an expression function within a protected body
6725 needs a set of renaming declarations if the expression function
6728 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6730 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
6731 list interface progenitor of a tagged concurrent type, for better
6734 2014-01-22 Robert Dewar <dewar@adacore.com>
6736 * lib.adb (In_Extended_Main_Code_Unit): Return False for
6738 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
6739 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
6740 treatment of Slocs No_Location and Standard_Location.
6741 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
6742 check for entity with Standard_Location Sloc, rather than relying
6743 on Lib routines to do that.
6744 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
6745 that a call cannot occur before a later occuring body within
6748 2014-01-22 Thomas Quinot <quinot@adacore.com>
6750 * rtsfind.adb: Update comment.
6752 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
6754 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
6755 * sem_ch3.adb (Analyze_Declarations): Add local variable
6756 Body_Seen. Generate the spec of a late controlled
6757 primitive body that is about to freeze its related type.
6758 (Handle_Late_Controlled_Primitive): New routine.
6760 2014-01-22 Robert Dewar <dewar@adacore.com>
6762 * a-stream.adb: Minor reformatting.
6764 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6766 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
6767 sub-procedure Declared_In_Actual to handle properly the visibility
6768 of actuals in actual packages, that are themselves actuals to a
6769 actual package of the current instance. This mimics properly the
6770 visibility of formals of formal packages declared with a box,
6771 within the corresponding generic unit.
6773 2014-01-22 Robert Dewar <dewar@adacore.com>
6775 * checks.adb: Do not assume that a volatile variable is valid.
6777 2014-01-22 Thomas Quinot <quinot@adacore.com>
6779 * g-catiio.ads (Image, Value): Clarify that these functions
6780 operate in the local time zone. Minor documentation update.
6782 2014-01-22 Thomas Quinot <quinot@adacore.com>
6784 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
6786 2014-01-22 Robert Dewar <dewar@adacore.com>
6788 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
6789 Moved to sem_aux.adb.
6791 2014-01-22 Robert Dewar <dewar@adacore.com>
6793 * vms_data.ads: Minor reformatting.
6795 2014-01-22 Robert Dewar <dewar@adacore.com>
6797 * debug.adb: Document messages affected by -gnatd.E including
6798 the new ones that relate to late definition of equality.
6799 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
6800 debug flag -gnatd.E is set, then generate warnings rather than
6802 (Check_Untagged_Equality): In earlier versions of Ada,
6803 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
6805 2014-01-22 Robert Dewar <dewar@adacore.com>
6807 * sem_prag.adb (Usage_Error): Output additional messages for
6808 unconstrained OUT parameters lacking an input dependency.
6810 2014-01-22 Robert Dewar <dewar@adacore.com>
6812 * sem_ch4.adb: Minor reformatting.
6814 2014-01-22 Robert Dewar <dewar@adacore.com>
6816 * restrict.ads: Minor reformatting.
6817 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
6818 forbids a call from within a subprogram to the same subprogram.
6820 2014-01-22 Thomas Quinot <quinot@adacore.com>
6822 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
6823 stream attributes for Stream_Element_Array.
6824 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
6825 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
6826 defined in the current scope.
6828 2014-01-22 Robert Dewar <dewar@adacore.com>
6830 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
6832 2014-01-22 Thomas Quinot <quinot@adacore.com>
6834 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
6836 2014-01-22 Thomas Quinot <quinot@adacore.com>
6838 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
6839 declaration initialized with a function call, whose type
6840 has variable size, need to remove side effects so that the
6841 initialization expression becomes a dereference of a temporary
6842 reference to the function result.
6844 2014-01-22 Yannick Moy <moy@adacore.com>
6846 * errout.adb (Initialize): Remove trick to add dummy entry
6848 * erroutc.adb (Set_Warnings_Mode_Off,
6849 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
6850 command line switch.
6851 * opt.ads (Warning_Mode): Document behavior
6852 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
6854 2014-01-22 Robert Dewar <dewar@adacore.com>
6856 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
6858 2014-01-22 Robert Dewar <dewar@adacore.com>
6860 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
6861 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
6862 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
6863 case Storage_Size): call Check_Pool_Size_Clash.
6865 2014-01-22 Robert Dewar <dewar@adacore.com>
6867 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
6868 sem_eval.ads: Minor reformatting.
6870 2014-01-22 Thomas Quinot <quinot@adacore.com>
6872 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
6873 Any_Composite to prevent cascaded errors.
6875 2014-01-22 Yannick Moy <moy@adacore.com>
6877 * errout.adb (Initialize): Do not insert special entry in Warnings
6878 table in GNATprove_Mode.
6879 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
6881 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
6884 2014-01-22 Robert Dewar <dewar@adacore.com>
6886 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
6889 2014-01-22 Robert Dewar <dewar@adacore.com>
6891 * snames.ads-tmpl: Update header.
6893 2014-01-22 Thomas Quinot <quinot@adacore.com>
6895 * exp_util.adb (Insert_Actions): When inserting actions on a
6896 short circuit operator that has already been analyzed, do not park
6897 actions in node; instead introduce an N_Expression_With_Actions
6898 and insert actions immediately.
6899 Add guard for unexpected case of climbing up through statement
6900 in Actions list of an N_Expression_With_Actions.
6901 * sem_elab.adb (Insert_Elab_Check): Remove complex
6902 specialized circuitry for the case where the context is already
6903 analyzed, as it is not needed and introduces irregularities in
6904 finalization. Instead rely on the above change to Insert_Actions
6905 to ensure that late insertion on short circuit operators works
6908 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6910 * sem_ch4.adb (Operator_Check): Improve error message when an
6911 operand of concatenation is an access type.
6913 2014-01-22 Thomas Quinot <quinot@adacore.com>
6915 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
6918 2014-01-22 Ed Schonberg <schonberg@adacore.com>
6920 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
6921 of an expanded name in a proper body, whose prefix is a package
6922 in the context of the proper body, when there is a homonym of
6923 the package declared in the parent unit.
6925 2014-01-22 Robert Dewar <dewar@adacore.com>
6927 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
6928 msg if errors found.
6929 (Check_One_Unit): Same change.
6931 2014-01-22 Robert Dewar <dewar@adacore.com>
6933 * ug_words: Add missing/wrong entries for VMS warning switches.
6934 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
6936 2014-01-22 Jerome Guitton <guitton@adacore.com>
6938 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
6941 2014-01-22 Robert Dewar <dewar@adacore.com>
6943 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
6945 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
6947 * gcc-interface/Makefile.in: Minor fixes.
6949 2014-01-21 Robert Dewar <dewar@adacore.com>
6951 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
6952 * par-ch5.adb (P_Condition): New version with expression prescanned.
6953 * par.adb (P_Condition): New version with expression prescanned.
6955 2014-01-21 Robert Dewar <dewar@adacore.com>
6957 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
6958 if Address is not a private type.
6959 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6960 Ignore pragma if System.Address is not a private type.
6962 2014-01-21 Arnaud Charlet <charlet@adacore.com>
6964 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
6965 uninitialized value.
6967 2014-01-21 Thomas Quinot <quinot@adacore.com>
6969 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
6971 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6973 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
6974 the value of Assertions_Enabled flag when compiling an instance of
6975 an internal unit. This facilitates the use of pre/postconditions
6976 in generic internal units, such as the new elementary function
6979 2014-01-21 Robert Dewar <dewar@adacore.com>
6981 * exp_aggr.adb: Minor reformatting.
6982 * sem_attr.adb: Minor reformatting.
6983 * sem_res.adb: Minor comment addition.
6984 * einfo.adb: Minor comment updates.
6985 * freeze.adb: Minor reformatting and code reorganization.
6987 2014-01-21 Ed Schonberg <schonberg@adacore.com>
6989 * par-ch4.adb (P_If_Expression): Handle more gracefully an
6990 elsif clause that does not have an else part.
6992 2014-01-21 Robert Dewar <dewar@adacore.com>
6994 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
6995 * gcc-interface/Makefile.in: clean up target pairs.
6997 2014-01-21 Pascal Obry <obry@adacore.com>
6999 * projects.texi: Minor typo fix.
7001 2014-01-21 Thomas Quinot <quinot@adacore.com>
7003 * freeze.adb (Check_Component_Storage_Order): If a record type
7004 has an explicit Scalar_Storage_Order attribute definition clause,
7005 reject any component that itself is of a composite type and does
7008 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7010 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
7011 can be used to generate proper cross-reference information for
7012 the parent units of proper bodies.
7014 2014-01-21 Thomas Quinot <quinot@adacore.com>
7016 * exp_pakd.adb (Expand_Packed_Element_Set,
7017 Expand_Packed_Element_Reference): No byte swapping required in
7018 the front-end for the case of a reverse storage order array,
7019 as this is now handled uniformly in the back-end. However we
7020 still need to swap back an extracted element if it is itself a
7021 nested composite with reverse storage order.
7023 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7025 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
7026 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
7029 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7031 * gnat_ugn.texi: Minor updates.
7033 2014-01-21 Thomas Quinot <quinot@adacore.com>
7035 * exp_pakd.adb: Update comment, minor reformatting.
7037 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7039 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
7040 object check when SPARK_Mode is on.
7041 * sem_ch6.adb (Process_Formals): Trigger the volatile object
7042 check when SPARK_Mode is on.
7043 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
7044 check when SPARK_Mode is on.
7045 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
7046 corresponding pragma of aspect SPARK_Mode in the visible
7047 declarations of a package declaration.
7048 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
7049 check when SPARK_Mode is on.
7050 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
7051 check when SPARK_Mode is on.
7052 (Resolve_Entity_Name): Trigger
7053 the volatile object check when SPARK_Mode is on.
7055 2014-01-21 Robert Dewar <dewar@adacore.com>
7057 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
7058 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
7060 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7062 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
7063 object is declared, it is rewritten as a renaming of an dynamic
7064 expression that wraps the initial value. The renaming declaration
7065 is first given an internal name, to prevent collisions with the
7066 entity already declared, and then the name is modified to reflect
7067 the original one. the modification of the name must preserve
7068 the source location of the original, to prevent spurious errors
7069 when compiling with style checks if the declaration involves
7070 more than one entity.
7072 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
7074 * aspects.adb Add entries for Async_Readers, Async_Writers,
7075 Effective_Reads and Effective_Writes in table Canonical_Aspect.
7076 * aspects.ads Add entries for Async_Readers, Async_Writers,
7077 Effective_Reads and Effective_Writes in tables Aspect_Id,
7078 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
7079 * atree.adb (Ekind_In): New version with 8 parameters.
7080 (Node34): New routine.
7081 (Set_Node34): New routine.
7082 * atree.ads (Ekind_In): New version with 8 parameters.
7083 (Node34): New routine.
7084 (Set_Node34): New routine.
7085 * einfo.adb Contract is now Node34.
7086 (Contract): Update the assertion and node usage.
7087 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
7088 Effective_Reads and Effective_Writes.
7089 (Set_Contract): Update the assertion and node usage.
7090 (Write_Field24_Name): Remove the output for a contract.
7091 (Write_Field34_Name): Add output for a contract.
7092 * einfo.ads Contract is now Node34. Update the comment on
7093 attribute usage and related node structures.
7094 (Get_Pragma): Update the comment on usage.
7095 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
7096 Effective_Reads and Effective_Writes do not require special
7097 processing by the parser.
7098 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
7099 (Analyze_Declarations): Analyze the contract of a variable at
7100 the end of the declarative region.
7101 (Analyze_Object_Declaration): Create a contract for a variable.
7102 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
7103 of classification pragmas.
7104 (Process_Formals): Detect an illegal
7105 use of a volatile object as a formal in a function.
7106 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
7107 a volatile object as an actual in generic instantiation.
7108 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
7109 Effective_Reads and Effective_Writes in table Sig_Flags.
7110 (Analyze_External_State_In_Decl_Part): New routine.
7111 (Analyze_Global_Item): Detect an illegal use of a volatile object
7112 as a global item of a function.
7113 (Analyze_Pragma): Reimplement
7114 pragma Abstract_State. Add support for pragmas Async_Readers,
7115 Async_Writers, Effective_Reads and Effective_Writes.
7116 (Check_External_Properties): New routine.
7117 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
7118 (Check_External_Properties): New routine.
7119 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
7120 volatile object as an actual in a call.
7121 (Resolve_Entity_Name):
7122 Add local variables Par, Prev and Usage_OK. Detect illegal
7123 contexts of volatile objects.
7124 * sem_util.adb (Add_Contract_Item): Add support for
7125 pragmas associated with the contract of a variable.
7126 (Async_Readers_Enabled): New routine.
7127 (Async_Writers_Enabled): New routine.
7128 (Effective_Reads_Enabled): New routine.
7129 (Effective_Writes_Enabled): New routine.
7130 (Has_Enabled_Property):
7132 (Is_Unchecked_Conversion_Instance): New routine.
7133 (Is_Volatile_Object): Add support for entities that may denote
7135 * sem_util.ads (Add_Contract_Item): Update the
7137 (Async_Readers_Enabled): New routine.
7138 (Async_Writers_Enabled): New routine.
7139 (Effective_Reads_Enabled): New routine.
7140 (Effective_Writes_Enabled): New routine.
7141 (Is_Unchecked_Conversion_Instance): New routine.
7142 * sinfo.ads Update the comment on the structure of N_Contract.
7143 * snames.ads-tmpl Add predefined names for Async_Readers,
7144 Async_Writers, Effective_Reads and Effective_Writes. Add
7145 pragma ids for Async_Readers, Async_Writers, Effective_Reads
7146 and Effective_Writes.
7148 2014-01-21 Robert Dewar <dewar@adacore.com>
7150 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
7151 * sem_eval.adb (Compile_Time_Known_Value): Remove special
7152 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
7153 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
7154 (Test_Foldable): Add CRT_Safe parameter
7155 * sem_eval.ads (Compile_Time_Known_Value): Remove special
7156 handling of CRT mode.
7157 (CRT_Safe_Compile_Time_Known_Value): New function.
7159 2014-01-21 Robert Dewar <dewar@adacore.com>
7161 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
7162 with pragma or aspect that applies to package spec or subprogram
7165 2014-01-21 Robert Dewar <dewar@adacore.com>
7167 * exp_aggr.adb: Minor reformatting.
7169 2014-01-21 Johannes Kanig <kanig@adacore.com>
7171 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
7173 2014-01-21 Bob Duff <duff@adacore.com>
7175 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
7177 2014-01-21 Steve Baird <baird@adacore.com>
7179 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
7181 2014-01-21 Vincent Celier <celier@adacore.com>
7183 * prj-part.adb (Parse_Single_Project): Accept to extend a project
7184 if it has only be imported by an project being extended. When a
7185 project that has only been imported by a project being extended
7186 is imported by another project that is not being extended,
7187 reset the previous indication, so that it will be an error if
7188 this project is extended later.
7189 * prj-tree.adb (Create_Project): Include component From_Extended
7190 in table Projects_HT
7191 * prj-tree.ads (Project_Name_And_Node): New Boolean component
7194 2014-01-21 Robert Dewar <dewar@adacore.com>
7196 * atree.ads, atree.adb: Add Node33 and Set_Node33.
7197 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
7198 New field (SPARK_Pragma_Inherited): New flag
7199 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
7201 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
7202 * opt.ads (SPARK_Mode_Pragma): New global variable.
7203 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
7204 * sem_ch3.adb: Use new SPARK_Mode data structures.
7205 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
7206 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
7207 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
7208 (Pop_Scope): Restore SPARK_Mode_Pragma.
7209 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
7210 new data structures.
7212 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7214 * back_end.adb: Undo previous change, not needed. Minor reformatting.
7216 2014-01-21 Thomas Quinot <quinot@adacore.com>
7218 * exp_ch5.adb: Fix comment.
7219 * switch-c.adb: Minor comment update.
7220 * exp_ch3.adb: Minor reformatting.
7222 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7224 * back_end.adb (Scan_Compiler_Arguments): Do not store object
7225 filename in gnatprove mode.
7227 2014-01-21 Thomas Quinot <quinot@adacore.com>
7229 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
7230 suppresses usage of primitive _assign for tagged types).
7231 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
7232 No_Ctrl_Actions for a tagged type that does not require
7233 finalization, as we want to disable usage of _assign (which
7234 may cause undesirable discriminant checks on an uninitialized,
7237 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7239 * sem_prag.adb: Reject invariant'class on completion.
7241 2014-01-21 Javier Miranda <miranda@adacore.com>
7243 * exp_ch3.adb (Build_Init_Procedure): For
7244 derivations of interfaces, do not move the the initialization
7245 of the _parent field since such assignment is not generated.
7247 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7249 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
7250 with the operator it renames if we are within an expression of
7251 a pre/postcondition, because the expression will be reanalyzed
7252 at a later point, and the analysis of the renaming may affect
7253 the visibility of the operator when in an instance.
7255 2014-01-21 Robert Dewar <dewar@adacore.com>
7257 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
7258 Add this flag to type conversion nodes and assignment nodes.
7259 * treepr.adb: Deal properly with Flag 1,2,3.
7260 * treeprs.adt: Minor comment update.
7262 2014-01-21 Robert Dewar <dewar@adacore.com>
7264 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
7266 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
7267 parameter, completely rewrite spec.
7269 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7271 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
7272 instance that is inlined, it may have been rewritten as a wrapper
7273 package. In that case the unit that must be made visible is the
7274 related instance of the package.
7276 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7278 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
7279 previous change in codepeer mode.
7281 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7283 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
7284 call to Abort_Undefer, as expected by the runtime.
7285 * s-tasren.adb (Local_Complete_Rendezvous): Replace
7286 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
7287 deferred at this point. Update comments.
7289 2014-01-21 Thomas Quinot <quinot@adacore.com>
7291 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
7293 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7295 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
7298 2014-01-21 Robert Dewar <dewar@adacore.com>
7300 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
7302 2014-01-21 Thomas Quinot <quinot@adacore.com>
7304 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
7305 this is value is used in Node_Id arithmetic operations.
7306 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
7307 instead of hard-coded unrolled code.
7309 2014-01-21 Yannick Moy <moy@adacore.com>
7311 * gnat1drv.adb: Minor code cleanup, removing useless code.
7313 2014-01-21 Arnaud Charlet <charlet@adacore.com>
7315 * opt.ads (SPARK_Switches_File_Name): New.
7316 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
7317 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
7318 * gnat_ugn.texi: Document -gnates.
7320 2014-01-21 Yannick Moy <moy@adacore.com>
7322 * errout.adb (Special_Msg_Delete): Update comment. Remove
7323 special case for GNATprove which should not ignore mismatch
7324 in sizes for representation clauses.
7325 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
7326 which should not ignore pragma Pack.
7328 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7330 * sem_ch4.adb: Code clean up.
7332 2014-01-21 Steve Baird <baird@adacore.com>
7334 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
7336 2014-01-21 Robert Dewar <dewar@adacore.com>
7338 * gcc-interface/gigi.h: Get Flags array address.
7339 * gcc-interface/trans.c: Acquire Flags array address.
7340 * atree.adb: Add support for Flags array and Flag0,1,2,3.
7341 * atree.ads: Add support for Flags array and Flag0,1,2,3.
7342 * atree.h: Add support for Flags array and Flag0,1,2,3.
7343 * back_end.adb: Pass Flags array address to gigi.
7345 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7347 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
7348 reference to generated body so that legality checks on stream
7349 attributes are properly applied. If type is tagged and already
7350 frozen, insert generated body at the point of the renaming
7353 2014-01-21 Ed Schonberg <schonberg@adacore.com>
7355 * sem_ch12.adb: Code clean up.
7356 * sem_ch8.adb: Minor reformatting
7358 2014-01-20 Robert Dewar <dewar@adacore.com>
7360 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
7361 converting warnings on inevitable exceptions to errors.
7362 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
7363 converting warnings on inevitable exceptions to errors.
7364 * opt.adb (SPARK_Mode_Config): Handled like other config flags
7365 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
7366 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
7367 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
7368 New flag (Config_Switches_Type): Add SPARK_Mode field
7369 * sem.adb: Minor code reorganization (remove unnecessary with)
7370 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
7371 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
7372 converting warnings on inevitable exceptions to errors.
7373 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
7374 converting warnings on inevitable exceptions to errors.
7375 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
7376 converting warnings on inevitable exceptions to errors.
7377 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
7378 converting warnings on inevitable exceptions to errors.
7379 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
7381 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
7383 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
7385 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
7386 converting warnings on inevitable exceptions to errors.
7387 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
7388 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
7389 of Get_SPARK_Mode_Id
7390 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
7391 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
7392 converting warnings on inevitable exceptions to errors.
7393 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
7394 converting warnings on inevitable exceptions to errors.
7395 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
7398 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7400 * sem_ch13.adb: Add semantic information to rewritten type
7403 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7405 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
7406 are of a type with unknown discriminants, convert both to the
7407 underlying view of the type, so that the proper constraint check
7408 can be applied to the right-hand side.
7410 2014-01-20 Robert Dewar <dewar@adacore.com>
7412 * atree.adb (Copy_Node): Fix failure to copy last component
7413 (Exchange_Entities): Fix failure to exchange last entity
7415 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7417 * sem_ch12.adb: Code clean up.
7419 2014-01-20 Robert Dewar <dewar@adacore.com>
7421 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
7423 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7425 * sem_ch4.adb (Analyze_Quantified_Expression): If after
7426 pre-analysis the loop parameter specification has been
7427 rewritten as a iterator specification, propagate the change to
7428 the quantified expression, for ASIS navigtion needs.
7430 2014-01-20 Vincent Celier <celier@adacore.com>
7432 * par-ch10.adb: Minor error message change: escape [ and ].
7434 2014-01-20 Robert Dewar <dewar@adacore.com>
7436 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
7437 * errout.adb: Implement [ and ] insertion characters.
7438 * errout.ads: Document new [ and ] insertion characters.
7439 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
7440 addition of ??? comment.
7441 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
7442 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
7443 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
7444 Make warnings on exceptions into errors in GNATprove mode.
7445 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
7448 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7450 * sem_ch13.adb: Code clean up.
7452 2014-01-20 Robert Dewar <dewar@adacore.com>
7454 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
7456 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
7457 error in GNATprove mode.
7459 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7461 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
7462 reference 'Old takes no parameters, and thus can appear as a
7465 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7467 * exp_aggr.adb: Fix minor typos.
7469 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7471 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
7472 instance the attribute is legal, and its value is determined
7473 statically if the type has no discriminants. This choice is
7474 more useful than rechecking the legality rule in the instance,
7475 is consistent with older usage, and is also consistent with all
7478 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7480 * sem_cat.adb (Validate_Static_Object_Name): Change error into
7481 warning in Relaxed_Semantic_Mode.
7483 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7485 * sem_attr.adb: Code and comments cleanup.
7487 2014-01-20 Yannick Moy <moy@adacore.com>
7489 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
7490 * errout.adb (Compilation_Errors): Remove special handling in
7492 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
7493 removed debug flags.
7494 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
7495 Global, Initial_Condition, Initializes and Refined_State pragmas and
7497 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
7498 SPARK_Strict_Mode): Remove global flags.
7499 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
7500 always performed now, on packages declaring a null state.
7501 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
7502 at providing pedantic mode for bounds of integer types.
7503 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
7504 "some" quantified expression now issued under control of -gnatw.t,
7505 like the other warning on unused bound variable.
7506 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
7508 (Analyze_Pragma): Remove tests for SPARK 2014
7509 pragmas, not officially allowed by GNAT.
7511 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7513 * sem_prag.adb (Analyze_Pragma): Ensure that
7514 the sole argument of pragmas Abstract_State, Contract_Cases,
7515 Depends, Global and Initializes in in aggregate form.
7516 (Analyze_Refined_Pragma): Ensure that the sole argument of
7517 pragmas Refined_Depends, Refined_Global and Refined_State is in
7519 (Ensure_Aggregate_Form): New routine.
7521 2014-01-20 Doug Rupp <rupp@adacore.com>
7523 * sem_attr.adb (Analyze_Attribute): case
7524 Attribute_Constrained => treat all prefixes as legal for Declib
7527 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7529 * sem_prag.adb (Check_Mode): Reimplement the routine.
7530 (Find_Mode): New routine.
7532 2014-01-20 Robert Dewar <dewar@adacore.com>
7534 * sem_ch4.adb (Operator_Check): Handle additional
7535 Allow_Integer_Address cases.
7537 2014-01-20 Robert Dewar <dewar@adacore.com>
7539 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
7540 allowed if address is non-private, no longer true.
7541 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7542 Remove check for address being private, causes difficulty when
7543 pragma used in gnat.adc file and is not needed, since we guard
7544 this in Address_Integer_Convert_OK.
7545 * exp_ch7.adb: Minor reformatting.
7546 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
7548 2014-01-20 Robert Dewar <dewar@adacore.com>
7550 * checks.adb (Apply_Range_Check): Remove gnatprove special
7551 casing of exponentiation.
7552 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
7553 operand for integer case to check range against Natural.
7555 2014-01-20 Robert Dewar <dewar@adacore.com>
7557 * s-tataat.adb: Minor reformatting.
7559 2014-01-20 Robert Dewar <dewar@adacore.com>
7561 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
7562 entities, and also fix documentation to remove mention of visible
7563 integer type, since this is not what the implementation does.
7564 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
7565 entities, and also fix documentation to remove mention of visible
7566 integer type, since this is not what the implementation does.
7567 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
7569 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
7570 case for parameter type check.
7571 * sem_res.adb (Resolve): Use new function
7572 Address_Integer_Convert_OK.
7573 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
7574 reformatting throughout.
7575 * sem_util.adb (Address_Integer_Convert_OK): New function.
7576 * sem_util.ads: Minor reformatting (put specs in alpha order)
7577 (Address_Integer_Convert_OK): New function.
7579 2014-01-20 Thomas Quinot <quinot@adacore.com>
7581 * exp_ch7.adb (Wrap_Transient_Expression):
7582 Insertion extra conditional expression only if
7583 Opt.Suppress_Control_Flow_Optimizations is set.
7585 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7587 * s-tataat.adb (Initialize_Attributes): Abort might already be
7588 deferred in Create_Task.
7590 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7592 * checks.adb (Apply_Scalar_Range_Check): Flag
7593 the exponent as requiring a range check when the expression is
7596 2014-01-20 Fedor Rybin <frybin@adacore.com>
7598 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
7600 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7602 * sem_util.adb (Default_Initialization): New routine.
7603 * sem_util.ads: Add new type Default_Initialization_Kind.
7604 (Default_Initialization): New routine.
7606 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7608 * sem_prag.adb (Check_Mode): Correct all error
7609 message logic dealing with in/in out parameters that may appear
7610 as inputs or have a self reference.
7612 2014-01-20 Robert Dewar <dewar@adacore.com>
7614 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
7615 * sem_res.adb (Resolve): Fix error causing infinite loop for
7616 integer used as address. Allow addresses as integers.
7618 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7620 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
7622 2014-01-20 Bob Duff <duff@adacore.com>
7624 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
7625 error when "use all" is not followed by "type".
7627 2014-01-20 Bob Duff <duff@adacore.com>
7629 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
7632 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7634 * checks.adb (Apply_Address_Clause_Check): If there is an
7635 alignment check on the expression in an address clause, and there
7636 is no local exception propagation, add an additional explanatory
7637 message to clarify the cause of previous warning.
7639 2014-01-20 Robert Dewar <dewar@adacore.com>
7641 * exp_ch7.adb: Minor reformatting.
7642 * opt.ads: Minor comment updates.
7643 * sem.adb: Minor name change Is_Main_Unit =>
7644 Is_Main_Unit_Or_Main_Unit_Spec.
7645 * sem_ch6.adb: Minor reformatting and code reorganization.
7647 2014-01-20 Bob Duff <duff@adacore.com>
7649 * gnat_ugn.texi: Update gnatpp switches.
7651 2014-01-20 Thomas Quinot <quinot@adacore.com>
7653 * exp_ch9.adb: Minor comment edit.
7655 2014-01-20 Robert Dewar <dewar@adacore.com>
7657 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
7658 only if System.Address is a private type.
7659 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
7660 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7661 Allowed only if type System.Address is private, since otherwise
7663 * sem_res.adb: Fix failure to properly Analyze unchecked
7664 conversions that were introduced by Allow_Integer_Address.
7665 * switch-c.adb: Remove -gnates switch.
7666 * usage.adb: Remove -gnates switch.
7667 * gnat_ugn.texi: Remove documentation of -gnates flag.
7669 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7671 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
7672 resolve expression to perform proper name capture.
7674 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7676 * sem.adb (Semantics): When saving/restoring configuration
7677 switches, the spec of a pre- defined unit that is the main unit
7678 must be treated as a predefined unit as well.
7680 2014-01-20 Thomas Quinot <quinot@adacore.com>
7682 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
7683 expression, insert an extra conditional expression when saving
7684 the value of the expression, for the benefit of control flow
7685 graph based coverage analysis.
7686 * exp_ch3.adb: Minor reformatting.
7688 2014-01-20 Robert Dewar <dewar@adacore.com>
7690 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
7691 * gnat_rm.texi: Document pragma Allow_Integer_Address.
7692 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
7693 * opt.ads: New flag Allow_Integer_Address.
7694 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
7695 * sem_ch5.adb: Minor reformatting.
7696 * sem_prag.adb: Implement pragma Allow_Integer_Address.
7697 * sem_res.adb (Resolve): Allow integer address value if
7699 * sem_util.adb: Minor reformatting.
7700 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
7701 * switch-c.adb: Recognize flag -gnates.
7702 * usage.adb: Document flag -gnates.
7704 2014-01-20 Thomas Quinot <quinot@adacore.com>
7706 * s-tadeca.adb: Fix minor typos in comment.
7708 2014-01-20 Pascal Obry <obry@adacore.com>
7710 * s-win32.ads (FreeLibrary): New import.
7712 2014-01-20 Robert Dewar <dewar@adacore.com>
7714 * sem_res.adb, sem_cat.adb: Minor reformatting.
7715 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
7716 assigning to OUT parameters for the current subprogram scope.
7717 * exp_ch4.adb: Minor reformatting.
7719 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7721 * exp_ch4.adb (Process_Transient_Object,
7722 Find_Enclosing_Contexts): If the top-level if-expression that
7723 generated the transient object is an actual in a call, the proper
7724 Hook_Context is a construct enclosing the call.
7725 * einfo.ads: Indicate that Related_Expression is used to link a
7726 loop variable to the container expression over which the loop
7728 (Analyze_Iterator_Specification): Set the Related_Expression of
7729 the loop variable in a container element iterator.
7730 (Note_Possible_Modification): If the variable is the loop
7731 variable in a container element iterator, indicate that the
7732 enclosing container is also modified.
7734 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7736 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
7738 2014-01-20 Robert Dewar <dewar@adacore.com>
7740 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
7741 Minor reformatting and code clean up.
7743 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7745 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
7746 of objects of private type if Relaxed_RM_Semantics.
7748 2014-01-20 Claire Dross <dross@adacore.com>
7750 * a-cofove.ads (Vector): Capacity discriminant
7751 should be in range of the index.
7753 2014-01-20 Thomas Quinot <quinot@adacore.com>
7755 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
7756 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
7757 possible difference between epoch of Ada.Calendar clock and Ada
7758 real-time/tasking clock.
7759 * s-taprop-posix.adb: Minor comment fix.
7761 2014-01-20 Doug Rupp <rupp@adacore.com>
7763 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
7765 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7767 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
7768 checks on the prefix of attribute 'Old.
7769 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
7770 generation of validity checks on a range that belongs to the
7771 iteration scheme of a quantified expression.
7772 * sem_ch5.adb (One_Bound): Suppress the generation of validity
7773 checks on a bound that belongs to the iteration scheme of a
7774 quantified expression, generate the check in all other cases.
7776 2014-01-20 Bob Duff <duff@adacore.com>
7778 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
7780 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7782 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
7783 interpretations that do not come from other predefined units,
7784 to prevent spurious ambiguities in the presence of user-defined
7785 operators in the context of (an instance of) a predefined unit.
7787 2014-01-20 Robert Dewar <dewar@adacore.com>
7789 * gnat_rm.texi: Document that Loop_Variant is included in
7790 Statement_Assertions.
7791 * sem_prag.adb (Check_Kind): Add Loop_Variant to
7792 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
7793 to Statement_Assertions.
7795 2014-01-20 Doug Rupp <rupp@adacore.com>
7797 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
7798 for errno ENOENT from RTP on NFS mounted file system.
7800 2014-01-20 Ed Schonberg <schonberg@adacore.com>
7802 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
7803 examine code that does not come from source. The check does not
7804 apply to code generated for constraint checks, and such code may
7805 generate spurious error messages when compiled with expansion
7806 disabled (as in a generic unit) because side effects may not
7808 2) Make error messages more explicit: indicate the component
7809 of the construct whose value is indeterminate because of a
7810 call to a function with in-out parameter in another component,
7811 when there is no mandated order of execution between the two
7812 components (actuals, aggregate components, alternatives).
7814 2014-01-20 Robert Dewar <dewar@adacore.com>
7816 * gnat_rm.texi: Minor cleanup.
7818 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7820 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
7821 can now apply to a refined postcondition.
7822 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
7823 variable Result_Seen. Add variables Case_Prag, Post_Prag,
7824 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
7825 whether postconditions and/or constract-cases mention attribute
7826 'Result and introduce a post-state when applied to functions.
7827 (Check_Result_And_Post_State): Removed.
7828 * sem_prag.adb (Analyze_Pragma): Add local variable
7829 Result_Seen. Verify that the expression of pragma Refined_Post
7830 mentions attribute 'Result and introduces a post-state.
7831 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
7833 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7835 * exp_ch7.adb (Is_Subprogram_Call): New routine.
7836 (Process_Transient_Objects): Make variable Must_Hook global with
7837 respect to all locally declared subprograms. Search the context
7838 for at least one subprogram call.
7839 (Requires_Hooking): Removed.
7841 2014-01-20 Claire Dross <dross@adacore.com>
7843 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
7844 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
7845 External_Axiomatization);
7847 2014-01-20 Robert Dewar <dewar@adacore.com>
7849 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
7850 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
7851 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
7852 Allow Loop_Entry to be used in these pragmas if they appear in
7853 an appropriate context.
7854 (Placement_Error): Specialize error
7855 message for pragma Assert[_And_Cut] or pragma Assume containing
7856 Loop_Entry attribute.
7857 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
7858 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
7861 2014-01-20 Robert Dewar <dewar@adacore.com>
7863 * gnat1drv.adb: Minor comment update.
7865 2014-01-20 Tristan Gingold <gingold@adacore.com>
7867 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
7868 variables, comment out unused code.
7869 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
7870 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
7871 * s-excmac-arm.ads: New file.
7873 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7875 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
7876 Drange and Index_Typ. Remove the circuitry which creates a
7877 range check to compare the index type of the array against the
7879 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
7880 the circuitry which creates a range check to handle a
7881 discrete_range denoted by a subtype indication.
7883 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
7885 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
7886 nodes to get the original sloc range.
7888 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7890 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
7891 entity of a [library level] package.
7893 2014-01-20 Tristan Gingold <gingold@adacore.com>
7895 * raise-gcc.c (exception_class_eq): New function.
7896 (is_handled_by): Use it to compare exception classes.
7897 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
7898 be called to return URC_CONTINUE_UNWIND.
7899 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
7900 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
7902 2014-01-20 Robert Dewar <dewar@adacore.com>
7904 * opt.ads: Minor comment update.
7906 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7908 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
7909 constants to the "Local variables" area. Add new constant D. Add
7910 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
7911 to Pref_Typ and update all occurrences. Add circuitry to extract
7912 the discrete_range and the index type and build a range check.
7914 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7916 * gnat1drv.adb (Adjust_Global_Switches): Enable
7917 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
7920 2014-01-20 Thomas Quinot <quinot@adacore.com>
7922 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
7924 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7926 * sem_ch13.adb (Analyze_Aspect_Specifications):
7927 When aspect SPARK_Mode appears on a package body, insert the
7928 generated pragma at the top of the body declarations.
7930 2014-01-20 Robert Dewar <dewar@adacore.com>
7932 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
7933 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
7934 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
7935 sem_ch8.adb, exp_dist.adb: Minor reformatting.
7937 2014-01-20 Yannick Moy <moy@adacore.com>
7939 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
7942 2014-01-20 Pascal Obry <obry@adacore.com>
7944 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
7946 * g-arrspl.adb: Adapt all routine to this new implementation.
7947 (Set): Copy the Slice_Set definition before reusing it.
7949 2014-01-20 Arnaud Charlet <charlet@adacore.com>
7951 * sem_prag.adb (Process_Import_Or_Interface): In
7952 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
7953 (Analyze_Pragma): Ditto for pragma Export.
7954 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
7957 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7959 * einfo.ads: E_Abstract_State is now part of the entities that
7960 can be overloaded. Update type Overloadable_Kind to reflect the
7961 inclusion of abstract states.
7962 * sem_ch6.adb (New_Overloaded_Entity): A function can now
7963 overload an abstract state.
7964 * sem_prag.adb (Analyze_Constituent): Handle the overloading
7965 of states by functions. Use Entity_Of to obtain the entity of
7966 a constituent. (Analyze_Global_Item): Handle the overloading of
7967 states by functions.
7968 (Analyze_Initialization_Item): Handle the
7969 overloading of states by functions. Use Entity_Of to obtain the
7971 (Analyze_Input_Item): Handle the overloading
7972 of states by functions. Use Entity_Of to obtain the entity of an item.
7973 (Analyze_Input_Output): Handle the overloading of states by functions.
7974 (Analyze_Refinement_Clause): Handle the overloading
7975 of states by functions. Use Entity_Of to obtain the entity of an item.
7976 (Appears_In): Use Entity_Of to obtain the entity of an element.
7977 (Check_Usage): Use Entity_Of to obtain the entity of
7978 an item. Add a guard to prevent a crash due to a previous error.
7979 (Resolve_State): New routine.
7981 2014-01-20 Yannick Moy <moy@adacore.com>
7983 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
7984 opt.ads: Minor comments updates.
7986 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7988 * einfo.adb (Non_Limited_View): Applies to abstract states.
7989 (Set_From_Limited_With): Applies to abstract states.
7990 (Set_Non_Limited_View): Applies to abstract states.
7991 (Write_Field17): Output the non-limited view of an abstract state.
7992 * einfo.ads: Update the comment on usage and occurrences in
7993 nodes for attributes From_Limited_With and Non_Limited_View.
7994 * sem_aux.adb (Available_View): This routine can now handle
7996 * sem_aux.ads (Available_View): This routine can now handle
7997 abstract states. Update the comment on usage.
7998 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
7999 of states and variables.
8000 (In_Pragmas_Depends_Or_Global): New routine.
8001 * sem_ch10.adb (Build_Limited_Views): Implement
8002 abstract (limited) views of variables and states.
8003 (Build_Shadow_Entity): This routine is now a procedure. Add
8004 formal parameter Shadow. Update the comment on usage. Add
8005 context-specific decoration for states and variables.
8006 (Decorate_State): New routine. (Decorate_Variable): New routine.
8007 (Find_And_Process_States): New routine.
8008 (Process_Declarations): Renamed to Process_Declarations_And_States.
8009 (Process_Declarations_And_States): Add formal parameters
8010 Pack and Create_Abstract_Views. Update the comment on usage.
8011 (Process_States): New routine.
8012 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
8013 views of states and variables. Match the abstract view of a state
8014 against its corresponding non-abstract view.
8015 (Is_Matching_Input):
8016 Handle abstract views of states and variables. Match the abstract
8017 view of a state against its corresponding non-abstract view.
8018 (Process_Global_Item): Handle abstract views of states and
8021 2014-01-20 Bob Duff <duff@adacore.com>
8023 * sem_ch10.adb (Expand_With_Clause): Don't
8024 recurse on the prefix if the current with-ed name refers to a
8025 package that renames its own parent, eg "package P.Q renames P;".
8027 2014-01-20 Yannick Moy <moy@adacore.com>
8029 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
8030 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
8031 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
8032 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
8033 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
8036 2014-01-20 Yannick Moy <moy@adacore.com>
8038 * sinfo.ads Update documentation of GNATprove mode.
8040 2014-01-20 Yannick Moy <moy@adacore.com>
8042 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
8043 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
8044 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
8045 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
8047 * sem_ch13.adb: Remove blank.
8048 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
8049 subprograms by alias for renamings, not for inherited primitive
8051 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
8053 (Remove_Side_Effects): Apply the removal in
8054 GNATprove mode, for the full analysis of expressions.
8055 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
8057 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
8058 save/restore actions for Expander_Active flag in GNATprove mode,
8059 similar to what is done in ASIS mode.
8060 * frontend.adb (Frontend): Generic bodies are instantiated in
8062 * gnat1drv.adb (Adjust_Global_Switches): Set operating
8063 mode to Check_Semantics in GNATprove mode, although a light
8064 expansion is still performed.
8065 (Gnat1drv): Set Back_End_Mode to
8066 Declarations_Only in GNATprove mode, and later on special case
8067 the GNATprove mode to continue analysis anyway.
8068 * lib-writ.adb (Write_ALI): Always generate ALI files in
8070 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
8072 (SPARK_Mode): Renamed as GNATprove_Mode.
8073 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
8074 tree in GNATprove_Mode.
8075 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
8076 body in GNATprove mode.
8077 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
8079 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
8080 Make sure side effects are removed in GNATprove mode.
8082 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8084 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
8085 for aliased objects with an unconstrained nominal subtype.
8086 * gcc-interface/trans.c (Call_to_gnu): Likewise.
8087 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
8088 <case N_Op_Minus>: Remove useless code.
8089 (Exception_Handler_to_gnu_zcx): Minor tweaks.
8091 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8093 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
8094 Tidy up. For a subtype with discriminants and variant part, if a
8095 variant is statically selected and the fields all have a constant
8096 position, put them in order of increasing position. Likewise if
8097 no variant part but representation clause is present.
8098 * gcc-interface/utils.c (make_packable_type): Robustify.
8099 (maybe_pad_type): Use local variable and tidy up condition. If no
8100 alignment is specified, use the original one.
8101 (create_type_stub_decl): Minor tweak.
8102 (convert) <case VECTOR_CST>: Fix typo.
8103 <case CONSTRUCTOR>: Deal with padding types around the same type.
8104 Do not punt on missing fields.
8105 (unchecked_convert): Call finish_record_type to lay out the special
8106 record types made for conversions from/to problematic integer types.
8107 Bump the alignment of CONSTRUCTORs before converting them to a more
8110 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8112 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
8113 obsolete code for type_annotate_only mode, simplify code and slightly
8114 improve wording of comments.
8116 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
8119 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
8120 as intermediate type.
8121 (UI_To_gnu): Likewise.
8123 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
8125 * gnatvsn.ads (Current_Year): Bump to 2014.
8127 2014-01-02 Tobias Burnus <burnus@net-b.de>
8129 * gnat_ugn.texi: Bump @copying's copyright year.
8131 Copyright (C) 2014 Free Software Foundation, Inc.
8133 Copying and distribution of this file, with or without modification,
8134 are permitted in any medium without royalty provided the copyright
8135 notice and this notice are preserved.