72cd47578e197a340376fe14ddfe3c2b942d5e44
[gcc.git] / gcc / ada / ChangeLog
1 2013-10-14 Tristan Gingold <gingold@adacore.com>
2
3 * a-exexpr-gcc.adb: Adjust comment.
4 (Others_Value, All_Others_Value,
5 Unhandled_Others_Value): Declare as Character to slightly reduce
6 memory footprint.
7
8 2013-10-14 Robert Dewar <dewar@adacore.com>
9
10 * freeze.adb (Size_Known): Size is not known for packed record
11 with aliased components
12
13 2013-10-14 Robert Dewar <dewar@adacore.com>
14
15 * sem_ch3.adb: Minor fix to error message.
16 * a-exexpr-gcc.adb, sem_util.adb, sem_case.adb, exp_ch11.adb: Minor
17 reformatting.
18
19 2013-10-14 Arnaud Charlet <charlet@adacore.com>
20
21 * exp_ch11.adb: Fix typo.
22
23 2013-10-14 Thomas Quinot <quinot@adacore.com>
24
25 * exp_util.ads: Minor reformatting.
26
27 2013-10-14 Ed Schonberg <schonberg@adacore.com>
28
29 * sem_ch3.adb (Build_Derived_Record_Type): Reject full views
30 with no explicit discriminant constraints, when the parents of
31 the partial view and the full view are constrained subtypes with
32 different constraints.
33
34 2013-10-14 Robert Dewar <dewar@adacore.com>
35
36 * freeze.adb (Freeze_Array_Type): New procedure, abstracts out
37 this code from Freeze.
38 (Freeze_Array_Type): Detect pragma Pack overriding foreign convention
39 (Freeze_Record_Type): Ditto.
40
41 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
42
43 * sem_prag.adb (Analyze_Dependency_Clause): Add new local variable
44 Non_Null_Output_Seen. Update the call to Analyze_Input_Output.
45 (Analyze_Input_Item): Streamline the detection mechanism of null and
46 non-null items.
47 (Analyze_Input_List): Add new local variable
48 Non_Null_Input_Seen. Update all calls to Analyze_Input_Output.
49 (Analyze_Input_Output): Add new formal parameter Non_Null_Seen
50 and update the related comment on usage. Update the
51 recursive call to itself. Attribute 'Result is now treated
52 as a non-null item. Detect mixes of null and non-null items.
53 (Analyze_Initialization_Item): Streamline the detection mechanism
54 of null and non-null items.
55
56 2013-10-14 Vincent Celier <celier@adacore.com>
57
58 * projects.texi: Add documentation for the new project level
59 attribute Library_Rpath_Options.
60
61 2013-10-14 Tristan Gingold <gingold@adacore.com>
62
63 * a-exexpr-gcc.adb (Set_Exception_Parameter): New procedure.
64 (Set_Foreign_Occurrence): New procedure, extracted from
65 Setup_Current_Excep.
66 * exp_ch11.adb (Expand_Exception_Handlers): Do not expand choice
67 parameter in case of zcx.
68 * sem_ch11.adb (Analyze_Exception_Handlers): Need debug info
69 for the choice parameter.
70 * raise-gcc.c: Add comments.
71
72 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
73
74 * aspects.adb: Add an entry in table Canonical_Aspect for
75 Initial_Condition.
76 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
77 Aspect_Names and Aspect_Delay for Initial_Condition.
78 * einfo.adb (Get_Pragma): Include pragma Initial_Condition to
79 categorization pragmas.
80 * einfo.ads (Get_Pragma): Update comment on usage.
81 * exp_ch7.adb (Expand_N_Package_Body): Add a runtime check to
82 verify the assertion introduced by pragma Initial_Condition.
83 (Expand_N_Package_Declaration): Add a runtime check to
84 verify the assertion introduced by pragma Initial_Condition.
85 (Expand_Pragma_Initial_Condition): New routine.
86 * par-prag: Include pragma Initial_Condition to the list of
87 pragmas that do not require special processing by the parser.
88 * sem_ch3.adb (Analyze_Declarations): Analyze pragma
89 Initial_Condition at the end of the visible declarations.
90 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
91 for aspect Initial_Condition.
92 (Check_Aspect_At_Freeze_Point):
93 Aspect Initial_Condition does not need inspection at freezing.
94 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part):
95 New routine.
96 (Analyze_Pragma): Update all calls
97 to Check_Declaration_Order. Add processing for pragma
98 Initial_Condition. Initial_Condition is now a valid assertion
99 kind. Add an entry in table Sig_Flags for Initial_Condition.
100 (Check_Declaration_Order): Reimplemented to handle arbitrary
101 pragmas.
102 (Is_Valid_Assertion_Kind): Add an entry for
103 Initial_Condition.
104 * sem_pag.ads (Analyze_Initial_Condition_In_Decl_Part):
105 New routine.
106 * sem_util.adb (Add_Contract_Item): Pragma Initial_Condition
107 can now be associated with a package spec.
108 * sem_util.ads (Add_Contract_Item): Update comment on usage.
109 * sinfo.ads: Update the documentation of node N_Contract
110 * snames.ads-tmpl: Add new predefined name Initial_Condition. Add
111 new pragma id for Initial_Condition.
112
113 2013-10-14 Thomas Quinot <quinot@adacore.com>
114
115 * exp_pakd.adb: Minor reformatting.
116
117 2013-10-14 Robert Dewar <dewar@adacore.com>
118
119 * exp_prag.adb: Minor reformatting.
120
121 2013-10-14 Ed Schonberg <schonberg@adacore.com>
122
123 * sem_case.adb (Check_Against_Predicate): Handle properly an
124 others clause in various cases.
125
126 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
127
128 * sem_prag.adb (Check_Matching_Constituent): Do
129 not inspect the hidden states if there are no hidden states. This
130 case arises when the constituents are states coming from a
131 private child.
132
133 2013-10-14 Doug Rupp <rupp@adacore.com>
134
135 * init.c [ARMEL and VxWorks] (__gnat_map_signal): Re-arm guard
136 page by clearing VALID bit vice setting page protection.
137
138 2013-10-14 Arnaud Charlet <charlet@adacore.com>
139
140 * gnat_rm.texi, adaint.c: Fix typo.
141
142 2013-10-14 Ed Schonberg <schonberg@adacore.com>
143
144 * sem_util.adb (Is_Variable, In_Protected_Function): In the
145 body of a protected function, the protected object itself is a
146 constant (not just its components).
147
148 2013-10-14 Vincent Celier <celier@adacore.com>
149
150 * snames.ads-tmpl: Add new standard name Library_Rpath_Options.
151
152 2013-10-14 Tristan Gingold <gingold@adacore.com>
153
154 * sem_prag.adb (Process_Import_Or_Interface): Allow importing
155 of exception using convention Cpp.
156 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Expand cpp
157 imported exceptions.
158 * raise-gcc.c (is_handled_by): Filter C++ exception occurrences.
159 * gnat_rm.texi: Document how to import C++ exceptions.
160
161 2013-10-14 Jose Ruiz <ruiz@adacore.com>
162
163 * sem_ch13.adb (Sem_Ch13.Analyze_Aspect_Specification): For
164 Priority and CPU aspects, when checking, issue a warning only
165 if it is obviously not a main program.
166
167 2013-10-14 Tristan Gingold <gingold@adacore.com>
168
169 * adaint.c: Fix condition for AIX. Minor reformatting.
170
171 2013-10-14 Robert Dewar <dewar@adacore.com>
172
173 * sem_ch3.adb, sem_prag.adb, prj.ads: Minor reformatting.
174
175 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
176
177 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
178 Rename Outputs_Seen to All_Outputs_Seen and update all occurrences
179 of the variable.
180 (Analyze_Input_Output): Add an item to
181 All_Inputs_Seen when it is an input or a self-referential output.
182 (Check_Mode): Comment reformatting.
183 (Analyze_Abstract_State): Remove the restriction that an Export state
184 must also have mode Input_Only or Output_Only.
185
186 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
187
188 * einfo.adb: Flag 263 is now known as Has_Visible_Refinement.
189 (Has_Non_Null_Refinement): New routine.
190 (Has_Null_Refinement): The routine is now synthesized.
191 (Has_Visible_Refinement): New routine.
192 (Set_Has_Visible_Refinement): New routine.
193 (Write_Entity_Flags): Remove the output for
194 Has_Null_Refinement. Add output for Has_Visible_Refinement.
195 * einfo.ads: Update the occurrences of Has_Non_Null_Refinement,
196 Has_Null_Refinement and Has_Visible_Refinement in entities.
197 (Has_Non_Null_Refinement): New synthesized attribute.
198 (Has_Null_Refinement): This attribute is now synthesized.
199 (Has_Visible_Refinement): New routine with corresponding
200 pragma Inline.
201 (Set_Has_Visible_Refinement): New routine with corresponding pragma
202 Inline.
203 * sem_ch3.adb (Analyze_Declarations): Add new local
204 variable In_Package_Body. Remove state refinements from
205 visibility at the end of the package body declarations.
206 (Remove_Visible_Refinements): New routine.
207 * sem_prag.adb (Analyze_Constituent): Collect a null
208 constituent and mark the state as having visible refinement.
209 (Analyze_Global_Item): Use attribute Has_Visible_Refinement to
210 detect a state with visible refinement.
211 (Analyze_Input_Output): Use attribute Has_Visible_Refinement to detect
212 a state with visible refinement.
213 (Check_Dependency_Clause): Use attribute Has_Non_Null_Refinement rather
214 than checking the contents of list Refinement_Constituents.
215 (Check_In_Out_States): Use attribute Has_Non_Null_Refinement rather
216 than checking the contents of list Refinement_Constituents.
217 (Check_Input_States): Use attribute Has_Non_Null_Refinement rather
218 than checking the contents of list Refinement_Constituents.
219 (Check_Matching_Constituent): Mark a state as having visible refinement.
220 (Check_Output_States): Use attribute Has_Non_Null_Refinement rather than
221 checking the contents of list Refinement_Constituents.
222 (Check_Refined_Global_Item): Use attribute Has_Visible_Refinement
223 to detect a state with visible refinement.
224 (Is_Matching_Input): Use attribute Has_Non_Null_Refinement rather than
225 checking the contents of list Refinement_Constituents.
226 * sem_util.adb (Is_Refined_State): Use attribute
227 Has_Visible_Refinement to detect a state with visible refinement.
228
229 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
230
231 * sem_prag.adb (Check_Mode): Do not emit an
232 error when inspecting a self referencial output item of an
233 unconstrained type.
234
235 2013-10-14 Tristan Gingold <gingold@adacore.com>
236
237 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Fix
238 target type for code of VMS imported exception.
239 * init.c: Replace Exception_Code by void *.
240 * s-vmexta.adb (Hash, Base_Code_In): Adjust code after changing
241 the type of Exception_Code.
242
243 2013-10-14 Vincent Celier <celier@adacore.com>
244
245 * prj.ads: Minor comment updates.
246 * prj-attr.adb: New attribute Library_Rpath_Options.
247
248 2013-10-14 Robert Dewar <dewar@adacore.com>
249
250 * gnat_rm.texi: Library_Level attribute now applies to an
251 entity name.
252 * sem_attr.adb (Analyze_Attribute, case Library_Level): Prefix
253 is now an entity name.
254
255 2013-10-14 Jose Ruiz <ruiz@adacore.com>
256
257 * sem_ch13.adb (Analyze_Aspect_Specification): For
258 Priority and CPU aspects in subprograms, the expression in the
259 aspect is analyzed and exported.
260
261 2013-10-14 Robert Dewar <dewar@adacore.com>
262
263 * s-valuti.adb, prep.adb, scng.adb, errout.adb: Minor reformatting.
264
265 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
266
267 * adaint.c: Further disable __gnat_get_executable_load_address
268 for Linux.
269
270 2013-10-14 Vincent Celier <celier@adacore.com>
271
272 * gnat_ugn.texi: Add documentation for comparing symbols to
273 integers in preprocessing expressions.
274
275 2013-10-14 Jose Ruiz <ruiz@adacore.com>
276
277 * sem_prag.adb (Analyze_Aspect_Specification): For
278 Priority and CPU aspects in subprograms, the expression in the
279 aspect is analyzed and exported.
280 (Analyze_Pragma): When having a Priority pragma in the
281 main subprogram, load a unit that will force the initialization
282 of the tasking run time, which is needed for setting the required
283 priority.
284
285 2013-10-14 Vincent Celier <celier@adacore.com>
286
287 * prj-nmsc.adb (Check_Interfaces): Put in Other_Interfaces all
288 non Ada interface files.
289 * prj.ads (Project_Data): New component Other_Interfaces.
290
291 2013-10-14 Arnaud Charlet <charlet@adacore.com>
292
293 * gcc-interface/Makefile.in: Target pairs clean ups.
294
295 2013-10-14 Vincent Celier <celier@adacore.com>
296
297 * errout.adb (Write_Error_Summary): Do not output the number
298 of lines when Main_Source_File is unknown.
299 (Output_Messages): Do not write the header when Main_Source_File is
300 unknown.
301
302 2013-10-14 Vincent Celier <celier@adacore.com>
303
304 * prep.adb (Expression): Accept terms of the form 'symbol <relop>
305 integer", where relop is =, <, <=, > or >=.
306 (Parse_Def_File): Accept literal integer values.
307 * gcc-interface/Make-lang.in: Add s-valint.o, s-valuns.o and
308 s-valuti.o to the compiler object files.
309
310 2013-10-14 Robert Dewar <dewar@adacore.com>
311
312 * exp_prag.adb, exp_ch11.adb, s-exctab.adb: Minor reformatting.
313 * usage.adb: Add line for -gnateu switch.
314
315 2013-10-14 Vincent Celier <celier@adacore.com>
316
317 * lib-writ.ads: Add comments to indicate that a path name in
318 D lines may be quoted if the path name includes directories
319 with spaces.
320
321 2013-10-14 Robert Dewar <dewar@adacore.com>
322
323 * debug.adb: Document -gnatd.E.
324 * gnat1drv.adb (Adjust_Global_Switches): Set Error_To_Warning
325 if -gnatd.E set.
326 * opt.ads (Error_To_Warning): New switch.
327 * osint.adb: Minor reformatting.
328 * sem_warn.adb (Warn_On_Overlapping_Actuals): Overlap is error
329 in some cases in Ada 2012 mode (unless Error_To_Warning) is set.
330 * sem_warn.ads (Warn_On_Overlapping_Actuals): Document error
331 in Ada 2012 mode.
332
333 2013-10-14 Tristan Gingold <gingold@adacore.com>
334
335 * cstand.adb: Add a comment for Standard_Exception_Type.
336
337 2013-10-14 Ed Schonberg <schonberg@adacore.com>
338
339 * exp_ch4.adb (Process_Transient_Object): If a transient scope
340 has already been created, use the corresponding Node_To_Be_Wrapped
341 as the insertion point for the controlled actions.
342
343 2013-10-14 Tristan Gingold <gingold@adacore.com>
344
345 * cstand.adb (Create_Standard): Change Import_Code component
346 of Standard_Exception_Type to Foreign_Data. Its type is now
347 Standard_A_Char (access to character).
348 * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Adjust
349 definition of Code to match the type of Foreign_Data.
350 * s-stalib.ads (Exception_Data): Replace Import_Code by Foreign_Data
351 Change the definition of standard predefined exceptions.
352 (Exception_Code): Remove.
353 * raise.h (Exception_Code): Remove (Exception_Data): Replace
354 Import_Code field by Foreign_Data.
355 * rtsfind.ads (RE_Exception_Code): Remove
356 (RE_Import_Address): Add.
357 * a-exexpr-gcc.adb (Import_Code_For): Replaced by Foreign_Data_For.
358 * exp_ch11.adb (Expand_N_Exception_Declaration): Associate null
359 to Foreign_Data component.
360 * raise-gcc.c (Import_Code_For): Replaced by Foreign_Data_For.
361 (is_handled_by): Add comments. Use replaced function. Change
362 condition so that an Ada occurrence is never handled by
363 Foreign_Exception.
364 * s-exctab.adb (Internal_Exception): Associate Null_Address to
365 Foreign_Data component.
366 * s-vmexta.adb, s-vmexta.ads (Exception_Code): Declare Replace
367 SSL.Exception_Code by Exception_Code.
368
369 2013-10-14 Robert Dewar <dewar@adacore.com>
370
371 * gnat_ugn.texi: Document -gnateu switch.
372 * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
373 * stylesw.adb: Ignore unrecognized switch if
374 Ignore_Unrecognized_VWY_Switches set.
375 * switch-c.adb: Implement -gnateu (sets
376 Ignore_Unrecognized_VWY_Switches).
377 * validsw.adb: Ignore unrecognized switch if
378 Ignore_Unrecognized_VWY_Switches set.
379 * warnsw.adb: Ignore unrecognized switch if
380 Ignore_Unrecognized_VWY_Switches set.
381
382 2013-10-14 Robert Dewar <dewar@adacore.com>
383
384 * exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
385 reformatting.
386
387 2013-10-14 Vincent Celier <celier@adacore.com>
388
389 * ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted,
390 defaulted to False. Calls Get_Name with May_Be_Quoted.
391 (Get_Name): New Boolean parameter May_Be_Quoted, defaulted to
392 False. If May_Be_Quoted is True and first non blank charater is
393 '"', unquote the name.
394 (Scan_ALI): For the file/path name on the D line, call Get_File_Name
395 with May_Be_Quoted = True, as it may have been quoted.
396 * lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New
397 procedure to write file/path names that may contain spaces and if they
398 do are quoted.
399 * lib-writ.adb (Write_ALI): Use new procedure
400 Write_Info_Name_May_Be_Quoted to write file/path names on D lines.
401
402 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
403
404 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
405 Analyze_Global_In_Decl_Part,
406 Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
407 and its formals only when it is not already installed.
408 * sem_util.adb (Is_Refined_State): A state is refined when it
409 has a non-empty list of constituents.
410
411 2013-10-14 Tristan Gingold <gingold@adacore.com>
412
413 * adaint.c: Disable __gnat_get_executable_load_address for linux.
414 * exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
415
416 2013-10-14 Tristan Gingold <gingold@adacore.com>
417
418 * s-vmexta.ads: Add comments.
419
420 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
421
422 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
423 for pragma Refined_State.
424 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
425 for aspect Refined_Depends.
426 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
427 Use Find_Related_Subprogram_Or_Body to find the related
428 context. Use the current scope when determining whether to
429 ensure proper visibility.
430 (Analyze_Depends_In_Decl_Part):
431 Add local variable Spec_Id. Update the comment on usage of
432 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
433 related context. Extract the corresponding spec of the body
434 (if any). Use the current scope when determining when to
435 ensure proper visibility.
436 (Analyze_Global_In_Decl_Part):
437 Add local variable Spec_Id. Update the comment on usage of
438 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
439 related context. Extract the corresponding spec of the body
440 (if any). Use the current scope when determining when to
441 ensure proper visibility.
442 (Analyze_Global_Item): Use the
443 entity of the subprogram spec when performing formal parameter
444 checks. Perform state-related checks.
445 (Analyze_Input_Output):
446 Use Is_Attribute_Result to detect 'Result. Query the
447 entity of a subprogram spec when verifying the prefix of
448 'Result. Perform state-related checks. (Analyze_Pragma):
449 Merge the analysis of Refined_Depends and Refined_Global.
450 (Analyze_Refined_Depends_In_Decl_Part): Provide implemenation.
451 (Analyze_Refined_Global_In_Decl_Part): Move state-related checks
452 to the body of Analyze_Global_In_Decl_Part. Rename local constant
453 List to Items. (Analyze_Refined_Pragma): Remove circuitry to
454 find the proper context, use Find_Related_Subprogram_Or_Body
455 instead.
456 (Check_Function_Return): Query the entity of
457 the subprogram spec when verifying the use of 'Result.
458 (Check_In_Out_States, Check_Input_States, Check_Output_States):
459 Avoid using Has_Null_Refinement to detect a state with
460 a non-null refinement, use the Refinement_Constituents
461 list instead.
462 (Check_Matching_Constituent): Remove initialization code.
463 (Check_Mode_Restriction_In_Function): Use the entity of the subprogram
464 spec when verifying mode usage in functions.
465 (Collect_Global_Items): New routine.
466 (Collect_Subprogram_Inputs_Outputs): Add local
467 variable Spec_Id. Add circuitry for bodies-as-specs. Use
468 pragma Refined_Global when collecting for a body.
469 (Create_Or_Modify_Clause): Use the location of the
470 clause. Rename local variable Clause to New_Clause to avoid
471 confusion and update all occurrences. Use Is_Attribute_Result
472 to detect 'Result.
473 (Find_Related_Subprogram): Removed.
474 (Find_Related_Subprogram_Or_Body): New routine.
475 (Is_Part_Of): Move routine to top level.
476 (Normalize_Clause): Update the
477 comment on usage. The routine can now normalize a clause with
478 multiple outputs by splitting it.
479 (Collect_Global_Items):
480 Rename local constant List to Items. Remove the check for
481 a null list.
482 (Requires_Profile_Installation): Removed.
483 (Split_Multiple_Outputs): New routine.
484 * sem_prag.ads: Update the comments on usage of various
485 pragma-related analysis routines.
486 * sem_util.adb (Contains_Refined_State): The routine can now
487 process pragma [Refined_]Depends.
488 (Has_Refined_State): Removed.
489 (Has_State_In_Dependency): New routine.
490 (Has_State_In_Global): New routine.
491 (Is_Attribute_Result): New routine.
492 * sem_util.ads (Is_Attribute_Result): New routine.
493
494 2013-10-14 Emmanuel Briot <briot@adacore.com>
495
496 * s-regpat.adb (Compile): Fix finalization of the automaton
497 when its size was automatically computed to be exactly 1000 bytes.
498
499 2013-10-14 Ed Schonberg <schonberg@adacore.com>
500
501 * sem_ch3.adb (Complete_Private_Subtype): If the full view of
502 the base type is constrained, the full view of the subtype is
503 known to be constrained as well.
504
505 2013-10-14 Vincent Celier <celier@adacore.com>
506
507 * projects.texi: Add documentation for new attributes of package
508 Clean: Artifacts_In_Object_Dir and Artifacts_In_Exec_Dir.
509
510 2013-10-14 Tristan Gingold <gingold@adacore.com>
511
512 * adaint.c, adaint.h (__gnat_get_executable_load_address):
513 New function.
514 * a-exexda.adb (Append_Info_Basic_Exception_Traceback): Add
515 executable load address (Basic_Exception_Tback_Maxlength): Adjust.
516
517 2013-10-14 Vincent Celier <celier@adacore.com>
518
519 * prj-attr.adb: New attributes in package Clean:
520 Artifacts_In_Exec_Dir, Artifacts_In_Object_Dir.
521 * prj-nmsc.adb (Process_Clean (Attributes)): New
522 procedure to process attributes Artifacts_In_Exec_Dir and
523 Artifacts_In_Object_Dir in package Clean.
524 * prj.ads (Project_Configuration): New components
525 Artifacts_In_Exec_Dir and Artifacts_In_Object_Dir.
526 * snames.ads-tmpl: New standard names Artifacts_In_Exec_Dir and
527 Artifacts_In_Object_Dir used only by gprclean.
528
529 2013-10-14 Robert Dewar <dewar@adacore.com>
530
531 * exp_attr.adb (Expand_N_Attribute_Reference): Add error
532 entry for Library_Level attribute (which should not survive
533 to expansion)
534 * gnat_rm.texi: Document attribute Library_Level
535 * sem_attr.adb (Analyze_Attribute, case Library_Level): Implement
536 this new attribute (Set_Boolean_Result): Replaces Set_Result
537 (Check_Standard_Prefix): Document that Check_E0 is called
538 (Check_System_Prefix): New procedure
539 * snames.ads-tmpl: Add entry for Library_Level attribute
540
541 2013-10-14 Robert Dewar <dewar@adacore.com>
542
543 * exp_ch6.adb, sinfo.ads: Minor reformatting.
544 * checks.adb (Overlap_Check): Use identifier casing in messages.
545
546 2013-10-14 Robert Dewar <dewar@adacore.com>
547
548 * einfo.ads, einfo.adb (Default_Aspect_Component_Value): Is on base type
549 only.
550 * exp_aggr.adb (Expand_Array_Aggregate): Handle proper
551 initialization of <> component.
552 * exp_ch3.adb, exp_tss.adb: Minor reformatting
553 * sem_ch13.adb (Default_Aspect_Component_Value, Default_Aspect_Value):
554 Is on base type only.
555 * sinfo.ads: Minor comment revision.
556
557 2013-10-14 Robert Dewar <dewar@adacore.com>
558
559 * g-decstr.adb (Decode_Wide_Wide_Character): Fix failure
560 to detect invalid sequences where longer than necessary
561 sequences are used for encoding.
562 (Validate_Wide_Character):
563 Call Decode_Wide_Character to get the above validations.
564 (Validate_Wide_Wide_Character): Same fix
565 * g-decstr.ads: Add documentation making it clear that the UTF-8
566 implementation here recognizes all valid UTF-8 sequences, rather
567 than the well-formed subset corresponding to characters defined
568 in Unicode.
569 (Next_Wide_Character): Remove comment about this
570 being more efficient than Decode_Wide_Character (because this
571 no longer the case).
572 (Prev_Wide_Character): Add note that valid encoding is assumed.
573
574 2013-10-14 Robert Dewar <dewar@adacore.com>
575
576 * a-wichha.adb (Character_Set_Version): New function.
577 * a-wichha.ads: Remove comments for pragma Pure (final RM has
578 this).
579 (Character_Set_Version): New function.
580 * gnat_rm.texi: Update doc.
581
582 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
583
584 * einfo.adb: Flag263 is now known as Has_Null_Refinement.
585 (Has_Null_Refinement): New routine.
586 (Set_Has_Null_Refinement): New routine.
587 (Write_Entity_Flags): Output the status of flag
588 Has_Null_Refinement.
589 * einfo.ads: Add new flag Has_Null_Refinement along with
590 comment on usage and update all nodes subject to the flag.
591 (Has_Null_Refinement): New routine along with pragma Inline.
592 (Set_Has_Null_Refinement): New rouitine along with pragma Inline.
593 * sem_prag.adb (Analyze_Constituent): Mark a state as having
594 a null refinement when the sole constituent is "null".
595 (Analyze_Global_List): Handle null input/output items.
596 (Analyze_Refined_Global_In_Decl_Part): Add local variable
597 Has_Null_State. Add logic to handle combinations of states
598 with null refinements and null global lists and/or items.
599 (Check_In_Out_States, Check_Input_States, Check_Output_States):
600 Use attribute Has_Null_Refinement to detect states with
601 constituents.
602 (Check_Refined_Global_List): Handle null input/output items.
603 (Process_Global_Item): Handle states with null refinements.
604 (Process_Global_List): Handle null input/output items.
605
606 2013-10-14 Robert Dewar <dewar@adacore.com>
607
608 * freeze.adb (Freeze_Entity): Reset Is_True_Constant for
609 aliased object
610 * gnat_ugn.texi: Update doc on aliased variables and constants.
611
612 2013-10-14 Ed Schonberg <schonberg@adacore.com>
613
614 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
615 reference is an actual in a call, the prefix has not been fully
616 expanded, to account for the additional expansion for parameter
617 passing. the prefix itself is a packed reference as well,
618 recurse to complete the transformation of the prefix.
619
620 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
621
622 * exp_dbug.adb (Debug_Renaming_Declaration): Do not
623 materialize the entity when the renamed object contains an
624 N_Explicit_Dereference.
625 * sem_ch8.adb (Analyze_Object_Renaming):
626 If the renaming comes from source and the renamed object is a
627 dereference, mark the prefix as needing debug information.
628
629 2013-10-14 Doug Rupp <rupp@adacore.com>
630
631 * system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
632 Enable Stack Probes, Disable Stack Limit Checking.
633 * init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
634 (__gnat_map_signal): Fix signature.
635 (__gnat_error_handler): Make
636 static, fix signature, remove prototype, fix prototype warning.
637 [ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
638 page for storage_error.
639 * exp_pakd.adb: Minor reformatting.
640
641 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
642
643 * sem_prag.adb (Analyze_Global_In_Decl_Part): Remove local
644 variable Contract_Seen. Add local variable Proof_Seen.
645 (Analyze_Global_List): Remove the processing for mode
646 Contract_In. Add support for mode Proof_In.
647 (Analyze_Pragma): Update the grammar of pragmas Global and
648 Refined_Global.
649 * snames.ads-tmpl: Remove predefined name Contract_In. Add
650 predefined name Proof_In.
651
652 2013-10-14 Robert Dewar <dewar@adacore.com>
653
654 * exp_prag.adb (Expand_Pragma_Check): Generate proper string
655 for invariant
656 * gnat_rm.texi: Add documentation for pragmas
657 Type_Invariant[_Class]
658 * par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
659 * sem_ch13.adb: Minor reformatting
660 * sem_prag.adb: Implement pragmas Type_Invariant[_Class]
661 * snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
662
663 2013-10-14 Johannes Kanig <kanig@adacore.com>
664
665 * debug.adb: Release now unused debug switches that were only
666 relevant for gnat2why backend, not the frontend
667 * frontend.adb (Frontend) Do not stop when -gnatd.H is present,
668 was unused
669
670 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
671
672 * sem_prag.adb (Analyze_Global_Item): Allow
673 references to enclosing formal parameters.
674
675 2013-10-14 Thomas Quinot <quinot@adacore.com>
676
677 * einfo.adb (Equivalent_Type): Add missing case
678 E_Access_Subprogram_Type in guard (for remote access to
679 subprograms) * sem_ch8.adb (Find_Direct_Name, Find_Expanded_Name):
680 Add missing guards to account for the presence of RAS types
681 that have already been replaced with the corresponding fat
682 pointer type.
683
684 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
685
686 * aspects.adb: Add an entry in table Canonical_Aspect for
687 Initializes.
688 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
689 Aspect_Names and Aspect_Delay for Initializes.
690 * atree.ads, atree.adb (Ekind_In): New seven argument versions of the
691 routines.
692 * einfo.adb: Remove Refined_State_Pragma from the list of node
693 usage. Finalizer is now at position 28.
694 (Contract): Package
695 and package bodies now have a contract.
696 (Finalizer): Update
697 the assertion and node usage.
698 (Get_Pragma): Update the Is_CDG
699 flag to include Abstract_State, Initializes and Refined_State.
700 (Refined_State_Pragma): Removed.
701 (Set_Contract): Package and
702 package bodies now have a contract.
703 (Set_Finalizer): Update the
704 assertion and node usage.
705 (Set_Refined_State_Pragma): Removed.
706 (Write_Field8_Name): Remove the output for Refined_State_Pragma.
707 (Write_Field24_Name): Remove the output for Finalizer. Package
708 and package bodies now have a contract.
709 (Write_Field28_Name):
710 Add output for Finalizer.
711 * einfo.ads: Update the documentation and usage in entities
712 of attribute Contract. Update the node position and usage in
713 entities of attribute Finalizer. Remove the documentation
714 and usage in entities for attribute Refined_State_Pragma.
715 (Refined_State_Pragma): Removed along with pragma Inline.
716 (Set_Refined_State_Pragma): Removed along with pragma Inline.
717 * par-prag.adb: Add Initializes to the pragmas that do not
718 require special processing by the parser.
719 * sem_ch3.adb (Analyze_Declarations): Add local variable
720 Prag. Update the retrieval of pragma Refined_State. Analyze
721 aspect/pragma Initializes at the end of the visible declarations
722 of the related package.
723 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
724 Add local variables Ref_Depends and Ref_Global. Analyze
725 pragmas Refined_Global and Refined_Depends in that order.
726 (Analyze_Subprogram_Contract): Add local variables Depends and
727 Global. Analyze pragmas Global and Depends in that order.
728 * sem_ch7.adb (Analyze_Package_Body_Helper): Package
729 bodies now have a contract. Move the analysis of the aspect
730 specifications after the defining entity has been decorated.
731 (Analyze_Package_Declaration): Packages now have a contract. Move
732 the analysis of the aspect specifications after the defining
733 entity has been decorated.
734 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Packages
735 now have contracts.
736 * sem_ch13.adb (Analyze_Pragma): Code cleanup for aspect
737 Abstract_State. Add processing for aspect Initializes.
738 (Check_Aspect_At_Freeze_Point): Add an entry for Initializes.
739 * sem_prag.adb: Use Get_Pragma_Arg to extract the expression
740 of a pragma argument. Add an entry in table Sig_Flags for
741 Initializes.
742 (Analyze_Initializes_In_Decl_Part): New routine.
743 (Analyze_Pragma): Check the declaration order of pragmas
744 Abstract_State and Initializes. Abstract_State is now part of
745 the package contract. Analyze pragma Initializes. Check for
746 duplicate Refined_State pragma. Refined_State is now part of
747 the package contract.
748 (Check_Declaration_Order): New routine.
749 (Check_Test_Case): Alphabetized.
750 * sem_prag.ads (Analyze_Initializes_In_Decl_Part): New routine.
751 * sem_util.adb (Add_Contract_Item): Rename formal Subp_Id
752 to Id. This routine can now support contracts on packages and
753 package bodies.
754 * sem_util.ads (Add_Contract_Item): Rename formal Subp_Id to
755 Id. Update comment on usage.
756 * sinfo.ads: Update the usage of N_Contract nodes.
757 * snames.ads-tmpl: Add predefined name Initializes. Add new
758 pragma id for Initializes.
759
760 2013-10-13 Nicolas Roche <roche@adacore.com>
761 Eric Botcazou <ebotcazou@adacore.com>
762
763 * gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with
764 generic rule and add $(POSTCOMPILE).
765 (ADA_DEPS): New.
766 (.adb.o): Add @$(ADA_DEPS).
767 (.ads.o): Likewise.
768 (ada/a-except.o): Likewise.
769 (ada/s-excdeb.): Likewise.
770 (ada/s-assert.o): Likewise.
771 (ada/a-tags.o): Likewise.
772 (ada_generated_files): New variable.
773 Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS.
774 (ADA_DEPFILES): New variable.
775 Include them.
776 (ada_OBJS): Define.
777
778 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
779
780 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Force all local
781 variables with aggregate types in memory if not optimizing.
782
783 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
784
785 * sem_prag.adb (Check_Mode): Do
786 not emit an error when we are looking at inputs and
787 the item is an unconstrained or tagged out parameter.
788 (Check_Mode_Restriction_In_Enclosing_Context): Use Get_Pragma
789 to find whether the context is subject to aspect/pragma Global.
790 (Collect_Subprogram_Inputs_Outputs): Unconstrained or tagged
791 out parameters are now considered inputs. Use Get_Pragma to
792 find wheher the subprogram is subject to aspect/pragma Global.
793 (Is_Unconstrained_Or_Tagged_Item): New routine.
794
795 2013-10-13 Thomas Quinot <quinot@adacore.com>
796
797 * einfo.ads: Minor reformatting.
798 * gcc-interface/Make-lang.in: Update dependencies.
799
800 2013-10-13 Robert Dewar <dewar@adacore.com>
801
802 * gnat_rm.texi: Add documentation for pragmas Pre[_Class]
803 Post[_Class].
804 * par-ch2.adb (Skip_Pragma_Semicolon): Handle extra semicolon nicely.
805 * par-prag.adb: Add entries for pragmas Pre[_Class] and
806 Post[_Class].
807 * sem_prag.adb: Add handling of pragmas Pre[_Class] and
808 Post[_Class].
809 * sem_util.adb (Original_Aspect_Name): Moved here from
810 Sem_Prag.Original_Name, and modified to handle pragmas
811 Pre/Post/Pre_Class/Post_Class.
812 * sem_util.ads (Original_Aspect_Name): Moved here from
813 Sem_Prag.Original_Name.
814 * snames.ads-tmpl: Add entries for pragmas Pre[_Class] and
815 Post[_Class].
816
817 2013-10-13 Robert Dewar <dewar@adacore.com>
818
819 * einfo.adb, sem_ch6.adb: Minor reformatting.
820
821 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
822
823 * einfo.adb: Add node/list usage for Refined_State
824 and Refinement_Constituents.
825 (Get_Pragma): Update the
826 initialization of Is_CDG to include Refined_Global and
827 Refined_Depends. Rename constant Delayed to In_Contract and update
828 all of its occurrences.
829 (Is_Non_Volatile_State): New routine.
830 (Is_Volatile_State): Removed.
831 (Refined_State): New routine.
832 (Refinement_Constituents): New routine.
833 (Set_Refined_State): New routine.
834 (Set_Refinement_Constituents): New routine.
835 (Write_Field8_Name): Add output for Refinement_Constituents.
836 (Write_Field10_Name): Add output for Refined_State.
837 * einfo.ads: Add new synthesized attribute Is_Non_Volatile_State.
838 Remove synthesized attribute Is_Volatile_State. Add new
839 attributes Refined_State and Refinement_Constituents along with
840 usage in nodes.
841 (Get_Pragma): Update the comment on usage.
842 (Is_Non_Volatile_State): New routine.
843 (Is_Volatile_State): Removed.
844 (Refined_State): New routine and pragma Inline.
845 (Refinement_Constituents): New routine and pragma Inline.
846 (Set_Refined_State): New routine and pragma Inline.
847 (Set_Refinement_Constituents): New routine and pragma Inline.
848 * elists.ads, elists.adb (Clone): Removed.
849 (New_Copy_Elist): New routine.
850 (Remove): New routine.
851 * sem_ch3.adb (Analyze_Declarations): Use Defining_Entity
852 to get the entity of the subprogram [body].
853 (Analyze_Object_Declaration): Add initialization for
854 Refined_State.
855 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
856 for Refined_Global and Refined_Depends. Emit an error when
857 the body requires Refined_Global, but the aspect/pragma is
858 not present.
859 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Change
860 procedure signature and add comment on usage.
861 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
862 for aspect Refined_Global.
863 * sem_prag.adb (Analyze_Abstract_State): Add initialization
864 of attributes Refined_State and Refinement_Constituents.
865 (Analyze_Depends_In_Decl_Part, Analyze_Global_In_Decl_Part,
866 Analyze_Contract_Cases_In_Decl_Part): Remove local
867 constant Arg1.
868 (Analyze_Pragma): Add processing for pragma
869 Refined_Global. The analysis of Refined_Post and Refined_Pre
870 has been merged. Update an error message in the processing of
871 pragma Refined_State.
872 (Analyze_Refined_Global_In_Decl_Part): Provide implementation.
873 (Analyze_Refined_Pragma): New routine.
874 (Analyze_Refined_Pre_Post_Condition): Removed.
875 (Analyze_Refined_State_In_Decl_Part): Update the call to Clone.
876 (Analyze_Refinement_Clause): Make State_Id visible to all
877 nested subprogram.
878 (Check_Matching_Constituent): Establish
879 a relation between a refined state and its constituent.
880 (Collect_Hidden_States_In_Decls): Remove ??? comment. Look at
881 the entity of the object declaration to establish its kind.
882 * sem_util.adb: Alphabetize with and use clauses.
883 (Contains_Refined_State): New routine.
884 * sem_util.ads (Contains_Refined_State): New routine.
885
886 2013-10-13 Thomas Quinot <quinot@adacore.com>
887
888 * scos.ads: Minor documentation clarification.
889
890 2013-10-13 Thomas Quinot <quinot@adacore.com>
891
892 * s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when
893 building on AIX 5.3 or later, and to CLOCK_REALTIME on older
894 versions of AIX.
895 * init.c (pthread_condattr_setclock): Remove now useless weak symbol.
896 * thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2
897 compatibility shim.
898 * s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit
899 type).
900 (clock_gettime): Import from C runtime library.
901 * s-osinte-aix.adb (clock_gettime): Remove bogus emulation body,
902 this routine is provided by the system in current supported
903 versions of AIX.
904
905 2013-10-13 Robert Dewar <dewar@adacore.com>
906
907 * sem_ch3.adb: Minor reformatting.
908
909 2013-10-13 Ed Schonberg <schonberg@adacore.com>
910
911 * freeze.adb (Freeze_Entity): For a function whose return type
912 is incomplete, do not replace the type with the full view if the
913 type is a limited view. In that case the full view appears in a
914 different unit, and the back-end will retrieve it at the proper
915 elaboration point.
916
917 2013-10-13 Yannick Moy <moy@adacore.com>
918
919 * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for
920 actuals.
921
922 2013-10-13 Ed Schonberg <schonberg@adacore.com>
923
924 * sem_ch3.adb: in Ada 2012 access_to_function types can have
925 in-out parameters.
926 (Derived_Type_Declaration): SPARK restriction
927 must be flagged on the original node, since it may have been
928 written as a subtype declaration.
929 (Analyze_Subtype_Declaration): Do not enter name of
930 entity in declaration if it is the current entity, because it may
931 have been inserted in a previous analysis and it appears in the
932 else_part of an if-statement that is rewritten during expansion.
933
934 2013-10-13 Yannick Moy <moy@adacore.com>
935
936 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove procedure.
937 (Expand_SPARK): Remove call to Expand_SPARK_N_Attribute_Reference and
938 Expand_SPARK_N_Simple_Return_Statement.
939 (Expand_SPARK_N_Simple_Return_Statement,
940 Expand_SPARK_Simple_Function_Return): Remove procedures.
941
942 2013-10-13 Vincent Celier <celier@adacore.com>
943
944 * gnat_ugn.texi: Minor editing.
945
946 2013-10-13 Ed Schonberg <schonberg@adacore.com>
947
948 * sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
949 operation implements an interface primitive, mark the operation
950 as referenced, to prevent usually spurious messages about unused
951 entities: such operations are called in dispatching select
952 statements that are not visible to the compiler.
953
954 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
955
956 * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
957
958 2013-10-11 Jakub Jelinek <jakub@redhat.com>
959
960 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
961
962 2013-10-10 Robert Dewar <dewar@adacore.com>
963
964 * par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
965 junk code.
966
967 2013-10-10 Javier Miranda <miranda@adacore.com>
968
969 * sem_ch13.adb (Freeze_Entity_Checks): Avoid
970 loosing errors on CPP entities in -gnatc mode.
971
972 2013-10-10 Robert Dewar <dewar@adacore.com>
973
974 * sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
975 if from source.
976
977 2013-10-10 Robert Dewar <dewar@adacore.com>
978
979 * restrict.adb (Check_SPARK_Restriction): Refine test (don't
980 automatically go to the original node).
981 * sem_ch11.adb (Analyze_Raise_Statement): Only raise
982 statements that come from source violate SPARK restrictions.
983 (Analyze_Raise_xxx_Error): Same fix.
984 * sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
985 initialization on original node, not on possibly rewritten
986 expression.
987 * sem_ch4.adb (Analyze_If_Expression): Only if expressions that
988 come from source violate SPARK mode restrictions.
989
990 2013-10-10 Robert Dewar <dewar@adacore.com>
991
992 * gnat_ugn.texi: Fix confusing documentation for -gnatyM.
993
994 2013-10-10 Yannick Moy <moy@adacore.com>
995
996 * errout.adb (Compilation_Errors): In formal verification mode,
997 always return False.
998
999 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1000
1001 * sem_prag.adb (Collect_Hidden_States_In_Decls): Only consider source
1002 non-constant objects.
1003
1004 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1005
1006 * aspects.adb: Add an entry in table Canonical_Aspect for
1007 Refined_State.
1008 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1009 Aspect_Names and Aspect_Delay for Refined_State.
1010 * einfo.adb: Add with and use clauses for Elists.
1011 Remove Refined_State from the list of node usage.
1012 Add Refined_State_Pragma to the list of node usage.
1013 (Has_Null_Abstract_State): New routine.
1014 (Refined_State): Removed.
1015 (Refined_State_Pragma): New routine.
1016 (Set_Refined_State): Removed.
1017 (Set_Refined_State_Pragma): New routine.
1018 (Write_Field8_Name): Add output for Refined_State_Pragma.
1019 (Write_Field9_Name): Remove the output for Refined_State.
1020 * einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
1021 along with usage in nodes. Remove attribute Refined_State along
1022 with usage in nodes. Add new attribute Refined_State_Pragma along
1023 with usage in nodes.
1024 (Has_Null_Abstract_State): New routine.
1025 (Refined_State): Removed.
1026 (Refined_State_Pragma): New routine.
1027 (Set_Refined_State): Removed.
1028 (Set_Refined_State_Pragma): New routine.
1029 * elists.adb (Clone): New routine.
1030 * elists.ads (Clone): New routine.
1031 * par-prag.adb: Add Refined_State to the pragmas that do not
1032 require special processing by the parser.
1033 * sem_ch3.adb: Add with and use clause for Sem_Prag.
1034 (Analyze_Declarations): Add local variables Body_Id, Context and
1035 Spec_Id. Add processing for delayed aspect/pragma Refined_State.
1036 * sem_ch13.adb (Analyze_Aspect_Specifications): Update the
1037 handling of aspect Abstract_State. Add processing for aspect
1038 Refined_State. Remove the bizzare insertion policy for aspect
1039 Abstract_State.
1040 (Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
1041 * sem_prag.adb: Add an entry to table Sig_Flags
1042 for pragma Refined_State.
1043 (Add_Item): Update the
1044 comment on usage. The inserted items need not be unique.
1045 (Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
1046 Restore_Scope and update all its occurrences.
1047 (Analyze_Pragma):
1048 Update the handling of pragma Abstract_State. Add processing for
1049 pragma Refined_State.
1050 (Analyze_Pre_Post_Condition_In_Decl_Part):
1051 Rename variable Restore to Restore_Scope and update all its
1052 occurrences.
1053 (Analyze_Refined_State_In_Decl_Part): New routine.
1054 * sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
1055 * snames.ads-tmpl: Add new predefined name for Refined_State. Add
1056 new Pragma_Id for Refined_State.
1057
1058 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1059
1060 * sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
1061 case of a record declaration in a limited view, when the record
1062 contains a self-referential component of an anonymous access type.
1063
1064 2013-10-10 Thomas Quinot <quinot@adacore.com>
1065
1066 * exp_ch4.adb (Process_Transient_Object): For any context other
1067 than a simple return statement, insert the finalization action
1068 after the context, not as an action on the context (which will
1069 get evaluated before it).
1070
1071 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1072
1073 * einfo.adb (Write_Field19_Name): Correct the
1074 string name of attribute Default_Aspect_Value.
1075
1076 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1077
1078 * sem_type.adb (Interface_Present_In_Ancestor): The progenitor
1079 in a type declaration may be an interface subtype.
1080
1081 2013-10-10 Robert Dewar <dewar@adacore.com>
1082
1083 * sinfo.ads (Do_Range_Check): Add special note on handling of
1084 range checks for Succ and Pred.
1085
1086 2013-10-10 Robert Dewar <dewar@adacore.com>
1087
1088 * erroutc.adb (Output_Msg_Text): Remove VMS special handling.
1089
1090 2013-10-10 Robert Dewar <dewar@adacore.com>
1091
1092 * a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
1093 (Is_Mark): New function.
1094 (Is_Other_Format): New function.
1095 (Is_Punctuation_Connector): New function.
1096 (Is_Space): New function.
1097
1098 2013-10-10 Robert Dewar <dewar@adacore.com>
1099
1100 * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
1101 choice circuit. Was not quite right in some cases, which showed
1102 up in ACATS test B43201C.
1103 * sem_attr.adb (Address_Checks): Make sure name is set right
1104 for some messages issued.
1105 * mlib-prj.adb: Minor code reorganization.
1106 * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
1107 * exp_ch9.adb: Minor reformatting.
1108
1109 2013-10-10 Tristan Gingold <gingold@adacore.com>
1110
1111 * lib-writ.adb (Write_Unit_Information): Adjust previous patch.
1112
1113 2013-10-10 Robert Dewar <dewar@adacore.com>
1114
1115 * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
1116 statement.
1117 * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
1118 function.
1119
1120 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1121
1122 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
1123 for the case of a dispatching trigger: there is no need to
1124 duplicate the code or create a subprogram to encapsulate the
1125 triggering statements. This allows exit statements in the
1126 triggering statements, that refer to enclosing loops.
1127
1128 2013-10-10 Robert Dewar <dewar@adacore.com>
1129
1130 * freeze.adb: Minor reformatting.
1131 * sem_ch13.adb (Freeze_Entity_Checks): New procedure
1132 (Analyze_Freeze_Entity): Call Freeze_Entity_Checks
1133 (Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
1134 * sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
1135 * sprint.ads: Add syntax for freeze generic entity node.
1136
1137 2013-10-10 Robert Dewar <dewar@adacore.com>
1138
1139 * einfo.adb, einfo.ads: Minor comment updates.
1140
1141 2013-10-10 Robert Dewar <dewar@adacore.com>
1142
1143 * lib-writ.adb (Write_Unit_Information): Fatal error if linker
1144 options are detected in a predefined generic unit.
1145
1146 2013-10-10 Thomas Quinot <quinot@adacore.com>
1147
1148 * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
1149 a dummy placeholder value.
1150 (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
1151 * thread.c: Adjust #if test accordingly.
1152
1153 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1154
1155 * exp_ch6.adb (Consequence_Error): Generate an
1156 implicit if statement.
1157 (Expand_Contract_Cases): Generate an implicit if statement.
1158 (Process_Contract_Cases): Do not expand Contract_Cases when no code
1159 is being generated.
1160
1161 2013-10-10 Robert Dewar <dewar@adacore.com>
1162
1163 * sem_attr.adb (Address_Checks): New procedure.
1164
1165 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1166
1167 * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
1168 semantic actions at the proper point for entities that previously
1169 had no explicit freeze point.
1170 * freeze.adb (Freeze_Generic_Entities): generate new nodes to
1171 indicate the point at which semantic checks can be performed on
1172 entities declared in generic packages.
1173 * sem_ch13.ads, sem_ch13.adb: New procedure
1174 Analyze_Freeze_Generic_Entity.
1175 * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
1176 * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
1177 * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
1178 * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
1179 * gcc-interface/Make-lang.in: Update dependencies.
1180
1181 2013-10-10 Robert Dewar <dewar@adacore.com>
1182
1183 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
1184 cases.
1185
1186 2013-10-10 Robert Dewar <dewar@adacore.com>
1187
1188 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
1189 (Analyze_Protected_Body): Aspects are illegal.
1190
1191 2013-10-10 Robert Dewar <dewar@adacore.com>
1192
1193 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
1194 * sem_case.adb (Check_Choices): Fix bad listing of missing
1195 values from predicated subtype case (Check_Choices): List
1196 duplicated values.
1197 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
1198 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
1199 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
1200 * ug_words: Add entries for -gnatw.d and -gnatw.D
1201 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
1202 * lib-writ.ads: Documentation fixes
1203
1204 2013-10-10 Robert Dewar <dewar@adacore.com>
1205
1206 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
1207 (Is_Other_Format): New name for Is_Other.
1208 (Is_Punctuation_Connector): New name for Is_Punctuation
1209
1210 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1211
1212 * aspects.adb: Add entries in table Canonical_Aspects for aspects
1213 Refined_Depends and Refined_Global.
1214 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
1215 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
1216 aspects Refined_Depends and Refined_Global.
1217 * einfo.adb (Contract): Subprogram bodies are now valid owners
1218 of contracts.
1219 (Set_Contract): Subprogram bodies are now valid
1220 owners of contracts.
1221 (Write_Field24_Name): Output the contract
1222 attribute for subprogram bodies.
1223 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
1224 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
1225 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
1226 not require any special processing by the parser.
1227 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
1228 (Analyze_Declarations): Code reformatting. Analyze the contract
1229 of a subprogram body at the end of the declarative region.
1230 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1231 Subprogram bodies can now have contracts. Use
1232 Expand_Subprogram_Contract to handle the various contract
1233 assertions.
1234 (Analyze_Subprogram_Body_Contract): New null routine.
1235 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
1236 contracts. Use Expand_Subprogram_Contract to handle the various
1237 contract assertions.
1238 (Analyze_Subprogram_Contract): Add local
1239 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
1240 the pragma name in Nam.
1241 (Process_PPCs): Removed.
1242 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
1243 (Analyze_Subprogram_Contract): Update the comment on usage.
1244 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
1245 implementations for aspects Refined_Depends and Refined_Global.
1246 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
1247 Refined_Global do not need to be checked at the freeze point.
1248 * sem_prag.adb: Add entries in table Sig_Flags
1249 for pragmas Refined_Depends and Refined_Global.
1250 (Analyze_Contract_Cases_In_Decl_Part): Add local
1251 variable Restore. Use Restore to pop the scope.
1252 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
1253 Restore to pop the scope.
1254 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
1255 to pop the scope.
1256 (Analyze_PPC_In_Decl_Part): Renamed to
1257 Analyze_Pre_Post_Condition_In_Decl_Part.
1258 (Analyze_Pragma):
1259 Add null implementations for pragmas Refined_Depends and
1260 Refined_Global. Refined_Pre and Refined_Post are now
1261 handled by routine Analyze_Refined_Pre_Post_Condition
1262 exclusively.
1263 (Analyze_Refined_Depends_In_Decl_Part): New
1264 null routine.
1265 (Analyze_Refined_Global_In_Decl_Part):
1266 New null routine.
1267 (Analyze_Refined_Pre_Post):
1268 Renamed to Analyze_Refined_Pre_Post_Condition.
1269 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
1270 expression.
1271 (Check_Precondition_Postcondition): Update the call
1272 to Analyze_PPC_In_Decl_Part.
1273 * sem_prag.ads: Add entries in table
1274 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
1275 and Refined_Global.
1276 (Analyze_PPC_In_Decl_Part): Renamed
1277 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
1278 comment on usage.
1279 (Analyze_Refined_Depends_In_Decl_Part): New routine.
1280 (Analyze_Refined_Global_In_Decl_Part): New routine.
1281 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
1282 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
1283 and update all occurrences. Subprogram body contracts can now
1284 contain pragmas Refined_Depends and Refined_Global.
1285 * sem_util.ads (Add_Contract_Item): Rename formal Item to
1286 Prag. Update the comment on usage.
1287 * sinfo.ads: Update the comment on structure and usage of
1288 N_Contract.
1289 * snames.ads-tmpl: Add new predefined names for Refined_Depends
1290 and Refined_Global. Add entries in table Pragma_Id for
1291 Refined_Depends and Refined_Global.
1292
1293 2013-10-10 Robert Dewar <dewar@adacore.com>
1294
1295 * types.ads: Minor reformatting.
1296
1297 2013-10-10 Thomas Quinot <quinot@adacore.com>
1298
1299 * s-taprop-posix.adb: Add missing comment.
1300
1301 2013-10-10 Robert Dewar <dewar@adacore.com>
1302
1303 * freeze.adb (Freeze_Record_Type): Move choice checking to
1304 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
1305 are properly frozen
1306 * sem_case.adb (Check_Choices): Remove misguided attempt to
1307 freeze choices (this is now done in Freeze_Record_Type where
1308 it belongs).
1309 (Check_Choices): Remove some analyze/resolve calls
1310 that are redundant since they are done in Analyze_Choices.
1311 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
1312 checking for choices in variant records here (moved here from
1313 Freeze.Freeze_Record_Type)
1314
1315 2013-10-10 Thomas Quinot <quinot@adacore.com>
1316
1317 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
1318 possibly using a dummy placeholder value.
1319 (Compute_Deadline): For the case of an
1320 Absolute_Calendar deadline, if the target uses another clock
1321 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
1322 different epoch.
1323
1324 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1325
1326 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
1327 qualified reference to a generic child unit within itself,
1328 in an instantiation.
1329
1330 2013-10-10 Pascal Obry <obry@adacore.com>
1331
1332 * prj-conf.adb: Minor typo fixes in comment.
1333
1334 2013-10-10 Thomas Quinot <quinot@adacore.com>
1335
1336 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
1337 factors common code between Timed_Sleep and Timed_Delay.
1338
1339 2013-10-10 Robert Dewar <dewar@adacore.com>
1340
1341 * freeze.adb (Freeze_Record_Type): Don't replace others if
1342 expander inactive. This avoids clobbering the ASIS tree in
1343 -gnatct mode.
1344
1345 2013-10-10 Robert Dewar <dewar@adacore.com>
1346
1347 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
1348 fixed-point case in preanalysis mode (error will be caught during
1349 full analysis).
1350
1351 2013-10-10 Robert Dewar <dewar@adacore.com>
1352
1353 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
1354 assertion identifiers for pragma Assertion_Policy.
1355 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
1356 * sem_ch13.adb: Minor reformatting.
1357
1358 2013-10-10 Pascal Obry <obry@adacore.com>
1359
1360 * prj-conf.adb: Code refactoring.
1361
1362 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1363
1364 * einfo.adb: Remove Integrity_Level from the node usage list.
1365 (Has_Option): Update the implementation to match
1366 the new terminology.
1367 (Has_Property): Renamed to Has_Option.
1368 (Integrity_Level): Removed.
1369 (Is_External_State): New routine.
1370 (Is_Input_Only_State): Use Has_Option to determine whether a state
1371 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
1372 (Is_Output_Only_State): Use Has_Option to determine whether
1373 a state is Output_Only.
1374 (Is_Output_State): Renamed to
1375 Is_Output_Only_State.
1376 (Is_Volatile_State): Use Has_Option to determine whether a state is
1377 volatile.
1378 (Set_Integrity_Level): Removed.
1379 (Write_Field8): Remove the entry for Integrity_Level.
1380 * einfo.ads: Remove Integrity_Level along with its documentation
1381 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
1382 Rename Is_Output_State to Is_Output_Only_State. Update the
1383 documentation of Is_Volatile_State. Update the node structure of
1384 E_Abstract_Entity.
1385 (Integrity_Level): Removed along with pragma Inline.
1386 (Is_External_State): New routine.
1387 (Is_Input_State): Renamed to Is_Input_Only_State.
1388 (Is_Output_State): Renamed to Is_Output_Only_State.
1389 (Set_Integrity_Level): Removed along with pragma Inline.
1390 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
1391 global items and abstract state modes. Update the implementation
1392 of pragma Abstract_State to reflect the new rules and terminology.
1393 * snames.ads-tmpl: Remove the predefined name for Integrity
1394 level. Add new predefined names for Input_Only, Non_Volatile,
1395 Output_Only and Part_Of.
1396
1397 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1398
1399 * lib-xref.adb (Generate_Reference): Do not generate a reference
1400 within a _postcondition procedure: a proper source reference has
1401 already been generated when pre- analyzing the original aspect
1402 specification, and the use of a formal in a pre/postcondition
1403 should not count as a proper use in a subprogram body.
1404
1405 2013-10-10 Robert Dewar <dewar@adacore.com>
1406
1407 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
1408 case
1409
1410 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1411
1412 * aspects.adb: Add an entry for Aspect_Refined_Post in table
1413 Canonical_Aspect.
1414 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
1415 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
1416 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
1417 table Aspect_On_Body_Or_Stub_OK.
1418 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
1419 that do not require special processing by the parser.
1420 * sem_attr.adb (Analyze_Attribute): Add special analysis for
1421 attributes 'Old and 'Result when code generation is disabled and
1422 they appear in aspect/pragma Refined_Post.
1423 (In_Refined_Post): New routine.
1424 * sem_ch6.adb (Analyze_Expression_Function): Move various
1425 aspects and/or pragmas that apply to an expression function to the
1426 corresponding spec or body.
1427 (Collect_Body_Postconditions): New routine.
1428 (Process_PPCs): Use routine Collect_Body_Postconditions
1429 to gather all postcondition pragmas.
1430 * sem_ch10.adb (Analyze_Proper_Body): Use routine
1431 Relocate_Pragmas_To_Body to move all source pragmas that follow
1432 a body stub to the proper body.
1433 (Move_Stub_Pragmas_To_Body): Removed.
1434 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1435 for aspect Refined_Post.
1436 (Check_Aspect_At_Freeze_Point): Aspect
1437 Refined_Post does not need delayed processing at the freeze point.
1438 * sem_prag.adb: Add an entry for pragma Refined_Post in
1439 table Sig_Flags.
1440 (Analyze_Pragma): Add processing for pragma
1441 Refined_Post. Update the processing of pragma Refined_Pre
1442 to use common routine Analyze_Refined_Pre_Post.
1443 (Analyze_Refined_Pre_Post): New routine.
1444 (Relocate_Pragmas_To_Body): New routine.
1445 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
1446 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
1447 table Pragma_On_Body_Or_Stub_OK.
1448 (Relocate_Pragmas_To_Body): New routine.
1449 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
1450 new Pragma_Id for Refined_Post.
1451
1452 2013-10-10 Robert Dewar <dewar@adacore.com>
1453
1454 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
1455 last choice to others is moved to Freeze_Record_Type.
1456 * freeze.adb (Freeze_Record_Type): Expand last variant to others
1457 if necessary (moved here from Expand_N_Variant_Part
1458
1459 2013-10-10 Robert Dewar <dewar@adacore.com>
1460
1461 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
1462 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
1463 s-atocou-builtin.adb: Minor reformatting.
1464
1465 2013-10-10 Thomas Quinot <quinot@adacore.com>
1466
1467 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
1468 constant needs to be output to s-oscons.h, as it is tested
1469 by init.c.
1470
1471 2013-10-10 Robert Dewar <dewar@adacore.com>
1472
1473 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
1474 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
1475 flag to avoid expanding choices when not necessary.
1476 * exp_util.adb: Minor reformatting
1477 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
1478 * sem_aggr.adb: Minor reformatting
1479 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
1480 Checking of choices.
1481 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
1482 Analyze_Choices.
1483 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
1484 and Check_Choices
1485 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
1486 and Check_Choices
1487 * sem_util.adb: Minor reformatting
1488 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
1489
1490 2013-10-10 Vincent Celier <celier@adacore.com>
1491
1492 * mlib-prj.adb (Build_Library): Do not issue link dynamic
1493 libraries with an Rpath, if switch -R was used.
1494
1495 2013-10-10 Tristan Gingold <gingold@adacore.com>
1496
1497 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
1498 Image_Index_Table_32): Remove as not used.
1499 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
1500 remove duplicated code.
1501
1502 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1503
1504 * sem_prag.adb (Analyze_Pragma): Provide a
1505 more precise error message when pragma Refined_Pre applies to
1506 an expression function that is not a completion.
1507
1508 2013-10-10 Thomas Quinot <quinot@adacore.com>
1509
1510 * sem_attr.adb (Analyse_Attribute, case
1511 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
1512 reference for a generic type is permitted in GNAT runtime mode.
1513 * a-sequio.adb (Read, Write): Use the endianness of the actual
1514 type to encode length information written to the file.
1515
1516 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1517
1518 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
1519 Ada2012 mode, assume that a legal aspect name following "with"
1520 keyword is an older gnat switch and not a misplaced with_clause.
1521
1522 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1523
1524 * aspects.adb: Add an entry for Aspect_Refined_Pre in
1525 table Canonical_Aspect.
1526 (Aspects_On_Body_OK): Renamed to
1527 Aspects_On_Body_Or_Stub_OK.
1528 (Aspects_On_Body_Or_Stub_OK):
1529 Update the query in table Aspect_On_Body_OK.
1530 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
1531 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
1532 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
1533 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
1534 that apply to body stubs.
1535 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
1536 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
1537 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
1538 that do not require special processing by the parser.
1539 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
1540 analysis of aspect specifications that apply to a body stub
1541 until the proper body is analyzed.
1542 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1543 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
1544 (Analyze_Proper_Body): Relocate all pragmas that apply
1545 to a subprogram body stub to the declarations of the proper
1546 body. Analyze the aspect specifications of the stub when the
1547 proper body is not present.
1548 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
1549 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
1550 (Move_Stub_Pragmas_To_Body): New routine.
1551 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1552 for aspect Refined_Pre.
1553 (Check_Aspect_At_Freeze_Point): Aspect
1554 Refined_Pre does not need delayed processing at the freeze point.
1555 * sem_prag.adb: Remove with and use clause for Snames. Add
1556 an entry for Pragma_Refined_Pre in table Sig_Flags.
1557 (Analyze_Pragma): Add processing for pragma Refined_Pre.
1558 * sem_prag.ads: Add with and use clause for Snames. Add table
1559 Pragma_On_Stub_OK.
1560 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
1561 (Set_Corresponding_Spec_Of_Stub): New routine.
1562 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
1563 along with comment on usage and occurrences in nodes.
1564 (Corresponding_Spec_Of_Stub): New routine along with pragma
1565 Inline.
1566 (Set_Corresponding_Spec_Of_Stub): New routine along
1567 with pragma Inline.
1568 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
1569 new Pragma_Id for Refined_Pre.
1570
1571 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1572
1573 * sem_ch12.adb (Analyze_Package_Instantiation,
1574 Analyze_Subprogram_Instantiation): Improve error message when
1575 name in instantiation does not designate a generic unit of the
1576 right kind.
1577
1578 2013-10-10 Robert Dewar <dewar@adacore.com>
1579
1580 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
1581 predicated subtype which appears in Discrete_Choices list.
1582 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
1583 predicated subtype which appears in Discrete_Choices list of
1584 case statement alternative.
1585 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
1586 procedure.
1587 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
1588 expand out Discrete_Choices that are names of subtypes with
1589 static predicates. This is now done in the analyzer so that the
1590 -gnatct tree is properly formed for ASIS.
1591 * sem_case.ads (Generic_Choices_Processing): Does not apply
1592 to aggregates any more, so change doc accordingly, and remove
1593 unneeded Get_Choices argument.
1594 * sem_ch3.adb (Analyze_Variant_Part): Remove no
1595 longer used Get_Choices argument in instantiation of
1596 Generic_Choices_Processing.
1597 * sem_ch4.adb (Analyze_Case_Expression): Remove no
1598 longer used Get_Choices argument in instantiation of
1599 Generic_Choices_Processing.
1600 * sem_ch5.adb (Analyze_Case_Statement): Remove no
1601 longer used Get_Choices argument in instantiation of
1602 Generic_Choices_Processing.
1603 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
1604 document that choices that are names of statically predicated
1605 subtypes are expanded in the code generation tree passed to the
1606 back end, but not in the ASIS tree generated for -gnatct.
1607
1608 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1609
1610 * sem_ch7.adb: Revert previous change.
1611
1612 2013-10-10 Gary Dismukes <dismukes@adacore.com>
1613
1614 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
1615 the Storage_Pool aspect is specified by an aspect clause and a
1616 renaming is used to capture the evaluation of the pool name,
1617 insert the renaming in front of the aspect's associated entity
1618 declaration rather than in front of the corresponding attribute
1619 definition (which hasn't been appended to the declaration
1620 list yet).
1621
1622 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1623
1624 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
1625 of the interface operation is obtained from the ultimate alias
1626 of the interface primitive parameter, because that may be in
1627 fact an implicit inherited operation whose signature involves
1628 the type extension and not the desired interface.
1629
1630 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1631
1632 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
1633 recognize an aspect specification with a misspelled name if it
1634 is followed by a a comma or semicolon.
1635
1636 2013-10-10 Vadim Godunko <godunko@adacore.com>
1637
1638 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
1639 Fix copyright notice.
1640
1641 2013-10-10 Yannick Moy <moy@adacore.com>
1642
1643 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
1644 enclosing subprogram for precondition/postcondition/contract cases.
1645
1646 2013-10-10 Robert Dewar <dewar@adacore.com>
1647
1648 * gnat_rm.texi: Minor fix.
1649
1650 2013-10-10 Robert Dewar <dewar@adacore.com>
1651
1652 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1653 Address): Remove the Comes_From_Source test for the overlap
1654 warning.
1655
1656 2013-10-10 Robert Dewar <dewar@adacore.com>
1657
1658 * sem_util.adb: Minor code reorganization (use Nkind_In).
1659 * sem_warn.adb: Minor code reorganization (optimization in
1660 Check_Unset_Reference).
1661 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
1662
1663 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1664
1665 * sem_ch7.adb (Install_Parent_Private_Declarations): When
1666 instantiating a child unit, do not install private declaration of
1667 a non-generic ancestor of the generic that is also an ancestor
1668 of the current unit: its private part will be installed when
1669 private part of ancestor itself is analyzed.
1670
1671 2013-10-10 Thomas Quinot <quinot@adacore.com>
1672
1673 * freeze.adb (Check_Component_Storage_Order): Retrieve component
1674 aliased status from type entities directly instead of going back
1675 to original component definition.
1676 * sem_ch7.adb: Minor reformatting.
1677
1678 2013-10-10 Robert Dewar <dewar@adacore.com>
1679
1680 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
1681 attribute, consider it to be set in source, because of aliasing
1682 considerations.
1683 (Analyze_Attribute_Definition_Clause): For the
1684 purpose of warning on overlays, take into account the aspect case.
1685
1686 2013-10-10 Robert Dewar <dewar@adacore.com>
1687
1688 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1689 a-cofove.ads: Minor reformatting.
1690
1691 2013-10-10 Arnaud Charlet <charlet@adacore.com>
1692
1693 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
1694
1695 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1696
1697 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
1698 generated variable used as a target of the expression needs
1699 no initialization.
1700
1701 2013-10-10 Jose Ruiz <ruiz@adacore.com>
1702
1703 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
1704 related to No_Dynamic_Attachment which was wrong. Protected types
1705 with interrupt handlers (when not using a restricted profile)
1706 are always treated as protected types with entries, regardless
1707 of the No_Dynamic_Attachment restriction.
1708 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
1709 using the result of Corresponding_Runtime_Package.
1710 (Install_Private_Data_Declarations): When having
1711 static handlers and a non restricted profile, we use the
1712 type Static_Interrupt_Protection always, so we removed an
1713 extra wrong condition looking at the No_Dynamic_Attachment
1714 restriction. Simplify the code using the result of
1715 Corresponding_Runtime_Package.
1716 (Make_Initialize_Protection): Simplify the code using
1717 the result of Corresponding_Runtime_Package.
1718 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
1719 restriction has nothing to do with static handlers. Remove the extra
1720 erroneous condition that was creating the wrong data type.
1721
1722 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1723
1724 * sem_util.adb (Is_Object_Reference): Attribute
1725 'Old produces an object reference.
1726 * gnat_rm.texi: Define accessibility level of
1727 X'Update(...) result.
1728
1729 2013-10-10 Yannick Moy <moy@adacore.com>
1730
1731 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1732 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
1733
1734 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1735
1736 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
1737 conditions that apply to a subprogram body, preserve the placement
1738 and order of the generated pragmas, which must appear before
1739 other declarations in the body.
1740
1741 2013-10-10 Bob Duff <duff@adacore.com>
1742
1743 * gnat_ugn.texi: Add gnat2xml doc.
1744
1745 2013-10-10 Doug Rupp <rupp@adacore.com>
1746
1747 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
1748
1749 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1750
1751 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
1752 on a variable need not have a convention specified, as long as
1753 the implicit convention of the object, obtained from its type,
1754 is Ada or Ada-related.
1755
1756 2013-10-10 Robert Dewar <dewar@adacore.com>
1757
1758 * cstand.adb (Standard_Unsigned_64): New internal type.
1759 * gnat_rm.texi: Update documentation on To_Address.
1760 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
1761 problem with out of range static values given as literals or
1762 named numbers.
1763 * stand.ads (Standard_Unsigned_64): New internal type.
1764 * stand.adb: Minor reformatting.
1765
1766 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1767
1768 * sem_ch4.adb (Analyze_Selected_Component,
1769 Has_Mode_Conformant_Spec): If selected component may be an
1770 indexing of a parameterless call to a protected function, and
1771 expansion is disabled, this is a valid candidate interpretation.
1772
1773 2013-10-10 Arnaud Charlet <charlet@adacore.com>
1774
1775 * gnat_ugn.texi: Minor editing.
1776
1777 2013-10-10 Robert Dewar <dewar@adacore.com>
1778
1779 * gnatlink.adb: Minor reformatting.
1780
1781 2013-10-10 Yannick Moy <moy@adacore.com>
1782
1783 * debug.adb: Free flag d.E and change doc for flag d.K.
1784
1785 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1786
1787 * sem_prag.adb (Check_Precondition_Postcondition): If the
1788 pragma comes from an aspect spec, and the subprogram is a
1789 library unit, treat as a ppc in a declarative part in ASIS mode,
1790 so that expression in aspect is properly analyzed. In this case
1791 there is no later point at which the aspect specification would
1792 be examined.
1793
1794 2013-10-10 Bob Duff <duff@adacore.com>
1795
1796 * opt.ads: Minor comment fix.
1797
1798 2013-10-10 Vadim Godunko <godunko@adacore.com>
1799
1800 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
1801 * s-atocou.ads: Add procedure to initialize counter.
1802 * s-atocou.adb: Likewise.
1803 * s-atocou-builtin.adb: Likewise.
1804 * s-atocou-x86.adb: Likewise.
1805 * gcc-interface/Makefile.in: Select special version of
1806 Indefinite_Holders package on platforms where atomic built-ins
1807 are supported. Update tools target pairs for PikeOS.
1808
1809 2013-10-10 Robert Dewar <dewar@adacore.com>
1810
1811 * sem_ch3.adb: Minor reformatting.
1812
1813 2013-10-10 Robert Dewar <dewar@adacore.com>
1814
1815 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
1816 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
1817 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
1818 alignment.
1819 (Load_File): Ditto.
1820 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
1821 line) version.
1822 * types.ads (Source_Align): New definition.
1823 (Source_Buffer): Document new alignment requirement.
1824
1825 2013-10-10 Robert Dewar <dewar@adacore.com>
1826
1827 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
1828 this for types.
1829
1830 2013-10-10 Robert Dewar <dewar@adacore.com>
1831
1832 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
1833
1834 2013-10-10 Vadim Godunko <godunko@adacore.com>
1835
1836 * s-stopoo.ads (Root_Storage_Pool): Add pragma
1837 Preelaborable_Initialization.
1838
1839 2013-09-25 Tom Tromey <tromey@redhat.com>
1840
1841 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
1842
1843 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1844
1845 PR ada/58264
1846 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
1847 variable and use it throughout.
1848 <Attr_Length>: Note whether the prefix is the dereference of a pointer
1849 to unconstrained array and, in this case, capture the result for both
1850 Attr_First and Attr_Last.
1851
1852 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1853
1854 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
1855
1856 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1857
1858 * gcc-interface/trans.c (gigi): Remove dead code.
1859
1860 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1861
1862 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
1863 return variables for subprograms using the CICO mechanism.
1864
1865 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
1866
1867 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
1868 not $target_cpu.
1869
1870 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
1871 Olivier Hainque <hainque@adacore.com>
1872
1873 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
1874 target_os and their host_ counterparts. Remove host_canonical and
1875 target_cpu_default, unused. Remove local ad-hoc computations of
1876 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
1877 uses of the now imported family, hence back to filters against
1878 canonical values. Remove filters on e500 for target_cpu, expected to
1879 be canonicalized into powerpc. Invert the logic filtering on 64bit
1880 sparc for VxWorks. Simplify the filtering logic for bareboard tools
1881 target pairs, now using straight elf/eabi filters on the target_os
1882 part only.
1883
1884 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1885
1886 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
1887 the return type is itself an access to function, recurse to emit
1888 another anonymous type.
1889 * gcc-interface/Make-lang.in: Update dependencies.
1890
1891 2013-09-10 Robert Dewar <dewar@adacore.com>
1892
1893 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
1894 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
1895 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
1896 * inline.ads (Warnings): New component in Pending_Body_Info.
1897 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
1898 at instantiation point.
1899 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
1900 New procedure Remove special handling of Warning_Doc_Switch,
1901 cleaner to handle the VMS case in errout, than to introduce
1902 undocumented oddities here.
1903 * warnsw.ads (Warning_Record) : New type.
1904 (Save_Warnings): New function.
1905 (Restore_Warnings): New procedure.
1906
1907 2013-09-10 Robert Dewar <dewar@adacore.com>
1908
1909 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
1910
1911 2013-09-10 Robert Dewar <dewar@adacore.com>
1912
1913 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
1914 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
1915 * inline.ads: Save/Restore Ada_Version_Pragma.
1916 * opt.adb: Save/Restore Ada_Version_Pragma.
1917 * opt.ads (Ada_Version_Pragma): New variable.
1918 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
1919 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
1920 * prj.adb: Initialize Ada_Version_Pragma.
1921 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
1922 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
1923 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
1924 * switch-c.adb: Initialize Ada_Version_Pragma.
1925 * sem_ch12.adb: Minor reformatting.
1926
1927 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1928
1929 * sem_ch3.adb (Process_Subtype): Discard constraint on access
1930 to class-wide type. Such constraints are not supported and are
1931 considered a language pathology.
1932
1933 2013-09-10 Robert Dewar <dewar@adacore.com>
1934
1935 * gnatbind.adb: Correct starting date in --version string.
1936 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
1937 and --version.
1938 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
1939 and --version.
1940 * gnatlink.adb: Correct starting date in --version string.
1941 * gnatls.adb: Correct starting date in --version string.
1942 * make.adb: Correct starting date in --version string.
1943
1944 2013-09-10 Robert Dewar <dewar@adacore.com>
1945
1946 * switch-c.adb: Minor reformatting.
1947 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
1948 * sinfo.ads: Add section on ASIS mode (documentation only).
1949
1950 2013-09-10 Robert Dewar <dewar@adacore.com>
1951
1952 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
1953 REASON parameter in compiler units (bootstrap issues).
1954
1955 2013-09-10 Robert Dewar <dewar@adacore.com>
1956
1957 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
1958 -gnateE specified for a target that does not support it.
1959
1960 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1961
1962 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
1963 a subprogram body without previous spec.
1964
1965 2013-09-10 Gary Dismukes <dismukes@adacore.com>
1966
1967 * sem_ch4.adb: Minor typo fixes.
1968
1969 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1970
1971 * aspects.adb (Aspects_On_Body_OK): New routine.
1972 * aspects.ads: Modify type Aspect_Expression to include
1973 the Optional_XXX variants. Update the contents of
1974 table Aspect_Argument. Add table Aspect_On_Body_OK.
1975 (Aspects_On_Body_OK): New routine.
1976 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
1977 names and expressions when parsing an aspect.
1978 * sem_ch6.adb: Add with and use clause for Aspects.
1979 (Analyze_Subprogram_Body_Helper): Do not emit an error when
1980 analyzing a body with aspects that can be applied simultaneously
1981 to both spec and body.
1982 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
1983 corresponding pragma of an aspect that applies to a subprogram
1984 body in the declarative part.
1985 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
1986 list.
1987
1988 2013-09-10 Robert Dewar <dewar@adacore.com>
1989
1990 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
1991 * gnat_ugn.texi: Add documentation for -gnatRm.
1992 * usage.adb: Minor reorganization (put style entries in proper
1993 order) Document -gnatRm switch.
1994 * sinfo.ads: Minor comment fix.
1995
1996 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
1997
1998 * tree_io.ads: Update ASIS_Version_Number.
1999
2000 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2001
2002 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
2003 designated type can appear in a parameterless call.
2004 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
2005 in the case of an indirect call through an access function that
2006 returns an array type.
2007 (Analyze_One_Call): Handle properly legal parameterless calls
2008 whose result is indexed, in constructs of the for F.all (I)
2009 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
2010 to subprogram types.
2011 * sem_res.adb (Resolve_Call): If the call is indirect, there is
2012 no entity to set on the name in the call.
2013
2014 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2015
2016 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
2017 table for package body and body stubs.
2018 (Move_Or_Merge_Aspects): New routine.
2019 (Remove_Aspects): New routine.
2020 * aspects.ads (Move_Aspects): Update comment on usage.
2021 (Move_Or_Merge_Aspects): New routine.
2022 (Remove_Aspects): New routine.
2023 * par-ch3.adb: Update the grammar of private_type_declaration,
2024 private_extension_declaration, object_renaming_declaration,
2025 and exception_renaming_declaration.
2026 (P_Subprogram): Parse the
2027 aspect specifications that apply to a body stub.
2028 * par-ch6.adb: Update the grammar of subprogram_body_stub and
2029 generic_instantiation.
2030 * par-ch7.adb: Update the grammar of package_declaration,
2031 package_specification, package_body, package_renaming_declaration,
2032 package_body_stub.
2033 (P_Package): Parse the aspect specifications
2034 that apply to a body, a body stub and package renaming.
2035 * par-ch9.adb: Update the grammar of entry_declaration,
2036 protected_body, protected_body_stub, task_body,
2037 and task_body_stub.
2038 (P_Protected): Add local variable
2039 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
2040 specifications that apply to a protected body and a protected
2041 body stub.
2042 (P_Task): Add local variable Aspect_Sloc. Add local
2043 constant Dummy_Node. Parse the aspect specifications that apply
2044 to a task body and a task body stub.
2045 * par-ch12.adb: Update the grammar of
2046 generic_renaming_declaration.
2047 (P_Generic): Parse the aspect
2048 specifications that apply to a generic renaming.
2049 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
2050 an error when analyzing aspects that apply to a body stub. Such
2051 aspects are relocated to the proper body.
2052 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
2053 specifications that apply to a body.
2054 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
2055 aspects not being supported on protected bodies. Remove the
2056 aspect specifications. (Analyze_Single_Protected_Declaration):
2057 Analyze the aspects that apply to a single protected declaration.
2058 (Analyze_Task_Body): Warn about user-defined aspects not being
2059 supported on task bodies. Remove the aspect specifications.
2060 * sem_ch10.adb: Add with and use clause for Aspects.
2061 (Analyze_Package_Body_Stub): Propagate the aspect specifications
2062 from the stub to the proper body.
2063 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
2064 corresponding pragma of an aspect that applies to a body in the
2065 declarations of the body.
2066 * sinfo.ads: Update the gramma of expression_function,
2067 private_type_declaration, private_extension_declaration,
2068 object_renaming_declaration, exception_renaming_declaration,
2069 package_renaming_declaration, subprogram_renaming_declaration,
2070 generic_renaming_declaration, entry_declaration,
2071 subprogram_body_stub, package_body_stub, task_body_stub,
2072 generic_subprogram_declaration.
2073
2074 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2075
2076 * sem_prag.adb (Analyze_Pragma): Add processing
2077 for aspect/pragma SPARK_Mode when it applies to a [library-level]
2078 subprogram or package [body].
2079
2080 2013-09-10 Robert Dewar <dewar@adacore.com>
2081
2082 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
2083 given together.
2084 * switch-c.adb (Scan_Front_End_Switches): Give error if both
2085 -gnatR and -gnatc given.
2086
2087 2013-09-10 Robert Dewar <dewar@adacore.com>
2088
2089 * g-table.ads, g-table.adb (For_Each): New generic procedure
2090 (Sort_Table): New generic procedure.
2091
2092 2013-09-10 Thomas Quinot <quinot@adacore.com>
2093
2094 * adaint.c (__gnat_is_executable_file_attr): Should be true
2095 for an executable regular file only only (not for a directory
2096 that has the executable permission).
2097
2098 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2099
2100 * sem_res.adb: Further work on operator calls in ASIS.
2101
2102 2013-09-10 Yannick Moy <moy@adacore.com>
2103
2104 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
2105 update.
2106
2107 2013-09-10 Thomas Quinot <quinot@adacore.com>
2108
2109 * aspects.ads, sem_ch13.adb: Minor reformatting.
2110 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
2111 that this routine is shared between OS_Lib and Sockets.
2112
2113 2013-09-10 Robert Dewar <dewar@adacore.com>
2114
2115 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
2116 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
2117 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
2118 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
2119 case Check): Ditto (Check_Applicable_Policy): Handle
2120 Statement_Assertion case Throughout, set and check the Is_Checked
2121 flag as appropriate.
2122 * sem_prag.ads (Check_Kind): Moved to body.
2123 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
2124
2125 2013-09-10 Robert Dewar <dewar@adacore.com>
2126
2127 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
2128 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
2129 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
2130 (use Get_Attribute_Representation_Clause).
2131 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
2132 (May_Inherit_Delayed_Rep_Aspects): New flag
2133 * freeze.adb: Minor reformatting
2134 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
2135 handling of delayed evaluation, including optimizing some cases
2136 and avoiding delays.
2137 (Analyze_Aspects_At_Freeze_Point): Now
2138 handled inheriting delayed rep aspects for type derivation case.
2139 (Inherit_Delayed_Rep_Aspects): New procedure
2140 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
2141 inheriting delayed rep aspects for type derivation case.
2142 * sem_ch3.adb (Build_Derived_Type): Set
2143 May_Inherit_Derived_Rep_Aspects if parent type flag
2144 Has_Delayed_Rep_Aspects is set
2145
2146 2013-09-10 Robert Dewar <dewar@adacore.com>
2147
2148 * errout.adb (Finalize): Don't delete real errors with specific
2149 warning control.
2150
2151 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2152
2153 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
2154 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
2155 Handle properly a trigger that is a call to a primitive operation
2156 of a type that implements a limited interface, if the type itself
2157 is not limited.
2158
2159 2013-09-10 Robert Dewar <dewar@adacore.com>
2160
2161 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
2162 exp_ch4.adb, sprint.adb: Minor reformatting.
2163
2164 2013-09-10 Yannick Moy <moy@adacore.com>
2165
2166 * sinfo.ads: Document splitting of pre/post in N_Contract description.
2167
2168 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2169
2170 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
2171 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
2172 add a mod operation if the result type is a binary modular type.
2173
2174 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2175
2176 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
2177 variable Context. Remove local variable Subp_Id. Start the
2178 context traversal from the current subprogram rather than the
2179 current scope. Update the scope traversal and error reporting.
2180
2181 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2182
2183 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
2184 Rewrite_Triggering_Statements, to encapsulate the statements that
2185 follow the trigger of the entry call. This procedure is needed
2186 when the trigger is a dispatching call, because the expansion
2187 requires several copies of those statements. The procedure is
2188 more efficient, and preserves non-local references when the
2189 construct is within an instance.
2190
2191 2013-09-10 Ed Schonberg <schonberg@adacore.com>
2192
2193 * sem_ch12.adb (Analyze_Package_Instantiation): If the
2194 instantiation is a compilation unit, analyze aspects before
2195 analyzing the package declaration for the instance.
2196 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
2197 corresponding node is a package instantiation, insert generated
2198 pragmas at the head of visible declarations.
2199 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
2200 do not ignore the pragma if it comes from an aspect specification
2201 in the instance, and not from the generic unit.
2202 * sprint.adb (Sprint_Node_Actual): For a package declaration that
2203 is an instantiation, print aspects after declaration.
2204
2205 2013-09-10 Robert Dewar <dewar@adacore.com>
2206
2207 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
2208
2209 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2210
2211 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
2212 case where the pragma may appear without an argument.
2213 (Analyze_Global_List): Add expanded_name to the list of constructs
2214 that denote a single item.
2215 (Collect_Global_List): Add expanded_name to the list of constructs
2216 that denote a single item.
2217
2218 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
2219
2220 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
2221 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
2222 and deallocate a heap-allocated class-wide object after it
2223 has been determined that it violates the accessibility rules.
2224 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
2225 and entry in RE_Unit_Table for RE_Free.
2226
2227 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
2228 Iain Sandoe <iain@codesourcery.com>
2229
2230 PR ada/58239
2231 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
2232 (GCC_LINK): Use CXX instead of CC.
2233 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
2234 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
2235
2236 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2237
2238 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2239 sets of derived types in ASIS mode.
2240
2241 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2242
2243 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
2244 (is_cplusplus_method): Likewise, and False with false.
2245 (components_need_strict_alignment): Likewise.
2246 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
2247 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
2248 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2249 (add_cleanup): Likewise.
2250 (Sloc_to_locus1): Likewise.
2251 (Sloc_to_locus): Likewise.
2252 (set_expr_location_from_node): Likewise.
2253 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
2254
2255 2013-08-13 Thomas Quinot <quinot@adacore.com>
2256
2257 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
2258 for the end_locus of a block if it does not come from an End_Label.
2259
2260 2013-08-13 Thomas Quinot <quinot@adacore.com>
2261
2262 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
2263 there is no End_Label, attach cleanup actions to the sloc of the HSS
2264 node instead.
2265 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
2266 of the handler itself.
2267 (add_cleanup): Clear column information in sloc of cleanup actions.
2268 (Sloc_to_locus1): New static function.
2269 (Sloc_to_locus): Call it.
2270 (set_expr_location_from_node1): New static function.
2271 (set_expr_location_from_node): Call it.
2272
2273 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2274
2275 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
2276 expressions for misaligned actual parameters.
2277
2278 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2279
2280 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
2281 values outside of the range of the type.
2282
2283 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
2284
2285 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
2286 to the original type before converting to the result type.
2287 (build_atomic_store): First do a conversion to the original type before
2288 view-converting to the effective type, but deal with a padded type
2289 specially.
2290
2291 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
2292
2293 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
2294 compiler build and use standard library variables.
2295 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
2296 (gnatmake-re): Do not depend on targext.o.
2297 (gnatlink-re): Do not depend on link.o and targext.o.
2298 (../../gnatmake$(exeext): Likewise.
2299 (../../gnatlink$(exeext): Likewise.
2300
2301 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2302
2303 * gcc-interface/gigi.h: Fix typos.
2304 * gcc-interface/trans.c: Likewise.
2305 * gcc-interface/utils2.c: Likewise.
2306 * gnat_rm.texi: Likewise.
2307 * gnat_ugn.texi: Likewise.
2308 * raise-gcc.c: Likewise.
2309 * sigtramp-ppcvxw.c: Likewise.
2310 * sysdep.c: Likewise.
2311 * terminals.c: Likewise.
2312
2313 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
2314
2315 PR ada/57934
2316 * gcc-interface/ada.h (CAT): Fix typo.
2317
2318 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2319
2320 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
2321 pragmas stored in N_Contract nodes.
2322 * einfo.ads (Get_Pragma): Update the comment on usage.
2323 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
2324 of the pragma when it applies to a body that acts as a spec. The
2325 copy is preanalyzed and chained on the contract of the body.
2326
2327 2013-07-08 Robert Dewar <dewar@adacore.com>
2328
2329 * rtsfind.adb: Minor comment fix.
2330
2331 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2332
2333 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
2334 of a Ghost function call when the enclosing context is being
2335 preanalyzed.
2336
2337 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2338
2339 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
2340 expression in a return statement is a numeric literal, qualify
2341 it with the return type for proper resolution.
2342
2343 2013-07-08 Robert Dewar <dewar@adacore.com>
2344
2345 * sem.ads: Minor comment updates.
2346 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
2347 Minor reformatting.
2348
2349 2013-07-08 Robert Dewar <dewar@adacore.com>
2350
2351 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2352 for Restriction_Set.
2353 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
2354 documentation for attribute Restriction_Set.
2355 * lib-writ.adb (Write_With_Lines): Generate special W lines
2356 for Restriction_Set.
2357 * lib-writ.ads: Document special use of W lines for
2358 Restriction_Set.
2359 * lib.ads (Restriction_Set_Dependences): New table.
2360 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
2361 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
2362 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
2363 for Restricton_Set.
2364 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
2365 (OK_No_Dependence_Unit_Name): New function.
2366 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
2367 * rtsfind.adb: Minor reformatting Minor code reorganization.
2368 * sem_attr.adb (Analyze_Attribute): Add processing for
2369 Restriction_Set.
2370 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2371 Remove Check_Unit_Name and use new function
2372 OK_No_Dependence_Unit_Name instead.
2373 * sinfo.ads: Minor comment updates.
2374 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
2375
2376 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2377
2378 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
2379 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
2380 object as "free" is not available on all targets/profiles.
2381
2382 2013-07-08 Robert Dewar <dewar@adacore.com>
2383
2384 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
2385 Storage_Size aspect for task type in case discriminant is
2386 referenced.
2387 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
2388 attribute definition clause as obsolescent if from aspect.
2389
2390 2013-07-08 Robert Dewar <dewar@adacore.com>
2391
2392 * gnat_rm.texi: Add documentation for Img returning a function.
2393 * par-prag.adb: Minor reformatting.
2394 * restrict.adb: Minor reformatting and code reorganization.
2395
2396 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2397
2398 * sem_res.adb: add guard to ASIS transform.
2399
2400 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2401
2402 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
2403 of the asynchronous select is a dispatching call, transform the
2404 abortable part into a procedure, to avoid duplication of local
2405 loop variables that may appear within.
2406
2407 2013-07-08 Vincent Celier <celier@adacore.com>
2408
2409 * projects.texi: Update the documentation of suffixes in package
2410 Naming.
2411
2412 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2413
2414 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
2415 types are type conformant if the designated type of one is
2416 protected and the other is not. Convention only matters when
2417 checking subtype conformance.
2418
2419 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2420
2421 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
2422 back the fully resolved operands to the original function call
2423 so that all semantic information remains available to ASIS.
2424
2425 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2426
2427 * sem_ch4.adb: minor reformatting (remove obsolete comment).
2428 * sem_ch9.adb: improve error message on illegal trigger.
2429
2430 2013-07-08 Robert Dewar <dewar@adacore.com>
2431
2432 * sem_prag.adb: Minor reformatting.
2433
2434 2013-07-08 Robert Dewar <dewar@adacore.com>
2435
2436 * gnatcmd.adb: Minor reformatting.
2437
2438 2013-07-08 Robert Dewar <dewar@adacore.com>
2439
2440 * targparm.adb (Get_Target_Parameters): Recognize pragma
2441 Partition_Elaboration_Policy.
2442
2443 2013-07-08 Robert Dewar <dewar@adacore.com>
2444
2445 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
2446
2447 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2448
2449 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
2450 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
2451 transformed but not rewritten as a function call (as is the case
2452 in a generic), analyze it as such.
2453
2454 2013-07-08 Thomas Quinot <quinot@adacore.com>
2455
2456 * gnat_rm.texi: Minor rewording: add missing word "operators"
2457 in documentation for restriction No_Direct_Boolean_Operator.
2458
2459 2013-07-08 Robert Dewar <dewar@adacore.com>
2460
2461 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
2462 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
2463 now).
2464 * errout.ads: Insertions ! and !! no longer have to be at the
2465 end of the message, they can be anywhere in the message.
2466 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
2467 Replaces Test_Style_Warning_Serious_Msg
2468 * erroutc.ads (Has_Double_Exclam): New flag New comments for
2469 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
2470 Replaces Test_Style_Warning_Serious_Msg
2471 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
2472 Replaces Test_Style_Warning_Serious_Msg
2473
2474 2013-07-08 Robert Dewar <dewar@adacore.com>
2475
2476 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2477 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
2478 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
2479 referenced there.
2480 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
2481 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
2482 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
2483
2484 2013-07-08 Vincent Celier <celier@adacore.com>
2485
2486 * gnatcmd.adb (Check_Files): Use a response file for gnatls
2487 when possible.
2488
2489 2013-07-08 Gary Dismukes <dismukes@adacore.com>
2490
2491 * freeze.adb: Minor typo fixes.
2492
2493 2013-07-08 Robert Dewar <dewar@adacore.com>
2494
2495 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
2496 obsolete recognition of SPARK Document all other obsolete synonyms
2497 for old restrictions.
2498 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
2499 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
2500 for SPARK_05.
2501 * restrict.ads: Restriction SPARK_05 replaces SPARK.
2502 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
2503 as synonym for SPARK_05.
2504 * sem_prag.adb: Minor reformatting.
2505 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
2506
2507 2013-07-08 Robert Dewar <dewar@adacore.com>
2508
2509 * sem_dim.adb: Minor error message change.
2510 * freeze.adb (Freeze_Entity, array type case): Extend handling
2511 of Implicit_Packing to handle multi-dimensional array case.
2512 * gnat_rm.texi: Update doc on Implicit_Packing.
2513
2514 2013-07-08 Robert Dewar <dewar@adacore.com>
2515
2516 * exp_ch4.adb: Minor reformatting.
2517
2518 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2519
2520 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
2521 the parent node is a selected component and the analysis as a
2522 call is successful, set the type of the selector in the parent
2523 node for subsequent checks, because the rewriting of the node
2524 does not take place during pre-analysis.
2525
2526 2013-07-08 Robert Dewar <dewar@adacore.com>
2527
2528 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
2529
2530 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2531
2532 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
2533 Bounded_Strings, use the predefined equality function of the
2534 root Super_String type.
2535
2536 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2537
2538 * exp_ch4.adb (Create_Alternative): Removed.
2539 (Expand_N_If_Expression): Remove constant
2540 In_Case_Or_If_Expression. Add local variable
2541 Ptr_Typ. Inspect the "then" and "else" action lists
2542 for transient controlled objects and generate code to
2543 finalize them. (Is_Controlled_Function_Call): Removed.
2544 (Process_Action): Update the comment on usage. Update the call
2545 to Process_Transient_Object. There is no need to continue the
2546 traversal of the object itself.
2547 (Process_Actions): New routine.
2548 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
2549 a new formal and update the related comment on usage.
2550 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
2551 from the parent of the node.
2552
2553 2013-07-08 Robert Dewar <dewar@adacore.com>
2554
2555 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
2556 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
2557
2558 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2559
2560 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
2561 that can be renamed as a function.
2562
2563 2013-07-08 Thomas Quinot <quinot@adacore.com>
2564
2565 * g-socket.ads: Document target dependency: FIONBIO may or may not
2566 be inherited from listening socket by accepted socket.
2567
2568 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2569
2570 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
2571 on targets that can't deallocate.
2572
2573 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2574
2575 * exp_ch3.adb (Freeze_Type): Generate a
2576 subpools-related accessibility check only on profiles that
2577 include the corresponding library unit.
2578
2579 2013-07-08 Gary Dismukes <dismukes@adacore.com>
2580
2581 * sem_ch8.adb: Minor typo fixes.
2582
2583 2013-07-08 Javier Miranda <miranda@adacore.com>
2584
2585 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
2586 (Restore_Scope_Stack): Remove the elements of the list when the
2587 visibility of each entity is restored.
2588
2589 2013-07-08 Robert Dewar <dewar@adacore.com>
2590
2591 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
2592
2593 2013-07-08 Robert Dewar <dewar@adacore.com>
2594
2595 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
2596
2597 2013-07-08 Gary Dismukes <dismukes@adacore.com>
2598
2599 * gnat_rm.texi: Minor reformatting and rewording for consistency.
2600
2601 2013-07-08 Bob Duff <duff@adacore.com>
2602
2603 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
2604 view coming from a limited-with'ed package, use the nonlimited
2605 view in case it has tasks.
2606
2607 2013-07-08 Javier Miranda <miranda@adacore.com>
2608
2609 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
2610 of entities which have been temporarily removed from immediate
2611 visibility.
2612 (Restore_Scope_Stack): Modified to receive an
2613 additional parameter with the list of entities whose immediate
2614 visibility must be restored.
2615 * sem.adb (Do_Analyze): Use new version of
2616 Save_Scope_Stack/Restore_Scope_Stack
2617 * sem_ch12.adb (Inline_Instance_Body): Use new version of
2618 Save_Scope_Stack and Restore_Scope_Stack
2619
2620 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2621
2622 * sem_prag.adb (Analyze_Pragma): Remove
2623 variable Unit_Prag. Remove the check on duplicate mode for the
2624 configuration form of the pragma.
2625 (Redefinition_Error): Removed.
2626
2627 2013-07-08 Robert Dewar <dewar@adacore.com>
2628
2629 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
2630 and editing.
2631
2632 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2633
2634 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
2635 pre-analyze only the original expression attached to the source
2636 aspect, not the relocated expression of the pragma, to prevent
2637 malformed trees in ASIS mode.
2638 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
2639 patch: the expression in the aspect for pre/post must be relocated
2640 to the pragma for proper analysis.
2641
2642 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2643
2644 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
2645 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
2646 Aspect_Argument, Aspect_Names.
2647 * atree.adb (Node32): New routine.
2648 (Set_Node32): New routine.
2649 * atree.ads (Node32): New routine.
2650 (Set_Node32): New routine.
2651 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
2652 (Set_SPARK_Mode_Pragmas): New routine.
2653 (SPARK_Mode_Pragmas): New routine.
2654 (Write_Field32_Name): Add and entry for SPARK_Modes.
2655 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
2656 in various entities.
2657 (Set_SPARK_Mode_Pragmas): New routine and
2658 pragma Inline.
2659 (SPARK_Mode_Pragmas): New routine and pragma Inline.
2660 * gnat_rm.texi: Add sections explaining the syntax and semantics
2661 of aspect/pragma SPARK_Mode.
2662 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
2663 configuration pragmas.
2664 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
2665 (SPARK_Mode_Pragma): New routine.
2666 * lib.ads: Alphabetize the comments on fields of record
2667 Unit_Record. Add new field SPARK_Mode_Pragma along with
2668 comment on its usage. Update the layout of record Unit_Record.
2669 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
2670 (SPARK_Mode_Pragma): New routine and pragma Inline.
2671 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
2672 field SPARK_Mode_Pragma.
2673 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
2674 (Load_Unit): Initialize field SPARK_Mode_Pragma.
2675 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
2676 SPARK_Mode_Pragma.
2677 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
2678 * opt.ads: Alphabetize verification flags. Store the
2679 compilation-wide SPARK mode in variable Global_SPARK_Mode.
2680 * par-prag.adb: Pragma SPARK_Mode does not need special processing
2681 by the parser.
2682 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
2683 SPARK_Mode into a pragma.
2684 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
2685 delayed processing.
2686 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
2687 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
2688 (Get_SPARK_Mode_Id): New routine.
2689 (Is_Elaboration_SPARK_Mode): New routine.
2690 (Is_Private_SPARK_Mode): New routine.
2691 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
2692 (Is_Elaboration_SPARK_Mode): New routine.
2693 (Is_Private_SPARK_Mode): New routine.
2694 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
2695 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
2696 Auto. Add new pragma Id for SPARK_Mode.
2697 * types.ads: Add new type SPARK_Mode_Id.
2698
2699 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2700
2701 * sem_ch13.adb (Analyze_Aspect_Specifications): For
2702 pre/postconditions copy the expression to the generated pragma,
2703 to avoid sharing between the original aspect and the pragma node,
2704 because in ASIS_Mode both will be independently analyzed.
2705
2706 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2707
2708 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
2709 formals for each discriminant of an unchecked union.
2710 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
2711 variants are supported. New helper function Corresponding_Formal.
2712 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
2713 loop through discriminants to create list of inferred values,
2714 and modify call to equality routine accordingly.
2715
2716 2013-07-05 Claire Dross <dross@adacore.com>
2717
2718 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
2719 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
2720 container types are not tagged any more.
2721
2722 2013-07-05 Thomas Quinot <quinot@adacore.com>
2723
2724 * freeze.adb (Freeze_Entity): For an object with captured
2725 initialization statements, do not remove Init_Stmts from the
2726 enclosing list, as Freeze_All might rely on it to know where to
2727 stop freezing.
2728
2729 2013-07-05 Robert Dewar <dewar@adacore.com>
2730
2731 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
2732 reformatting.
2733
2734 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2735
2736 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
2737 when the base type is private.
2738
2739 2013-07-05 Claire Dross <dross@adacore.com>
2740
2741 * a-cfdlli.ads: Add preconditions when needed.
2742
2743 2013-07-05 Robert Dewar <dewar@adacore.com>
2744
2745 * sem_ch8.adb: Minor reformatting.
2746
2747 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2748
2749 * sem_ch3.adb (Access_Subprogram_Declaration): Use
2750 Generate_Reference_To_Formals.
2751 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
2752 access to subprograms, the formals are found in the designated
2753 subprogram type.
2754
2755 2013-07-05 Robert Dewar <dewar@adacore.com>
2756
2757 * gnat_ugn.texi: Document that comments can be lined up with
2758 previous non-blank line.
2759 * styleg.adb (Check_Comment): Allow indentation to match previous
2760 non-blank line (Same_Column_As_Previous_Line): New function
2761
2762 2013-07-05 Robert Dewar <dewar@adacore.com>
2763
2764 * gnat_rm.texi: Update doc on missing pragmas.
2765 * sem_ch12.adb: Minor comment additions.
2766
2767 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2768
2769 * sem_prag.adb (Analyze_Pragma): Ensure that
2770 Contract_Cases, Depends and Global are analyzed when they apply
2771 to a subprogram compilation unit. The pragmas are all added
2772 unconditionally to the construct's contract. This ensures that
2773 proof tools can locate the pragmas.
2774
2775 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2776
2777 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
2778 a generic unit does not freeze a generic private type of the
2779 enclosing generic. This rule must also apply to a type derived
2780 from a generic private type.
2781
2782 2013-07-05 Arnaud Charlet <charlet@adacore.com>
2783
2784 * gnat_rm.texi: Add missing documentation for pragmas.
2785
2786 2013-07-05 Yannick Moy <moy@adacore.com>
2787
2788 * sem_ch12.adb: Minor comment.
2789
2790 2013-07-05 Robert Dewar <dewar@adacore.com>
2791
2792 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
2793 together.
2794 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
2795 specified.
2796
2797 2013-07-05 Robert Dewar <dewar@adacore.com>
2798
2799 * gnat_rm.texi: Add missing documentation for pragmas.
2800 * sem_ch8.adb: Minor reformatting.
2801 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
2802 together.
2803
2804 2013-07-05 Yannick Moy <moy@adacore.com>
2805
2806 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
2807 instance of subprogram body in SPARK mode, by testing Expander_Active
2808 (set in SPARK mode) instead of Full_Expander_Active (not set in
2809 SPARK mode).
2810 * sem_ch8.adb: Minor reformatting.
2811
2812 2013-07-05 Robert Dewar <dewar@adacore.com>
2813
2814 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
2815 Propagate_Exceptions, and associated useless code that did
2816 nothing.
2817 * gnat_rm.texi: Add documentation for obsolete pragma
2818 Propagate_Exceptions.
2819 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
2820 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
2821 Remove useless and obsolete setting of Propagate_Exceptions flag.
2822
2823 2013-07-05 Robert Dewar <dewar@adacore.com>
2824
2825 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
2826
2827 2013-07-05 Robert Dewar <dewar@adacore.com>
2828
2829 * gnat_rm.texi: Add missing doc for various pragmas.
2830
2831 2013-07-05 Robert Dewar <dewar@adacore.com>
2832
2833 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
2834 * gnat_rm.texi: Document pragma Profile_Warnings.
2835 * restrict.ads, sem_prag.adb: Minor reformatting.
2836
2837 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2838
2839 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
2840 a formal subprogram that was defaulted in the formal package.
2841
2842 2013-07-05 Thomas Quinot <quinot@adacore.com>
2843
2844 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
2845 N_Implicit_Label_Declaration nodes.
2846
2847 2013-07-05 Robert Dewar <dewar@adacore.com>
2848
2849 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
2850
2851 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2852
2853 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
2854 call is a valid entity name before preserving entity in generic
2855 copy.
2856
2857 2013-07-05 Thomas Quinot <quinot@adacore.com>
2858
2859 * par-ch5.adb: Minor reformatting.
2860
2861 2013-07-05 Thomas Quinot <quinot@adacore.com>
2862
2863 * sinfo.ads: Minor clarification to documentation for
2864 N_Implicit_Label_Declaration.
2865
2866 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2867
2868 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
2869 values of all remaining constants.
2870 (Rcheck_35): New routine along with pragmas Export and No_Return.
2871 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
2872 Export and No_Return.
2873 (Rcheck_PE_All_Guards_Closed,
2874 Rcheck_PE_Bad_Predicated_Generic_Type,
2875 Rcheck_PE_Current_Task_In_Entry_Body,
2876 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
2877 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
2878 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
2879 Rcheck_PE_Potentially_Blocking_Operation
2880 Rcheck_PE_Stubbed_Subprogram_Called,
2881 Rcheck_PE_Unchecked_Union_Restriction,
2882 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
2883 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
2884 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
2885 Update the use of Rmsg_XX.
2886 (Rcheck_17, Rcheck_18, Rcheck_19,
2887 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
2888 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
2889 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
2890 renamed subprograms.
2891 * checks.adb: Add with and use clause for Stringt.
2892 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
2893 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
2894 variable Cond. Initialize Check at the start of the routine. Use
2895 routine Overlap_Check to construct a simple or a detailed run-time
2896 check. Update the creation of the simple check.
2897 (Overlap_Check): New routine.
2898 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
2899 PE_Aliased_Parameters.
2900 * types.ads: Add new enumeration literal
2901 PE_Aliased_Parameters. Update the corresponding integer values
2902 of all RT_Exception_Code literals.
2903 * types.h: Add new constant PE_Aliased_Parameters. Correct the
2904 values of all remaining constants.
2905
2906 2013-07-05 Yannick Moy <moy@adacore.com>
2907
2908 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
2909 documentation.
2910
2911 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2912
2913 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
2914 condition, when replacing the name of a formal by a conversion
2915 to the class-wide type, exempt selector names that appear in
2916 parameter associations.
2917
2918 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
2919
2920 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
2921 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
2922 (convert_vms_descriptor): Likewise.
2923 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
2924 types by double dereference.
2925 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
2926 (gnat_to_gnu_entity): Adjust calls to annotate_object.
2927 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
2928 dereference.
2929 (Call_to_gnu): Likewise.
2930 (build_function_stub): Adjust call to convert_vms_descriptor.
2931 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
2932 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
2933 parameter and adjust.
2934
2935 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
2936
2937 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
2938
2939 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2940
2941 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
2942 check that access types have a set size.
2943
2944 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2945
2946 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
2947 (components_to_record): Change return type to bool.
2948 Lay out the variants in two passes. Do not force a specific layout for
2949 the variant part if the variants do not have a representation clause.
2950 Take the alignment of the variant part into account when laying out
2951 variants without rep clause in a record type with a partial rep clause.
2952 (create_rep_part): Do not set the position of the field.
2953
2954 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2955
2956 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
2957 to avoid generating an overflow for -1.
2958
2959 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2960
2961 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
2962 (create_label_decl): Complete prototype.
2963 (process_attributes): Declare.
2964 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
2965 create_type_decl throughout.
2966 <E_Enumeration_Type>: Do the layout of the type manually and call
2967 process_attributes on it. Reindent.
2968 <E_Enumeration_Subtype>: Minor tweak.
2969 <E_Floating_Point_Subtype>: Reindent.
2970 <E_Array_Subtype>: Call process_attributes on the array type built
2971 for a packed array type.
2972 <E_Record_Type>: Call process_attributes on the type.
2973 <E_Record_Subtype>: Likewise.
2974 <E_Access_Type>: Likewise.
2975 <E_Subprogram_Type>: Likewise.
2976 Likewise for all types at the end of the processing.
2977 * gcc-interface/utils.c (make_aligning_type): Adjust call to
2978 create_type_decl.
2979 (maybe_pad_type): Likewise.
2980 (create_index_type): Likewise.
2981 (create_type_decl): Remove attr_list parameter and associated code.
2982 (create_var_decl_1): Call process_attributes on the variable.
2983 (process_attributes): Take a pointer to the object and add in_place
2984 and gnat_node parameters and adjust throughout.
2985 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
2986 and set the input location.
2987 Zap the attribute list at the end.
2988 (create_subprog_decl): Call process_attributes on the subprogram.
2989 (build_unc_object_type): Adjust call to create_type_decl.
2990 (handle_vector_type_attribute): Remove dead code.
2991
2992 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2993
2994 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
2995 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
2996 for the position of the associated TYPE_DECL.
2997 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
2998 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
2999
3000 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3001
3002 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
3003 elaborate the full view of a type with a freeze node.
3004 * gcc-interface/trans.c (process_type): Add explicit predicate.
3005
3006 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
3007
3008 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
3009 UNC variable for aliased objects with unconstrained nominal subtype.
3010
3011 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3012
3013 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
3014 * gcc-interface/trans.c (gigi): Call it.
3015 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
3016
3017 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3018
3019 * gcc-interface/gigi.h (enum inline_status_t): New type.
3020 (create_subprog_decl): Adjust prototype.
3021 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
3022 calls to create_subprog_decl.
3023 (get_minimal_subprog_decl): Likewise.
3024 * gcc-interface/trans.c (gigi): Likewise.
3025 (build_raise_check): Likewise.
3026 (establish_gnat_vms_condition_handler): Likewise.
3027 (Compilation_Unit_to_gnu): Likewise.
3028 (gnat_to_gnu): Likewise.
3029 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
3030 parameter to inline_status and implement for suppressed inlining.
3031
3032 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3033
3034 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
3035 (LOOP_STMT_UNROLL): Likewise.
3036 (LOOP_STMT_NO_VECTOR): Likewise.
3037 (LOOP_STMT_VECTOR): Likewise.
3038 * gcc-interface/trans.c (struct loop_info_d): Replace label field
3039 with stmt field.
3040 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
3041 (Loop_Statement_to_gnu): Save the loop statement onto the stack
3042 instead of the label.
3043 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
3044
3045 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3046
3047 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
3048 (Pragma_to_gnu) <Pragma_Warnings>: New case.
3049
3050 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
3051
3052 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
3053 a handful of local variables.
3054 For a derived untagged type that renames discriminants, change the type
3055 of the stored discriminants to a subtype with the bounds of the type
3056 of the visible discriminants.
3057 (build_subst_list): Rename local variable.
3058
3059 2013-05-16 Jason Merrill <jason@redhat.com>
3060
3061 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
3062
3063 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3064
3065 PR ada/57188
3066 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
3067
3068 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
3069
3070 PR ada/56474
3071 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
3072 int_const_binop to shift bounds by 1 when they are integer constants.
3073
3074 2013-04-25 Arnaud Charlet <charlet@adacore.com>>
3075
3076 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
3077
3078 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3079
3080 * checks.adb (Apply_Predicate_Check): Update the comment associated
3081 with the call to Check_Expression_Against_Static_Predicate.
3082 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
3083 associated with the call to Check_Expression_Against_Static_Predicate.
3084 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3085 Broaden the check from a static expression to an expression with
3086 a known value at compile time.
3087 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
3088 comment on usage.
3089
3090 2013-04-25 Thomas Quinot <quinot@adacore.com>
3091
3092 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
3093 First_Bit, and Last_Bit): Fix incorrect test in implementation of
3094 RM 2005 13.5.2(3/2).
3095
3096 2013-04-25 Claire Dross <dross@adacore.com>
3097
3098 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
3099 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
3100 (Query_Element): Removed.
3101 (Update_Element): Removed.
3102 (Insert): The version with no New_Item specified is removed.
3103 (Iterate): Removed.
3104 (Write): Removed.
3105 (Read): Removed.
3106 Every check of fields Busy and Lock has been removed.
3107
3108 2013-04-25 Robert Dewar <dewar@adacore.com>
3109
3110 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
3111 call to S14_Pragma (Find_Related_Subprogram): Require proper
3112 placement in subprogram body (Find_Related_Subprogram): Detect
3113 duplicates for all cases (Find_Related_Subprogram): Handle case
3114 of spec nested inside body.
3115
3116 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3117
3118 * par-prag.adb: Fix typo.
3119
3120 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3121
3122 * checks.adb (Apply_Predicate_Check): If the type has a static
3123 predicate and the expression is also static, check whether the
3124 expression satisfies the predicate.
3125 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
3126 static predicate and the expression is also static, see if the
3127 expression satisfies the predicate.
3128 * sem_util.adb: Alphabetize several routines.
3129 (Check_Expression_Against_Static_Predicate): New routine.
3130 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
3131
3132 2013-04-25 Robert Dewar <dewar@adacore.com>
3133
3134 * gnat_rm.texi: Document Reason argument for pragma Warnings.
3135 * par-prag.adb: Handle Reason parameter for pragma Warnings.
3136 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
3137 * snames.ads-tmpl (Name_Reason): New name entry.
3138
3139 2013-04-25 Yannick Moy <moy@adacore.com>
3140
3141 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
3142 (Expand_SPARK): Remove special expansion for membership tests.
3143
3144 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3145
3146 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
3147 that should use constant Base_Typ. When building an invariant
3148 check, account for invariants coming from the base type. Prevent
3149 the creation of a junk invariant check when the related object
3150 is of an array type and it is initialized with an aggregate.
3151 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
3152 the base type to create an invariant call when the type of the
3153 expression is a composite subtype.
3154
3155 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
3156
3157 * a-cborse.adb: Fix minor typo.
3158
3159 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3160
3161 * sem_ch6.adb (Different_Generic_Profile): A spec and body
3162 match in an instance if a subtype declaration that renames a
3163 generic actual with the same name appears between spec and body.
3164
3165 2013-04-25 Robert Dewar <dewar@adacore.com>
3166
3167 * sem_util.adb: Minor reformatting.
3168
3169 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3170
3171 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
3172 fold strings with a single others choice only if there are no
3173 expressions in the aggregate.
3174
3175 2013-04-25 Arnaud Charlet <charlet@adacore.com>
3176
3177 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
3178
3179 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3180
3181 * exp_ch6.adb: Add with and use clause for Stringt.
3182 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
3183 Decls and Stmts along with comments on their usage.
3184 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
3185 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
3186 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
3187
3188 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3189
3190 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
3191 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
3192 aggregate for a packed type, which may be converted into an
3193 unchecked conversion of an object.
3194
3195 2013-04-25 Robert Dewar <dewar@adacore.com>
3196
3197 * sem_prag.adb: Minor code reorganization (correct misspelling
3198 Restiction).
3199 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
3200 * gnat_rm.texi: Document impl-defined aspects.
3201 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
3202 reformatting.
3203
3204 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3205
3206 * einfo.adb (Set_Abstract_States): The attribute now applies
3207 to generic packages.
3208 * sem_ch4.adb (Referenced): Moved to sem_util.
3209 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
3210 a non-null abstract state needs a body.
3211 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
3212 to Collect_Subprogram_Inputs_Outputs.
3213 (Analyze_Global_Item): Verify the proper usage of an item with mode
3214 In_Out or Output relative to the enclosing context.
3215 (Analyze_Pragma): Abstract_State can now be applied to a generic
3216 package. Do not reset the Analyzed flag for pragmas Depends and Global
3217 as this is not needed.
3218 (Appears_In): Moved to library level.
3219 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
3220 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
3221 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
3222 seen along with comments on usage.
3223 * sem_util.ads, sem_util.adb (Referenced): New routine.
3224
3225 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3226
3227 * sem_ch6.adb (Expand_Contract_Cases): Generate
3228 detailed error messages only when switch -gnateE is in effect.
3229
3230 2013-04-25 Yannick Moy <moy@adacore.com>
3231
3232 * sem_attr.adb (Analyze_Attribute): Do not issue
3233 an error for a possibly misplaced 'Result or 'Old attribute when
3234 analyzing the aspect.
3235
3236 2013-04-25 Robert Dewar <dewar@adacore.com>
3237
3238 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
3239
3240 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3241
3242 * sem_ch4.adb (Analyze_Quantified_Expression):
3243 Add local variable Loop_Id. Verify that the loop variable
3244 is used within the condition of the quantified expression.
3245 (Referenced): New routine.
3246
3247 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3248
3249 * sem_case.adb (Analyze_Choices): Enhance the error message
3250 given on a bad use of subtype predicate.
3251 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
3252 the error message given on a bad use of subtype predicate.
3253 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
3254 Suggest_Static. Emit an extra error message advising how to
3255 remedy the bad use of the predicate if the context warrants it.
3256 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
3257 Suggest_Static along with a comment explaining its usage.
3258
3259 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3260
3261 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
3262 to checks for AI05-0125: the check for a hidden primitive that
3263 may be overridden by the new declaration only applies if the
3264 hidden operation is never declared. This is not the case if the
3265 operation is declared in a parent unit.
3266
3267 2013-04-25 Robert Dewar <dewar@adacore.com>
3268
3269 * debug.adb: Remove d.X and d.Y entries and documentation.
3270 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
3271 if expression with actions not available (now always available).
3272 (Expand_Short_Circuit_Operator): Same change.
3273 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
3274 Use_Expression_With_Actions flag, since this is now obsolete.
3275 * opt.ads (Use_Expression_Actions): Removed (always True now).
3276 * sinfo.ads: Minor comment updates.
3277
3278 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3279
3280 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
3281 subtype whose base type is currently private, install full view
3282 when compiling instance body.
3283
3284 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3285
3286 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
3287 AI05-0125: the check for a hidden primitive that may be overridden
3288 by the new declaration is only performed if the declaration comes
3289 from source, and it must carry an explicit overriding indicator.
3290
3291 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3292
3293 * einfo.adb (Abstract_States): The attribute now applies to
3294 generic packages.
3295 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
3296 object declaration introduces an illegal hidden state.
3297 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
3298 declaration introduces an illegal hidden state.
3299 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
3300
3301 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3302
3303 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
3304 be to a protected function, in which case the name in the call
3305 is a selected component.
3306
3307 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3308
3309 * sem_ch4.adb (Analyze_Quantified_Expression):
3310 Warn on a suspicious use of quantifier "some" when "all" was meant.
3311 (No_Else_Or_Trivial_True): New routine.
3312
3313 2013-04-25 Robert Dewar <dewar@adacore.com>
3314
3315 * einfo.ads, einfo.adb: Put back with/use for Namet.
3316 (Get_Pragma): New name (wi new spec) for Find_Pragma.
3317 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
3318 different interface.
3319
3320 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3321
3322 * sem_ch3.adb (Is_Visible_Component): In an instance all
3323 components are visible.
3324
3325 2013-04-25 Matthew Heaney <heaney@adacore.com>
3326
3327 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
3328 tampering when container empty.
3329 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
3330 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
3331 ditto.
3332
3333 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3334
3335 * par-ch12.adb: Move aspects from package specification to
3336 generic package declaration.
3337 * sem_ch12.adb: Analyze aspect specifications before building
3338 and analyzing the generic copy, so that the generated pragmas
3339 are properly taken into account.
3340 * sem_ch13.adb: For compilation unit aspects that apply to a
3341 generic package declaration, insert corresponding pragmas ahead
3342 of visible declarations.
3343 * sprint.adb: Display properly the aspects of a generic type
3344 declaration.
3345
3346 2013-04-25 Robert Dewar <dewar@adacore.com>
3347
3348 * frontend.adb: Minor reformatting.
3349
3350 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3351
3352 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
3353 for untagged types.
3354 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
3355 case of untagged types derived from private types, to reject
3356 illegal selected components.
3357
3358 2013-04-25 Gary Dismukes <dismukes@adacore.com>
3359
3360 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3361 for case of selecting from an unexpanded implicit dereference
3362 and do not make a recursive call on such a prefix.
3363
3364 2013-04-25 Doug Rupp <rupp@adacore.com>
3365
3366 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
3367 (Get_Target_Parameters): Handle VXF tag.
3368 * targparm.ads (VAX_Float_On_Target): New boolean.
3369 * system-vms-ia64.ads (VAX_Float): New boolean.
3370 * frontend.adb (Frontend): Handle VAX float boolean.
3371
3372 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3373
3374 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
3375 (Find_Pragma): New routine.
3376 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
3377
3378 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3379
3380 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
3381 predicate.
3382 (Add_Predicates): Save the static predicate for diagnostics and error
3383 reporting purposes.
3384 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
3385 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
3386 the expression of a static predicate is static.
3387
3388 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3389
3390 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
3391
3392 2013-04-25 Robert Dewar <dewar@adacore.com>
3393
3394 * gnat_rm.texi: Minor addition of index entry.
3395
3396 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3397
3398 * sem_ch6.adb (Check_Access_Invariants): Test whether an
3399 invariant procedure is empty before generating a call to it.
3400 (Has_Enabled_Predicate): New routine.
3401 (Has_Null_Body): New routine.
3402 (Process_PPCs): Test whether an invariant procedure is
3403 empty before generating a call to it. Test whether predicates are
3404 enabled for a particular type before generating a predicate call.
3405 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
3406
3407 2013-04-25 Robert Dewar <dewar@adacore.com>
3408
3409 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
3410 snames.ads-tmpl: Minor reformatting.
3411
3412 2013-04-25 Thomas Quinot <quinot@adacore.com>
3413
3414 * sem_ch7.adb: Minor reformatting.
3415
3416 2013-04-25 Robert Dewar <dewar@adacore.com>
3417
3418 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
3419 * s-tarest.adb: Minor reformatting.
3420
3421 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3422
3423 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
3424 tables.
3425 * einfo.adb: Remove with and use clause for Aspects.
3426 (Is_Ghost_Function): Removed.
3427 (Is_Ghost_Entity): New routine.
3428 (Is_Ghost_Subprogram): New routine.
3429 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
3430 along with its uses in entities. Add synthesized attributes
3431 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
3432 entities.
3433 (Is_Ghost_Function): Removed.
3434 (Is_Ghost_Entity): New routine.
3435 (Is_Ghost_Subprogram): New routine.
3436 * par-prag.adb: Remove pragma Ghost from the processing machinery.
3437 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
3438 * sem_attr.adb (Analyze_Access_Attribute): Update the check
3439 for ghost subprograms.
3440 * sem_ch4.adb (Analyze_Call): Update the check for calls
3441 to ghost subprograms.
3442 (Check_Ghost_Function_Call): Removed.
3443 (Check_Ghost_Subprogram_Call): New routine.
3444 * sem_ch6.adb (Check_Convention): Rewritten.
3445 (Check_Overriding_Indicator): Remove the check for overriding
3446 ghost functions.
3447 (Convention_Of): New routine.
3448 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
3449 generic actual subprograms.
3450 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
3451 * sem_prag.adb: Remove the value for pragma Ghost from
3452 table Sig_Flags.
3453 (Analyze_Pragma): Remove the processing for pragma Ghost.
3454 (Process_Convention): Emit an error when a ghost
3455 subprogram attempts to override.
3456 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
3457 attempts to override.
3458 * sinfo.ads: Clarify the usage of field Label_Construct.
3459 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
3460 predefined name Ghost.
3461 (Get_Convention_Name): Add an entry for convention Ghost.
3462 * snames.ads-tmpl: Move predefined name Ghost to the sublist
3463 denoting conventions. Add convention id Ghost. Remove pragma
3464 id Ghost.
3465
3466 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3467
3468 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
3469 units if within a generic hierarchy.
3470
3471 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3472
3473 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
3474 actual the related type has a predicate function.
3475 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
3476 type has an invariant procedure before building a call to it.
3477 * sem_ch6.adb (Append_Enabled_Item): New routine.
3478 (Check_Access_Invariants): Use routine
3479 Append_Enabled_Item to chain onto the list of postconditions.
3480 (Contains_Enabled_Pragmas): Removed.
3481 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
3482 the list of postconditions.
3483 (Invariants_Or_Predicates_Present): Removed.
3484 (Process_PPCs): Partially reimplemented.
3485
3486 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
3487
3488 * tree_io.ads: Update ASIS_Version_Number because of changes
3489 in the way how entities are chained in a scope by means of
3490 Next_Entity link.
3491
3492 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3493
3494 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
3495 Storage_Size): If the clause is not from an aspect, insert
3496 assignment to size variable of task type at the point of the
3497 clause, not after the task definition, to prevent access before
3498 elaboration in the back-end.
3499
3500 2013-04-24 Yannick Moy <moy@adacore.com>
3501
3502 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
3503
3504 2013-04-24 Yannick Moy <moy@adacore.com>
3505
3506 * gnat_rm.texi: Document 'Loop_Entry.
3507
3508 2013-04-24 Jose Ruiz <ruiz@adacore.com>
3509
3510 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
3511 fall-back termination handlers from the parents, because they apply
3512 only to dependent tasks.
3513 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
3514 termination handlers because the environment task has no parent,
3515 and if it defines one of these handlers it does not apply to
3516 itself because they apply only to dependent tasks.
3517
3518 2013-04-24 Robert Dewar <dewar@adacore.com>
3519
3520 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
3521
3522 2013-04-24 Robert Dewar <dewar@adacore.com>
3523
3524 * gnat_rm.texi: Document 'Update attribute.
3525 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
3526 to S14_Attribute (S14_Attribute): removed.
3527
3528 2013-04-24 Robert Dewar <dewar@adacore.com>
3529
3530 * interfac.ads: Add size clauses for IEEE_Float_32/64
3531
3532 2013-04-24 Claire Dross <dross@adacore.com>
3533
3534 * gnat1drv.adb (Adjust_Global_Switches): Remove
3535 special assignment of Use_Expression_With_Actions for SPARK_Mode.
3536
3537 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3538
3539 * checks.adb (Apply_Predicate_Check): Check for the presence
3540 of the dynamic predicate aspect when trying to determine if the
3541 predicate of a type is non-static.
3542 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
3543 for the presence of the dynamic predicate aspect when trying to
3544 determine if the predicate of a type is non- static.
3545 * sem_ch13.adb (Add_Call): Capture the nature of the
3546 inherited ancestor predicate.
3547 (Build_Predicate_Functions): Update comments. Rewrite the checks on
3548 static predicate application. Complain about the form of a non-static
3549 expression only when the type is static.
3550
3551 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3552
3553 * sem_prag.adb: Add guard to tree traversal.
3554
3555 2013-04-24 Vincent Celier <celier@adacore.com>
3556
3557 * clean.adb (Clean): Remove local variable Root_Environment,
3558 use Makeutl.Root_Environment instead.
3559 * gnatcmd.adb: Remove local variable Root_Environment, use
3560 Makeutl.Root_Environment instead.
3561 * make.adb (Gnatmake): Remove local variable Root_Environment,
3562 use Makeutl.Root_Environment instead.
3563 * prj-makr.adb: Remove local variable Root_Environment, use
3564 Makeutl.Root_Environment instead.
3565
3566 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3567
3568 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
3569 extraction of the declarative part of the conditional block. Move
3570 the processing of simple infinite loops to the start of the
3571 expansion logic. Correct the check which determines whether the
3572 proper scope is installed in visibility.
3573 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
3574 to keep track of the attribute in case the enclosing indexed
3575 component has to be rewritten. When searching for the enclosing
3576 loop, start from the proper attribute reference in case of a
3577 rewriting. Do not allow for 'Loop_Entry to appear in pragma
3578 Assert. Replace loop variable J with Index. Set the type of the
3579 proper attribute.
3580 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
3581 block that services a loop statement subject to at least one
3582 'Loop_Entry attribute.
3583
3584 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3585
3586 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
3587 resolve a fixed point operation, use first subtype to determine
3588 whether type and operator are declared in the same list of
3589 declarations.
3590
3591 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3592
3593 * par-ch6.adb (P_Subprogram): Detect an illegal
3594 placement of the aspect specification list in the context of
3595 expression functions.
3596
3597 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3598
3599 * exp_ch4.adb (Expand_N_Allocator): If the designated object
3600 has tasks, and the pointer type is an itype that has no master
3601 id, create a master renaming in the current context, which can
3602 only be an init_proc.
3603
3604 2013-04-24 Robert Dewar <dewar@adacore.com>
3605
3606 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
3607 * gnat_rm.texi: Document pragma Loop_Invariant.
3608 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
3609 no longer an S14_Attribute.
3610 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
3611 processing with Assert, allow message parameter, remove call
3612 to S14_Pragma.
3613
3614 2013-04-24 Thomas Quinot <quinot@adacore.com>
3615
3616 * exp_ch4.adb: Minor reformatting.
3617
3618 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3619
3620 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
3621 to Install_Private_Declarations, to make the installation of
3622 private dependents recursive in the presence of child units.
3623 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
3624 the Private_Dependents of a private subtype.
3625
3626 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3627
3628 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
3629 retrieval of the block declarations.
3630 * par-ch4.adb (P_Name): Let the name parsing machinery create
3631 a sequence of nested indexed components for attribute Loop_Entry.
3632 * sem_attr.adb (Analyze_Attribute): Add local constant
3633 Context. Reimplement part of the analysis of attribute Loop_Entry.
3634 (Convert_To_Indexed_Component): Removed.
3635 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
3636 an indexed component after it has been rewritten into attribute
3637 Loop_Entry.
3638
3639 2013-04-24 Yannick Moy <moy@adacore.com>
3640
3641 * snames.ads-tmpl: Minor change to list
3642 Loop_(In)variant not in configuration pragma.
3643 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
3644 for analyzing the expressions in pre/postconditions.
3645
3646 2013-04-24 Robert Dewar <dewar@adacore.com>
3647
3648 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
3649 reformatting.
3650
3651 2013-04-24 Yannick Moy <moy@adacore.com>
3652
3653 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
3654 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
3655 before setting entity to E_Subprogram_Body.
3656 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
3657 Empty before setting entity to E_Subprogram_Body.
3658
3659 2013-04-24 Vincent Celier <celier@adacore.com>
3660
3661 * gnat_ugn.texi: Document new gnatls switch -aPdir.
3662 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
3663 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
3664 a warning for unknown switches.
3665 (Usage): Add line for new switch -aPdir.
3666
3667 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3668
3669 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
3670 if the type comes from a limited view, so that task attributes can be
3671 constructed.
3672
3673 2013-04-24 Yannick Moy <moy@adacore.com>
3674
3675 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
3676 full expansion is not enabled.
3677
3678 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3679
3680 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
3681 formals if the type does not yet have a completion, and thus
3682 has no underlying view.
3683
3684 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3685
3686 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
3687 specification for Address as a reference, to suppress warnings
3688 on entities that may be read by an external device.
3689
3690 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
3691
3692 * gnat_ugn.texi: Add description of '--help' and '--version'
3693 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
3694
3695 2013-04-24 Arnaud Charlet <charlet@adacore.com>
3696
3697 * gnat_rm.texi: Minor syntax fix.
3698
3699 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3700
3701 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
3702 what and why is being analyzed. Remove the decoration of renamings as
3703 this simply falls out of the general analysis mechanism.
3704
3705 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3706
3707 * sem_res.adb (Explain_Redundancy): New routine.
3708 (Resolve_Equality_Op): Place the error concerning a redundant
3709 comparison to True at the "=". Try to explain the nature of the
3710 redundant True.
3711
3712 2013-04-24 Javier Miranda <miranda@adacore.com>
3713
3714
3715 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
3716 check in interface thunks since it is performed at the caller
3717 side.
3718 (Expand_Simple_Function_Return): No accessibility check
3719 needed in thunks since the check is done by the target routine.
3720
3721 2013-04-24 Vincent Celier <celier@adacore.com>
3722
3723 * xref_lib.adb (Add_Entity): Use the canonical file names
3724 so that source file names with capital letters are found on
3725 platforms where file names are case insensitive.
3726
3727 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3728
3729 * par-ch4.adb (P_Name): Continue to parse the name extension when the
3730 construct is attribute Loop_Entry. Do not convert the attribute
3731 reference into an indexed component when there is at least one
3732 expression / range following 'Loop_Entry.
3733
3734 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3735
3736 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
3737 (Process_PPCs): Generate procedure _Postconditions
3738 only when the context has invariants or predicates or enabled
3739 aspects/pragmas.
3740
3741 2013-04-24 Thomas Quinot <quinot@adacore.com>
3742
3743 * g-socket.adb (Host_Entry): Introduce intermediate copy of
3744 memory location pointed to by Hostent_H_Addr, as it might not
3745 have sufficient alignment.
3746
3747 2013-04-24 Yannick Moy <moy@adacore.com>
3748
3749 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
3750 calling subprograms which may read it.
3751
3752 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3753
3754 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
3755 nodes. Flag 260 is now used.
3756 (Has_Loop_Entry_Attributes): New routine.
3757 (Loop_Entry_Attributes): Removed.
3758 (Set_Has_Loop_Entry_Attributes): New routine.
3759 (Set_Loop_Entry_Attributes): Removed.
3760 (Write_Entity_Flags): Write out Flag 260.
3761 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
3762 * einfo.ads: Remove attribute Loop_Entry_Attributes,
3763 its related comment and uses in nodes. Add new attribute
3764 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
3765 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
3766 (Loop_Entry_Attributes): Removed along with pragma Inline.
3767 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
3768 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
3769 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
3770 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
3771 * exp_ch5.adb: Remove with and use clause for Elists.
3772 (Expand_Loop_Entry_Attributes): Removed.
3773 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
3774 constant Isc to Scheme. When a loop is subject to attribute
3775 'Loop_Entry, retrieve the nested loop from the conditional
3776 block. Move the processing of controlled object at the end of
3777 loop expansion.
3778 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
3779 'Loop_Entry to its related loop.
3780 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
3781 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
3782 the entire loop is rewritten into a block. Retrieve the nested
3783 loop in such cases to complete the analysis.
3784 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
3785 routine.
3786 (Subject_To_Loop_Entry_Attributes): New routine.
3787
3788 2013-04-24 Robert Dewar <dewar@adacore.com>
3789
3790 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
3791 (Loop_Variant, xxx) rather than Assert (xxx).
3792 * gnat_rm.texi: Document pragma Loop_Variant.
3793 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
3794 to S14_Pragma.
3795
3796 2013-04-24 Yannick Moy <moy@adacore.com>
3797
3798 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
3799 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
3800 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
3801 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
3802 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
3803 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
3804 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
3805 sem_res.adb, sem_util.adb: Everything with name
3806 'Alfa' renamed in 'SPARK'. Update comments.
3807 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
3808 * exp_alfa.adb: renamed exp_spark.adb.
3809 * exp_alfa.ads: renamed exp_spark.ads.
3810 * get_alfa.adb: renamed get_spark_xrefs.adb.
3811 * get_alfa.ads: renamed get_spark_xrefs.ads.
3812 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
3813 * put_alfa.adb: renamed put_spark_xrefs.adb.
3814 * put_alfa.ads: renamed put_spark_xrefs.ads.
3815 * alfa.adb: renamed spark_xrefs.adb.
3816 * alfa.ads: renamed spark_xrefs.ads.
3817 * alfa_test.adb: renamed spark_xrefs_test.adb.
3818 * gcc-interface/Make-lang.in: Update dependencies.
3819
3820 2013-04-24 Robert Dewar <dewar@adacore.com>
3821
3822 * gnat_rm.texi: Document pragma Assume.
3823 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
3824 part of Assert, and no longer requires -gnatd.F
3825
3826 2013-04-24 Robert Dewar <dewar@adacore.com>
3827
3828 * gnat_rm.texi: Document pragma Assert_And_Cut.
3829 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
3830 S14_Pragma call.
3831
3832 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3833
3834 * sem_aux.adb: Add guard in Available_View.
3835
3836 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3837
3838 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
3839 Find_Related_Subprogram to find the associated subprogram.
3840 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
3841 to find the associated subprogram.
3842 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
3843 subprogram.
3844
3845 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3846
3847 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
3848 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
3849 the contract of a subprogram.
3850 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
3851 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
3852 analyze the contract of a subprogram.
3853 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
3854 (Check_Subprogram_Contract): Removed.
3855 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
3856 (Check_Subprogram_Contract): Removed.
3857 (Expand_Contract_Cases): Add a guard against malformed contract cases.
3858 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3859 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
3860 Contract_Cases, Depends and Global. Reimplement the analysis of
3861 aspect Contract_Cases.
3862 (Decorate_Delayed_Aspect_And_Pragma): New routine.
3863 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
3864 (Analyze_CTC_In_Decl_Part): Removed.
3865 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
3866 (Analyze_Test_Case_In_Decl_Part): New routine.
3867 (Find_Related_Subprogram): New routine.
3868 (Requires_Profile_Installation): Add new formal Prag. Update
3869 the logic to take into account the origin of the pragma.
3870 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
3871 (Analyze_CTC_In_Decl_Part): Removed.
3872 (Analyze_Test_Case_In_Decl_Part): New routine.
3873
3874 2013-04-24 Robert Dewar <dewar@adacore.com>
3875
3876 * sem_prag.adb (Process_Convention): Move Stdcall tests to
3877 Set_Convention_From_Pragma so that they are applied to each
3878 entry of a homonym set.
3879 (Process_Convention): Don't try to set convention if already set.
3880
3881 2013-04-24 Robert Dewar <dewar@adacore.com>
3882
3883 * gnatbind.adb: Minor reformatting.
3884
3885 2013-04-24 Vincent Celier <celier@adacore.com>
3886
3887 * clean.adb (Gnatclean): Add the default project search
3888 directories in the project search path after scanning the
3889 switches on the command line.
3890 (Initialize): Do not put the default project search directories in the
3891 project search path.
3892 * gnatcmd.adb (GNATcmd): Add the default project search
3893 directories in the project search path after scanning the switches
3894 on the command line.
3895 * make.adb (Initialize): Add the default project search
3896 directories in the project search path after scanning the switches
3897 on the command line.
3898
3899 2013-04-24 Yannick Moy <moy@adacore.com>
3900
3901 * restrict.ads (Restriction_Warnings): Initialize with all False value.
3902
3903 2013-04-24 Robert Dewar <dewar@adacore.com>
3904
3905 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
3906 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
3907 Predicate_Check.
3908 * snames.ads-tmpl (Name_Predicate_Check): New check name.
3909 * types.ads (Predicate_Check): New definition.
3910 * gnat_rm.texi: Add documentation for Predicate_Check.
3911
3912 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3913
3914 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
3915 is a renaming of predefined equality for an untagged record,
3916 add generated body to the freeze actions for the subprogram, to
3917 prevent freezing issues when the record has incomplete components.
3918 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
3919 without completion, return a predefined comparison instead of
3920 just False. This may happen when building the expression for
3921 record equality, when some component has a type whose completion
3922 has not been seen yet. The operation will be analyzed an expanded
3923 after the type has been frozen, at which point all component
3924 types will have been completed, or an error reported.
3925
3926 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3927
3928 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
3929 analysis of a Convention aspect.
3930
3931 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
3932
3933 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
3934 (Signed_Zeros_On_Target): Likewise.
3935
3936 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3937
3938 * exp_ch6.adb: Add with and use clause for Sem_Prag.
3939 (Freeze_Subprogram): Analyze all delayed aspects for a null
3940 procedure so that they are available when analyzing the
3941 internally-generated _Postconditions routine.
3942 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
3943 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
3944 aspects of null procedures to exp_ch6.Freeze_Subprogram.
3945 * sem_prag.adb (Analyze_Abstract_State): Update the check on
3946 volatile requirements.
3947
3948 2013-04-24 Bob Duff <duff@adacore.com>
3949
3950 * ali-util.ads (Source_Record): New component Stamp_File
3951 to record from whence the Stamp came.
3952 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
3953 * bcheck.adb (Check_Consistency): Print additional information in
3954 Verbose_Mode.
3955 * gnatbind.adb (Gnatbind): Print additional information in
3956 Verbose_Mode.
3957
3958 2013-04-24 Robert Dewar <dewar@adacore.com>
3959
3960 * exp_ch13.adb, sem_prag.adb: Update comments.
3961 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
3962 reformatting.
3963
3964 2013-04-24 Doug Rupp <rupp@adacore.com>
3965
3966 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
3967
3968 2013-04-24 Yannick Moy <moy@adacore.com>
3969
3970 * sinfo.ads: Minor correction of typo.
3971
3972 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3973
3974 * sem_ch3.adb: Create packed array only when expander is
3975 active.
3976
3977 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3978
3979 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
3980 when the context warrants it.
3981 (Analyze_Global_In_Decl_List): Install the formals only when
3982 the context warrants it.
3983 (Requires_Profile_Installation): New routine.
3984
3985 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3986
3987 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
3988 type is a discriminated private type that does not require use
3989 of the secondary stack, a constrained subtype of the underlying
3990 type is created to convey the proper object size to the backend.
3991 If the return type is originally a private type, the return
3992 expression is wrapped in an unchecked_conversion. If the return
3993 expression is used subsequently in a call to the postcondition
3994 function, this conversion must be undone to prevent a spurious
3995 error on the analysis of that call.
3996
3997 2013-04-23 Kai Tietz <ktietz@redhat.com>
3998
3999 PR target/55445
4000 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
4001
4002 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
4003 Pascal Obry <obry@adacore.com>
4004
4005 * gcc-interface/Makefile.in (targ): Fix target name check.
4006 (../../gnatmake$(exeext)): Add '+' for LTO.
4007 (../../gnatlink$(exeext)): Likewise.
4008
4009 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4010
4011 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
4012 pre- and post-conditions.
4013 (Expand_N_Task_Type_Declaration):
4014 Use the correct attribute to check for pre- and post-conditions.
4015 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
4016 pre- and post-conditions. Analyze delayed classification items.
4017 * freeze.adb (Freeze_Entity): Use the correct attribute to
4018 check for pre- and post- conditions.
4019 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
4020 of pre- and post-conditions as well as contract- and
4021 test-cases. Analyze delayed pragmas Depends and Global.
4022 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
4023 attribute to check for pre- and post-conditions, as well as
4024 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
4025 Correct the traversal of pre- and post- conditions.
4026 (Process_Contract_Cases): Update the comment on usage. Correct
4027 the traversal of contract-cases.
4028 (Process_Post_Conditions): Update the comment on usage. Correct the
4029 traversal of pre- and post-conditions.
4030 (Process_PPCs): Correct the traversal of pre- and post-conditions.
4031 (Spec_Postconditions): Use the correct
4032 attribute to check for pre- and post- conditions, as well as
4033 contract-cases and test-cases.
4034 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
4035 actions related to aspects Depends and Global. Code refactoring
4036 for pre- and post-conditions.
4037 (Insert_Delayed_Pragma): New routine.
4038 * sem_prag.adb (Add_Item): New routine.
4039 (Analyze_Depends_In_Decl_Part): New routine.
4040 (Analyze_Global_In_Decl_Part): New routine.
4041 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
4042 Global. Verify that a body acts as a spec for pragma Contract_Cases.
4043 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
4044 (Chain_CTC): Correct the traversal of contract-
4045 and test-cases. Use Add_Contract_Item to chain a pragma.
4046 (Chain_Contract_Cases): Correct the traversal of contract-
4047 and test-cases. Use Add_Contract_Item to chain a pragma.
4048 (Check_Precondition_Postcondition): Update the comment on usage.
4049 (Check_Test_Case): Update the comment on usage.
4050 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
4051 (Analyze_Global_In_Decl_Part): New routine.
4052 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
4053 * sinfo.adb (Classifications): New routine.
4054 (Contract_Test_Cases): New routine.
4055 (Pre_Post_Conditions): New routine.
4056 (Set_Classifications): New routine.
4057 (Set_Contract_Test_Cases): New routine.
4058 (Set_Pre_Post_Conditions): New routine.
4059 (Set_Spec_CTC_List): Removed.
4060 (Set_Spec_PPC_List): Removed.
4061 (Spec_CTC_List): Removed.
4062 (Spec_PPC_List): Removed.
4063 * sinfo.ads: Update the structure of N_Contruct along with all
4064 related comments.
4065 (Classifications): New routine and pragma Inline.
4066 (Contract_Test_Cases): New routine and pragma Inline.
4067 (Pre_Post_Conditions): New routine and pragma Inline.
4068 (Set_Classifications): New routine and pragma Inline.
4069 (Set_Contract_Test_Cases): New routine and pragma Inline.
4070 (Set_Pre_Post_Conditions): New routine and pragma Inline.
4071 (Set_Spec_CTC_List): Removed.
4072 (Set_Spec_PPC_List): Removed.
4073 (Spec_CTC_List): Removed.
4074 (Spec_PPC_List): Removed.
4075
4076 2013-04-23 Doug Rupp <rupp@adacore.com>
4077
4078 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
4079 to account for LIB$STOP not having the chance to add the PC and
4080 PSL fields.
4081
4082 2013-04-23 Robert Dewar <dewar@adacore.com>
4083
4084 * sem_ch13.adb: Minor code reorganization (remove some redundant
4085 assignments).
4086 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
4087
4088 2013-04-23 Yannick Moy <moy@adacore.com>
4089
4090 * einfo.ads: Minor typo fix.
4091 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
4092 Static_Predicate is applied to a non-scalar or non-static type.
4093 * sem_prag.adb: Minor typo fix.
4094
4095 2013-04-23 Doug Rupp <rupp@adacore.com>
4096
4097 * init.c (GNAT$STOP) [VMS]: New function.
4098
4099 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4100
4101 * sem_ch3.adb: Add exp_pakd to context.
4102 (Constrain_Component_Type): If the component of the parent is
4103 packed, and the record subtype being built is already frozen,
4104 as is the case for an itype, the component type itself will not
4105 be frozen, and the packed array type for it must be constructed
4106 explicitly.
4107
4108 2013-04-23 Thomas Quinot <quinot@adacore.com>
4109
4110 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
4111
4112 2013-04-23 Yannick Moy <moy@adacore.com>
4113
4114 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
4115 at declaration.
4116 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
4117 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
4118 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
4119 * stylesw.adb (Save_Style_Check_Options): Protect testing the
4120 value of Style_Check_Comments_Spacing by a previous test that
4121 Style_Check_Comments is True.
4122
4123 2013-04-23 Thomas Quinot <quinot@adacore.com>
4124
4125 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
4126 Original_Name, and move declaration to package body as this
4127 subprogram is not used from outside. Also clarify documentation.
4128
4129 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4130
4131 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
4132 initialize_scalars, disable predicate checks on the generated
4133 assignment to an out scalar parameter.
4134
4135 2013-04-23 Gary Dismukes <dismukes@adacore.com>
4136
4137 * sem_ch4.adb (Analyze_Allocator): Remove error
4138 check for "constrained in partial view" constraints entirely.
4139
4140 2013-04-23 Robert Dewar <dewar@adacore.com>
4141
4142 * einfo.ads, sem_prag.ads: Minor reformatting.
4143 * errout.ads: Comment update.
4144
4145 2013-04-23 Yannick Moy <moy@adacore.com>
4146
4147 * exp_ch5.adb: Minor typo.
4148
4149 2013-04-23 Thomas Quinot <quinot@adacore.com>
4150
4151 * gnat_ugn.texi: Fix typo.
4152
4153 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4154
4155 * einfo.ads: Minor documentation clarification.
4156
4157 2013-04-23 Bob Duff <duff@adacore.com>
4158
4159 * types.ads: Fix incorrect comment.
4160
4161 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4162
4163 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
4164 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
4165 description of purpose.
4166 * checks.adb (Apply_Discriminant_Check): Use above renaming.
4167 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
4168 of the base type, rather than using the Object_Type predicate.
4169 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
4170 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
4171 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
4172 * exp_ch4.adb (Expand_N_Allocator): Ditto.
4173
4174 2013-04-23 Robert Dewar <dewar@adacore.com>
4175
4176 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
4177 than Assertion.
4178 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
4179 (Effective_Name): New function (Analyze_Pragma, case Check):
4180 Disallow [Statement_]Assertions (Check_Kind): Implement
4181 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
4182 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
4183 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
4184 (Effective_Name): New function.
4185 * sem_res.adb: Minor reformatting.
4186 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
4187 * gnat_rm.texi: Add documentation of new assertion kind
4188 Statement_Assertions.
4189
4190 2013-04-23 Robert Dewar <dewar@adacore.com>
4191
4192 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
4193 reformatting and code clean up.
4194
4195 2013-04-23 Vincent Celier <celier@adacore.com>
4196
4197 * prj-part.ads, prj-conf.ads: Minor comment updates.
4198
4199 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4200
4201 * einfo.adb (Predicate_Function): For a private type, retrieve
4202 predicate function from full view.
4203 * aspects.adb (Find_Aspect): Ditto.
4204 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
4205 the actual is a definite type, apply predicate check after call.
4206 * sem_res.adb: Do not apply a predicate check before the call to
4207 a generated Init_Proc.
4208
4209 2013-04-23 Robert Dewar <dewar@adacore.com>
4210
4211 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
4212 rewrite to make sure Is_Ignore is properly captured when aspect
4213 is declared.
4214 * sem_ch6.adb: Minor reformatting.
4215 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
4216 pragma for the case of a pragma coming from an aspect (already
4217 tested when we analyzed the aspect).
4218
4219 2013-04-23 Vincent Celier <celier@adacore.com>
4220
4221 * prj-conf.adb (Parse_Project_And_Apply_Config): New
4222 Boolean parameter Implicit_Project, defaulted to False. Call
4223 Prj.Part.Parse with Implicit_Project.
4224 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
4225 parameter Implicit_Project, defaulted to False.
4226 * prj-part.adb (Parse_Single_Project): New Boolean parameter
4227 Implicit_Project, defaulted to False. When Implicit_Project is
4228 True, change the Directory of the project node to the Current_Dir.
4229 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
4230
4231 2013-04-23 Robert Dewar <dewar@adacore.com>
4232
4233 * exp_util.adb: Minor reformatting.
4234
4235 2013-04-23 Robert Dewar <dewar@adacore.com>
4236
4237 * xoscons.adb: Minor reformatting.
4238
4239 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4240
4241 * sem_prag.adb (Check_Mode): Ensure that a
4242 self-referential output appears in both input and output lists of
4243 the subprogram as categorized by aspect Global.
4244 (Check_Usage): Rename formal parameters to better illustrate their
4245 function. Update all uses of the said formals.
4246
4247 2013-04-23 Thomas Quinot <quinot@adacore.com>
4248
4249 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
4250 parameter Append_NUL to make NUL-termination optional.
4251 * exp_dist.adb: Consistently use the above throughout instead of
4252 Get_Library_Unit_Name_String.
4253
4254 2013-04-23 Robert Dewar <dewar@adacore.com>
4255
4256 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
4257 reformatting.
4258
4259 2013-04-23 Pascal Obry <obry@adacore.com>
4260
4261 * xoscons.adb: Remove unused use clause, minor code clean-up.
4262
4263 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4264
4265 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
4266 (can apply to any scope entity).
4267 * sem_res.adb (Resolve_Call): If the call is within another
4268 expression function it does not constitute a freeze point.
4269
4270 2013-04-23 Yannick Moy <moy@adacore.com>
4271
4272 * exp_ch6.adb (Expand_Actuals): Test that Subp
4273 is overloadable before testing if it's an inherited operation.
4274
4275 2013-04-23 Robert Dewar <dewar@adacore.com>
4276
4277 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
4278 reformatting.
4279
4280 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4281
4282 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
4283 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
4284 is a source entity and the declaration is for an aliased
4285 unconstrained array, create a new subtype so that the flag
4286 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
4287
4288 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4289
4290 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
4291 from the spec to the body.
4292 (Find_Aspect): Update the call to Get_Aspect_Id.
4293 (Get_Aspect_Id): New version that takes an aspect specification.
4294 * aspects.ads: Reorganize all aspect related tables.
4295 (Get_Aspect_Id): New version that takes an aspect specification.
4296 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
4297 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
4298 the call to Get_Aspect_Id.
4299 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
4300 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
4301 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
4302
4303 2013-04-23 Robert Dewar <dewar@adacore.com>
4304
4305 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
4306 of getting proper name in the case where pragma comes from
4307 aspect.
4308 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
4309
4310 2013-04-23 Yannick Moy <moy@adacore.com>
4311
4312 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
4313 applicable policy.
4314
4315 2013-04-23 Thomas Quinot <quinot@adacore.com>
4316
4317 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
4318
4319 2013-04-23 Doug Rupp <rupp@adacore.com>
4320
4321 * init.c: Move facility macros outside IN_RTS.
4322
4323 2013-04-23 Thomas Quinot <quinot@adacore.com>
4324
4325 * freeze.adb (Freeze_Entity): For the case of a bit-packed
4326 array time that is known at compile time to have more that
4327 Integer'Last+1 elements, issue an error, since such arrays are
4328 not supported.
4329
4330 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
4331
4332 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
4333 Analyze_Input_Output.
4334 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
4335 (Analyze_Input_Output): Add formal parameter Self_Ref along with
4336 comment on its usage. Update all calls to Analyze_Input_Output.
4337 (Analyze_Pragma): Add new local variable Self_Ref to capture
4338 the presence of a self-referential dependency clause. Update
4339 all calls to Analyze_Input_Output.
4340 (Check_Mode): Add formal parameter Self_Ref along with comment on its
4341 usage. Verify the legality of a self-referential output.
4342
4343 2013-04-23 Ed Schonberg <schonberg@adacore.com>
4344
4345 * exp_ch6.adb: Add predicate checks on by-copy parameter.
4346
4347 2013-04-23 Vincent Celier <celier@adacore.com>
4348
4349 * a-envvar.adb, a-envvar.ads (Value): New.
4350
4351 2013-04-22 Yannick Moy <moy@adacore.com>
4352
4353 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
4354 null statement if ignored.
4355 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
4356 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
4357
4358 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
4359
4360 * sem_prag.adb (Analyze_Contract_Case): New routine.
4361 (Analyze_Pragma): Aspect/pragma Contract_Cases can
4362 now be associated with a library level subprogram.
4363 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
4364 in a subprogram body.
4365 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
4366 Subp_Id. Remove local constant Subp. The entity of the subprogram
4367 is now obtained via the formal paramter.
4368
4369 2013-04-22 Ed Schonberg <schonberg@adacore.com>
4370
4371 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
4372 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
4373 if the expression is a source entity.
4374
4375 2013-04-22 Yannick Moy <moy@adacore.com>
4376
4377 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
4378 comments.
4379 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
4380
4381 2013-04-22 Thomas Quinot <quinot@adacore.com>
4382
4383 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
4384 pragma, fix up error message to include original pragma name.
4385 * par_sco.adb: Minor reformatting.
4386
4387 2013-04-22 Robert Dewar <dewar@adacore.com>
4388
4389 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
4390 sem_ch6.adb, opt.ads: Minor reformatting.
4391
4392 2013-04-22 Pascal Obry <obry@adacore.com>
4393
4394 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
4395 Library_Standalone and Library_Kind.
4396
4397 2013-04-22 Ed Schonberg <schonberg@adacore.com>
4398
4399 * exp_ch6.adb (Expand_Actuals): If the call is to an
4400 inherited operation and the actual is a by-reference type with
4401 predicates, add predicate call to post-call actions.
4402 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
4403 error: a type declaration has a defining identifier, not an Etype.
4404 * sem_res.adb: Restore code removed because of above error.
4405
4406 2013-04-22 Doug Rupp <rupp@adacore.com>
4407
4408 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
4409
4410 2013-04-22 Yannick Moy <moy@adacore.com>
4411
4412 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
4413 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
4414
4415 2013-04-22 Vincent Celier <celier@adacore.com>
4416
4417 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
4418 No_Path_Information only when Directories_Must_Exist_In_Projects
4419 is False.
4420 (Get_Directories): Set Object_Directory
4421 or Exec_Directory to No_Path_Information only when
4422 Directories_Must_Exist_In_Projects is False.
4423
4424 2013-04-22 Yannick Moy <moy@adacore.com>
4425
4426 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
4427 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
4428 Pragma_Contract_Case and Name_Contract_Case.
4429
4430 2013-04-22 Yannick Moy <moy@adacore.com>
4431
4432 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
4433 Contract_Case.
4434 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
4435 description of Contract_Cases.
4436
4437 2013-04-12 Robert Dewar <dewar@adacore.com>
4438
4439 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
4440
4441 2013-04-12 Robert Dewar <dewar@adacore.com>
4442
4443 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
4444 of Check_Enabled.
4445 * gnat_rm.texi (Check_Policy): Update documentation for new
4446 Check_Policy syntax.
4447 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
4448 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
4449 syntax (like Assertion_Policy).
4450 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
4451
4452 2013-04-12 Doug Rupp <rupp@adacore.com>
4453
4454 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
4455 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
4456 handler if installed.
4457 * ctrl_c.c (__gnat_install_int_handler)
4458 [VMS]: Install a dummy sigaction handler to trigger the real
4459 user handler dispatch in init.c/__gnat_handle_vms_condition.
4460 (__gnat_uninstall_int_handler) [VMS]: Likewise.
4461
4462 2013-04-12 Vincent Celier <celier@adacore.com>
4463
4464 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
4465 to False if switch is specified.
4466 * makeutl.adb (Initialize_Source_Record): Do not look for the
4467 object file if there is no object directory.
4468 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
4469 variable, defaulted to True.
4470 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
4471 directory does not exist when Directories_Must_Exist_In_Projects is
4472 False.
4473 (Get_Directories): Do not fail when the object or the exec directory
4474 do not exist when Directories_Must_Exist_In_Projects is False.
4475
4476 2013-04-12 Robert Dewar <dewar@adacore.com>
4477
4478 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
4479 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
4480 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
4481 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
4482 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
4483 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
4484 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
4485 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
4486 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
4487
4488 2013-04-12 Doug Rupp <rupp@adacore.com>
4489
4490 * init.c: Don't clobber condition code on VMS.
4491
4492 2013-04-12 Robert Dewar <dewar@adacore.com>
4493
4494 * exp_aggr.adb: Minor reformatting.
4495 * namet.ads, namet.adb (Nam_In): New functions.
4496
4497 2013-04-12 Robert Dewar <dewar@adacore.com>
4498
4499 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
4500 (Has_Static_Predicate_Aspect): New flag.
4501 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
4502 (Has_Static_Predicate_Aspect): New flag.
4503 * exp_ch9.adb: Minor reformatting.
4504 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
4505 synonyms.
4506 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
4507 since this switch is gone and control of Debug is done with
4508 Assertions_Enabled.
4509 * gnat_rm.texi: Update documentation for Assertion_Policy and
4510 Check_Policy pragmas.
4511 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
4512 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
4513 controlled by Assertion_Enabled.
4514 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
4515 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
4516 controlled by Assertion_Enabled.
4517 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
4518 'Class forms.
4519 * sem_attr.adb: Minor reformatting.
4520 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
4521 if DISABLE policy applies.
4522 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
4523 aspect from pragma (Process_PPCs): Properly check assertion policy.
4524 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
4525 (Check_Appicable_Policy): New procedure.
4526 (Is_Valid_Assertion_Kind): New function.
4527 (Rewrite_Assertion_Kind): New procedure.
4528 (Analyze_Pragma): Handle case of disabled assertion pragma.
4529 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
4530 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
4531 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
4532 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
4533 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
4534 (Analyze_Pragma, case Debug_Policy): Now consistent with
4535 Assertion_Policy.
4536 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
4537 pragma.
4538 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
4539 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
4540 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
4541 * sem_prag.ads (Check_Enabled): Rewritten for new
4542 Assertion_Policy stuff.
4543 (Check_Appicable_Policy): New procedure.
4544 * sinfo.adb (Is_Disabled): New flag.
4545 (Is_Ignored): New flag.
4546 * sinfo.ads (Is_Disabled): New flag.
4547 (Is_Ignored): New flag.
4548 (N_Pragma_Argument_Association): New 'Class forms.
4549 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
4550 Name_uType_Invariant, Name_uInvariant.
4551 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
4552 * tree_io.ads (ASIS_Version_Number): Updated (remove
4553 read write of obsolete flags Debug_Pragmas_Disabled and
4554 Debug_Pragmas_Enabled.
4555
4556 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4557
4558 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
4559 of Build_Record_Aggr_Code, used to retrieve explicit values
4560 for inherited discriminants in an extension aggregate, when the
4561 ancestor type is unconstrained.
4562
4563 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4564
4565 * sem_attr.adb (Check_Stream_Attribute): If restriction
4566 No_Default_Stream_Attributes is active, it is illegal to use a
4567 predefined elementary type stream attribute either by itself,
4568 or more importantly as part of the attribute subprogram for a
4569 composite type. However, if the broader restriction No_Streams
4570 is active, then stream operations are not generated, and there
4571 is no error.
4572
4573 2013-04-12 Robert Dewar <dewar@adacore.com>
4574
4575 * gnatbind.adb: Minor reformatting.
4576
4577 2013-04-12 Bob Duff <duff@adacore.com>
4578
4579 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
4580 call only in the static elaboration model.
4581
4582 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4583
4584 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
4585 clause where both input and output lists are null.
4586 (Analyze_Pragma): Update the grammar of pragma Depends.
4587
4588 2013-04-12 Vincent Celier <celier@adacore.com>
4589
4590 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
4591 take a parameter value, not a count.
4592 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
4593 * projects.texi: Complete documentation of attribute Roots.
4594
4595 2013-04-12 Thomas Quinot <quinot@adacore.com>
4596
4597 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
4598 sem_ch3.adb: Minor reformatting.
4599 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
4600 improvement: note that the computation is pessimistic for bit
4601 packed arrays.
4602 * gnat_rm.texi (Range_Length): Fix minor error in description
4603 of attribute.
4604
4605 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4606
4607 * aspects.adb (Find_Aspect): New routine.
4608 (Find_Value_Of_Aspect): New routine.
4609 (Has_Aspect): Reimplemented.
4610 * aspects.ads (Find_Aspect): New routine.
4611 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
4612 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
4613 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
4614 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
4615 * sem_ch5.adb (Analyze_Iterator_Specification): Update
4616 the call to Find_Aspect. Use function Has_Aspect for better
4617 readability.
4618 (Preanalyze_Range): Use function Has_Aspect for better readability.
4619 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
4620 * sem_prag.adb (Analyze_Pragma): There is no longer need to
4621 look at the parent to extract the corresponding pragma for
4622 aspect Global.
4623
4624 2013-04-12 Robert Dewar <dewar@adacore.com>
4625
4626 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
4627 restrict.ads: Minor reformatting.
4628
4629 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4630
4631 * lib-xref.adb: Retrieve original name of classwide type if any.
4632
4633 2013-04-12 Thomas Quinot <quinot@adacore.com>
4634
4635 * exp_ch11.ads: Minor reformatting.
4636
4637 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4638
4639 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
4640 an entry for Aspect_Ghost in the table of canonical aspects.
4641 (Has_Aspect): New routine.
4642 * aspects.ads: Add Aspect_Ghost to all relevant
4643 tables. Alphabetize subprograms in this unit.
4644 (Has_Aspect): New routine.
4645 * einfo.adb: Add with and use clauses for Aspects.
4646 (Is_Ghost_Function): New routine.
4647 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
4648 update the structure of the related nodes.
4649 (Is_Ghost_Function): New routine.
4650 * exp_ch4.adb (Find_Enclosing_Context): Use routine
4651 Is_Body_Or_Package_Declaration to terminate a search.
4652 (Is_Body_Or_Unit): Removed.
4653 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
4654 Is_Body_Or_Package_Declaration to terminate a search.
4655 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
4656 not need special processing by the parser.
4657 * sem_attr.adb (Analyze_Access_Attribute): Detect an
4658 illegal use of 'Access where the prefix is a ghost function.
4659 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
4660 to terminate a search. (Check_References_In_Prefix): Use routine
4661 Is_Body_Or_Package_Declaration to terminate a search.
4662 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
4663 inside an assertion expression. Verify the legality of a call
4664 to a ghost function.
4665 (Check_Ghost_Function_Call): New routine.
4666 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
4667 the setting of attribute In_Assertion_Expression to Analyze_Call.
4668 (Check_Overriding_Indicator): Detect an illegal attempt to
4669 override a function with a ghost function.
4670 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
4671 a ghost function as a generic actual.
4672 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
4673 to In_Assertion.
4674 * sem_prag.adb: Add an entry for pragma Ghost in the table
4675 of significant arguments.
4676 (Analyze_Pragma): Do not analyze
4677 an "others" case guard. Add processing for pragma Ghost. Use
4678 Preanalyze_Assert_Expression when analyzing the expression of
4679 pragmas Loop_Invariant and Loop_Variant.
4680 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
4681 (Is_Body_Or_Package_Declaration): New routine.
4682 * sem_util.ads: Alphabetize subprotrams in this unit.
4683 (Is_Body_Or_Package_Declaration): New routine.
4684 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
4685 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
4686 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
4687 to better reflect its use. Update all places that mention the flag.
4688 (In_Assertion): Rename to In_Assertion_Expression. Update
4689 related pragma Inline. (Set_In_Assertion): Rename to
4690 Set_In_Assertion_Expression. Update related pragma Inline.
4691 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
4692 id Pragma_Ghost.
4693
4694 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4695
4696 * sem_prag.adb (Set_Imported): Do not generate error for multiple
4697 Import in CodePeer mode.
4698 * s-rident.ads: Fix minor typo.
4699
4700 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4701
4702 * checks.adb (Insert_Valid_Check): Do not insert validity check
4703 in the body of the generated predicate function, to prevent
4704 infinite recursion.
4705
4706 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4707
4708 * s-rident.ads: Add various missing Ada 2012 restrictions:
4709 No_Access_Parameter_Allocators, No_Coextensions,
4710 No_Use_Of_Attribute, No_Use_Of_Pragma.
4711 * snames.ads-tmpl: Add corresponding names.
4712 * restrict.ads restrict.adb: Subprograms and data structures to
4713 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
4714 * sem_ch4.adb: Correct name of restrictions is
4715 No_Standard_Allocators_After_Elaboration.
4716 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
4717 violation of restriction No_Use_Of_Attribute.
4718 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4719 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
4720 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
4721 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
4722 and No_Coextensions.
4723 * bcheck.adb: Correct name of restrictions is
4724 No_Standard_Allocators_After_Elaboration.
4725 * gnatbind.adb: Correct name of restrictions is
4726 No_Standard_Allocators_After_Elaboration.
4727
4728 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4729
4730 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
4731 Correct error message format.
4732
4733 2013-04-12 Robert Dewar <dewar@adacore.com>
4734
4735 * sem_attr.adb: Minor reformatting.
4736
4737 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4738
4739 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
4740 item that has not been analyzed, because the unit may have errors,
4741 or the context item may come from a proper unit inserted at the
4742 point of a stub and not analyzed yet.
4743
4744 2013-04-12 Thomas Quinot <quinot@adacore.com>
4745
4746 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
4747 List_Record_Info): Also include scalar storage order information in
4748 output.
4749
4750 2013-04-12 Yannick Moy <moy@adacore.com>
4751
4752 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
4753 Contract_Cases instead of Contract_Case pragma.
4754
4755 2013-04-12 Robert Dewar <dewar@adacore.com>
4756
4757 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
4758
4759 2013-04-12 Yannick Moy <moy@adacore.com>
4760
4761 * sem_attr.adb (Analyze_Attribute): Update analyse of
4762 Attribute_Old and Attribute_Result so they are allowed in the
4763 right-hand-side of an association in a Contract_Cases pragma.
4764 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
4765 the expressions in a Contract_Cases pragma.
4766
4767 2013-04-12 Robert Dewar <dewar@adacore.com>
4768
4769 * sem.ads, opt.ads: Minor comment edits.
4770 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
4771
4772 2013-04-12 Claire Dross <dross@adacore.com>
4773
4774 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
4775 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
4776 not suitable for formal analysis.
4777
4778 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4779
4780 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
4781 to locate package entity, which may be a child unit.
4782
4783 2013-04-12 Thomas Quinot <quinot@adacore.com>
4784
4785 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
4786 the specified timeout is 0, do not attempt to determine whether the
4787 connection succeeded.
4788
4789 2013-04-12 Doug Rupp <rupp@adacore.com>
4790
4791 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
4792
4793 2013-04-12 Doug Rupp <rupp@adacore.com>
4794
4795 * s-fileio.adb: Minor reformatting.
4796
4797 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4798
4799 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
4800 the last statement in the analyzed loop is an unconditional
4801 exit statement.
4802
4803 2013-04-12 Robert Dewar <dewar@adacore.com>
4804
4805 * opt.ads (Style_Check_Main): New switch.
4806 * sem.adb (Semantics): Set Style_Check flag properly for new
4807 unit to be analyzed.
4808 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
4809 the proper setting of this flag is now part of the Semantics
4810 procedure.
4811 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
4812 for -gnatg and -gnaty
4813
4814 2013-04-12 Doug Rupp <rupp@adacore.com>
4815
4816 * s-crtl.ads (fopen, freopen): Add vms_form parameter
4817 * i-cstrea.ads (fopen, freopen): Likewise.
4818 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
4819 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
4820 [VMS]: Split out RMS keys and call CRTL function appropriately.
4821 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
4822 subprograms.
4823 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
4824 vms_form
4825 * gnat_rm.texi: Document implemented RMS keys.
4826
4827 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4828
4829 * sem_ch13.adb (Analyze_Aspect_Specifications):
4830 Insert the corresponding pragma for aspect Abstract_State at
4831 the top of the visible declarations of the related package.
4832 Previously this was only done when the package is a compilation
4833 unit.
4834
4835 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4836
4837 * gnat_ugn.texi: Further menu clean ups.
4838 * sem_prag.adb, opt.ads: Minor reformatting.
4839 * sem_util.ads: Minor comment fix.
4840
4841 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4842
4843 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
4844 Depends is now a delayed aspect. The delay is required
4845 due to the interplay between aspects Depends and Global.
4846 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
4847 * sem_prag.adb: Reformat various error messages.
4848 (Add_Item): New subsidiary routine.
4849 (Analyze_Pragma): Add new variables
4850 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
4851 analysis of pragma Depends now has the capability to check
4852 the proper mode and usage of subprogram inputs and outputs.
4853 (Appears_In): New routine.
4854 (Check_Function_Return): New routine.
4855 (Check_Mode): New routine.
4856 (Check_Usage): New routine.
4857 (Collect_Subprogram_Inputs_Outputs): New routine.
4858
4859 2013-04-12 Bob Duff <duff@adacore.com>
4860
4861 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
4862 stack entry.
4863
4864 2013-04-12 Robert Dewar <dewar@adacore.com>
4865
4866 * switch-c.adb: Minor fix to wording of error message for
4867 -gnatet/eT.
4868
4869 2013-04-12 Robert Dewar <dewar@adacore.com>
4870
4871 * impunit.adb: Add s-multip and s-mudido to list of impl defined
4872 system units.
4873 * gnat_rm.texi: Add documentation for
4874 System.Multiprocessors[.Dispatching_Domains].
4875
4876 2013-04-12 Ben Brosgol <brosgol@adacore.com>
4877
4878 * gnat_ugn.texi: Completion of menu cleanups.
4879
4880 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4881
4882 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
4883 in Relaxed_RM_Semantics.
4884
4885 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4886
4887 * set_targ.adb (elab code): Add support for non gcc back-ends
4888 where save_argv is null.
4889
4890 2013-04-12 Robert Dewar <dewar@adacore.com>
4891
4892 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
4893 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
4894 type (Target_Dependent_Info_Write): Add _Name, now an access type.
4895 * set_targ.adb (Write_Target_Dependent_Values): Use name
4896 from -gnatet switch stored in Target_Dependent_Info_Write_Name
4897 (Read_Target_Dependent_Values): Use name from -gnateT switch
4898 stored in Target_Dependent_Info_Read_Name.
4899 * switch-c.adb: New form of -gnatet and -gnateT switches.
4900 * usage.adb: New form of -gnatet and -gnateT switches with
4901 file name.
4902
4903 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4904
4905 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
4906 arithmetics when looking for a read-only variable in the expression.
4907
4908 2013-04-11 Javier Miranda <miranda@adacore.com>
4909
4910 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
4911 interface thunks since it is performed at the caller side.
4912 (Expand_Simple_Function_Return): No accessibility check needed in thunks
4913 since the check is done by the target routine.
4914
4915 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4916
4917 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
4918 expression with type Any_Priority.
4919 * exp_ch9.adb (Initialize_Protection): Check that the value
4920 of the priority expression is within the bounds of the proper
4921 priority type.
4922
4923 2013-04-11 Robert Dewar <dewar@adacore.com>
4924
4925 * sem_prag.adb, prj-env.adb: Minor reformatting.
4926
4927 2013-04-11 Ben Brosgol <brosgol@adacore.com>
4928
4929 * gnat_ugn.texi: Clean ups.
4930
4931 2013-04-11 Yannick Moy <moy@adacore.com>
4932
4933 * set_targ.adb: Minor comment update.
4934
4935 2013-04-11 Pascal Obry <obry@adacore.com>
4936
4937 * gnat_ugn.texi: Remove obsolete comment about DLL calling
4938 convention.
4939
4940 2013-04-11 Javier Miranda <miranda@adacore.com>
4941
4942 * exp_ch6.adb (Expand_Call): For the call to the target primitive
4943 of an interface thunks do not compute the extra actuals; just
4944 propagate the extra actuals received by the thunk.
4945 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
4946 Thunk_Entity.
4947 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
4948 formals in interface thunks whose target primitive has no extra
4949 formals.
4950
4951 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4952
4953 * sem_prag.adb (Analyze_Pragma): Detect
4954 a renaming by looking at the Renamed_Object attribute.
4955 (Is_Renaming): Removed.
4956
4957 2013-04-11 Vincent Celier <celier@adacore.com>
4958
4959 * prj-env.adb (Initialize_Default_Project_Path): Take
4960 into account a project path file, specified by environment
4961 variable GPR_PROJECT_PATH_FILE, before taking into account
4962 GPR_PROJECT_PATH.
4963 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
4964
4965 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4966
4967 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
4968 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
4969 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
4970 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
4971 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
4972 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
4973 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
4974 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
4975 Move Iterator operations from body to private part of spec.
4976
4977 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4978
4979 * ttypes.ads, get_targ.ads: More minor rewording of comments.
4980
4981 2013-04-11 Johannes Kanig <kanig@adacore.com>
4982
4983 * debug.adb: Document use of switch -gnatd.Z.
4984
4985 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4986
4987 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
4988 support renamings of entire objects. Legal renamings are replaced by
4989 the object they rename.
4990 (Is_Renaming): New routine.
4991
4992 2013-04-11 Yannick Moy <moy@adacore.com>
4993
4994 * set_targ.adb, opt.ads: Minor changes in comments.
4995
4996 2013-04-11 Ben Brosgol <brosgol@adacore.com>
4997
4998 * gnat_ugn.texi: Minor clean ups.
4999
5000 2013-04-11 Robert Dewar <dewar@adacore.com>
5001
5002 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
5003 function p from Nlists to Treepr.
5004
5005 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5006
5007 * sem_disp.adb (Check_Dispatching_Context): If the context is
5008 a contract for a null procedure defer error reporting until
5009 postcondition body is created.
5010 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
5011 null procedure, complete the analysis of its contracts so that
5012 calls within classwide conditions are properly rewritten as
5013 dispatching calls.
5014
5015 2013-04-11 Thomas Quinot <quinot@adacore.com>
5016
5017 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
5018
5019 2013-04-11 Robert Dewar <dewar@adacore.com>
5020
5021 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
5022
5023 2013-04-11 Robert Dewar <dewar@adacore.com>
5024
5025 * atree.adb, atree.ads (Node31): New function.
5026 (Set_Node31): New procedure.
5027
5028 2013-04-11 Robert Dewar <dewar@adacore.com>
5029
5030 * errout.ads: Minor typo correction.
5031
5032 2013-04-11 Javier Miranda <miranda@adacore.com>
5033
5034 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
5035
5036 2013-04-11 Robert Dewar <dewar@adacore.com>
5037
5038 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
5039 * back_end.ads (C_String): Moved to Get_Targ
5040 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
5041 Moved to Get_Targ.
5042 * cstand.adb (Register_Float_Type): New interface
5043 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
5044 * get_targ.adb (Register_Back_End_Types): Moved here from
5045 Back_End.
5046 * get_targ.ads (C_String): Moved here from Back_End
5047 (Register_Type_Proc): Moved here from Back_End
5048 (Register_Back_End_Types): here from Back_End.
5049 * gnat1drv.adb (GGnat11drv): Add call to
5050 Write_Target_Dependent_Values;
5051 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
5052 obsolete target dependent info.
5053 * opt.ads (Generate_Target_Dependent_Info):
5054 Removed (Target_Dependent_Info_Read): New flag
5055 (Target_Dependent_Info_Write): New flag
5056 * output.adb: Minor comment change
5057 * s-os_lib.ads: Minor reformatting
5058 * set_targ.ads, set_targ.adb: Minor reformatting.
5059 * switch-c.adb (Scan_Switches.First_Ptr): New variable
5060 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
5061 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
5062 * ttypes.ads: Remove documentation section on target dependent
5063 info in ali file Remove four letter codes, no longer used Instead
5064 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
5065 * usage.adb: Add usage lines for -gnatet/-gnateT
5066 * gcc-interface/Make-lang.in: Update dependencies.
5067
5068 2013-04-11 Thomas Quinot <quinot@adacore.com>
5069
5070 * sem_ch4.adb: Update documentation.
5071 * sinfo.ads (N_Expression_With_Actions): Ditto.
5072
5073 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5074
5075 * sem_ch13.adb (Analyze_Aspect_Specifications):
5076 Add a guard to prevent the double insertion of the same aspect
5077 into a rep item list. This previously led to a circularity.
5078
5079 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5080
5081 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
5082 reference if the prefix is the dereference of an anonymous access
5083 to subprogram type.
5084 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
5085 properly a reference to the current instance of a protected type
5086 from within a protected subprogram.
5087 * sem_res.adb (Find_Unique_Access_Type): Treat
5088 Attribute_Access_Type like Allocator_Type when resolving an
5089 equality operator.
5090
5091 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5092
5093 * xgnatugn.adb: Remove obsolete comments.
5094
5095 2013-04-11 Robert Dewar <dewar@adacore.com>
5096
5097 * back_end.ads, back_end.adb: Minor reformatting.
5098 * set_targ.ads, set_targ.adb: New files.
5099
5100 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5101
5102 * sem_case.adb (Check_Against_Predicate): New routine.
5103 (Check_Choices): When the type covered by the list of choices
5104 is a static subtype with a static predicate, check all choices
5105 agains the predicate.
5106 (Issue_Msg): All versions removed.
5107 (Missing_Choice): New routines.
5108 * sem_ch4.adb: Code and comment reformatting.
5109 (Analyze_Case_Expression): Do not check the choices when the case
5110 expression is being preanalyzed and the type of the expression
5111 is a subtype with a static predicate.
5112 (Has_Static_Predicate): New routine.
5113 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
5114 Always build a range even if the low and hi bounds denote the
5115 same value. This is needed by the machinery in Check_Choices.
5116 (Build_Static_Predicate): Always build a range even if the low and
5117 hi bounds denote the same value. This is needed by the machinery
5118 in Check_Choices.
5119
5120 2013-04-11 Robert Dewar <dewar@adacore.com>
5121
5122 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
5123 reformatting.
5124
5125 2013-04-11 Doug Rupp <rupp@adacore.com>
5126
5127 * gnatlink.adb: Fold program basename to lower case on VMS for
5128 consistency.
5129
5130 2013-04-11 Matthew Heaney <heaney@adacore.com>
5131
5132 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
5133 entering loop.
5134
5135 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5136
5137 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
5138
5139 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5140
5141 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
5142 needed, and seems to confuse some versions of makeinfo.
5143
5144 2013-04-11 Javier Miranda <miranda@adacore.com>
5145
5146 * einfo.adb (Is_Thunk): Remove assertion.
5147 (Set_Is_Thunk): Add assertion.
5148 * einfo.ads (Is_Thunk): Complete documentation.
5149 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
5150 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
5151 (Is_Variable_Size_Record): Moved to sem_util
5152 * exp_ch6.adb (Expand_Call): Code cleanup.
5153 (Expand_N_Extended_Return_Statement): Code cleanup.
5154 (Expand_Simple_Function_Return): Code cleanup.
5155 * exp_disp.adb Remove dependency on exp_ch3
5156 (Expand_Interface_Thunk): Add minimum decoration needed to set
5157 attribute Is_Thunk.
5158 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
5159 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
5160 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
5161 (Is_Variable_Size_Record): Moved from exp_ch3
5162
5163 2013-04-11 Javier Miranda <miranda@adacore.com>
5164
5165 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
5166 not add cleanup actions in thunks associated with interface types.
5167 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
5168 the package spec.
5169 * exp_ch4.adb (Tagged_Conversion): Update call to
5170 Expand_Interface_Conversion since the parameter Is_Static is no
5171 longer needed.
5172 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
5173 assertion to ensure that interface thunks are never handled by
5174 this routine.
5175 (Expand_N_Simple_Function_Return): Do not rewrite this statement
5176 as an extended return statement in interface thunks, and do not
5177 perform copy in the secondary stack if the return statement is
5178 located in a thunk.
5179 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
5180 the pointer to the returned object in functions returning interface
5181 types.
5182 (Expand_Interface_Thunk): For functions returning interface types
5183 displace the pointer to the returned object.
5184 (Expand_Interface_Conversion): Remove formal
5185 Is_Static since this subprogram can now evaluate it locally.
5186 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
5187 propagate the type returned by the covered interface primitive to
5188 the internal interface entity. Needed by the thunk to generate
5189 the code which displaces "this" to reference the corresponding
5190 secondary dispatch table.
5191 * sem_disp.adb (Propagate_Tag): Update call to
5192 Expand_Interface_Conversion since the parameter Is_Static is no
5193 longer needed.
5194 * sem_res.adb (Resolve_Type_Conversion): Update calls to
5195 Expand_Interface_Conversion since the parameter Is_Static is no
5196 longer needed plus code cleanup.
5197
5198 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5199
5200 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
5201
5202 2013-04-11 Robert Dewar <dewar@adacore.com>
5203
5204 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
5205 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
5206
5207 2013-04-11 Yannick Moy <moy@adacore.com>
5208
5209 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
5210 discriminant check for Unchecked_Union.
5211 * sem_res.adb (Resolve_Selected_Component): Set flag
5212 Do_Discriminant_Check even when expansion is not performed.
5213 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
5214 of Unchecked_Union.
5215
5216 2013-04-11 Thomas Quinot <quinot@adacore.com>
5217
5218 * sem_ch13.adb (Same_Representation): Two types with different scalar
5219 storage order never have the same representation.
5220
5221 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5222
5223 * xgnatugn.adb (Push_Conditional): Simplify handling,
5224 no longer need to keep track of "excluding" sections.
5225 (Currently_Excluding): Removed.
5226 (Process_Source_File):
5227 Set unw/vms flag so that texinfo can do the whole handling of
5228 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
5229 sections.
5230 * gnat_ugn.texi: Add a section on performing unassisted install
5231 on Windows.
5232
5233 2013-04-11 Johannes Kanig <kanig@adacore.com>
5234
5235 * debug.adb: Document usage of -gnatd.Q switch.
5236
5237 2013-04-11 Matthew Heaney <heaney@adacore.com>
5238
5239 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
5240 before element comparisons.
5241 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
5242 Ditto.
5243 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
5244 element comparisons.
5245 * a-rbtgso.adb (Difference, Intersection): Adjust locks
5246 before element comparisons.
5247 (Is_Subset, Overlap): Ditto
5248 (Symmetric_Difference, Union): Ditto
5249 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
5250 before element comparisons.
5251 (Set_Subset, Set_Overlap): Ditto
5252 (Set_Symmetric_Difference, Set_Union): Ditto
5253 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
5254 (Update_Element_Preserving_Key): Adjust locks before element
5255 comparisons (Replace_Element): Ditto
5256
5257 2013-04-11 Pascal Obry <obry@adacore.com>
5258
5259 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
5260 attribute.
5261
5262 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5263
5264 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
5265 Expand_N_Object_Declaration, used to construct an aggregate
5266 with static components whenever possible, so that objects of a
5267 discriminated type can be initialized without calling the init.
5268 proc for the type.
5269
5270 2013-04-11 Vincent Celier <celier@adacore.com>
5271
5272 * prj-makr.adb (Process_Directory): On VMS, always delete,
5273 then recreate the temporary file with Create_Output_Text_File,
5274 otherwise the output redirection does not work properly.
5275
5276 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5277
5278 * urealp.ads: Fix minor typo.
5279
5280 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
5281
5282 * cio.c (mktemp): Don't use tmpnam function from the
5283 system on VxWorks in kernel mode.
5284
5285 2013-04-11 Vincent Celier <celier@adacore.com>
5286
5287 * make.adb (Compile): Clarify the error message reported
5288 when gnatmake refuses to compile a runtime source.
5289 (Start_Compile_If_Possible): Ditto.
5290
5291 2013-04-11 Vincent Celier <celier@adacore.com>
5292
5293 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
5294
5295 2013-04-11 Vincent Celier <celier@adacore.com>
5296
5297 * switch-c.adb: Document internal switches.
5298 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
5299 -gnatez and -gnateO.
5300
5301 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5302
5303 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
5304 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
5305 subprogram stubs.
5306 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
5307 pre/post pragmas at once before analyzing the proper body.
5308 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
5309 aspect on a subprogram stub.
5310 * aspects.adb: Aspect specifications can appear on a
5311 subprogram_Body_Stub.
5312
5313 2013-04-11 Vincent Celier <celier@adacore.com>
5314
5315 * gnatname.adb: Minor comment fix.
5316
5317 2013-04-11 Vincent Celier <celier@adacore.com>
5318
5319 * prj-makr.adb (Process_Directory): Create a new temporary
5320 file for each invocation of the compiler, in directory pointed
5321 by environment variable TMPDIR if it exists.
5322
5323 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5324
5325 * gnat_ugn.texi: Minor editing/clean ups.
5326
5327 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5328
5329 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
5330 extracted from Analyze_Subprogram_Declaration, to handle null
5331 procedure declarations that in ada 2012 can be completions of
5332 previous declarations.
5333
5334 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5335
5336 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
5337 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
5338
5339 2013-04-11 Robert Dewar <dewar@adacore.com>
5340
5341 * g-spipat.ads: Minor comment fix.
5342
5343 2013-04-11 Robert Dewar <dewar@adacore.com>
5344
5345 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
5346 reformatting.
5347
5348 2013-04-11 Thomas Quinot <quinot@adacore.com>
5349
5350 * exp_util.ads (Fully_Qualified_Name_String): Document that the
5351 constructed literal is the entity name in all upper case.
5352
5353 2013-04-11 Thomas Quinot <quinot@adacore.com>
5354
5355 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
5356 check for implementation defined identifiers.
5357
5358 2013-04-11 Yannick Moy <moy@adacore.com>
5359
5360 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
5361 of why range check and length are put on different nodes.
5362 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
5363 when doing their expansion.
5364
5365 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5366
5367 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
5368 New function to implement the notion introduced in RM 7.3.1
5369 (5.2/3): in a child unit, a derived type is within the derivation
5370 class of an ancestor declared in a parent unit, even if there
5371 is an intermediate derivation that does not see the full view
5372 of that ancestor.
5373 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
5374 incomplete view of an ancestor makes a numeric conversion legal.
5375
5376 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5377
5378 * sem_ch6.adb: in Ada2012 operators can only have in
5379 parameters.
5380
5381 2013-04-11 Vincent Celier <celier@adacore.com>
5382
5383 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
5384 the mapping file ALI files of sources that have been replaced.
5385
5386 2013-04-11 Vincent Celier <celier@adacore.com>
5387
5388 * projects.texi: Add subsection Duplicate Sources in Projects.
5389
5390 2013-04-11 Vincent Celier <celier@adacore.com>
5391
5392 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
5393
5394 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5395
5396 * init.c (__gnat_install_handler): Only set up an alternate
5397 stack when installing a signal handler for SIGSEGV.
5398
5399 2013-04-11 Thomas Quinot <quinot@adacore.com>
5400
5401 * g-socket.adb (Connect_Socket, timeout version): Call
5402 underlying connect operation directly, not through the 2-argument
5403 Connect_Socket thick binding, in order to avoid raising a junk
5404 exception for the EINPROGRESS return.
5405
5406 2013-04-11 Robert Dewar <dewar@adacore.com>
5407
5408 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
5409
5410 2013-04-11 Robert Dewar <dewar@adacore.com>
5411
5412 * hostparm.ads: Minor reformatting.
5413
5414 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5415
5416 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
5417 tables.
5418 * elists.ads, elists.adb (Contains): New routine.
5419 * par-prag.adb: Pragma Depends does not need any special treatment
5420 by the parser.
5421 * sem_ch13.adb (Analyze_Aspect_Specifications):
5422 Transform aspect Depends into a corresponding pragma.
5423 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
5424 inspection at its freeze point.
5425 * sem_prag.adb (Analyze_Pragma): Perform analysis and
5426 normalization of pragma Depends. Remove the use of function
5427 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
5428 parameters of a subprogram. Add a value for pragma Depends in
5429 table Sig_Flags.
5430 (Is_Duplicate_Item): Removed.
5431 * snames.ads-tmpl: Add predefined name for Depends as well as
5432 a pragma identifier.
5433
5434 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5435
5436 * gnat1drv.adb: Minor code clean up.
5437
5438 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5439
5440 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
5441 Ignore enumeration rep clauses by default in CodePeer mode, unless
5442 -gnatd.I is specified.
5443
5444 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5445
5446 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
5447 an expression that has been attached to the else_actions of an
5448 if-expression, the capture is not safe.
5449
5450 2013-04-11 Yannick Moy <moy@adacore.com>
5451
5452 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
5453 conversion for arrays.
5454
5455 2013-04-11 Robert Dewar <dewar@adacore.com>
5456
5457 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
5458
5459 2013-04-11 Johannes Kanig <kanig@adacore.com>
5460
5461 * adabkend.adb: Minor comment addition.
5462
5463 2013-04-11 Matthew Heaney <heaney@adacore.com>
5464
5465 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
5466 lock counts before entering loop.
5467 (Find): Ditto.
5468 (Is_Sorted, Merge, Sort): Ditto.
5469 (Reverse_Find): Ditto.
5470 (Splice_Internal): Internal operation to refactor splicing logic.
5471 (Splice): Some logic moved into Splice_Internal.
5472
5473 2013-04-11 Johannes Kanig <kanig@adacore.com>
5474
5475 * adabkend.adb (Scan_Compiler_Arguments): Do not call
5476 Set_Output_Object_File_Name in Alfa_Mode
5477 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
5478 * opt.ads: Fix documentation.
5479
5480 2013-04-11 Robert Dewar <dewar@adacore.com>
5481
5482 * sem_res.adb: Minor code reorganization and comment fixes.
5483 * sem_type.adb: Minor reformatting.
5484
5485 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5486
5487 * exp_ch4.adb (Process_Transient_Object): Add new
5488 local variable Fin_Call. Remove and explain ??? comment. Use the
5489 Actions of logical operators "and then" and "or else" to insert
5490 the generated finalization call.
5491
5492 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5493
5494 * gnat_rm.texi: Fix typo.
5495
5496 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5497
5498 * sem_res.adb: Minor reformatting.
5499
5500 2013-04-11 Robert Dewar <dewar@adacore.com>
5501
5502 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
5503 of Field30 (was wrong, but no effect, since not yet referenced by
5504 back end) Add declarations for Field31-Field35 Add declarations
5505 for Node31-Node35.
5506 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
5507 procedures.
5508 (Has_Predicates): No longer applies to functions.
5509 (Is_Predicate_Function): New flag.
5510 (Is_Predicate_Function_M): New flag.
5511 (Is_Invariant_Procedure): New flag.
5512 (Predicate_Function_M): New function.
5513 (Set_Predicate_Function_M): New procedure.
5514 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
5515 case of appearing in predicate used for membership test.
5516 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
5517 Is_Invariant_Procedure flag.
5518 * exp_ch4.adb (Expand_Op_In): Call special predicate function
5519 that takes care of raise_expression nodes in the predicate.
5520 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
5521 membership case.
5522 * sem_ch13.adb (Build_Predicate_Functions): New name for
5523 Build_Predicate_Function. Major rewrite to take care of raise
5524 expression in predicate for membership tests.
5525 * sem_res.adb (Resolve_Actuals): Include both predicate functions
5526 in defense against infinite predicate function loops.
5527 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
5528
5529 2013-04-11 Robert Dewar <dewar@adacore.com>
5530
5531 * sem_prag.adb: Minor reformatting.
5532
5533 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5534
5535 * lib-xref.adb: Generate reference for component of anonymous
5536 access type.
5537
5538 2013-04-11 Robert Dewar <dewar@adacore.com>
5539
5540 * stand.ads: Minor reformatting.
5541
5542 2013-04-11 Matthew Heaney <heaney@adacore.com>
5543
5544 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
5545 counts before entering loop.
5546 (Find, Find_Index): Ditto.
5547 (Is_Sorted, Merge, Sort): Ditto.
5548 (Reverse_Find, Reverse_Find_Index): Ditto.
5549
5550 2013-04-11 Robert Dewar <dewar@adacore.com>
5551
5552 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
5553 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
5554 * expander.adb: Add call to Expand_N_Raise_Expression.
5555 * par-ch11.adb (P_Raise_Expression): New procedure.
5556 * par-ch4.adb (P_Relation): Handle Raise_Expression.
5557 * par.adb (P_Raise_Expression): New procedure.
5558 * sem.adb: Add handling for N_Raise_Expression.
5559 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
5560 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
5561 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
5562 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
5563 * stand.ads (Any_Type): Document use with N_Raise_Expression.
5564
5565 2013-04-11 Vincent Celier <celier@adacore.com>
5566
5567 * gnat_ugn.texi: Remove section "The Development Environments"
5568 now that all predefined attributes are documented, including
5569 those in package IDE.
5570
5571 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5572
5573 * sem_ch6.adb: Preserve parent link in copy of expression.
5574
5575 2013-04-11 Vincent Celier <celier@adacore.com>
5576
5577 * projects.texi: Complete rewrite of the subsection Attributes
5578 in section "Project file Reference".
5579
5580 2013-04-11 Robert Dewar <dewar@adacore.com>
5581
5582 * exp_ch4.adb: Minor reformatting.
5583
5584 2013-04-11 Robert Dewar <dewar@adacore.com>
5585
5586 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
5587 expression-with-actions node. No longer needed given fix to
5588 sem_prag and caused loss of some useful warnings.
5589 * sem.ads: Minor reformatting.
5590 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
5591 Check_Enabled. These two routines were curiously incompatible
5592 causing confusion.
5593 (Analyze_Pragma, case Check): Make sure we do
5594 not expand the string argument if the check is disabled. Avoid
5595 use of Check_Disabled, which resulted in missing analysis in
5596 some cases.
5597 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
5598 Check_Enabled. These two routines were curiously incompatible
5599 causing confusion.
5600
5601 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5602
5603 * exp_ch4.adb (Process_Transient_Object): Use
5604 an unchecked conversion when associating a transient controlled
5605 object with its "hook".
5606
5607 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5608
5609 * sem_prag.adb (Analyze_Pragma, case
5610 Preelaborable_Initialization): The pragma is legal if it comes
5611 from an aspect on the private view of the type, even though its
5612 analysis point takes place later at the freeze point.
5613
5614 2013-04-11 Robert Dewar <dewar@adacore.com>
5615
5616 * sem_ch6.adb: Minor reformatting.
5617
5618 2013-04-11 Yannick Moy <moy@adacore.com>
5619
5620 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
5621 read ALI files with No_Object=True in Alfa mode.
5622 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
5623 this is during frame condition generation of translation to Why.
5624
5625 2013-04-11 Robert Dewar <dewar@adacore.com>
5626
5627 * exp_ch4.adb: Minor code reorganization
5628 * types.ads: Minor reformatting.
5629
5630 2013-04-11 Johannes Kanig <kanig@adacore.com>
5631
5632 * opt.ads New global boolean Frame_Condition_Mode to avoid
5633 referring to command line switch.
5634 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
5635 is present, and disable Code generation in that case. Disable
5636 ALI file generation when switch is *not* present.
5637
5638 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5639
5640 * sem_ch6.adb (Analyze_Expression_Function): Perform the
5641 pre-analysis on a copy of the expression, to prevent downstream
5642 visbility issues involving operators and instantiations.
5643
5644 2013-04-11 Johannes Kanig <kanig@adacore.com>
5645
5646 * debug.adb: Reservation and documentation for -gnatd.G switch.
5647 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
5648 switch, and set ALI file generation accordingly.
5649
5650 2013-04-11 Robert Dewar <dewar@adacore.com>
5651
5652 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
5653 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
5654 check names introduced with pragma Check_Name are suppressed by -gnatp.
5655
5656 2013-04-11 Vincent Celier <celier@adacore.com>
5657
5658 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
5659 Files" from projects.texi to gnat_ugn.texi.
5660
5661 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5662
5663 * gcc-interface/Make-lang.in: Update dependencies.
5664
5665 2013-04-11 Yannick Moy <moy@adacore.com>
5666
5667 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
5668 mode.
5669
5670 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5671
5672 * exp_ch4.adb (Expand_N_Allocator): Detect the
5673 allocation of an anonymous controlled object where the type of
5674 the context is named. Use the pool and finalization master of
5675 the named access type to allocate the object.
5676
5677 2013-04-11 Vincent Celier <celier@adacore.com>
5678
5679 * gnat_ugn.texi: Remove most mentions of gprbuild.
5680 * projects.texi: Remove all mentions of asociative array
5681 attributes.
5682
5683 2013-04-11 Robert Dewar <dewar@adacore.com>
5684
5685 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
5686 opt.ads, sem_ch13.adb: Minor reformatting.
5687 * debug.adb: Minor comment fix (remove junk .I doc).
5688
5689 2013-04-11 Thomas Quinot <quinot@adacore.com>
5690
5691 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
5692 PolyORB): Bump to 6.
5693 (Exp_Dist.PolyORB_Support): Replace TC_Build with
5694 Build_Complex_TC.
5695
5696 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5697
5698 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
5699 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
5700 Enable this flag in CodePeer mode, and also via -gnatd.M.
5701 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
5702
5703 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5704
5705 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
5706 from the renamed object in an object renaming declaration with
5707 an unconstrained nominal subtype, freeze the created subtype at
5708 once, to prevent order of elaboration issues in the backend.
5709
5710 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5711
5712 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
5713 in particular in CodePeer mode.
5714
5715 2013-04-11 Vincent Celier <celier@adacore.com>
5716
5717 * gnat_ugn.texi: Add documentation for backup copies of project
5718 files for gnatname.
5719
5720 2013-04-11 Tristan Gingold <gingold@adacore.com>
5721
5722 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
5723 pragma list.
5724
5725 2013-04-11 Vincent Celier <celier@adacore.com>
5726
5727 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
5728 (Usage): Add line for --no-backup.
5729 * opt.ads (No_Backup): New Boolean variable, initialized to False.
5730 (Ada_Version_Default): Switch to Ada 2012 by default.
5731 * prj-makr.adb (Initialize): Create a backup for an existing
5732 project file if gnatname is not invoked with --no-backup.
5733
5734 2013-04-11 Thomas Quinot <quinot@adacore.com>
5735
5736 * exp_ch4.adb: Minor code improvement: replace various calls to
5737 Make_If_Statement in expansion with Make_Implicit_If_Statement.
5738
5739 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5740
5741 * ali.adb: Fix minor typo.
5742
5743 2013-04-11 Thomas Quinot <quinot@adacore.com>
5744
5745 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
5746 N_Procedure_Call_Statement.
5747
5748 2013-04-11 Robert Dewar <dewar@adacore.com>
5749
5750 * debug.adb: Minor comment fix.
5751
5752 2013-04-11 Johannes Kanig <kanig@adacore.com>
5753
5754 * debug.adb: Remove comment for -gnatd.G.
5755
5756 2013-04-11 Thomas Quinot <quinot@adacore.com>
5757
5758 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
5759 Remove recursive routine, replace with...
5760 (Expand_Record_Equality.Element_To_Compare): New subroutine,
5761 implement iterative search for next element to compare.
5762 Add explanatory comment in the tagged case.
5763
5764 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5765
5766 * sem_ch5.adb: remove spurious warning from non-empty loop.
5767 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
5768 in the package, in order to suppress redundant semantic checks
5769 on subprogram renamings in nested instantiations.
5770
5771 2013-04-11 Robert Dewar <dewar@adacore.com>
5772
5773 * errout.ads: Minor reformatting.
5774 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
5775 (Why_Not_Static): Test for aggregates behind string literals.
5776 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
5777
5778 2013-04-11 Robert Dewar <dewar@adacore.com>
5779
5780 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
5781 Expressions_With_Actions.
5782
5783 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5784
5785 * sem_ch6.adb (Base_Types_Match): For an actual type in an
5786 instance, the base type may itself be a subtype, so find true
5787 base type to determine compatibility.
5788
5789 2013-04-11 Robert Dewar <dewar@adacore.com>
5790
5791 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
5792 makeutl.adb, sem_ch8.adb: Minor reformatting.
5793
5794 2013-04-11 Vincent Celier <celier@adacore.com>
5795
5796 * gnat_ugn.texi: Minor fixes for VMS.
5797 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
5798
5799 2013-04-11 Robert Dewar <dewar@adacore.com>
5800
5801 * usage.adb (Usage): Minor edit to -gnatW message
5802
5803 2013-04-11 Robert Dewar <dewar@adacore.com>
5804
5805 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
5806 others for string literal case. Also add big ??? comment about
5807 this new code, which should be redundant, but is not.
5808 * sem_eval.adb (Eval_Concatenation): Handle non-static case
5809 properly (Eval_String_Literal): Handle non-static literal properly
5810
5811 2013-03-20 Tobias Burnus <burnus@net-b.de>
5812
5813 * i-fortra.ads: Update comment, add Ada 2012's optional
5814 Star and Kind data types for enhanced interoperability.
5815
5816 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
5817
5818 * gnatvsn.ads (Library_Version): Bump to 4.9.
5819
5820 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
5821
5822 PR ada/52123
5823 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
5824 (__gnat_SEH_error_handler): Likewise. Remove final return.
5825
5826 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5827
5828 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
5829 out for an unimplemented attribute.
5830
5831 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5832
5833 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
5834 a misaligned integral type if a size is specified for the field.
5835
5836 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5837
5838 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
5839 Record the unpadded type of the index type on the RCI stack.
5840
5841 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5842
5843 * gcc-interface/trans.c (emit_range_check): Assert that the range type
5844 is a numerical type and remove useless local variables.
5845
5846 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
5847
5848 * gcc-interface/ada-tree.h: Back out change accidentally committed.
5849
5850 2013-02-21 Jakub Jelinek <jakub@redhat.com>
5851
5852 PR bootstrap/56258
5853 * gnat-style.texi (@title): Remove @hfill.
5854 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
5855
5856 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
5857
5858 PR target/52123
5859 * tracebak.c: Cast from pointer via FARPROC.
5860
5861 2013-02-07 Simon Wright <simon@pushface.org>
5862
5863 PR target/50678
5864 * init.c (__darwin_major_version): New function for x86-64/Darwin.
5865 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
5866 on Darwin 12 and above.
5867
5868 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
5869
5870 PR target/52123
5871 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
5872 SECURITY_DESCRIPTOR *
5873 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
5874 (__gnat_portable_spawn): Fix cast to char* const*
5875 (add_handle): Cast from pointer via void **
5876 (add_handle): Cast from pointer via int *
5877 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
5878 (__gnat_locate_exec_on_path): Cast from pointer via char *
5879 * initialize.c (append_arg): Cast from pointer via LPWSTR
5880 (__gnat_initialize): Cast from pointer via LPWSTR
5881 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
5882
5883 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5884
5885 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
5886 target pairs on VxWorks 5 only.
5887
5888 2013-02-06 Arnaud Charlet <charlet@adacore.com>
5889
5890 * gcc-interface/Make-lang.in: Update dependencies.
5891
5892 2013-02-06 Vincent Celier <celier@adacore.com>
5893
5894 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
5895 node tree for each project tree rooted at an aggregated project.
5896
5897 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5898
5899 * sem_util.adb (Is_Interface_Conversion): New routine.
5900 (Object_Access_Level): Detect an interface conversion
5901 that has been rewritten into a different construct. Use the
5902 original form of the conversion to find the access level of
5903 the operand.
5904
5905 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5906
5907 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
5908 (Has_Pragma_No_Inline): Declare and mark as inline.
5909 (Set_Has_Pragma_No_Inline): Likewise.
5910 * einfo.adb (Has_Pragma_No_Inline): New function.
5911 (Set_Has_Pragma_No_Inline): New procedure.
5912 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
5913 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
5914 (Pragma_Id): Add Pragma_No_Inline value.
5915 * par-prag.adb (Prag): Handle Pragma_Inline.
5916 * sem_prag.adb (Inline_Status): New enumeration type.
5917 (Process_Inline): Change Active parameter
5918 to Inline_Status and add support for suppressed inlining.
5919 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
5920 <Pragma_Inline_Always>: Likewise.
5921 <Pragma_No_Inline>: Implement new pragma No_Inline.
5922 (Sig_Flags): Add Pragma_No_Inline.
5923 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
5924 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
5925
5926 2013-02-06 Pascal Obry <obry@adacore.com>
5927
5928 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
5929 to avoid interleaved modifications that could happen from another
5930 task calling Get_Base_Data.
5931 (Get_Base_Data): Make it a critical section. Avoid updating if another
5932 task has already done it.
5933
5934 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5935
5936 * sem_prag.adb: Minor reformatting.
5937
5938 2013-02-06 Pascal Obry <obry@adacore.com>
5939
5940 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
5941
5942 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5943
5944 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
5945 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
5946 names.
5947 (Pragma_Id): Add Pragma_Loop_Optimize value.
5948 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
5949 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
5950 (Check_Loop_Pragma_Placement): ...this.
5951 (Analyze_Pragma)
5952 <Pragma_Loop_Invariant>: Adjust to above renaming.
5953 <Loop_Variant>: Likewise.
5954 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
5955 (Sig_Flags): Add Pragma_Loop_Optimize.
5956 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
5957 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
5958
5959 2013-02-06 Robert Dewar <dewar@adacore.com>
5960
5961 * osint.ads: Minor fix of typo.
5962
5963 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
5964
5965 * gnat_ugn.texi: gnatmetric: update the documentation of
5966 complexity metrics for Ada 2012.
5967
5968 2013-02-06 Javier Miranda <miranda@adacore.com>
5969
5970 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
5971 remove useless initialization.
5972
5973 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5974
5975 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
5976 generate overflow checks on a discriminant expression if the
5977 discriminant constraint is applied to a private type that has
5978 a full view, because the check will be applied when the full
5979 view is elaborated. Removing the redundant check is not just
5980 an optimization, but it prevents spurious assembler errors,
5981 because of the way the backend generates names for expressions
5982 that require overflow checking.
5983
5984 2013-02-06 Pascal Obry <obry@adacore.com>
5985
5986 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
5987 limitation on Windows.
5988 (DA): Removed.
5989 (LIA): Removed.
5990 (LLIA): Removed.
5991 (TFA): Removed.
5992 (BTA): Removed.
5993 (BMTA): Removed.
5994 (BCA): Removed.
5995 (BMCA): Removed.
5996 (BTiA): Removed.
5997 (Clock): Use variable corresponding to access.
5998 (Get_Base_Time): Likewise.
5999 (Monotonic_Clock): Likewise.
6000
6001 2013-02-06 Vincent Celier <celier@adacore.com>
6002
6003 * make.adb (Gnatmake): When gnatmake is called with a project
6004 file, do not invoke gnatbind with -I-.
6005 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
6006 the infos from all the sources.
6007
6008 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6009
6010 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
6011 Overriding_Renamings.
6012 * par-prag.adb: Recognize pragma Overriding_Renamings.
6013 * opt.ads (Overriding_Renamings): flag to control compatibility
6014 mode with Rational compiler, replaces Rational_Profile flag.
6015 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
6016 Overriding_Renamings is enabled, accept renaming declarations
6017 where the new subprogram renames and overrides a locally inherited
6018 operation. Improve error message for some illegal renamings.
6019 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
6020 (Set_Rational_Profile): The Rational_Profile enables
6021 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
6022
6023 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6024
6025 * sem_util.adb: Set parent of copied aggregate component, to
6026 prevent infinite loop.
6027
6028 2013-02-06 Robert Dewar <dewar@adacore.com>
6029
6030 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
6031 * exp_disp.adb: Minor comment update.
6032 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
6033 No_Return pragmas.
6034
6035 2013-02-06 Thomas Quinot <quinot@adacore.com>
6036
6037 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
6038 parameter, defaulted to False for now, indicates targets where
6039 non-default scalar storage order may be specified.
6040
6041 2013-02-06 Thomas Quinot <quinot@adacore.com>
6042
6043 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
6044 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
6045 subtype, not type.
6046
6047 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6048
6049 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
6050 Has_Unknown_Discriminants from the full view of the base type.
6051
6052 2013-02-06 Tristan Gingold <gingold@adacore.com>
6053
6054 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
6055 Enclosing debugging functions within #ifndef inhibit_libc to
6056 support builds without full C headers.
6057
6058 2013-02-06 Thomas Quinot <quinot@adacore.com>
6059
6060 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
6061
6062 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6063
6064 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
6065 check to detect a parent-child relationship between two units in
6066 order to correctly bypass the installation of a limited view. In
6067 other words, the comment on the intended usage of the check was
6068 correct, but the code itself did not reflect the behavior.
6069
6070 2013-02-06 Javier Miranda <miranda@adacore.com>
6071
6072 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
6073 runtime check on assignment to tagged types if compiling with checks
6074 suppressed.
6075
6076 2013-02-06 Robert Dewar <dewar@adacore.com>
6077
6078 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
6079 s-os_lib.adb: Minor reformatting
6080
6081 2013-02-06 Vincent Celier <celier@adacore.com>
6082
6083 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
6084
6085 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6086
6087 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
6088 * par-prag.adb: Recognize pragma Rational.
6089 * opt.ads (Rational_Profile): flag to control compatibility mode
6090 with Rational compiler.
6091 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
6092 is enable, accept renaming declarations where the new subprogram
6093 and the renamed entity have the same name.
6094 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
6095 Rational as a profile.
6096
6097 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6098
6099 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
6100 dealing with a for loop that iterates over a subtype indication
6101 with a range, use the low and high bounds of the subtype.
6102
6103 2013-02-06 Nicolas Roche <roche@adacore.com>
6104
6105 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
6106 be quoted
6107
6108 2013-02-06 Vincent Celier <celier@adacore.com>
6109
6110 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
6111 Conf_Project. New recursive procedure Check_Project to find a non
6112 aggregate project and put its Project_Id in Conf_Project. Fails if
6113 no such project can be found.
6114 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
6115 (Do_Autoconf): Use project directory of project Conf_Project to store
6116 the generated configuration project file.
6117 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
6118 Conf_Project.
6119
6120 2013-02-06 Javier Miranda <miranda@adacore.com>
6121
6122 * sem_res.adb (Resolve_Actuals): Generate a read
6123 reference for out-mode parameters in the cases specified by
6124 RM 6.4.1(12).
6125
6126 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6127
6128 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
6129 Loop_Entry, instead wait until the attribute has been expanded. The
6130 delay ensures that any generated checks or temporaries are inserted
6131 before the relocated prefix.
6132
6133 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6134
6135 * sem_ch12.adb: Code clean up.
6136
6137 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6138
6139 * checks.adb (Apply_Discriminant_Check): Look for discriminant
6140 constraint in full view of private type when needed.
6141 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
6142 previous patch to components types that are private and without
6143 discriminants.
6144
6145 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6146
6147 * exp_ch4.adb (Find_Enclosing_Context): Recognize
6148 a simple return statement as one of the cases that require special
6149 processing with respect to temporary controlled function results.
6150 (Process_Transient_Object): Do attempt to finalize a temporary
6151 controlled function result when the associated context is
6152 a simple return statement. Instead, leave this task to the
6153 general finalization mechanism.
6154
6155 2013-02-06 Thomas Quinot <quinot@adacore.com>
6156
6157 * einfo.ads: Minor reformatting.
6158 (Status_Flag_Or_Transient_Decl): Add ??? comment.
6159
6160 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
6161
6162 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
6163 routine should be able to properly detect controlled transient
6164 objects in its actions and generate the appropriate finalization
6165 actions.
6166 * exp_ch6.adb (Enclosing_Context): Removed.
6167 (Expand_Ctrl_Function_Call): Remove local subprogram and
6168 constant. Use routine Within_Case_Or_If_Expression to determine
6169 whether the lifetime of the function result must be extended to
6170 match that of the context.
6171 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
6172 routine.
6173
6174 2013-02-06 Ed Schonberg <schonberg@adacore.com>
6175
6176 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
6177 for subtype matching of component type of formal array type,
6178 to avoid spurious error when component type is a separate actual
6179 in the instance, and there may be a discrepancy between private
6180 and full view of component type.
6181
6182 2013-02-06 Robert Dewar <dewar@adacore.com>
6183
6184 * s-dim.ads, clean.adb: Minor reformatting.
6185
6186 2013-02-06 Javier Miranda <miranda@adacore.com>
6187
6188 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
6189 (Can_Split_Unconstrained_Function): Only split the inlined function if
6190 the compiler generates the code of its body.
6191
6192 2013-02-06 Robert Dewar <dewar@adacore.com>
6193
6194 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
6195 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
6196 N_Pragma nodes.
6197
6198 2013-02-06 Robert Dewar <dewar@adacore.com>
6199
6200 * gnat_rm.texi: Minor text updates for pragma Warning.
6201
6202 2013-02-06 Geert Bosch <bosch@adacore.com>
6203
6204 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
6205 CPU'Last = 1.
6206
6207 2013-02-06 Vincent Celier <celier@adacore.com>
6208
6209 * clean.adb (Delete): On VMS use host notation to delete all files.
6210
6211 2013-02-06 Robert Dewar <dewar@adacore.com>
6212
6213 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
6214 reformatting.
6215
6216 2013-02-06 Gary Dismukes <dismukes@adacore.com>
6217
6218 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
6219 the special case of a user-defined equality that overrides
6220 the predefined equality of a nonderived type declared in a
6221 declarative part.
6222 * sem_util.adb (Collect_Primitive_Operations): Add test for
6223 Is_Primitive when looping over the subprograms following a type,
6224 to catch the case of primitives such as a user-defined equality,
6225 which otherwise won't be found when the type is not a derived
6226 type and is declared in a declarative part.
6227
6228 2013-02-06 Vincent Celier <celier@adacore.com>
6229
6230 * prj-conf.adb (Check_Target): Always return True when Target
6231 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
6232 New procedure to get the value of attribute Target in the main
6233 project.
6234 (Get_Or_Create_Configuration_File.Do_Autoconf): No
6235 need to get the value of attribute Target in the main project.
6236 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
6237 use the target fom this call.
6238
6239 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
6240
6241 * erroutc.adb (Validate_Specific_Warning): Do not issue the
6242 warning about an ineffective Pragma Warnings for -Wxxx warnings.
6243 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
6244 * gnat_rm.texi (Pragma Warnings): Document coordination with
6245 warnings of the GCC back-end.
6246
6247 2013-02-06 Javier Miranda <miranda@adacore.com>
6248
6249 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
6250 of an inlined function if we do not generate code for the function.
6251
6252 2013-02-06 Pascal Obry <obry@adacore.com>
6253
6254 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
6255 with Resolve_Links set to False.
6256
6257 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
6258
6259 * gcc-interface/decl.c: Include diagnostic-core.h.
6260 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
6261 is set on the entity.
6262 <E_Record_Type>: Likewise.
6263 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
6264
6265 2013-01-29 Ben Brosgol <brosgol@adacore.com>
6266
6267 * gnat_rm.texi: Fixed typos. Minor edits.
6268
6269 2013-01-29 Bob Duff <duff@adacore.com>
6270
6271 * a-convec.adb: Minor reformatting.
6272
6273 2013-01-29 Pascal Obry <obry@adacore.com>
6274
6275 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
6276 directory.
6277
6278 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6279
6280 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
6281 identifier only if it comes from source.
6282 (Expand_N_Loop_Statement): If the domain of iteration is an
6283 enumeration type with a representation clause, remove from
6284 visibility the loop identifier before rewriting the loop as a
6285 block with a declaration for said identifier.
6286 * sem_util.adb (Remove_Homonym): Handle properly the default case.
6287
6288 2013-01-29 Vincent Celier <celier@adacore.com>
6289
6290 * prj-proc.adb: Minor comment spelling fix.
6291
6292 2013-01-29 Pascal Obry <obry@adacore.com>
6293
6294 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
6295 Project_Path to current environment.
6296
6297 2013-01-29 Thomas Quinot <quinot@adacore.com>
6298
6299 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
6300 itypes even if Dump_Freeze_Null is not set.
6301
6302 2013-01-29 Robert Dewar <dewar@adacore.com>
6303
6304 * sem_util.adb: Minor reformatting.
6305 * s-rident.ads: Minor comment fixes.
6306
6307 2013-01-29 Pascal Obry <obry@adacore.com>
6308
6309 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
6310 control if the path is prepended or appended.
6311
6312 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6313
6314 * sem_ch6.adb (Analyze_Expression_Function): An expression
6315 function declaration is not a subprogram declaration, and thus
6316 cannot appear in a protected definition.
6317
6318 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6319
6320 * exp_util.adb (Insert_Actions): When new
6321 actions come from the expression of the expression with actions,
6322 then they must be added to the list of existing actions.
6323
6324 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
6325
6326 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
6327 the subtype of a constrained private type with discriminants
6328 that has got a full view, show that the completion is a clone
6329 of the full view.
6330
6331 2013-01-29 Javier Miranda <miranda@adacore.com>
6332
6333 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
6334 * opt.ads (Warn_On_Overlap): Update documentation.
6335 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6336 Check function writable actuals.
6337 * sem_ch3.adb (Build_Derived_Record_Type,
6338 Record_Type_Declaration): Check function writable actuals.
6339 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
6340 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
6341 implementation of AI05-0144.
6342 * sem_ch6.adb (Analyze_Function_Return,
6343 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
6344 of the initial implementation of AI05-0144.
6345 * sem_res.adb (Resolve): Remove code of the initial implementation.
6346 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
6347 of the initial implementation.
6348 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
6349 Resolve_Membership_Op): Check function writable actuals.
6350 * sem_util.ad[sb] (Actuals_In_Call): Removed
6351 (Check_Order_Dependence): Removed (Save_Actual): Removed
6352 (Check_Function_Writable_Actuals): New subprogram.
6353 * usage.adb (Usage): Update documentation.
6354 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
6355 setting all warnings.
6356
6357 2013-01-29 Robert Dewar <dewar@adacore.com>
6358
6359 * a-calend-vms.adb: Minor comment fix.
6360
6361 2013-01-29 Robert Dewar <dewar@adacore.com>
6362
6363 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
6364 because of casing issues.
6365 * sem_util.ads: Minor comment fix.
6366 * style.adb (Check_Identifier): Set proper casing for entities
6367 in ASCII.
6368 * styleg.adb: Minor comment improvement.
6369 * stylesw.ads (Style_Check_Standard): Fix bad comments.
6370
6371 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6372
6373 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
6374 (Analyze_Pragma): Push the scope of the related subprogram and install
6375 its formals once before starting the analysis of the [moded] global
6376 list.
6377
6378 2013-01-29 Pascal Obry <obry@adacore.com>
6379
6380 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
6381 relative paths in Project_Path as relative to the aggregate
6382 project location. Note that this was what was documented.
6383
6384 2013-01-29 Vincent Celier <celier@adacore.com>
6385
6386 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
6387 scheme for Ada, when Ada is not a language for the project.
6388
6389 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6390
6391 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
6392 Is_Generic_Actual_Type flag in a nested instance.
6393 * sem_ch12.adb (Restore_Private_Views): Preserve
6394 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
6395 of an enclosing instance.
6396 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
6397 which is an actual of an enclosing instance.
6398 * sem_type.adb (Real_Actual): If a generic_actual_type is the
6399 formal of an enclosing generic and thus renames the corresponding
6400 actual, use the actual of the enclosing instance to resolve
6401 spurious ambiguities in instantiations when two formals are
6402 instantiated with the same actual.
6403
6404 2013-01-29 Robert Dewar <dewar@adacore.com>
6405
6406 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
6407 being available as implementation-defined pragmas in earlier
6408 versions of Ada.
6409
6410 2013-01-29 Vincent Celier <celier@adacore.com>
6411
6412 * clean.adb (Delete): On VMS, delete all versions of the file.
6413
6414 2013-01-29 Robert Dewar <dewar@adacore.com>
6415
6416 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
6417 * par-util.adb (No_Constraint): Undo special handling, moved
6418 to par-ch6.adb.
6419
6420 2013-01-29 Robert Dewar <dewar@adacore.com>
6421
6422 * aspects.ads: Aspect Warnings is implementation defined Add
6423 some other missing entries to impl-defined list Mark Warnings
6424 as GNAT pragma in main list.
6425 * sem_ch8.adb: Process aspects for all cases of renaming
6426 declarations.
6427
6428 2013-01-29 Robert Dewar <dewar@adacore.com>
6429
6430 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
6431 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
6432 warnings about possible elaboration error if call is within
6433 an assertion.
6434 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
6435
6436 2013-01-29 Robert Dewar <dewar@adacore.com>
6437
6438 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
6439 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
6440 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
6441
6442 2013-01-29 Robert Dewar <dewar@adacore.com>
6443
6444 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
6445 * par-prag.adb (Par, case Style_Checks): Recognize
6446 Ignore_Style_Checks_Pragmas.
6447 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
6448 Ignore_Style_Checks_Pragmas.
6449 * switch-c.adb: Recognize -gnateY switch.
6450 * usage.adb: Add documentation for "-gnateY".
6451 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
6452
6453 2013-01-29 Vincent Celier <celier@adacore.com>
6454
6455 * clean.adb (Clean_Executables): Add Sid component when calling
6456 Queue.Insert.
6457 * make.adb: When inserting in the Queue, add the Source_Id
6458 (Sid) when it is known (Start_Compile_If_Possible): When the
6459 Source_Id is known (Sid), get the path name of the ALI file
6460 (Full_Lib_File) from it, to avoid finding old ALI files in other
6461 object directories.
6462 * makeutl.ads (Source_Info): New Source_Id component Sid in
6463 Format_Gnatmake variant.
6464
6465 2013-01-29 Robert Dewar <dewar@adacore.com>
6466
6467 * gnat_ugn.texi: Document -gnateY.
6468
6469 2013-01-29 Doug Rupp <rupp@adacore.com>
6470
6471 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
6472 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
6473
6474 2013-01-29 Robert Dewar <dewar@adacore.com>
6475
6476 * atree.ads, atree.adb (Node30): New function.
6477 (Set_Node30): New procedure.
6478 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
6479 * atree.h: Add macros for Field30 and Node30.
6480 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
6481 * treepr.adb (Print_Entity_Information): Print fields 30-35.
6482
6483 2013-01-29 Robert Dewar <dewar@adacore.com>
6484
6485 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
6486 be a violation of No_Obsolescent_Features even in Ada 95. Also
6487 generates a warning in -gnatwj mode.
6488 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
6489 mode.
6490 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
6491 Interface[_Name].
6492
6493 2013-01-29 Vincent Celier <celier@adacore.com>
6494
6495 * snames.ads-tmpl: Add new standard name Trailing_Switches.
6496
6497 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6498
6499 * sem_disp.adb (Check_Controlling_Type): If a designated type T
6500 of an anonymous access type is a limited view of a tagged type,
6501 it can be a controlling type only if the subprogram is in the
6502 same scope as T.
6503
6504 2013-01-29 Vincent Celier <celier@adacore.com>
6505
6506 * gnatcmd.adb: Use the project where the config pragmas file is
6507 declared to get its path.
6508
6509 2013-01-29 Vincent Celier <celier@adacore.com>
6510
6511 * prj-attr.adb: New attribute Linker'Trailing_Switches.
6512
6513 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
6514
6515 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
6516 not translate the Etype of the node before translating the Actions.
6517
6518 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
6519
6520 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
6521 instead of optimize and adjust warning message.
6522 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
6523
6524 2013-01-22 Tristan Gingold <gingold@adacore.com>
6525
6526 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
6527 ADT_unhandled_others_decl): New.
6528 (unhandled_others_decl, unhandled_except_decl): Define.
6529 * gcc-interface/trans.c: Include common/common-target.h.
6530 (gigi): Initialize them.
6531 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
6532 function in a try/catch clause.
6533
6534 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
6535
6536 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
6537 (CHECKING_ADAFLAGS): New.
6538 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
6539
6540 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
6541
6542 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
6543 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
6544
6545 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
6546
6547 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
6548 comment about type extension with discriminants.
6549 <E_Record_Subtype>: Remove useless test and reorder conditions.
6550 (elaborate_entity) <E_Record_Subtype>: Likewise.
6551
6552 2013-01-07 Richard Biener <rguenther@suse.de>
6553
6554 PR ada/864
6555 * gcc-interface/Make-lang.in (ada.install-common): Always apply
6556 program_transform_name.
6557
6558 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6559
6560 * gnatvsn.ads (Current_Year): Bump to 2013.
6561
6562 2013-01-06 Olivier Hainque <hainque@adacore.com>
6563
6564 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
6565 diagnostic for component size mismatch wrt volatile requirements.
6566 Add a gcc_unreachable() at the end of the checks for size. Split
6567 the check on volatile for positions into one check on atomic and
6568 a subsequent one on volatile.
6569
6570 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6571
6572 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
6573
6574 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6575
6576 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
6577 pack the field of the record type made for a misaligned type.
6578
6579 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6580
6581 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
6582 for discriminants inherited from parent record types.
6583
6584 2013-01-04 Robert Dewar <dewar@adacore.com>
6585
6586 * warnsw.adb: Minor fixes to -gnatw.d handling.
6587
6588 2013-01-04 Robert Dewar <dewar@adacore.com>
6589
6590 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
6591 fields.
6592
6593 2013-01-04 Joel Brobecker <brobecker@adacore.com>
6594
6595 * gnat_ugn.texi: Fix typo.
6596
6597 2013-01-04 Robert Dewar <dewar@adacore.com>
6598
6599 * gnat_rm.texi: Document alignment choice for subtypes.
6600
6601 2013-01-04 Robert Dewar <dewar@adacore.com>
6602
6603 * validsw.ads: Minor fix to comment.
6604
6605 2013-01-04 Doug Rupp <rupp@adacore.com>
6606
6607 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
6608 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
6609 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
6610 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
6611 Rename leon vxworks toolchain as leon-wrs-vxworks.
6612 * gcc-interface/Make-lang.in: Update dependencies
6613
6614 2013-01-04 Pascal Obry <obry@adacore.com>
6615
6616 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
6617 (Source_Iterator): Add Locally_Removed field.
6618 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
6619 (Next): Likewise.
6620
6621 2013-01-04 Robert Dewar <dewar@adacore.com>
6622
6623 * exp_attr.adb: Minor reformatting.
6624
6625 2013-01-04 Robert Dewar <dewar@adacore.com>
6626
6627 * checks.adb (Insert_Valid_Check): Fix handling of renamed
6628 packed array element.
6629 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
6630 fields in generated code.
6631 * exp_util.adb (Side_Effect_Free): Improve detection of cases
6632 needing renaming.
6633
6634 2013-01-04 Robert Dewar <dewar@adacore.com>
6635
6636 * sinfo.ads: Clean up order of N_xxx subtypes
6637
6638 2013-01-04 Vincent Celier <celier@adacore.com>
6639
6640 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
6641
6642 2013-01-04 Robert Dewar <dewar@adacore.com>
6643
6644 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
6645
6646 2013-01-04 Robert Dewar <dewar@adacore.com>
6647
6648 * par-ch6.adb (P_Subprogram): Better handling of missing IS
6649 after expression function.
6650 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
6651
6652 2013-01-04 Robert Dewar <dewar@adacore.com>
6653
6654 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
6655 actions case, new actions are appended to the sequence rather than
6656 prepended.
6657
6658 2013-01-04 Robert Dewar <dewar@adacore.com>
6659
6660 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
6661 * usage.adb: Add lines for -gnatw.d/w.D switches.
6662 * warnsw.adb: Minor fixes (some missing cases of setting
6663 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
6664
6665 2013-01-04 Robert Dewar <dewar@adacore.com>
6666
6667 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
6668 is restored on exit.
6669
6670 2013-01-04 Robert Dewar <dewar@adacore.com>
6671
6672 * usage.adb: Document -gnateF (check overflow for predefined Float).
6673
6674 2013-01-04 Robert Dewar <dewar@adacore.com>
6675
6676 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
6677 prevention of call to Apply_Type_Conversion_Checks, which resulted
6678 in missing check flags in formal mode.
6679
6680 2013-01-04 Vincent Celier <celier@adacore.com>
6681
6682 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
6683 * prj-conf.adb (Check_Builder_Switches): Check for switches
6684 --config= (Get_Db_Switches): New procedure to get the --db
6685 switches so that they are used when invoking gprconfig in
6686 auto-configuration.
6687 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
6688
6689 2013-01-04 Pascal Obry <obry@adacore.com>
6690
6691 * prj-nmsc.adb: Minor reformatting.
6692
6693 2013-01-04 Vincent Celier <celier@adacore.com>
6694
6695 * makeutl.ads (Root_Environment): New variable, moved rom
6696 gprbuild (Load_Standard_Base): New Boolean variable, moved
6697 from gprbuild.
6698 * prj-conf.adb (Check_Builder_Switches): New procedure to check
6699 for switch --RTS in package Builder. If a runtime specified
6700 by --RTS is a relative path name, but not a base name, then
6701 find the path on the Project Search Path.
6702 (Do_Autoconf): Call Check_Builder_Switches.
6703 (Locate_Runtime): New procedure, moved from gprbuild, to get the
6704 absolute paths of runtimes when they are not specified as a base name.
6705 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
6706
6707 2013-01-04 Ed Schonberg <schonberg@adacore.com>
6708
6709 * sem_ch3.adb (Build_Private_Derived_Type): Set
6710 Has_Private_Ancestor on type derived from an untagged private
6711 type whose full view has discriminants
6712 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
6713 aggregate for untagged record type with private ancestor.
6714
6715 2013-01-04 Thomas Quinot <quinot@adacore.com>
6716
6717 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
6718
6719 2013-01-04 Robert Dewar <dewar@adacore.com>
6720
6721 * table.adb: Minor reformatting.
6722
6723 2013-01-04 Ed Schonberg <schonberg@adacore.com>
6724
6725 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
6726 not come from source does not generate a warning for redundant
6727 with_clauses.
6728
6729 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
6730
6731 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
6732 * par-prag.adb: Add pragma Global to the list of pragmas that
6733 do not need special processing by the parser.
6734 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
6735 Global into a pragma without any form of legality checks. The
6736 work is done by Analyze_Pragma. The aspect and pragma are both
6737 marked as needing delayed processing. Insert the corresponding
6738 pragma of aspect Abstract_State in the visible declarations of the
6739 related package.
6740 (Check_Aspect_At_Freeze_Point): Aspect Global
6741 does not need processing even though it is marked as delayed.
6742 Alphabetize the list on aspect names.
6743 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
6744 (Analyze_Pragma): Add ??? comment about the grammar of pragma
6745 Abstract_State. Move the error location from the pragma to the
6746 state to improve the quality of error placement. Add legality
6747 checks for pragma Global.
6748 * snames.ads-tmpl Add the following specially recognized names
6749
6750 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
6751
6752 * sem_ch3.adb: Fix minor typo.
6753
6754 2013-01-04 Ed Schonberg <schonberg@adacore.com>
6755
6756 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
6757 accept an aspect name followed by a comma, indicating a defaulted
6758 boolean aspect.
6759
6760 2013-01-04 Joel Brobecker <brobecker@adacore.com brobecker>
6761
6762 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
6763 Update doc on gnattest --separates switch.
6764
6765 2013-01-04 Thomas Quinot <quinot@adacore.com>
6766
6767 * s-chepoo.ads: Minor reformatting.
6768
6769 2013-01-04 Arnaud Charlet <charlet@adacore.com>
6770
6771 * usage.adb: Remove mention of -gnatN in usage.
6772
6773 2013-01-04 Robert Dewar <dewar@adacore.com>
6774
6775 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
6776 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
6777 prj-conf.adb, sem_ch13.adb: Minor reformatting.
6778
6779 2013-01-04 Thomas Quinot <quinot@adacore.com>
6780
6781 * sinfo.ads: Minor documentation update.
6782
6783 2013-01-04 Thomas Quinot <quinot@adacore.com>
6784
6785 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
6786 before resolving initialization expression.
6787
6788 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
6789
6790 * checks.adb (Generate_Index_Checks): Delay the generation of
6791 the check for an indexed component where the prefix mentions
6792 Loop_Entry until the attribute has been properly expanded.
6793 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
6794 decoration of the constant that captures the value of Loop_Entry's
6795 prefix at the entry point into a loop. Generate index checks
6796 for an attribute reference that has been transformed into an
6797 indexed component.
6798
6799 2013-01-04 Thomas Quinot <quinot@adacore.com>
6800
6801 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
6802 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
6803 do if Obj is already frozen.
6804 (Exp_Util.Find_Init_Call): Rename to...
6805 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
6806 Find_Init_Call. Remove the initialization call from the enclosing
6807 list if found, and if it is from an Initialization_Statements
6808 attribute, reset it.
6809 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
6810 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
6811 allocated (as is already done in Append_Freeze_Action).
6812 (Freeze.Freeze_Entity): For an object with captured
6813 Initialization_Statements and non-delayed freezeing, unwrap the
6814 initialization statements and insert and them directly in the
6815 enclosing list.
6816 (Sem_Ch13.Check_Address_Clause): For an object
6817 with Initialization_Statements and an address clause, unwrap the
6818 initialization statements when moving them to the freeze actions.
6819
6820 2013-01-03 Pascal Obry <obry@adacore.com>
6821
6822 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
6823 corresponding attibutes.
6824
6825 2013-01-03 Thomas Quinot <quinot@adacore.com>
6826
6827 * exp_aggr.adb: Minor comment improvement.
6828
6829 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
6830
6831 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
6832 relevant tables.
6833 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
6834 the description of fields (Abstract_States): New routine.
6835 (Integrity_Level): New routine.
6836 (Has_Property): New routine.
6837 (Is_Input_State): New routine.
6838 (Is_Null_State): New routine.
6839 (Is_Output_State): New routine.
6840 (Is_Volatile_State): New routine.
6841 (Refined_State): New routine.
6842 (Set_Abstract_States): New routine.
6843 (Set_Integrity_Level): New routine.
6844 (Set_Refined_State): New routine.
6845 (Write_Field8_Name): Add proper output for E_Abstract_State.
6846 (Write_Field9_Name): Add proper output for E_Abstract_State.
6847 (Write_Field25_Name): Add proper output for E_Package.
6848 * lib-xref.ads: Add new letter for an abstract state.
6849 * par-prag.adb: Add pragma Abstract_State to the list of pragma
6850 that do not need special processing by the parser.
6851 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
6852 aspect Abstract_State into a pragma without any form
6853 of legality checks. The work is done by Analyze_Pragma.
6854 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
6855 require delayed analysis.
6856 * sem_prag.adb: Add a value for pragma Abstract_State in table
6857 Sig_Flags.
6858 (Analyze_Pragma): Add legality checks for pragma
6859 Abstract_State. Analysis of individual states introduces a state
6860 abstraction entity into the visibility chain.
6861 * snames.ads-tmpl: Add new names for abstract state and
6862 integrity. Add new pragma id for abstract state.
6863
6864 2013-01-03 Bob Duff <duff@adacore.com>
6865
6866 * table.adb (Reallocate): Calculate new Length in
6867 Long_Integer to avoid overflow.
6868
6869 2013-01-03 Thomas Quinot <quinot@adacore.com>
6870
6871 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
6872 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
6873 it is set properly when expanding the initialization expression.
6874 (Freeze.Check_Address_Clause): Transfer initialization expression
6875 to an assignment in the freeze actions, so that the object is
6876 initialized only after being elaborated by GIGI.
6877 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
6878 a Null_Statement as the expression in an Expression_With_Actions.
6879 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
6880 shared by expansion of record and array aggregates, used to
6881 capture statements for an aggregate used to initalize an object
6882 into an Expression_With_Actions (which acts as a container for
6883 a list of actions).
6884 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
6885 capture initialization statements, instead of the previously
6886 existing loop which left freeze nodes out of the capturing
6887 construct (causing out of order elaboration crashes in GIGI).
6888 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
6889 initialization statements (this was previously not done for
6890 arrays). Also do not unconditionally prevent in place expansion
6891 for an object with address clause.
6892
6893 2013-01-03 Thomas Quinot <quinot@adacore.com>
6894
6895 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
6896 a record extension has the same scalar storage order as the parent type.
6897
6898 2013-01-03 Thomas Quinot <quinot@adacore.com>
6899
6900 * exp_ch4.adb: Add comment.
6901
6902 2013-01-03 Vincent Celier <celier@adacore.com>
6903
6904 * prj.adb: Minor spelling error correction in comment.
6905
6906 2013-01-03 Vincent Celier <celier@adacore.com>
6907
6908 * gnatcmd.adb (GNATCmd): If a single main has been specified
6909 as an absolute path, use its simple file name to find specific
6910 switches, instead of the absolute path.
6911
6912 2013-01-03 Javier Miranda <miranda@adacore.com>
6913
6914 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
6915 parameters that are record types or array types generate warnings
6916 only compiling under -gnatw.i
6917 * opt.ads (Extensions_Allowed): Restore previous documentation.
6918
6919 2013-01-03 Vincent Celier <celier@adacore.com>
6920
6921 * prj-conf.adb (Do_Autoconf): If Target is specified in the
6922 main project, but not on the command line, use the Target in
6923 the project to invoke gprconfig in auto-configuration.
6924 * makeutl.ads (Default_Config_Name): New constant String.
6925
6926 2013-01-03 Arnaud Charlet <charlet@adacore.com>
6927
6928 * usage.adb: Minor: fix typo in usage.
6929
6930 2013-01-03 Thomas Quinot <quinot@adacore.com>
6931
6932 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
6933 an illegal component clause for an inherited component in a
6934 record extension.
6935
6936 2013-01-03 Emmanuel Briot <briot@adacore.com>
6937
6938 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
6939 have information in the ALI file for both the index and the component
6940 types.
6941
6942 2013-01-03 Emmanuel Briot <briot@adacore.com>
6943
6944 * projects.texi: Fix error in documenting the project path
6945 computed for an aggregate project.
6946
6947 2013-01-03 Javier Miranda <miranda@adacore.com>
6948
6949 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
6950 plus restricting the functionality of this routine to cover the
6951 cases described in the Ada 2012 reference manual. The previous
6952 extended support is now available under -gnatX.
6953 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
6954 variable to call Timed_Sleep. Required to avoid warning on
6955 overlapping out-mode actuals.
6956 * opt.ads (Extensions_Allowed): Update documentation.
6957
6958 2013-01-03 Tristan Gingold <gingold@adacore.com>
6959
6960 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
6961 * arit64.c: Removed
6962 * gcc-interface/Makefile.in: Remove reference to arit64.c.
6963
6964 2013-01-03 Thomas Quinot <quinot@adacore.com>
6965
6966 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
6967 be generated at the start of the freeze actions for the entity, not
6968 before (or after) the freeze node.
6969
6970 2013-01-03 Thomas Quinot <quinot@adacore.com>
6971
6972 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
6973 Reorganize code to capture initialization statements in a block,
6974 so that freeze nodes are excluded from the captured block.
6975
6976 2013-01-03 Thomas Quinot <quinot@adacore.com>
6977
6978 * exp_ch11.adb: Minor reformatting.
6979
6980 2013-01-03 Thomas Quinot <quinot@adacore.com>
6981
6982 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
6983 sem_ch13.adb (Einfo.Initialization_Statements,
6984 Einfo.Set_Initialization_Statements): New entity attribute
6985 for objects.
6986 (Exp_Util.Find_Init_Call): Handle case of an object initialized
6987 by an aggregate converted to a block of assignment statements.
6988 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
6989 even for objects that require a constant address, because the
6990 address expression might involve entities that have yet to be
6991 elaborated at the point of the object declaration.
6992 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
6993 not require a transient scope, capture the assignment statements
6994 in a block so that they can be moved down after elaboration of
6995 an address clause if needed.
6996 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
6997 case N_Unchecked_Conversion): Do not replace operand subtype with
6998 its base type as this violates a GIGI invariant if the operand
6999 is an identifier (in which case the etype of the identifier
7000 is expected to be equal to that of the denoted entity).
7001
7002 2013-01-03 Javier Miranda <miranda@adacore.com>
7003
7004 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
7005 functionality of this routine to cover cases described in the Ada 2012
7006 reference manual.
7007
7008 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7009
7010 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
7011 a 'Access attribute reference when the subprogram is called
7012 Initialize.
7013
7014 2013-01-03 Arnaud Charlet <charlet@adacore.com>
7015
7016 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
7017 select statement may be called from a controlled (e.g. Initialize)
7018 operation and have abort always deferred.
7019
7020 2013-01-03 Robert Dewar <dewar@adacore.com>
7021
7022 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
7023
7024 2013-01-03 Javier Miranda <miranda@adacore.com>
7025
7026 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
7027 internal entities associated with interfaces and add minimum
7028 decoration to the defining entity of the generated wrapper to
7029 allow overriding interface primitives.
7030 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
7031 new formal (Is_Wrapper).
7032 * sem_disp.adb (Override_Dispatching_Operation): When overriding
7033 interface primitives the new formal helps identifying that the
7034 new operation is not fully decorated.
7035
7036 2013-01-03 Thomas Quinot <quinot@adacore.com>
7037
7038 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
7039 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
7040 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
7041 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
7042 update spec accordingly (now also applies to root library units).
7043 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
7044 on root library units, not only child units.
7045 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
7046 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
7047 even for root library units.
7048 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
7049 Standard is an expanded name for a root library unit.
7050
7051 2013-01-03 Thomas Quinot <quinot@adacore.com>
7052
7053 * exp_ch3.adb: Minor reformatting.
7054
7055 2013-01-03 Olivier Hainque <hainque@adacore.com>
7056
7057 * tracebak.c: Reinstate changes to support ppc-lynx178.
7058
7059 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7060
7061 * atree.ads: Minor reformatting and documentation enhancement.
7062
7063 2013-01-03 Ed Schonberg <schonberg@adacore.com>
7064
7065 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
7066 a class-wide type and a renaming declaration is created for it,
7067 preserve entity chain, which already contains generated internal
7068 types. This ensures that freezing actions are properly generated
7069 for all objects declared subsequently in the same scope, and
7070 that debugging information is generated for them.
7071 * sem_util.adb, sem_util.ads (we): New debugging routine, to
7072 display entity chain of a given scope.
7073
7074 2013-01-03 Robert Dewar <dewar@adacore.com>
7075
7076 * exp_intr.adb: Minor reformatting.
7077
7078 2013-01-03 Robert Dewar <dewar@adacore.com>
7079
7080 * einfo.adb: Minor reformatting.
7081
7082 2013-01-03 Pascal Obry <obry@adacore.com>
7083
7084 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
7085 (__gnat_is_module_name_supported): Removed.
7086 * s-win32.ads: Add some needed definitions.
7087 * g-trasym.ads: Update comments.
7088
7089 2013-01-03 Robert Dewar <dewar@adacore.com>
7090
7091 * layout.adb (Set_Composite_Alignment): Fix problems of
7092 interactions with Optimize_Alignment set to Space.
7093
7094 2013-01-03 Thomas Quinot <quinot@adacore.com>
7095
7096 * exp_disp.adb: Minor reformatting.
7097
7098 2013-01-02 Richard Biener <rguenther@suse.de>
7099
7100 PR bootstrap/55784
7101 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
7102
7103 2013-01-02 Thomas Quinot <quinot@adacore.com>
7104
7105 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
7106 side effects from Tag_Arg early, doing it too late may cause a
7107 crash due to inconsistent Parent link.
7108 * sem_ch8.adb, einfo.ads: Minor reformatting.
7109
7110 2013-01-02 Robert Dewar <dewar@adacore.com>
7111
7112 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
7113 * freeze.adb (Size_Known): We do not know the size of a packed
7114 record if it has atomic components, by reference type components,
7115 or independent components.
7116 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
7117 flag Has_Independent_Components.
7118
7119 2013-01-02 Yannick Moy <moy@adacore.com>
7120
7121 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
7122 * usage.adb (Usage): Update usage message.
7123
7124 2013-01-02 Pascal Obry <obry@adacore.com>
7125
7126 * adaint.c (__gnat_is_module_name_supported): New constant.
7127
7128 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7129
7130 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
7131 array whose component type does not have a completion.
7132
7133 2013-01-02 Geert Bosch <bosch@adacore.com>
7134
7135 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
7136
7137 2013-01-02 Robert Dewar <dewar@adacore.com>
7138
7139 * par_sco.adb: Minor reformatting.
7140
7141 2013-01-02 Javier Miranda <miranda@adacore.com>
7142
7143 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
7144
7145 2013-01-02 Olivier Hainque <hainque@adacore.com>
7146
7147 * a-exctra.ads (Get_PC): New function.
7148
7149 2013-01-02 Thomas Quinot <quinot@adacore.com>
7150
7151 * sem_ch8.adb: Minor reformatting.
7152
7153 2013-01-02 Thomas Quinot <quinot@adacore.com>
7154
7155 * sem_ch7.adb: Minor reformatting.
7156
7157 2013-01-02 Thomas Quinot <quinot@adacore.com>
7158
7159 * freeze.adb (Check_Component_Storage_Order): Do not crash on
7160 _Tag component.
7161
7162 2013-01-02 Robert Dewar <dewar@adacore.com>
7163
7164 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
7165 On_Target to Atomic_Sync_Default.
7166
7167 2013-01-02 Robert Dewar <dewar@adacore.com>
7168
7169 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
7170 comparison of attribute result with constant
7171 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
7172 Warnings (Off, "..");
7173
7174 2013-01-02 Yannick Moy <moy@adacore.com>
7175
7176 * sem_prag.ads: Minor correction of comment.
7177
7178 2013-01-02 Thomas Quinot <quinot@adacore.com>
7179
7180 * par_sco.adb (Traverse_Package_Declaration): The first
7181 declaration in a nested package is dominated by the preceding
7182 declaration in the enclosing scope.
7183
7184 2013-01-02 Pascal Obry <obry@adacore.com>
7185
7186 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
7187 module containing a given address.
7188
7189 2013-01-02 Thomas Quinot <quinot@adacore.com>
7190
7191 * sem_ch3.adb: Minor reformatting.
7192
7193 2013-01-02 Pascal Obry <obry@adacore.com>
7194
7195 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
7196 Win64 and default to ftell on other platforms.
7197 (__gnat_fsek64): Likewise.
7198 * i-cstrea.ads: Add fssek64 and ftell64 specs.
7199 * s-crtl.ads: Likewise.
7200 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
7201 (Set_Position): Likewise.
7202
7203 2013-01-02 Thomas Quinot <quinot@adacore.com>
7204
7205 * par_sco.adb: Generate X SCOs for default expressions in
7206 subprogram body stubs. Do not generate any SCO for package,
7207 task, or protected body stubs.
7208
7209 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7210
7211 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
7212 access to protected subprograms.
7213
7214 2013-01-02 Robert Dewar <dewar@adacore.com>
7215
7216 * par_sco.adb, vms_data.ads: Minor reformatting.
7217
7218 2013-01-02 Thomas Quinot <quinot@adacore.com>
7219
7220 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
7221 form, returning value of Current_Dominant upon exit, for chaining
7222 purposes.
7223 (Traverse_Declarations_Or_Statement.Traverse_One, case
7224 N_Block_Statement): First statement is dominated by last declaration.
7225 (Traverse_Subprogram_Or_Task_Body): Ditto.
7226 (Traverse_Package_Declaration): First private
7227 declaration is dominated by last visible declaration.
7228 (Traverse_Sync_Definition): Ditto.
7229
7230 2013-01-02 Thomas Quinot <quinot@adacore.com>
7231
7232 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
7233 matching Bit_Order to record types only, since array types do not
7234 have a Bit_Order.
7235
7236 2013-01-02 Vincent Celier <celier@adacore.com>
7237
7238 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
7239 internal switch.
7240 * usage.adb: Indicate that -gnateO is an internal switch.
7241
7242 2013-01-02 Thomas Quinot <quinot@adacore.com>
7243
7244 * par_sco.adb: Add SCO generation for task types and single
7245 task declarations.
7246 * get_scos.adb: When adding an instance table entry for a
7247 non-nested instantiation, make sure the Enclosing_Instance is
7248 correctly set to 0.
7249
7250 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7251
7252 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
7253 scope generated for subprogram inlining purposes while trying
7254 to locate the enclosing function.
7255 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
7256 expression of pragma Postcondition when the pragma comes from
7257 source and appears inside a subprogram body.
7258
7259 2013-01-02 Thomas Quinot <quinot@adacore.com>
7260
7261 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
7262 information in debug info unconditionally when using -fdump-scos,
7263 instead of relying on a separate command line switch -fdebug-instances.
7264 * gcc-interface/Make-lang.in: Update dependencies.
7265
7266 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7267
7268 * sem_ch12.adb: Additional refinement of predicate.
7269
7270 2013-01-02 Vincent Celier <celier@adacore.com>
7271
7272 * vms_data.ads: Remove incorrect spaces at end of descriptions
7273 of qualifiers for single switch.
7274
7275 2013-01-02 Ben Brosgol <brosgol@adacore.com>
7276
7277 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
7278 Check_Float_Overflow.
7279
7280 2013-01-02 Thomas Quinot <quinot@adacore.com>
7281
7282 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
7283 a conditional expression (CASE or IF expression) that already
7284 has parens. Also omit ELSE keyword for an IF expression without
7285 an ELSE part.
7286
7287 2013-01-02 Thomas Quinot <quinot@adacore.com>
7288
7289 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
7290 flag_debug_instances here, after front-end switches have been
7291 processed.
7292
7293 2013-01-02 Vincent Celier <celier@adacore.com>
7294
7295 * usage.adb: Minor reformatting.
7296
7297 2013-01-02 Arnaud Charlet <charlet@adacore.com>
7298
7299 * opt.ads: Fix typo.
7300
7301 2013-01-02 Thomas Quinot <quinot@adacore.com>
7302
7303 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
7304 Assume and Loop_Invariant.
7305
7306 2013-01-02 Robert Dewar <dewar@adacore.com>
7307
7308 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
7309 * ug_words: Add entry for Float_Check_Overflow.
7310 * usage.adb: Minor reformatting.
7311 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
7312
7313 2013-01-02 Vincent Celier <celier@adacore.com>
7314
7315 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
7316 -gnateO=, -gnatet and -gnateV.
7317 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
7318 -gnatet and -gnateV.
7319 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
7320 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
7321 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
7322 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
7323 (-gnatet).
7324
7325 2013-01-02 Robert Dewar <dewar@adacore.com>
7326
7327 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
7328 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
7329 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
7330 * sem_prag.adb: Implement pragma Check_Float_Overflow.
7331 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
7332 * switch-c.adb: Recognize -gnateF switch.
7333 * tree_io.ads: Update ASIS version number.
7334 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
7335
7336 2013-01-02 Robert Dewar <dewar@adacore.com>
7337
7338 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
7339 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
7340 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
7341 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
7342 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
7343 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
7344 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
7345
7346 2013-01-02 Robert Dewar <dewar@adacore.com>
7347
7348 * err_vars.ads: Minor comment fix.
7349
7350 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7351
7352 * sem_ch12.adb: Refine predicate.
7353
7354 2013-01-02 Robert Dewar <dewar@adacore.com>
7355
7356 * errout.ads: Minor comment fixes.
7357 * opt.ads: Minor comment additions.
7358 * exp_aggr.adb: Add tags to warning messages
7359 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
7360 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
7361 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
7362 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
7363 sem_warn.adb: Add tags to warning messages
7364
7365 2013-01-02 Doug Rupp <rupp@adacore.com>
7366
7367 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
7368
7369 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7370
7371 * sem_ch12.adb: Recover source name for renamed packagea.
7372
7373 2013-01-02 Robert Dewar <dewar@adacore.com>
7374
7375 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
7376 tests to fail if insertion sequence is at end of message string.
7377 * opt.ads: Minor comment fixes and additions.
7378 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
7379 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
7380 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
7381 tags. Add tags to warning messages.
7382
7383 2013-01-02 Robert Dewar <dewar@adacore.com>
7384
7385 * err_vars.ads (Warning_Doc_Switch): New flag.
7386 * errout.adb (Error_Msg_Internal): Implement new warning flag
7387 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
7388 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
7389 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
7390 tag stuff.
7391 * erroutc.ads (Warning_Msg_Char): New variable.
7392 (Warn_Chr): New field in error message object.
7393 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
7394 * sem_ch13.adb: Minor reformatting.
7395 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
7396 (Warning_Doc_Switch).
7397 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
7398 doc tag).
7399
7400 2013-01-02 Robert Dewar <dewar@adacore.com>
7401
7402 * opt.ads: Minor reformatting.
7403
7404 2013-01-02 Doug Rupp <rupp@adacore.com>
7405
7406 * init.c: Reorganize VMS section.
7407 (scan_condtions): New function for scanning condition tables.
7408 (__gnat_handle_vms_condtion): Use actual exception name for imported
7409 exceptions vice IMPORTED_EXCEPTION.
7410 Move condition table scanning into separate function. Move formerly
7411 special handled conditions to system condition table. Use SYS$PUTMSG
7412 output to fill exception message field for formally special handled
7413 condtions, in particular HPARITH to provide more clues about cause and
7414 location then raised from the translated image.
7415
7416 2013-01-02 Thomas Quinot <quinot@adacore.com>
7417
7418 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
7419 aspect that applies to a library subprogram, prepend corresponding
7420 pragma to the Pragmas_After list, in order for split AND THEN
7421 sections to be processed in the expected order.
7422
7423 2013-01-02 Thomas Quinot <quinot@adacore.com>
7424
7425 * exp_prag.adb (Expand_Pragma_Check): The statements generated
7426 for the pragma must have the sloc of the pragma, not the
7427 sloc of the condition, otherwise this creates anomalies in the
7428 generated debug information that confuse coverage analysis tools.
7429
7430 2013-01-02 Thomas Quinot <quinot@adacore.com>
7431
7432 * sem_ch13.adb: Minor reformatting.
7433
7434 2013-01-02 Arnaud Charlet <charlet@adacore.com>
7435
7436 * g-excact.ads (Core_Dump): Clarify that this subprogram does
7437 not dump cores under Windows.
7438
7439 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7440
7441 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
7442 view of a subprogram has convention Intrnnsic, and a renaming
7443 of a prefixed view cannot be the prefix of an Access attribute.
7444
7445 2013-01-02 Robert Dewar <dewar@adacore.com>
7446
7447 * restrict.adb: Minor reformatting.
7448
7449 2013-01-02 Thomas Quinot <quinot@adacore.com>
7450
7451 * exp_prag.adb: Minor reformatting.
7452
7453 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7454
7455 * sem_ch12.adb (Get_Associated_Node): If the node is an
7456 identifier that denotes an unconstrained array in an object
7457 declaration, it is rewritten as the name of an anonymous
7458 subtype whose bounds are given by the initial expression in the
7459 declaration. When checking whether that identifier is global
7460 reference, use the original node, not the local generated subtype.
7461
7462 2013-01-02 Olivier Hainque <hainque@adacore.com>
7463
7464 * tracebak.c: Revert previous change, incomplete.
7465
7466 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7467
7468 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
7469 appears on a subprogram body that acts as a spec, place the
7470 corresponding pragma in the declarations of the body, so that
7471 e.g. pre/postcondition checks can be generated appropriately.
7472
7473 2013-01-02 Robert Dewar <dewar@adacore.com>
7474
7475 * sem_ch3.adb: Minor reformatting and code reorganization.
7476
7477 2013-01-02 Vincent Celier <celier@adacore.com>
7478
7479 * switch-m.adb (Normalize_Compiler_Switches): Record the
7480 complete switch -fstack-check=specific instead of its shorter
7481 alias -fstack-check.
7482
7483 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7484
7485 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
7486 if the derived type is a tagged generic formal type with
7487 unknown discriminants, the inherited operation has convention
7488 Intrinsic. As such, the 'Access attribute cannot be applied to it.
7489
7490 2013-01-02 Thomas Quinot <quinot@adacore.com>
7491
7492 * sem_attr.adb: Minor reformatting.
7493
7494 2013-01-02 Thomas Quinot <quinot@adacore.com>
7495
7496 * par_sco.adb: Add SCO generation for S of protected types and
7497 single protected object declarations.
7498
7499 2013-01-02 Robert Dewar <dewar@adacore.com>
7500
7501 * sem_eval.adb, osint.ads: Minor reformatting.
7502
7503 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7504
7505 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
7506
7507 2013-01-02 Thomas Quinot <quinot@adacore.com>
7508
7509 * sem_eval.adb (Compile_Time_Compare): For static operands, we
7510 can perform a compile time comparison even if in preanalysis mode.
7511
7512 2013-01-02 Thomas Quinot <quinot@adacore.com>
7513
7514 * par_sco.adb (SCO_Record): Always use
7515 Traverse_Declarations_Or_Statements to process the library level
7516 declaration, so that SCOs are properly generated for its aspects.
7517
7518 2013-01-02 Thomas Quinot <quinot@adacore.com>
7519
7520 * scos.ads (In_Decision): Add missing entry for 'a'.
7521 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
7522 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
7523 * sem_ch13.adb: Minor comment update.
7524 \f
7525 Copyright (C) 2013 Free Software Foundation, Inc.
7526
7527 Copying and distribution of this file, with or without modification,
7528 are permitted in any medium without royalty provided the copyright
7529 notice and this notice are preserved.