1 2013-10-14 Robert Dewar <dewar@adacore.com>
3 * gnat_ugn.texi: Document -gnateu switch.
4 * opt.ads (Ignore_Unrecognized_VWY_Switches): New switch.
5 * stylesw.adb: Ignore unrecognized switch if
6 Ignore_Unrecognized_VWY_Switches set.
7 * switch-c.adb: Implement -gnateu (sets
8 Ignore_Unrecognized_VWY_Switches).
9 * validsw.adb: Ignore unrecognized switch if
10 Ignore_Unrecognized_VWY_Switches set.
11 * warnsw.adb: Ignore unrecognized switch if
12 Ignore_Unrecognized_VWY_Switches set.
14 2013-10-14 Robert Dewar <dewar@adacore.com>
16 * exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor
19 2013-10-14 Vincent Celier <celier@adacore.com>
21 * ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted,
22 defaulted to False. Calls Get_Name with May_Be_Quoted.
23 (Get_Name): New Boolean parameter May_Be_Quoted, defaulted to
24 False. If May_Be_Quoted is True and first non blank charater is
25 '"', unquote the name.
26 (Scan_ALI): For the file/path name on the D line, call Get_File_Name
27 with May_Be_Quoted = True, as it may have been quoted.
28 * lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New
29 procedure to write file/path names that may contain spaces and if they
31 * lib-writ.adb (Write_ALI): Use new procedure
32 Write_Info_Name_May_Be_Quoted to write file/path names on D lines.
34 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
36 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
37 Analyze_Global_In_Decl_Part,
38 Analyze_Pre_Post_Condition_In_Decl_Part): Install the subprogram
39 and its formals only when it is not already installed.
40 * sem_util.adb (Is_Refined_State): A state is refined when it
41 has a non-empty list of constituents.
43 2013-10-14 Tristan Gingold <gingold@adacore.com>
45 * adaint.c: Disable __gnat_get_executable_load_address for linux.
46 * exp_prag.adb: Add comment in Expand_Pragma_Import_Export_Exception.
48 2013-10-14 Tristan Gingold <gingold@adacore.com>
50 * s-vmexta.ads: Add comments.
52 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
54 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
55 for pragma Refined_State.
56 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
57 for aspect Refined_Depends.
58 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
59 Use Find_Related_Subprogram_Or_Body to find the related
60 context. Use the current scope when determining whether to
61 ensure proper visibility.
62 (Analyze_Depends_In_Decl_Part):
63 Add local variable Spec_Id. Update the comment on usage of
64 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
65 related context. Extract the corresponding spec of the body
66 (if any). Use the current scope when determining when to
67 ensure proper visibility.
68 (Analyze_Global_In_Decl_Part):
69 Add local variable Spec_Id. Update the comment on usage of
70 Subp_Id. Use Find_Related_Subprogram_Or_Body to find the
71 related context. Extract the corresponding spec of the body
72 (if any). Use the current scope when determining when to
73 ensure proper visibility.
74 (Analyze_Global_Item): Use the
75 entity of the subprogram spec when performing formal parameter
76 checks. Perform state-related checks.
77 (Analyze_Input_Output):
78 Use Is_Attribute_Result to detect 'Result. Query the
79 entity of a subprogram spec when verifying the prefix of
80 'Result. Perform state-related checks. (Analyze_Pragma):
81 Merge the analysis of Refined_Depends and Refined_Global.
82 (Analyze_Refined_Depends_In_Decl_Part): Provide implemenation.
83 (Analyze_Refined_Global_In_Decl_Part): Move state-related checks
84 to the body of Analyze_Global_In_Decl_Part. Rename local constant
85 List to Items. (Analyze_Refined_Pragma): Remove circuitry to
86 find the proper context, use Find_Related_Subprogram_Or_Body
88 (Check_Function_Return): Query the entity of
89 the subprogram spec when verifying the use of 'Result.
90 (Check_In_Out_States, Check_Input_States, Check_Output_States):
91 Avoid using Has_Null_Refinement to detect a state with
92 a non-null refinement, use the Refinement_Constituents
94 (Check_Matching_Constituent): Remove initialization code.
95 (Check_Mode_Restriction_In_Function): Use the entity of the subprogram
96 spec when verifying mode usage in functions.
97 (Collect_Global_Items): New routine.
98 (Collect_Subprogram_Inputs_Outputs): Add local
99 variable Spec_Id. Add circuitry for bodies-as-specs. Use
100 pragma Refined_Global when collecting for a body.
101 (Create_Or_Modify_Clause): Use the location of the
102 clause. Rename local variable Clause to New_Clause to avoid
103 confusion and update all occurrences. Use Is_Attribute_Result
105 (Find_Related_Subprogram): Removed.
106 (Find_Related_Subprogram_Or_Body): New routine.
107 (Is_Part_Of): Move routine to top level.
108 (Normalize_Clause): Update the
109 comment on usage. The routine can now normalize a clause with
110 multiple outputs by splitting it.
111 (Collect_Global_Items):
112 Rename local constant List to Items. Remove the check for
114 (Requires_Profile_Installation): Removed.
115 (Split_Multiple_Outputs): New routine.
116 * sem_prag.ads: Update the comments on usage of various
117 pragma-related analysis routines.
118 * sem_util.adb (Contains_Refined_State): The routine can now
119 process pragma [Refined_]Depends.
120 (Has_Refined_State): Removed.
121 (Has_State_In_Dependency): New routine.
122 (Has_State_In_Global): New routine.
123 (Is_Attribute_Result): New routine.
124 * sem_util.ads (Is_Attribute_Result): New routine.
126 2013-10-14 Emmanuel Briot <briot@adacore.com>
128 * s-regpat.adb (Compile): Fix finalization of the automaton
129 when its size was automatically computed to be exactly 1000 bytes.
131 2013-10-14 Ed Schonberg <schonberg@adacore.com>
133 * sem_ch3.adb (Complete_Private_Subtype): If the full view of
134 the base type is constrained, the full view of the subtype is
135 known to be constrained as well.
137 2013-10-14 Vincent Celier <celier@adacore.com>
139 * projects.texi: Add documentation for new attributes of package
140 Clean: Artifacts_In_Object_Dir and Artifacts_In_Exec_Dir.
142 2013-10-14 Tristan Gingold <gingold@adacore.com>
144 * adaint.c, adaint.h (__gnat_get_executable_load_address):
146 * a-exexda.adb (Append_Info_Basic_Exception_Traceback): Add
147 executable load address (Basic_Exception_Tback_Maxlength): Adjust.
149 2013-10-14 Vincent Celier <celier@adacore.com>
151 * prj-attr.adb: New attributes in package Clean:
152 Artifacts_In_Exec_Dir, Artifacts_In_Object_Dir.
153 * prj-nmsc.adb (Process_Clean (Attributes)): New
154 procedure to process attributes Artifacts_In_Exec_Dir and
155 Artifacts_In_Object_Dir in package Clean.
156 * prj.ads (Project_Configuration): New components
157 Artifacts_In_Exec_Dir and Artifacts_In_Object_Dir.
158 * snames.ads-tmpl: New standard names Artifacts_In_Exec_Dir and
159 Artifacts_In_Object_Dir used only by gprclean.
161 2013-10-14 Robert Dewar <dewar@adacore.com>
163 * exp_attr.adb (Expand_N_Attribute_Reference): Add error
164 entry for Library_Level attribute (which should not survive
166 * gnat_rm.texi: Document attribute Library_Level
167 * sem_attr.adb (Analyze_Attribute, case Library_Level): Implement
168 this new attribute (Set_Boolean_Result): Replaces Set_Result
169 (Check_Standard_Prefix): Document that Check_E0 is called
170 (Check_System_Prefix): New procedure
171 * snames.ads-tmpl: Add entry for Library_Level attribute
173 2013-10-14 Robert Dewar <dewar@adacore.com>
175 * exp_ch6.adb, sinfo.ads: Minor reformatting.
176 * checks.adb (Overlap_Check): Use identifier casing in messages.
178 2013-10-14 Robert Dewar <dewar@adacore.com>
180 * einfo.ads, einfo.adb (Default_Aspect_Component_Value): Is on base type
182 * exp_aggr.adb (Expand_Array_Aggregate): Handle proper
183 initialization of <> component.
184 * exp_ch3.adb, exp_tss.adb: Minor reformatting
185 * sem_ch13.adb (Default_Aspect_Component_Value, Default_Aspect_Value):
186 Is on base type only.
187 * sinfo.ads: Minor comment revision.
189 2013-10-14 Robert Dewar <dewar@adacore.com>
191 * g-decstr.adb (Decode_Wide_Wide_Character): Fix failure
192 to detect invalid sequences where longer than necessary
193 sequences are used for encoding.
194 (Validate_Wide_Character):
195 Call Decode_Wide_Character to get the above validations.
196 (Validate_Wide_Wide_Character): Same fix
197 * g-decstr.ads: Add documentation making it clear that the UTF-8
198 implementation here recognizes all valid UTF-8 sequences, rather
199 than the well-formed subset corresponding to characters defined
201 (Next_Wide_Character): Remove comment about this
202 being more efficient than Decode_Wide_Character (because this
204 (Prev_Wide_Character): Add note that valid encoding is assumed.
206 2013-10-14 Robert Dewar <dewar@adacore.com>
208 * a-wichha.adb (Character_Set_Version): New function.
209 * a-wichha.ads: Remove comments for pragma Pure (final RM has
211 (Character_Set_Version): New function.
212 * gnat_rm.texi: Update doc.
214 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
216 * einfo.adb: Flag263 is now known as Has_Null_Refinement.
217 (Has_Null_Refinement): New routine.
218 (Set_Has_Null_Refinement): New routine.
219 (Write_Entity_Flags): Output the status of flag
221 * einfo.ads: Add new flag Has_Null_Refinement along with
222 comment on usage and update all nodes subject to the flag.
223 (Has_Null_Refinement): New routine along with pragma Inline.
224 (Set_Has_Null_Refinement): New rouitine along with pragma Inline.
225 * sem_prag.adb (Analyze_Constituent): Mark a state as having
226 a null refinement when the sole constituent is "null".
227 (Analyze_Global_List): Handle null input/output items.
228 (Analyze_Refined_Global_In_Decl_Part): Add local variable
229 Has_Null_State. Add logic to handle combinations of states
230 with null refinements and null global lists and/or items.
231 (Check_In_Out_States, Check_Input_States, Check_Output_States):
232 Use attribute Has_Null_Refinement to detect states with
234 (Check_Refined_Global_List): Handle null input/output items.
235 (Process_Global_Item): Handle states with null refinements.
236 (Process_Global_List): Handle null input/output items.
238 2013-10-14 Robert Dewar <dewar@adacore.com>
240 * freeze.adb (Freeze_Entity): Reset Is_True_Constant for
242 * gnat_ugn.texi: Update doc on aliased variables and constants.
244 2013-10-14 Ed Schonberg <schonberg@adacore.com>
246 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
247 reference is an actual in a call, the prefix has not been fully
248 expanded, to account for the additional expansion for parameter
249 passing. the prefix itself is a packed reference as well,
250 recurse to complete the transformation of the prefix.
252 2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
254 * exp_dbug.adb (Debug_Renaming_Declaration): Do not
255 materialize the entity when the renamed object contains an
256 N_Explicit_Dereference.
257 * sem_ch8.adb (Analyze_Object_Renaming):
258 If the renaming comes from source and the renamed object is a
259 dereference, mark the prefix as needing debug information.
261 2013-10-14 Doug Rupp <rupp@adacore.com>
263 * system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
264 Enable Stack Probes, Disable Stack Limit Checking.
265 * init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
266 (__gnat_map_signal): Fix signature.
267 (__gnat_error_handler): Make
268 static, fix signature, remove prototype, fix prototype warning.
269 [ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
270 page for storage_error.
271 * exp_pakd.adb: Minor reformatting.
273 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
275 * sem_prag.adb (Analyze_Global_In_Decl_Part): Remove local
276 variable Contract_Seen. Add local variable Proof_Seen.
277 (Analyze_Global_List): Remove the processing for mode
278 Contract_In. Add support for mode Proof_In.
279 (Analyze_Pragma): Update the grammar of pragmas Global and
281 * snames.ads-tmpl: Remove predefined name Contract_In. Add
282 predefined name Proof_In.
284 2013-10-14 Robert Dewar <dewar@adacore.com>
286 * exp_prag.adb (Expand_Pragma_Check): Generate proper string
288 * gnat_rm.texi: Add documentation for pragmas
289 Type_Invariant[_Class]
290 * par-prag.adb: Add entries for pragmas Type_Invariant[_Class]
291 * sem_ch13.adb: Minor reformatting
292 * sem_prag.adb: Implement pragmas Type_Invariant[_Class]
293 * snames.ads-tmpl: Add entries for pragmas Type_Invariant[_Class]
295 2013-10-14 Johannes Kanig <kanig@adacore.com>
297 * debug.adb: Release now unused debug switches that were only
298 relevant for gnat2why backend, not the frontend
299 * frontend.adb (Frontend) Do not stop when -gnatd.H is present,
302 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
304 * sem_prag.adb (Analyze_Global_Item): Allow
305 references to enclosing formal parameters.
307 2013-10-14 Thomas Quinot <quinot@adacore.com>
309 * einfo.adb (Equivalent_Type): Add missing case
310 E_Access_Subprogram_Type in guard (for remote access to
311 subprograms) * sem_ch8.adb (Find_Direct_Name, Find_Expanded_Name):
312 Add missing guards to account for the presence of RAS types
313 that have already been replaced with the corresponding fat
316 2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
318 * aspects.adb: Add an entry in table Canonical_Aspect for
320 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
321 Aspect_Names and Aspect_Delay for Initializes.
322 * atree.ads, atree.adb (Ekind_In): New seven argument versions of the
324 * einfo.adb: Remove Refined_State_Pragma from the list of node
325 usage. Finalizer is now at position 28.
327 and package bodies now have a contract.
329 the assertion and node usage.
330 (Get_Pragma): Update the Is_CDG
331 flag to include Abstract_State, Initializes and Refined_State.
332 (Refined_State_Pragma): Removed.
333 (Set_Contract): Package and
334 package bodies now have a contract.
335 (Set_Finalizer): Update the
336 assertion and node usage.
337 (Set_Refined_State_Pragma): Removed.
338 (Write_Field8_Name): Remove the output for Refined_State_Pragma.
339 (Write_Field24_Name): Remove the output for Finalizer. Package
340 and package bodies now have a contract.
341 (Write_Field28_Name):
342 Add output for Finalizer.
343 * einfo.ads: Update the documentation and usage in entities
344 of attribute Contract. Update the node position and usage in
345 entities of attribute Finalizer. Remove the documentation
346 and usage in entities for attribute Refined_State_Pragma.
347 (Refined_State_Pragma): Removed along with pragma Inline.
348 (Set_Refined_State_Pragma): Removed along with pragma Inline.
349 * par-prag.adb: Add Initializes to the pragmas that do not
350 require special processing by the parser.
351 * sem_ch3.adb (Analyze_Declarations): Add local variable
352 Prag. Update the retrieval of pragma Refined_State. Analyze
353 aspect/pragma Initializes at the end of the visible declarations
354 of the related package.
355 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
356 Add local variables Ref_Depends and Ref_Global. Analyze
357 pragmas Refined_Global and Refined_Depends in that order.
358 (Analyze_Subprogram_Contract): Add local variables Depends and
359 Global. Analyze pragmas Global and Depends in that order.
360 * sem_ch7.adb (Analyze_Package_Body_Helper): Package
361 bodies now have a contract. Move the analysis of the aspect
362 specifications after the defining entity has been decorated.
363 (Analyze_Package_Declaration): Packages now have a contract. Move
364 the analysis of the aspect specifications after the defining
365 entity has been decorated.
366 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Packages
368 * sem_ch13.adb (Analyze_Pragma): Code cleanup for aspect
369 Abstract_State. Add processing for aspect Initializes.
370 (Check_Aspect_At_Freeze_Point): Add an entry for Initializes.
371 * sem_prag.adb: Use Get_Pragma_Arg to extract the expression
372 of a pragma argument. Add an entry in table Sig_Flags for
374 (Analyze_Initializes_In_Decl_Part): New routine.
375 (Analyze_Pragma): Check the declaration order of pragmas
376 Abstract_State and Initializes. Abstract_State is now part of
377 the package contract. Analyze pragma Initializes. Check for
378 duplicate Refined_State pragma. Refined_State is now part of
379 the package contract.
380 (Check_Declaration_Order): New routine.
381 (Check_Test_Case): Alphabetized.
382 * sem_prag.ads (Analyze_Initializes_In_Decl_Part): New routine.
383 * sem_util.adb (Add_Contract_Item): Rename formal Subp_Id
384 to Id. This routine can now support contracts on packages and
386 * sem_util.ads (Add_Contract_Item): Rename formal Subp_Id to
387 Id. Update comment on usage.
388 * sinfo.ads: Update the usage of N_Contract nodes.
389 * snames.ads-tmpl: Add predefined name Initializes. Add new
390 pragma id for Initializes.
392 2013-10-13 Nicolas Roche <roche@adacore.com>
393 Eric Botcazou <ebotcazou@adacore.com>
395 * gcc-interface/Make-lang.in (ada/%.o): Replace individual rules with
396 generic rule and add $(POSTCOMPILE).
398 (.adb.o): Add @$(ADA_DEPS).
400 (ada/a-except.o): Likewise.
401 (ada/s-excdeb.): Likewise.
402 (ada/s-assert.o): Likewise.
403 (ada/a-tags.o): Likewise.
404 (ada_generated_files): New variable.
405 Use them as dependency order for GNAT1_ADA_OBJS and GNATBIND_OBJS.
406 (ADA_DEPFILES): New variable.
410 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
412 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Force all local
413 variables with aggregate types in memory if not optimizing.
415 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
417 * sem_prag.adb (Check_Mode): Do
418 not emit an error when we are looking at inputs and
419 the item is an unconstrained or tagged out parameter.
420 (Check_Mode_Restriction_In_Enclosing_Context): Use Get_Pragma
421 to find whether the context is subject to aspect/pragma Global.
422 (Collect_Subprogram_Inputs_Outputs): Unconstrained or tagged
423 out parameters are now considered inputs. Use Get_Pragma to
424 find wheher the subprogram is subject to aspect/pragma Global.
425 (Is_Unconstrained_Or_Tagged_Item): New routine.
427 2013-10-13 Thomas Quinot <quinot@adacore.com>
429 * einfo.ads: Minor reformatting.
430 * gcc-interface/Make-lang.in: Update dependencies.
432 2013-10-13 Robert Dewar <dewar@adacore.com>
434 * gnat_rm.texi: Add documentation for pragmas Pre[_Class]
436 * par-ch2.adb (Skip_Pragma_Semicolon): Handle extra semicolon nicely.
437 * par-prag.adb: Add entries for pragmas Pre[_Class] and
439 * sem_prag.adb: Add handling of pragmas Pre[_Class] and
441 * sem_util.adb (Original_Aspect_Name): Moved here from
442 Sem_Prag.Original_Name, and modified to handle pragmas
443 Pre/Post/Pre_Class/Post_Class.
444 * sem_util.ads (Original_Aspect_Name): Moved here from
445 Sem_Prag.Original_Name.
446 * snames.ads-tmpl: Add entries for pragmas Pre[_Class] and
449 2013-10-13 Robert Dewar <dewar@adacore.com>
451 * einfo.adb, sem_ch6.adb: Minor reformatting.
453 2013-10-13 Hristian Kirtchev <kirtchev@adacore.com>
455 * einfo.adb: Add node/list usage for Refined_State
456 and Refinement_Constituents.
457 (Get_Pragma): Update the
458 initialization of Is_CDG to include Refined_Global and
459 Refined_Depends. Rename constant Delayed to In_Contract and update
460 all of its occurrences.
461 (Is_Non_Volatile_State): New routine.
462 (Is_Volatile_State): Removed.
463 (Refined_State): New routine.
464 (Refinement_Constituents): New routine.
465 (Set_Refined_State): New routine.
466 (Set_Refinement_Constituents): New routine.
467 (Write_Field8_Name): Add output for Refinement_Constituents.
468 (Write_Field10_Name): Add output for Refined_State.
469 * einfo.ads: Add new synthesized attribute Is_Non_Volatile_State.
470 Remove synthesized attribute Is_Volatile_State. Add new
471 attributes Refined_State and Refinement_Constituents along with
473 (Get_Pragma): Update the comment on usage.
474 (Is_Non_Volatile_State): New routine.
475 (Is_Volatile_State): Removed.
476 (Refined_State): New routine and pragma Inline.
477 (Refinement_Constituents): New routine and pragma Inline.
478 (Set_Refined_State): New routine and pragma Inline.
479 (Set_Refinement_Constituents): New routine and pragma Inline.
480 * elists.ads, elists.adb (Clone): Removed.
481 (New_Copy_Elist): New routine.
482 (Remove): New routine.
483 * sem_ch3.adb (Analyze_Declarations): Use Defining_Entity
484 to get the entity of the subprogram [body].
485 (Analyze_Object_Declaration): Add initialization for
487 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Add processing
488 for Refined_Global and Refined_Depends. Emit an error when
489 the body requires Refined_Global, but the aspect/pragma is
491 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Change
492 procedure signature and add comment on usage.
493 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
494 for aspect Refined_Global.
495 * sem_prag.adb (Analyze_Abstract_State): Add initialization
496 of attributes Refined_State and Refinement_Constituents.
497 (Analyze_Depends_In_Decl_Part, Analyze_Global_In_Decl_Part,
498 Analyze_Contract_Cases_In_Decl_Part): Remove local
500 (Analyze_Pragma): Add processing for pragma
501 Refined_Global. The analysis of Refined_Post and Refined_Pre
502 has been merged. Update an error message in the processing of
503 pragma Refined_State.
504 (Analyze_Refined_Global_In_Decl_Part): Provide implementation.
505 (Analyze_Refined_Pragma): New routine.
506 (Analyze_Refined_Pre_Post_Condition): Removed.
507 (Analyze_Refined_State_In_Decl_Part): Update the call to Clone.
508 (Analyze_Refinement_Clause): Make State_Id visible to all
510 (Check_Matching_Constituent): Establish
511 a relation between a refined state and its constituent.
512 (Collect_Hidden_States_In_Decls): Remove ??? comment. Look at
513 the entity of the object declaration to establish its kind.
514 * sem_util.adb: Alphabetize with and use clauses.
515 (Contains_Refined_State): New routine.
516 * sem_util.ads (Contains_Refined_State): New routine.
518 2013-10-13 Thomas Quinot <quinot@adacore.com>
520 * scos.ads: Minor documentation clarification.
522 2013-10-13 Thomas Quinot <quinot@adacore.com>
524 * s-oscons-tmplt.c (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC when
525 building on AIX 5.3 or later, and to CLOCK_REALTIME on older
527 * init.c (pthread_condattr_setclock): Remove now useless weak symbol.
528 * thread.c(__gnat_pthread_condattr_setup): Remove bogus AIX 5.2
530 * s-osinte-aix.ads(clock_id_t): Fix C mapping (this is a 64-bit
532 (clock_gettime): Import from C runtime library.
533 * s-osinte-aix.adb (clock_gettime): Remove bogus emulation body,
534 this routine is provided by the system in current supported
537 2013-10-13 Robert Dewar <dewar@adacore.com>
539 * sem_ch3.adb: Minor reformatting.
541 2013-10-13 Ed Schonberg <schonberg@adacore.com>
543 * freeze.adb (Freeze_Entity): For a function whose return type
544 is incomplete, do not replace the type with the full view if the
545 type is a limited view. In that case the full view appears in a
546 different unit, and the back-end will retrieve it at the proper
549 2013-10-13 Yannick Moy <moy@adacore.com>
551 * exp_spark.adb (Expand_SPARK_Call): Do not introduce temporaries for
554 2013-10-13 Ed Schonberg <schonberg@adacore.com>
556 * sem_ch3.adb: in Ada 2012 access_to_function types can have
558 (Derived_Type_Declaration): SPARK restriction
559 must be flagged on the original node, since it may have been
560 written as a subtype declaration.
561 (Analyze_Subtype_Declaration): Do not enter name of
562 entity in declaration if it is the current entity, because it may
563 have been inserted in a previous analysis and it appears in the
564 else_part of an if-statement that is rewritten during expansion.
566 2013-10-13 Yannick Moy <moy@adacore.com>
568 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove procedure.
569 (Expand_SPARK): Remove call to Expand_SPARK_N_Attribute_Reference and
570 Expand_SPARK_N_Simple_Return_Statement.
571 (Expand_SPARK_N_Simple_Return_Statement,
572 Expand_SPARK_Simple_Function_Return): Remove procedures.
574 2013-10-13 Vincent Celier <celier@adacore.com>
576 * gnat_ugn.texi: Minor editing.
578 2013-10-13 Ed Schonberg <schonberg@adacore.com>
580 * sem_ch3.adb (Check_Abstract_Overriding): If a synchronized
581 operation implements an interface primitive, mark the operation
582 as referenced, to prevent usually spurious messages about unused
583 entities: such operations are called in dispatching select
584 statements that are not visible to the compiler.
586 2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
588 * gcc-interface/decl.c (gnat_to_gnu_param): Remove obsolete comment.
590 2013-10-11 Jakub Jelinek <jakub@redhat.com>
592 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_8): Define.
594 2013-10-10 Robert Dewar <dewar@adacore.com>
596 * par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove
599 2013-10-10 Javier Miranda <miranda@adacore.com>
601 * sem_ch13.adb (Freeze_Entity_Checks): Avoid
602 loosing errors on CPP entities in -gnatc mode.
604 2013-10-10 Robert Dewar <dewar@adacore.com>
606 * sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant
609 2013-10-10 Robert Dewar <dewar@adacore.com>
611 * restrict.adb (Check_SPARK_Restriction): Refine test (don't
612 automatically go to the original node).
613 * sem_ch11.adb (Analyze_Raise_Statement): Only raise
614 statements that come from source violate SPARK restrictions.
615 (Analyze_Raise_xxx_Error): Same fix.
616 * sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK
617 initialization on original node, not on possibly rewritten
619 * sem_ch4.adb (Analyze_If_Expression): Only if expressions that
620 come from source violate SPARK mode restrictions.
622 2013-10-10 Robert Dewar <dewar@adacore.com>
624 * gnat_ugn.texi: Fix confusing documentation for -gnatyM.
626 2013-10-10 Yannick Moy <moy@adacore.com>
628 * errout.adb (Compilation_Errors): In formal verification mode,
631 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
633 * sem_prag.adb (Collect_Hidden_States_In_Decls): Only consider source
634 non-constant objects.
636 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
638 * aspects.adb: Add an entry in table Canonical_Aspect for
640 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
641 Aspect_Names and Aspect_Delay for Refined_State.
642 * einfo.adb: Add with and use clauses for Elists.
643 Remove Refined_State from the list of node usage.
644 Add Refined_State_Pragma to the list of node usage.
645 (Has_Null_Abstract_State): New routine.
646 (Refined_State): Removed.
647 (Refined_State_Pragma): New routine.
648 (Set_Refined_State): Removed.
649 (Set_Refined_State_Pragma): New routine.
650 (Write_Field8_Name): Add output for Refined_State_Pragma.
651 (Write_Field9_Name): Remove the output for Refined_State.
652 * einfo.ads: Add new synthesized attribute Has_Null_Abstract_State
653 along with usage in nodes. Remove attribute Refined_State along
654 with usage in nodes. Add new attribute Refined_State_Pragma along
656 (Has_Null_Abstract_State): New routine.
657 (Refined_State): Removed.
658 (Refined_State_Pragma): New routine.
659 (Set_Refined_State): Removed.
660 (Set_Refined_State_Pragma): New routine.
661 * elists.adb (Clone): New routine.
662 * elists.ads (Clone): New routine.
663 * par-prag.adb: Add Refined_State to the pragmas that do not
664 require special processing by the parser.
665 * sem_ch3.adb: Add with and use clause for Sem_Prag.
666 (Analyze_Declarations): Add local variables Body_Id, Context and
667 Spec_Id. Add processing for delayed aspect/pragma Refined_State.
668 * sem_ch13.adb (Analyze_Aspect_Specifications): Update the
669 handling of aspect Abstract_State. Add processing for aspect
670 Refined_State. Remove the bizzare insertion policy for aspect
672 (Check_Aspect_At_Freeze_Point): Add an entry for Refined_State.
673 * sem_prag.adb: Add an entry to table Sig_Flags
674 for pragma Refined_State.
675 (Add_Item): Update the
676 comment on usage. The inserted items need not be unique.
677 (Analyze_Contract_Cases_In_Decl_Part): Rename variable Restore to
678 Restore_Scope and update all its occurrences.
680 Update the handling of pragma Abstract_State. Add processing for
681 pragma Refined_State.
682 (Analyze_Pre_Post_Condition_In_Decl_Part):
683 Rename variable Restore to Restore_Scope and update all its
685 (Analyze_Refined_State_In_Decl_Part): New routine.
686 * sem_prag.ads (Analyze_Refined_State_In_Decl_Part): New routine.
687 * snames.ads-tmpl: Add new predefined name for Refined_State. Add
688 new Pragma_Id for Refined_State.
690 2013-10-10 Ed Schonberg <schonberg@adacore.com>
692 * sem_ch10.adb (Install_Limited_Withed_Unit): handle properly the
693 case of a record declaration in a limited view, when the record
694 contains a self-referential component of an anonymous access type.
696 2013-10-10 Thomas Quinot <quinot@adacore.com>
698 * exp_ch4.adb (Process_Transient_Object): For any context other
699 than a simple return statement, insert the finalization action
700 after the context, not as an action on the context (which will
701 get evaluated before it).
703 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
705 * einfo.adb (Write_Field19_Name): Correct the
706 string name of attribute Default_Aspect_Value.
708 2013-10-10 Ed Schonberg <schonberg@adacore.com>
710 * sem_type.adb (Interface_Present_In_Ancestor): The progenitor
711 in a type declaration may be an interface subtype.
713 2013-10-10 Robert Dewar <dewar@adacore.com>
715 * sinfo.ads (Do_Range_Check): Add special note on handling of
716 range checks for Succ and Pred.
718 2013-10-10 Robert Dewar <dewar@adacore.com>
720 * erroutc.adb (Output_Msg_Text): Remove VMS special handling.
722 2013-10-10 Robert Dewar <dewar@adacore.com>
724 * a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
725 (Is_Mark): New function.
726 (Is_Other_Format): New function.
727 (Is_Punctuation_Connector): New function.
728 (Is_Space): New function.
730 2013-10-10 Robert Dewar <dewar@adacore.com>
732 * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
733 choice circuit. Was not quite right in some cases, which showed
734 up in ACATS test B43201C.
735 * sem_attr.adb (Address_Checks): Make sure name is set right
736 for some messages issued.
737 * mlib-prj.adb: Minor code reorganization.
738 * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs.
739 * exp_ch9.adb: Minor reformatting.
741 2013-10-10 Tristan Gingold <gingold@adacore.com>
743 * lib-writ.adb (Write_Unit_Information): Adjust previous patch.
745 2013-10-10 Robert Dewar <dewar@adacore.com>
747 * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if
749 * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New
752 2013-10-10 Ed Schonberg <schonberg@adacore.com>
754 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion
755 for the case of a dispatching trigger: there is no need to
756 duplicate the code or create a subprogram to encapsulate the
757 triggering statements. This allows exit statements in the
758 triggering statements, that refer to enclosing loops.
760 2013-10-10 Robert Dewar <dewar@adacore.com>
762 * freeze.adb: Minor reformatting.
763 * sem_ch13.adb (Freeze_Entity_Checks): New procedure
764 (Analyze_Freeze_Entity): Call Freeze_Entity_Checks
765 (Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
766 * sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
767 * sprint.ads: Add syntax for freeze generic entity node.
769 2013-10-10 Robert Dewar <dewar@adacore.com>
771 * einfo.adb, einfo.ads: Minor comment updates.
773 2013-10-10 Robert Dewar <dewar@adacore.com>
775 * lib-writ.adb (Write_Unit_Information): Fatal error if linker
776 options are detected in a predefined generic unit.
778 2013-10-10 Thomas Quinot <quinot@adacore.com>
780 * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using
781 a dummy placeholder value.
782 (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore.
783 * thread.c: Adjust #if test accordingly.
785 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
787 * exp_ch6.adb (Consequence_Error): Generate an
788 implicit if statement.
789 (Expand_Contract_Cases): Generate an implicit if statement.
790 (Process_Contract_Cases): Do not expand Contract_Cases when no code
793 2013-10-10 Robert Dewar <dewar@adacore.com>
795 * sem_attr.adb (Address_Checks): New procedure.
797 2013-10-10 Ed Schonberg <schonberg@adacore.com>
799 * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger
800 semantic actions at the proper point for entities that previously
801 had no explicit freeze point.
802 * freeze.adb (Freeze_Generic_Entities): generate new nodes to
803 indicate the point at which semantic checks can be performed on
804 entities declared in generic packages.
805 * sem_ch13.ads, sem_ch13.adb: New procedure
806 Analyze_Freeze_Generic_Entity.
807 * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity.
808 * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity.
809 * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity.
810 * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity.
811 * gcc-interface/Make-lang.in: Update dependencies.
813 2013-10-10 Robert Dewar <dewar@adacore.com>
815 * sem_aggr.adb (Resolve_Array_Aggregate): Identify duplicated
818 2013-10-10 Robert Dewar <dewar@adacore.com>
820 * sem_ch9.adb (Analyze_Task_Body): Aspects are illegal
821 (Analyze_Protected_Body): Aspects are illegal.
823 2013-10-10 Robert Dewar <dewar@adacore.com>
825 * sem_ch6.adb, sem_ch13.adb: Minor reformatting.
826 * sem_case.adb (Check_Choices): Fix bad listing of missing
827 values from predicated subtype case (Check_Choices): List
829 * errout.adb (Set_Msg_Text): Process warning tags in VMS mode
830 * erroutc.adb (Output_Msg_Text): Handle VMS warning tags
831 * gnat_ugn.texi: Document /WARNINGS=TAG_WARNINGS for VMS
832 * ug_words: Add entries for -gnatw.d and -gnatw.D
833 * vms_data.ads: Add [NO]TAG_WARNINGS for -gnatw.D/-gnatw.d
834 * lib-writ.ads: Documentation fixes
836 2013-10-10 Robert Dewar <dewar@adacore.com>
838 * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads
839 (Is_Other_Format): New name for Is_Other.
840 (Is_Punctuation_Connector): New name for Is_Punctuation
842 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
844 * aspects.adb: Add entries in table Canonical_Aspects for aspects
845 Refined_Depends and Refined_Global.
846 * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument,
847 Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for
848 aspects Refined_Depends and Refined_Global.
849 * einfo.adb (Contract): Subprogram bodies are now valid owners
851 (Set_Contract): Subprogram bodies are now valid
853 (Write_Field24_Name): Output the contract
854 attribute for subprogram bodies.
855 * exp_ch6.adb (Expand_Subprogram_Contract): New routine.
856 * exp_ch6.ads (Expand_Subprogram_Contract): New routine.
857 * par-prag.adb: Pragmas Refined_Depends and Refined_Global do
858 not require any special processing by the parser.
859 * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl.
860 (Analyze_Declarations): Code reformatting. Analyze the contract
861 of a subprogram body at the end of the declarative region.
862 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
863 Subprogram bodies can now have contracts. Use
864 Expand_Subprogram_Contract to handle the various contract
866 (Analyze_Subprogram_Body_Contract): New null routine.
867 (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have
868 contracts. Use Expand_Subprogram_Contract to handle the various
870 (Analyze_Subprogram_Contract): Add local
871 variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture
872 the pragma name in Nam.
873 (Process_PPCs): Removed.
874 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine.
875 (Analyze_Subprogram_Contract): Update the comment on usage.
876 * sem_ch13.adb (Analyze_Aspect_Specifications): Add null
877 implementations for aspects Refined_Depends and Refined_Global.
878 (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and
879 Refined_Global do not need to be checked at the freeze point.
880 * sem_prag.adb: Add entries in table Sig_Flags
881 for pragmas Refined_Depends and Refined_Global.
882 (Analyze_Contract_Cases_In_Decl_Part): Add local
883 variable Restore. Use Restore to pop the scope.
884 (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use
885 Restore to pop the scope.
886 (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore
888 (Analyze_PPC_In_Decl_Part): Renamed to
889 Analyze_Pre_Post_Condition_In_Decl_Part.
891 Add null implementations for pragmas Refined_Depends and
892 Refined_Global. Refined_Pre and Refined_Post are now
893 handled by routine Analyze_Refined_Pre_Post_Condition
895 (Analyze_Refined_Depends_In_Decl_Part): New
897 (Analyze_Refined_Global_In_Decl_Part):
899 (Analyze_Refined_Pre_Post):
900 Renamed to Analyze_Refined_Pre_Post_Condition.
901 (Analyze_Refined_Pre_Post_Condition): Analyze the boolean
903 (Check_Precondition_Postcondition): Update the call
904 to Analyze_PPC_In_Decl_Part.
905 * sem_prag.ads: Add entries in table
906 Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends
908 (Analyze_PPC_In_Decl_Part): Renamed
909 to Analyze_Pre_Post_Condition_In_Decl_Part. Update the
911 (Analyze_Refined_Depends_In_Decl_Part): New routine.
912 (Analyze_Refined_Global_In_Decl_Part): New routine.
913 (Analyze_Test_Case_In_Decl_Part): Update the comment on usage.
914 * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag
915 and update all occurrences. Subprogram body contracts can now
916 contain pragmas Refined_Depends and Refined_Global.
917 * sem_util.ads (Add_Contract_Item): Rename formal Item to
918 Prag. Update the comment on usage.
919 * sinfo.ads: Update the comment on structure and usage of
921 * snames.ads-tmpl: Add new predefined names for Refined_Depends
922 and Refined_Global. Add entries in table Pragma_Id for
923 Refined_Depends and Refined_Global.
925 2013-10-10 Robert Dewar <dewar@adacore.com>
927 * types.ads: Minor reformatting.
929 2013-10-10 Thomas Quinot <quinot@adacore.com>
931 * s-taprop-posix.adb: Add missing comment.
933 2013-10-10 Robert Dewar <dewar@adacore.com>
935 * freeze.adb (Freeze_Record_Type): Move choice checking to
936 Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices
938 * sem_case.adb (Check_Choices): Remove misguided attempt to
939 freeze choices (this is now done in Freeze_Record_Type where
941 (Check_Choices): Remove some analyze/resolve calls
942 that are redundant since they are done in Analyze_Choices.
943 * sem_ch13.adb (Analyze_Freeze_Entity): Do the error
944 checking for choices in variant records here (moved here from
945 Freeze.Freeze_Record_Type)
947 2013-10-10 Thomas Quinot <quinot@adacore.com>
949 * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define,
950 possibly using a dummy placeholder value.
951 (Compute_Deadline): For the case of an
952 Absolute_Calendar deadline, if the target uses another clock
953 than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible
956 2013-10-10 Ed Schonberg <schonberg@adacore.com>
958 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
959 qualified reference to a generic child unit within itself,
962 2013-10-10 Pascal Obry <obry@adacore.com>
964 * prj-conf.adb: Minor typo fixes in comment.
966 2013-10-10 Thomas Quinot <quinot@adacore.com>
968 * s-taprop-posix.adb (Compute_Deadline): New local subprogram,
969 factors common code between Timed_Sleep and Timed_Delay.
971 2013-10-10 Robert Dewar <dewar@adacore.com>
973 * freeze.adb (Freeze_Record_Type): Don't replace others if
974 expander inactive. This avoids clobbering the ASIS tree in
977 2013-10-10 Robert Dewar <dewar@adacore.com>
979 * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for
980 fixed-point case in preanalysis mode (error will be caught during
983 2013-10-10 Robert Dewar <dewar@adacore.com>
985 * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as
986 assertion identifiers for pragma Assertion_Policy.
987 * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post
988 * sem_ch13.adb: Minor reformatting.
990 2013-10-10 Pascal Obry <obry@adacore.com>
992 * prj-conf.adb: Code refactoring.
994 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
996 * einfo.adb: Remove Integrity_Level from the node usage list.
997 (Has_Option): Update the implementation to match
999 (Has_Property): Renamed to Has_Option.
1000 (Integrity_Level): Removed.
1001 (Is_External_State): New routine.
1002 (Is_Input_Only_State): Use Has_Option to determine whether a state
1003 is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State.
1004 (Is_Output_Only_State): Use Has_Option to determine whether
1005 a state is Output_Only.
1006 (Is_Output_State): Renamed to
1007 Is_Output_Only_State.
1008 (Is_Volatile_State): Use Has_Option to determine whether a state is
1010 (Set_Integrity_Level): Removed.
1011 (Write_Field8): Remove the entry for Integrity_Level.
1012 * einfo.ads: Remove Integrity_Level along with its documentation
1013 and usage in nodes. Rename Is_Input_State to Is_Input_Only_State.
1014 Rename Is_Output_State to Is_Output_Only_State. Update the
1015 documentation of Is_Volatile_State. Update the node structure of
1017 (Integrity_Level): Removed along with pragma Inline.
1018 (Is_External_State): New routine.
1019 (Is_Input_State): Renamed to Is_Input_Only_State.
1020 (Is_Output_State): Renamed to Is_Output_Only_State.
1021 (Set_Integrity_Level): Removed along with pragma Inline.
1022 * sem_prag.adb (Analyze_Pragma): Update the checks regarding
1023 global items and abstract state modes. Update the implementation
1024 of pragma Abstract_State to reflect the new rules and terminology.
1025 * snames.ads-tmpl: Remove the predefined name for Integrity
1026 level. Add new predefined names for Input_Only, Non_Volatile,
1027 Output_Only and Part_Of.
1029 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1031 * lib-xref.adb (Generate_Reference): Do not generate a reference
1032 within a _postcondition procedure: a proper source reference has
1033 already been generated when pre- analyzing the original aspect
1034 specification, and the use of a formal in a pre/postcondition
1035 should not count as a proper use in a subprogram body.
1037 2013-10-10 Robert Dewar <dewar@adacore.com>
1039 * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant
1042 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1044 * aspects.adb: Add an entry for Aspect_Refined_Post in table
1046 * aspects.ads: Add an entry for Aspect_Refined_Post in tables
1047 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
1048 Aspect_On_Body_Or_Stub_OK. Update the comment on the use of
1049 table Aspect_On_Body_Or_Stub_OK.
1050 * par-prag.adb: Add pragma Refined_Post to the list of pragmas
1051 that do not require special processing by the parser.
1052 * sem_attr.adb (Analyze_Attribute): Add special analysis for
1053 attributes 'Old and 'Result when code generation is disabled and
1054 they appear in aspect/pragma Refined_Post.
1055 (In_Refined_Post): New routine.
1056 * sem_ch6.adb (Analyze_Expression_Function): Move various
1057 aspects and/or pragmas that apply to an expression function to the
1058 corresponding spec or body.
1059 (Collect_Body_Postconditions): New routine.
1060 (Process_PPCs): Use routine Collect_Body_Postconditions
1061 to gather all postcondition pragmas.
1062 * sem_ch10.adb (Analyze_Proper_Body): Use routine
1063 Relocate_Pragmas_To_Body to move all source pragmas that follow
1064 a body stub to the proper body.
1065 (Move_Stub_Pragmas_To_Body): Removed.
1066 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1067 for aspect Refined_Post.
1068 (Check_Aspect_At_Freeze_Point): Aspect
1069 Refined_Post does not need delayed processing at the freeze point.
1070 * sem_prag.adb: Add an entry for pragma Refined_Post in
1072 (Analyze_Pragma): Add processing for pragma
1073 Refined_Post. Update the processing of pragma Refined_Pre
1074 to use common routine Analyze_Refined_Pre_Post.
1075 (Analyze_Refined_Pre_Post): New routine.
1076 (Relocate_Pragmas_To_Body): New routine.
1077 * sem_prag.ads: Table Pragma_On_Stub_OK is now known as
1078 Pragma_On_Body_Or_Stub_OK. Update the comment on usage of
1079 table Pragma_On_Body_Or_Stub_OK.
1080 (Relocate_Pragmas_To_Body): New routine.
1081 * snames.ads-tmpl: Add new predefined name for Refined_Post. Add
1082 new Pragma_Id for Refined_Post.
1084 2013-10-10 Robert Dewar <dewar@adacore.com>
1086 * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of
1087 last choice to others is moved to Freeze_Record_Type.
1088 * freeze.adb (Freeze_Record_Type): Expand last variant to others
1089 if necessary (moved here from Expand_N_Variant_Part
1091 2013-10-10 Robert Dewar <dewar@adacore.com>
1093 * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads,
1094 sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb,
1095 s-atocou-builtin.adb: Minor reformatting.
1097 2013-10-10 Thomas Quinot <quinot@adacore.com>
1099 * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This
1100 constant needs to be output to s-oscons.h, as it is tested
1103 2013-10-10 Robert Dewar <dewar@adacore.com>
1105 * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early
1106 * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice
1107 flag to avoid expanding choices when not necessary.
1108 * exp_util.adb: Minor reformatting
1109 * freeze.adb (Freeze_Record_Type): Redo expansion of variants
1110 * sem_aggr.adb: Minor reformatting
1111 * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and
1112 Checking of choices.
1113 * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new
1115 * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices
1117 * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices
1119 * sem_util.adb: Minor reformatting
1120 * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag.
1122 2013-10-10 Vincent Celier <celier@adacore.com>
1124 * mlib-prj.adb (Build_Library): Do not issue link dynamic
1125 libraries with an Rpath, if switch -R was used.
1127 2013-10-10 Tristan Gingold <gingold@adacore.com>
1129 * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16,
1130 Image_Index_Table_32): Remove as not used.
1131 * s-imgint.adb (Image_Integer): Call Set_Image_Integer and
1132 remove duplicated code.
1134 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1136 * sem_prag.adb (Analyze_Pragma): Provide a
1137 more precise error message when pragma Refined_Pre applies to
1138 an expression function that is not a completion.
1140 2013-10-10 Thomas Quinot <quinot@adacore.com>
1142 * sem_attr.adb (Analyse_Attribute, case
1143 Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute
1144 reference for a generic type is permitted in GNAT runtime mode.
1145 * a-sequio.adb (Read, Write): Use the endianness of the actual
1146 type to encode length information written to the file.
1148 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1150 * par-ch13.adb (Aspect_Specifications_Present)): In earlier than
1151 Ada2012 mode, assume that a legal aspect name following "with"
1152 keyword is an older gnat switch and not a misplaced with_clause.
1154 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1156 * aspects.adb: Add an entry for Aspect_Refined_Pre in
1157 table Canonical_Aspect.
1158 (Aspects_On_Body_OK): Renamed to
1159 Aspects_On_Body_Or_Stub_OK.
1160 (Aspects_On_Body_Or_Stub_OK):
1161 Update the query in table Aspect_On_Body_OK.
1162 * aspects.ads: Add an entry for Aspect_Refined_Pre in tables
1163 Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay,
1164 Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as
1165 Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications
1166 that apply to body stubs.
1167 (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK.
1168 (Aspects_On_Body_Or_Stub_OK): Update the comment on usage.
1169 * par-prag.adb: Add pragma Refined_Pre to the list of pragmas
1170 that do not require special processing by the parser.
1171 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the
1172 analysis of aspect specifications that apply to a body stub
1173 until the proper body is analyzed.
1174 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1175 (Analyze_Package_Body_Stub): Set the corresponding spec of the stub.
1176 (Analyze_Proper_Body): Relocate all pragmas that apply
1177 to a subprogram body stub to the declarations of the proper
1178 body. Analyze the aspect specifications of the stub when the
1179 proper body is not present.
1180 (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub.
1181 (Analyze_Task_Body_Stub): Set the corresponding spec of the stub.
1182 (Move_Stub_Pragmas_To_Body): New routine.
1183 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
1184 for aspect Refined_Pre.
1185 (Check_Aspect_At_Freeze_Point): Aspect
1186 Refined_Pre does not need delayed processing at the freeze point.
1187 * sem_prag.adb: Remove with and use clause for Snames. Add
1188 an entry for Pragma_Refined_Pre in table Sig_Flags.
1189 (Analyze_Pragma): Add processing for pragma Refined_Pre.
1190 * sem_prag.ads: Add with and use clause for Snames. Add table
1192 * sinfo.adb (Corresponding_Spec_Of_Stub): New routine.
1193 (Set_Corresponding_Spec_Of_Stub): New routine.
1194 * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub
1195 along with comment on usage and occurrences in nodes.
1196 (Corresponding_Spec_Of_Stub): New routine along with pragma
1198 (Set_Corresponding_Spec_Of_Stub): New routine along
1200 * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add
1201 new Pragma_Id for Refined_Pre.
1203 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1205 * sem_ch12.adb (Analyze_Package_Instantiation,
1206 Analyze_Subprogram_Instantiation): Improve error message when
1207 name in instantiation does not designate a generic unit of the
1210 2013-10-10 Robert Dewar <dewar@adacore.com>
1212 * exp_ch3.adb (Expand_N_Variant_Part): Expand statically
1213 predicated subtype which appears in Discrete_Choices list.
1214 * exp_ch5.adb (Expand_N_Case_Statement): Expand statically
1215 predicated subtype which appears in Discrete_Choices list of
1216 case statement alternative.
1217 * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New
1219 * sem_case.adb: Minor reformatting (Analyze_Choices): Don't
1220 expand out Discrete_Choices that are names of subtypes with
1221 static predicates. This is now done in the analyzer so that the
1222 -gnatct tree is properly formed for ASIS.
1223 * sem_case.ads (Generic_Choices_Processing): Does not apply
1224 to aggregates any more, so change doc accordingly, and remove
1225 unneeded Get_Choices argument.
1226 * sem_ch3.adb (Analyze_Variant_Part): Remove no
1227 longer used Get_Choices argument in instantiation of
1228 Generic_Choices_Processing.
1229 * sem_ch4.adb (Analyze_Case_Expression): Remove no
1230 longer used Get_Choices argument in instantiation of
1231 Generic_Choices_Processing.
1232 * sem_ch5.adb (Analyze_Case_Statement): Remove no
1233 longer used Get_Choices argument in instantiation of
1234 Generic_Choices_Processing.
1235 * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative,
1236 document that choices that are names of statically predicated
1237 subtypes are expanded in the code generation tree passed to the
1238 back end, but not in the ASIS tree generated for -gnatct.
1240 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1242 * sem_ch7.adb: Revert previous change.
1244 2013-10-10 Gary Dismukes <dismukes@adacore.com>
1246 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where
1247 the Storage_Pool aspect is specified by an aspect clause and a
1248 renaming is used to capture the evaluation of the pool name,
1249 insert the renaming in front of the aspect's associated entity
1250 declaration rather than in front of the corresponding attribute
1251 definition (which hasn't been appended to the declaration
1254 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1256 * sem_ch6.adb (Is_Interface_Conformant): The controlling type
1257 of the interface operation is obtained from the ultimate alias
1258 of the interface primitive parameter, because that may be in
1259 fact an implicit inherited operation whose signature involves
1260 the type extension and not the desired interface.
1262 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1264 * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012,
1265 recognize an aspect specification with a misspelled name if it
1266 is followed by a a comma or semicolon.
1268 2013-10-10 Vadim Godunko <godunko@adacore.com>
1270 * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb:
1271 Fix copyright notice.
1273 2013-10-10 Yannick Moy <moy@adacore.com>
1275 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get
1276 enclosing subprogram for precondition/postcondition/contract cases.
1278 2013-10-10 Robert Dewar <dewar@adacore.com>
1280 * gnat_rm.texi: Minor fix.
1282 2013-10-10 Robert Dewar <dewar@adacore.com>
1284 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1285 Address): Remove the Comes_From_Source test for the overlap
1288 2013-10-10 Robert Dewar <dewar@adacore.com>
1290 * sem_util.adb: Minor code reorganization (use Nkind_In).
1291 * sem_warn.adb: Minor code reorganization (optimization in
1292 Check_Unset_Reference).
1293 * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting.
1295 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1297 * sem_ch7.adb (Install_Parent_Private_Declarations): When
1298 instantiating a child unit, do not install private declaration of
1299 a non-generic ancestor of the generic that is also an ancestor
1300 of the current unit: its private part will be installed when
1301 private part of ancestor itself is analyzed.
1303 2013-10-10 Thomas Quinot <quinot@adacore.com>
1305 * freeze.adb (Check_Component_Storage_Order): Retrieve component
1306 aliased status from type entities directly instead of going back
1307 to original component definition.
1308 * sem_ch7.adb: Minor reformatting.
1310 2013-10-10 Robert Dewar <dewar@adacore.com>
1312 * sem_ch13.adb (Analyze_Aspect_Specifications): For Address
1313 attribute, consider it to be set in source, because of aliasing
1315 (Analyze_Attribute_Definition_Clause): For the
1316 purpose of warning on overlays, take into account the aspect case.
1318 2013-10-10 Robert Dewar <dewar@adacore.com>
1320 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1321 a-cofove.ads: Minor reformatting.
1323 2013-10-10 Arnaud Charlet <charlet@adacore.com>
1325 * gnat_ugn.texi: Remove obsolete mention to -laddr2line.
1327 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1329 * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the
1330 generated variable used as a target of the expression needs
1333 2013-10-10 Jose Ruiz <ruiz@adacore.com>
1335 * exp_util.adb (Corresponding_Runtime_Package): Remove the condition
1336 related to No_Dynamic_Attachment which was wrong. Protected types
1337 with interrupt handlers (when not using a restricted profile)
1338 are always treated as protected types with entries, regardless
1339 of the No_Dynamic_Attachment restriction.
1340 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code
1341 using the result of Corresponding_Runtime_Package.
1342 (Install_Private_Data_Declarations): When having
1343 static handlers and a non restricted profile, we use the
1344 type Static_Interrupt_Protection always, so we removed an
1345 extra wrong condition looking at the No_Dynamic_Attachment
1346 restriction. Simplify the code using the result of
1347 Corresponding_Runtime_Package.
1348 (Make_Initialize_Protection): Simplify the code using
1349 the result of Corresponding_Runtime_Package.
1350 (Install_Private_Data_Declaration): The No_Dynamic_Attachment
1351 restriction has nothing to do with static handlers. Remove the extra
1352 erroneous condition that was creating the wrong data type.
1354 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1356 * sem_util.adb (Is_Object_Reference): Attribute
1357 'Old produces an object reference.
1358 * gnat_rm.texi: Define accessibility level of
1359 X'Update(...) result.
1361 2013-10-10 Yannick Moy <moy@adacore.com>
1363 * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1364 a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers
1366 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1368 * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post
1369 conditions that apply to a subprogram body, preserve the placement
1370 and order of the generated pragmas, which must appear before
1371 other declarations in the body.
1373 2013-10-10 Bob Duff <duff@adacore.com>
1375 * gnat_ugn.texi: Add gnat2xml doc.
1377 2013-10-10 Doug Rupp <rupp@adacore.com>
1379 * s-vxwork-arm.ads: Fix interface to FP_CONTEXT.
1381 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1383 * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import
1384 on a variable need not have a convention specified, as long as
1385 the implicit convention of the object, obtained from its type,
1386 is Ada or Ada-related.
1388 2013-10-10 Robert Dewar <dewar@adacore.com>
1390 * cstand.adb (Standard_Unsigned_64): New internal type.
1391 * gnat_rm.texi: Update documentation on To_Address.
1392 * sem_attr.adb (Analyze_Attribute, case To_Address): Fix
1393 problem with out of range static values given as literals or
1395 * stand.ads (Standard_Unsigned_64): New internal type.
1396 * stand.adb: Minor reformatting.
1398 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1400 * sem_ch4.adb (Analyze_Selected_Component,
1401 Has_Mode_Conformant_Spec): If selected component may be an
1402 indexing of a parameterless call to a protected function, and
1403 expansion is disabled, this is a valid candidate interpretation.
1405 2013-10-10 Arnaud Charlet <charlet@adacore.com>
1407 * gnat_ugn.texi: Minor editing.
1409 2013-10-10 Robert Dewar <dewar@adacore.com>
1411 * gnatlink.adb: Minor reformatting.
1413 2013-10-10 Yannick Moy <moy@adacore.com>
1415 * debug.adb: Free flag d.E and change doc for flag d.K.
1417 2013-10-10 Ed Schonberg <schonberg@adacore.com>
1419 * sem_prag.adb (Check_Precondition_Postcondition): If the
1420 pragma comes from an aspect spec, and the subprogram is a
1421 library unit, treat as a ppc in a declarative part in ASIS mode,
1422 so that expression in aspect is properly analyzed. In this case
1423 there is no later point at which the aspect specification would
1426 2013-10-10 Bob Duff <duff@adacore.com>
1428 * opt.ads: Minor comment fix.
1430 2013-10-10 Vadim Godunko <godunko@adacore.com>
1432 * a-coinho-shared.ads, a-coinho-shared.adb: New file.
1433 * s-atocou.ads: Add procedure to initialize counter.
1434 * s-atocou.adb: Likewise.
1435 * s-atocou-builtin.adb: Likewise.
1436 * s-atocou-x86.adb: Likewise.
1437 * gcc-interface/Makefile.in: Select special version of
1438 Indefinite_Holders package on platforms where atomic built-ins
1439 are supported. Update tools target pairs for PikeOS.
1441 2013-10-10 Robert Dewar <dewar@adacore.com>
1443 * sem_ch3.adb: Minor reformatting.
1445 2013-10-10 Robert Dewar <dewar@adacore.com>
1447 * sinput-c.adb (Load_File): Ensure Source_Align alignment.
1448 * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment.
1449 * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align
1452 * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single
1454 * types.ads (Source_Align): New definition.
1455 (Source_Buffer): Document new alignment requirement.
1457 2013-10-10 Robert Dewar <dewar@adacore.com>
1459 * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow
1462 2013-10-10 Robert Dewar <dewar@adacore.com>
1464 * gnat_rm.texi: Minor adjustment to doc for To_Address attribute.
1466 2013-10-10 Vadim Godunko <godunko@adacore.com>
1468 * s-stopoo.ads (Root_Storage_Pool): Add pragma
1469 Preelaborable_Initialization.
1471 2013-09-25 Tom Tromey <tromey@redhat.com>
1473 * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@".
1475 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1478 * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local
1479 variable and use it throughout.
1480 <Attr_Length>: Note whether the prefix is the dereference of a pointer
1481 to unconstrained array and, in this case, capture the result for both
1482 Attr_First and Attr_Last.
1484 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1486 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.
1488 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1490 * gcc-interface/trans.c (gigi): Remove dead code.
1492 2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
1494 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack of
1495 return variables for subprograms using the CICO mechanism.
1497 2013-09-13 Dominique Dhumieres <dominiq@lps.ens.fr>
1499 * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os,
1502 2013-09-11 Thomas Schwinge <thomas@codesourcery.com>
1503 Olivier Hainque <hainque@adacore.com>
1505 * gcc-interface/Makefile.in: Import target_cpu, target_vendor,
1506 target_os and their host_ counterparts. Remove host_canonical and
1507 target_cpu_default, unused. Remove local ad-hoc computations of
1508 "host", "targ", "arch", "osys" and "manu". Replace uses of these by
1509 uses of the now imported family, hence back to filters against
1510 canonical values. Remove filters on e500 for target_cpu, expected to
1511 be canonicalized into powerpc. Invert the logic filtering on 64bit
1512 sparc for VxWorks. Simplify the filtering logic for bareboard tools
1513 target pairs, now using straight elf/eabi filters on the target_os
1516 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1518 * sem_ch3.adb (Replace_Anonymoous_Access_To_Protected_Subprogram): If
1519 the return type is itself an access to function, recurse to emit
1520 another anonymous type.
1521 * gcc-interface/Make-lang.in: Update dependencies.
1523 2013-09-10 Robert Dewar <dewar@adacore.com>
1525 * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode.
1526 * errout.adb (Warning_Doc_Switch): Ignored in VMS mode.
1527 * errout.ads (Warning_Doc_Switch): Ignored in VMS mode.
1528 * inline.ads (Warnings): New component in Pending_Body_Info.
1529 * sem_ch12.adb (Pending_Body_Info): Save and restore warnings
1530 at instantiation point.
1531 * warnsw.adb (Save_Warnings): New function (Restore_Warnings):
1532 New procedure Remove special handling of Warning_Doc_Switch,
1533 cleaner to handle the VMS case in errout, than to introduce
1534 undocumented oddities here.
1535 * warnsw.ads (Warning_Record) : New type.
1536 (Save_Warnings): New function.
1537 (Restore_Warnings): New procedure.
1539 2013-09-10 Robert Dewar <dewar@adacore.com>
1541 * sinput.adb (Check_For_BOM): Avoid reading past end of file.
1543 2013-09-10 Robert Dewar <dewar@adacore.com>
1545 * errout.adb (Error_Msg_Ada_2012_Feature): New procedure.
1546 * errout.ads (Error_Msg_Ada_2012_Feature): New procedure.
1547 * inline.ads: Save/Restore Ada_Version_Pragma.
1548 * opt.adb: Save/Restore Ada_Version_Pragma.
1549 * opt.ads (Ada_Version_Pragma): New variable.
1550 * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb,
1551 par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature.
1552 * prj.adb: Initialize Ada_Version_Pragma.
1553 * sem_attr.adb: Use Error_Msg_Ada_2012_Feature.
1554 * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma.
1555 * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma.
1556 * switch-c.adb: Initialize Ada_Version_Pragma.
1557 * sem_ch12.adb: Minor reformatting.
1559 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1561 * sem_ch3.adb (Process_Subtype): Discard constraint on access
1562 to class-wide type. Such constraints are not supported and are
1563 considered a language pathology.
1565 2013-09-10 Robert Dewar <dewar@adacore.com>
1567 * gnatbind.adb: Correct starting date in --version string.
1568 * gnatdll.adb: Use Check_Version_And_Help_G to implement --help
1570 * gnatkr.adb: Use Check_Version_And_Help_G to implement --help
1572 * gnatlink.adb: Correct starting date in --version string.
1573 * gnatls.adb: Correct starting date in --version string.
1574 * make.adb: Correct starting date in --version string.
1576 2013-09-10 Robert Dewar <dewar@adacore.com>
1578 * switch-c.adb: Minor reformatting.
1579 * atree.ads (Original_Nodes): Add documentation on ASIS usage.
1580 * sinfo.ads: Add section on ASIS mode (documentation only).
1582 2013-09-10 Robert Dewar <dewar@adacore.com>
1584 * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
1585 REASON parameter in compiler units (bootstrap issues).
1587 2013-09-10 Robert Dewar <dewar@adacore.com>
1589 * gnat1drv.adb (Adjust_Global_Switches): Output warning if
1590 -gnateE specified for a target that does not support it.
1592 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1594 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
1595 a subprogram body without previous spec.
1597 2013-09-10 Gary Dismukes <dismukes@adacore.com>
1599 * sem_ch4.adb: Minor typo fixes.
1601 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1603 * aspects.adb (Aspects_On_Body_OK): New routine.
1604 * aspects.ads: Modify type Aspect_Expression to include
1605 the Optional_XXX variants. Update the contents of
1606 table Aspect_Argument. Add table Aspect_On_Body_OK.
1607 (Aspects_On_Body_OK): New routine.
1608 * par-ch13.adb (Get_Aspect_Specifications): Account for optional
1609 names and expressions when parsing an aspect.
1610 * sem_ch6.adb: Add with and use clause for Aspects.
1611 (Analyze_Subprogram_Body_Helper): Do not emit an error when
1612 analyzing a body with aspects that can be applied simultaneously
1613 to both spec and body.
1614 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
1615 corresponding pragma of an aspect that applies to a subprogram
1616 body in the declarative part.
1617 (Make_Aitem_Pragma): Do not generate a pragma with an empty argument
1620 2013-09-10 Robert Dewar <dewar@adacore.com>
1622 * switch-c.adb: Diagnose -gnatc given after -gnatRm.
1623 * gnat_ugn.texi: Add documentation for -gnatRm.
1624 * usage.adb: Minor reorganization (put style entries in proper
1625 order) Document -gnatRm switch.
1626 * sinfo.ads: Minor comment fix.
1628 2013-09-10 Sergey Rybin <rybin@adacore.com frybin>
1630 * tree_io.ads: Update ASIS_Version_Number.
1632 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1634 * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the
1635 designated type can appear in a parameterless call.
1636 * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference
1637 in the case of an indirect call through an access function that
1638 returns an array type.
1639 (Analyze_One_Call): Handle properly legal parameterless calls
1640 whose result is indexed, in constructs of the for F.all (I)
1641 * sem_ch6.ads (May_Need_Actuals): Make public, for use on access
1642 to subprogram types.
1643 * sem_res.adb (Resolve_Call): If the call is indirect, there is
1644 no entity to set on the name in the call.
1646 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1648 * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag
1649 table for package body and body stubs.
1650 (Move_Or_Merge_Aspects): New routine.
1651 (Remove_Aspects): New routine.
1652 * aspects.ads (Move_Aspects): Update comment on usage.
1653 (Move_Or_Merge_Aspects): New routine.
1654 (Remove_Aspects): New routine.
1655 * par-ch3.adb: Update the grammar of private_type_declaration,
1656 private_extension_declaration, object_renaming_declaration,
1657 and exception_renaming_declaration.
1658 (P_Subprogram): Parse the
1659 aspect specifications that apply to a body stub.
1660 * par-ch6.adb: Update the grammar of subprogram_body_stub and
1661 generic_instantiation.
1662 * par-ch7.adb: Update the grammar of package_declaration,
1663 package_specification, package_body, package_renaming_declaration,
1665 (P_Package): Parse the aspect specifications
1666 that apply to a body, a body stub and package renaming.
1667 * par-ch9.adb: Update the grammar of entry_declaration,
1668 protected_body, protected_body_stub, task_body,
1670 (P_Protected): Add local variable
1671 Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect
1672 specifications that apply to a protected body and a protected
1674 (P_Task): Add local variable Aspect_Sloc. Add local
1675 constant Dummy_Node. Parse the aspect specifications that apply
1676 to a task body and a task body stub.
1677 * par-ch12.adb: Update the grammar of
1678 generic_renaming_declaration.
1679 (P_Generic): Parse the aspect
1680 specifications that apply to a generic renaming.
1681 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit
1682 an error when analyzing aspects that apply to a body stub. Such
1683 aspects are relocated to the proper body.
1684 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect
1685 specifications that apply to a body.
1686 * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined
1687 aspects not being supported on protected bodies. Remove the
1688 aspect specifications. (Analyze_Single_Protected_Declaration):
1689 Analyze the aspects that apply to a single protected declaration.
1690 (Analyze_Task_Body): Warn about user-defined aspects not being
1691 supported on task bodies. Remove the aspect specifications.
1692 * sem_ch10.adb: Add with and use clause for Aspects.
1693 (Analyze_Package_Body_Stub): Propagate the aspect specifications
1694 from the stub to the proper body.
1695 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
1696 corresponding pragma of an aspect that applies to a body in the
1697 declarations of the body.
1698 * sinfo.ads: Update the gramma of expression_function,
1699 private_type_declaration, private_extension_declaration,
1700 object_renaming_declaration, exception_renaming_declaration,
1701 package_renaming_declaration, subprogram_renaming_declaration,
1702 generic_renaming_declaration, entry_declaration,
1703 subprogram_body_stub, package_body_stub, task_body_stub,
1704 generic_subprogram_declaration.
1706 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1708 * sem_prag.adb (Analyze_Pragma): Add processing
1709 for aspect/pragma SPARK_Mode when it applies to a [library-level]
1710 subprogram or package [body].
1712 2013-09-10 Robert Dewar <dewar@adacore.com>
1714 * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be
1716 * switch-c.adb (Scan_Front_End_Switches): Give error if both
1717 -gnatR and -gnatc given.
1719 2013-09-10 Robert Dewar <dewar@adacore.com>
1721 * g-table.ads, g-table.adb (For_Each): New generic procedure
1722 (Sort_Table): New generic procedure.
1724 2013-09-10 Thomas Quinot <quinot@adacore.com>
1726 * adaint.c (__gnat_is_executable_file_attr): Should be true
1727 for an executable regular file only only (not for a directory
1728 that has the executable permission).
1730 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1732 * sem_res.adb: Further work on operator calls in ASIS.
1734 2013-09-10 Yannick Moy <moy@adacore.com>
1736 * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment
1739 2013-09-10 Thomas Quinot <quinot@adacore.com>
1741 * aspects.ads, sem_ch13.adb: Minor reformatting.
1742 * adaint.c (__gnat_set_close_on_exec): Add comment documenting
1743 that this routine is shared between OS_Lib and Sockets.
1745 2013-09-10 Robert Dewar <dewar@adacore.com>
1747 * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set.
1748 * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed.
1749 * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma):
1750 Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma,
1751 case Check): Ditto (Check_Applicable_Policy): Handle
1752 Statement_Assertion case Throughout, set and check the Is_Checked
1753 flag as appropriate.
1754 * sem_prag.ads (Check_Kind): Moved to body.
1755 * sinfo.ads, sinfo.adb (Is_Checked): New flag.
1757 2013-09-10 Robert Dewar <dewar@adacore.com>
1759 * aspects.ads (Delay_Type): New type (Aspect_Delay): New table.
1760 * einfo.adb (Has_Delayed_Rep_Aspects): New flag
1761 (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed
1762 (use Get_Attribute_Representation_Clause).
1763 * einfo.ads (Has_Delayed_Rep_Aspects): New flag
1764 (May_Inherit_Delayed_Rep_Aspects): New flag
1765 * freeze.adb: Minor reformatting
1766 * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo
1767 handling of delayed evaluation, including optimizing some cases
1768 and avoiding delays.
1769 (Analyze_Aspects_At_Freeze_Point): Now
1770 handled inheriting delayed rep aspects for type derivation case.
1771 (Inherit_Delayed_Rep_Aspects): New procedure
1772 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled
1773 inheriting delayed rep aspects for type derivation case.
1774 * sem_ch3.adb (Build_Derived_Type): Set
1775 May_Inherit_Derived_Rep_Aspects if parent type flag
1776 Has_Delayed_Rep_Aspects is set
1778 2013-09-10 Robert Dewar <dewar@adacore.com>
1780 * errout.adb (Finalize): Don't delete real errors with specific
1783 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1785 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
1786 Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select):
1787 Handle properly a trigger that is a call to a primitive operation
1788 of a type that implements a limited interface, if the type itself
1791 2013-09-10 Robert Dewar <dewar@adacore.com>
1793 * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb,
1794 exp_ch4.adb, sprint.adb: Minor reformatting.
1796 2013-09-10 Yannick Moy <moy@adacore.com>
1798 * sinfo.ads: Document splitting of pre/post in N_Contract description.
1800 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1802 * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the
1803 form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift,
1804 add a mod operation if the result type is a binary modular type.
1806 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1808 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local
1809 variable Context. Remove local variable Subp_Id. Start the
1810 context traversal from the current subprogram rather than the
1811 current scope. Update the scope traversal and error reporting.
1813 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1815 * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure
1816 Rewrite_Triggering_Statements, to encapsulate the statements that
1817 follow the trigger of the entry call. This procedure is needed
1818 when the trigger is a dispatching call, because the expansion
1819 requires several copies of those statements. The procedure is
1820 more efficient, and preserves non-local references when the
1821 construct is within an instance.
1823 2013-09-10 Ed Schonberg <schonberg@adacore.com>
1825 * sem_ch12.adb (Analyze_Package_Instantiation): If the
1826 instantiation is a compilation unit, analyze aspects before
1827 analyzing the package declaration for the instance.
1828 * sem_ch13.adb (Analyze_Aspect_Specifications): If the
1829 corresponding node is a package instantiation, insert generated
1830 pragmas at the head of visible declarations.
1831 * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance
1832 do not ignore the pragma if it comes from an aspect specification
1833 in the instance, and not from the generic unit.
1834 * sprint.adb (Sprint_Node_Actual): For a package declaration that
1835 is an instantiation, print aspects after declaration.
1837 2013-09-10 Robert Dewar <dewar@adacore.com>
1839 * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting.
1841 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1843 * sem_prag.adb (Get_SPARK_Mode_Id): Handle the
1844 case where the pragma may appear without an argument.
1845 (Analyze_Global_List): Add expanded_name to the list of constructs
1846 that denote a single item.
1847 (Collect_Global_List): Add expanded_name to the list of constructs
1848 that denote a single item.
1850 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>
1852 * exp_ch4.adb (Apply_Accessibility_Check): Add local constant
1853 Pool_Id and local variables Fin_Call and Free_Stmt. Finalize
1854 and deallocate a heap-allocated class-wide object after it
1855 has been determined that it violates the accessibility rules.
1856 * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id
1857 and entry in RE_Unit_Table for RE_Free.
1859 2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
1860 Iain Sandoe <iain@codesourcery.com>
1863 * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
1864 (GCC_LINK): Use CXX instead of CC.
1865 * gcc-interface/Make-lang.in (CXX_LFLAGS): New.
1866 (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
1868 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1870 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
1871 sets of derived types in ASIS mode.
1873 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1875 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.
1876 (is_cplusplus_method): Likewise, and False with false.
1877 (components_need_strict_alignment): Likewise.
1878 * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise.
1879 * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise.
1880 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1881 (add_cleanup): Likewise.
1882 (Sloc_to_locus1): Likewise.
1883 (Sloc_to_locus): Likewise.
1884 (set_expr_location_from_node): Likewise.
1885 * gcc-interface/utils.c (potential_alignment_gap): Likewise.
1887 2013-08-13 Thomas Quinot <quinot@adacore.com>
1889 * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
1890 for the end_locus of a block if it does not come from an End_Label.
1892 2013-08-13 Thomas Quinot <quinot@adacore.com>
1894 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
1895 there is no End_Label, attach cleanup actions to the sloc of the HSS
1897 (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc
1898 of the handler itself.
1899 (add_cleanup): Clear column information in sloc of cleanup actions.
1900 (Sloc_to_locus1): New static function.
1901 (Sloc_to_locus): Call it.
1902 (set_expr_location_from_node1): New static function.
1903 (set_expr_location_from_node): Call it.
1905 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1907 * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditional
1908 expressions for misaligned actual parameters.
1910 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1912 * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for
1913 values outside of the range of the type.
1915 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
1917 * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversion
1918 to the original type before converting to the result type.
1919 (build_atomic_store): First do a conversion to the original type before
1920 view-converting to the effective type, but deal with a padded type
1923 2013-08-08 Eric Botcazou <ebotcazou@adacore.com>
1925 * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from the
1926 compiler build and use standard library variables.
1927 (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust.
1928 (gnatmake-re): Do not depend on targext.o.
1929 (gnatlink-re): Do not depend on link.o and targext.o.
1930 (../../gnatmake$(exeext): Likewise.
1931 (../../gnatlink$(exeext): Likewise.
1933 2013-07-21 Ondřej BÃÂlka <neleai@seznam.cz>
1935 * gcc-interface/gigi.h: Fix typos.
1936 * gcc-interface/trans.c: Likewise.
1937 * gcc-interface/utils2.c: Likewise.
1938 * gnat_rm.texi: Likewise.
1939 * gnat_ugn.texi: Likewise.
1940 * raise-gcc.c: Likewise.
1941 * sigtramp-ppcvxw.c: Likewise.
1942 * sysdep.c: Likewise.
1943 * terminals.c: Likewise.
1945 2013-07-20 Eric Botcazou <ebotcazou@adacore.com>
1948 * gcc-interface/ada.h (CAT): Fix typo.
1950 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1952 * einfo.adb (Get_Pragma): Handle the retrieval of delayed
1953 pragmas stored in N_Contract nodes.
1954 * einfo.ads (Get_Pragma): Update the comment on usage.
1955 * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy
1956 of the pragma when it applies to a body that acts as a spec. The
1957 copy is preanalyzed and chained on the contract of the body.
1959 2013-07-08 Robert Dewar <dewar@adacore.com>
1961 * rtsfind.adb: Minor comment fix.
1963 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
1965 * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement
1966 of a Ghost function call when the enclosing context is being
1969 2013-07-08 Ed Schonberg <schonberg@adacore.com>
1971 * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the
1972 expression in a return statement is a numeric literal, qualify
1973 it with the return type for proper resolution.
1975 2013-07-08 Robert Dewar <dewar@adacore.com>
1977 * sem.ads: Minor comment updates.
1978 * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb:
1981 2013-07-08 Robert Dewar <dewar@adacore.com>
1983 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
1984 for Restriction_Set.
1985 * gnat_rm.texi: Add missing menu entry for Attribute Ref Add
1986 documentation for attribute Restriction_Set.
1987 * lib-writ.adb (Write_With_Lines): Generate special W lines
1988 for Restriction_Set.
1989 * lib-writ.ads: Document special use of W lines for
1991 * lib.ads (Restriction_Set_Dependences): New table.
1992 * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to
1993 list (Scan_Name_Extension_Apostrophe): Remove kludge test for
1994 Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence
1996 * restrict.adb (Check_SPARK_Restriction): Put in Alfa order
1997 (OK_No_Dependence_Unit_Name): New function.
1998 * restrict.ads (OK_No_Dependence_Unit_Name): New function.
1999 * rtsfind.adb: Minor reformatting Minor code reorganization.
2000 * sem_attr.adb (Analyze_Attribute): Add processing for
2002 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2003 Remove Check_Unit_Name and use new function
2004 OK_No_Dependence_Unit_Name instead.
2005 * sinfo.ads: Minor comment updates.
2006 * snames.ads-tmpl: Add entry for Restriction_Set attribute.
2008 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2010 * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant
2011 Pool_Id and local variable Free_Stmt. Do not deallocate the faulty
2012 object as "free" is not available on all targets/profiles.
2014 2013-07-08 Robert Dewar <dewar@adacore.com>
2016 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle
2017 Storage_Size aspect for task type in case discriminant is
2019 (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size
2020 attribute definition clause as obsolescent if from aspect.
2022 2013-07-08 Robert Dewar <dewar@adacore.com>
2024 * gnat_rm.texi: Add documentation for Img returning a function.
2025 * par-prag.adb: Minor reformatting.
2026 * restrict.adb: Minor reformatting and code reorganization.
2028 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2030 * sem_res.adb: add guard to ASIS transform.
2032 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2034 * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger
2035 of the asynchronous select is a dispatching call, transform the
2036 abortable part into a procedure, to avoid duplication of local
2037 loop variables that may appear within.
2039 2013-07-08 Vincent Celier <celier@adacore.com>
2041 * projects.texi: Update the documentation of suffixes in package
2044 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2046 * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm
2047 types are type conformant if the designated type of one is
2048 protected and the other is not. Convention only matters when
2049 checking subtype conformance.
2051 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2053 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate
2054 back the fully resolved operands to the original function call
2055 so that all semantic information remains available to ASIS.
2057 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2059 * sem_ch4.adb: minor reformatting (remove obsolete comment).
2060 * sem_ch9.adb: improve error message on illegal trigger.
2062 2013-07-08 Robert Dewar <dewar@adacore.com>
2064 * sem_prag.adb: Minor reformatting.
2066 2013-07-08 Robert Dewar <dewar@adacore.com>
2068 * gnatcmd.adb: Minor reformatting.
2070 2013-07-08 Robert Dewar <dewar@adacore.com>
2072 * targparm.adb (Get_Target_Parameters): Recognize pragma
2073 Partition_Elaboration_Policy.
2075 2013-07-08 Robert Dewar <dewar@adacore.com>
2077 * gnat_ugn.texi: Minor update to mention partition elaboration policy.
2079 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2081 * sem_ch4.adb (Comple_Object_Operation): Revert previous change.
2082 (Analyze_Indexed_Component_Form): In ASIS mode, if node has been
2083 transformed but not rewritten as a function call (as is the case
2084 in a generic), analyze it as such.
2086 2013-07-08 Thomas Quinot <quinot@adacore.com>
2088 * gnat_rm.texi: Minor rewording: add missing word "operators"
2089 in documentation for restriction No_Direct_Boolean_Operator.
2091 2013-07-08 Robert Dewar <dewar@adacore.com>
2093 * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg,
2094 Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere
2096 * errout.ads: Insertions ! and !! no longer have to be at the
2097 end of the message, they can be anywhere in the message.
2098 * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg):
2099 Replaces Test_Style_Warning_Serious_Msg
2100 * erroutc.ads (Has_Double_Exclam): New flag New comments for
2101 existing flags (Test_Style_Warning_Serious_Unconditional_Msg):
2102 Replaces Test_Style_Warning_Serious_Msg
2103 * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg):
2104 Replaces Test_Style_Warning_Serious_Msg
2106 2013-07-08 Robert Dewar <dewar@adacore.com>
2108 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2109 Recognize SPARK_05 as synonym for SPARK in restrictions pragma.
2110 * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only
2112 * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb,
2113 sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK.
2114 * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry.
2116 2013-07-08 Vincent Celier <celier@adacore.com>
2118 * gnatcmd.adb (Check_Files): Use a response file for gnatls
2121 2013-07-08 Gary Dismukes <dismukes@adacore.com>
2123 * freeze.adb: Minor typo fixes.
2125 2013-07-08 Robert Dewar <dewar@adacore.com>
2127 * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document
2128 obsolete recognition of SPARK Document all other obsolete synonyms
2129 for old restrictions.
2130 * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces
2131 SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym
2133 * restrict.ads: Restriction SPARK_05 replaces SPARK.
2134 * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK
2135 as synonym for SPARK_05.
2136 * sem_prag.adb: Minor reformatting.
2137 * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05.
2139 2013-07-08 Robert Dewar <dewar@adacore.com>
2141 * sem_dim.adb: Minor error message change.
2142 * freeze.adb (Freeze_Entity, array type case): Extend handling
2143 of Implicit_Packing to handle multi-dimensional array case.
2144 * gnat_rm.texi: Update doc on Implicit_Packing.
2146 2013-07-08 Robert Dewar <dewar@adacore.com>
2148 * exp_ch4.adb: Minor reformatting.
2150 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2152 * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if
2153 the parent node is a selected component and the analysis as a
2154 call is successful, set the type of the selector in the parent
2155 node for subsequent checks, because the rewriting of the node
2156 does not take place during pre-analysis.
2158 2013-07-08 Robert Dewar <dewar@adacore.com>
2160 * sem_ch8.adb, exp_ch3.adb: Minor reformatting.
2162 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2164 * exp_ch4.adb (Expand_N_Op_Eq): When comparing two
2165 Bounded_Strings, use the predefined equality function of the
2166 root Super_String type.
2168 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2170 * exp_ch4.adb (Create_Alternative): Removed.
2171 (Expand_N_If_Expression): Remove constant
2172 In_Case_Or_If_Expression. Add local variable
2173 Ptr_Typ. Inspect the "then" and "else" action lists
2174 for transient controlled objects and generate code to
2175 finalize them. (Is_Controlled_Function_Call): Removed.
2176 (Process_Action): Update the comment on usage. Update the call
2177 to Process_Transient_Object. There is no need to continue the
2178 traversal of the object itself.
2179 (Process_Actions): New routine.
2180 (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add
2181 a new formal and update the related comment on usage.
2182 * exp_util.adb (Within_Case_Or_If_Expression): Start the search
2183 from the parent of the node.
2185 2013-07-08 Robert Dewar <dewar@adacore.com>
2187 * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads,
2188 a-cbsyqu.ads: Minor reformatting (proper formatting of overriding).
2190 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2192 * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute
2193 that can be renamed as a function.
2195 2013-07-08 Thomas Quinot <quinot@adacore.com>
2197 * g-socket.ads: Document target dependency: FIONBIO may or may not
2198 be inherited from listening socket by accepted socket.
2200 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2202 * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object
2203 on targets that can't deallocate.
2205 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2207 * exp_ch3.adb (Freeze_Type): Generate a
2208 subpools-related accessibility check only on profiles that
2209 include the corresponding library unit.
2211 2013-07-08 Gary Dismukes <dismukes@adacore.com>
2213 * sem_ch8.adb: Minor typo fixes.
2215 2013-07-08 Javier Miranda <miranda@adacore.com>
2217 * sem_ch8.adb (Save_Scope_Stack): Adding documentation.
2218 (Restore_Scope_Stack): Remove the elements of the list when the
2219 visibility of each entity is restored.
2221 2013-07-08 Robert Dewar <dewar@adacore.com>
2223 * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting.
2225 2013-07-08 Robert Dewar <dewar@adacore.com>
2227 * sem_ch8.adb, sem_ch8.ads: Minor reformatting.
2229 2013-07-08 Gary Dismukes <dismukes@adacore.com>
2231 * gnat_rm.texi: Minor reformatting and rewording for consistency.
2233 2013-07-08 Bob Duff <duff@adacore.com>
2235 * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete
2236 view coming from a limited-with'ed package, use the nonlimited
2237 view in case it has tasks.
2239 2013-07-08 Javier Miranda <miranda@adacore.com>
2241 * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list
2242 of entities which have been temporarily removed from immediate
2244 (Restore_Scope_Stack): Modified to receive an
2245 additional parameter with the list of entities whose immediate
2246 visibility must be restored.
2247 * sem.adb (Do_Analyze): Use new version of
2248 Save_Scope_Stack/Restore_Scope_Stack
2249 * sem_ch12.adb (Inline_Instance_Body): Use new version of
2250 Save_Scope_Stack and Restore_Scope_Stack
2252 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>
2254 * sem_prag.adb (Analyze_Pragma): Remove
2255 variable Unit_Prag. Remove the check on duplicate mode for the
2256 configuration form of the pragma.
2257 (Redefinition_Error): Removed.
2259 2013-07-08 Robert Dewar <dewar@adacore.com>
2261 * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting
2264 2013-07-08 Ed Schonberg <schonberg@adacore.com>
2266 * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode,
2267 pre-analyze only the original expression attached to the source
2268 aspect, not the relocated expression of the pragma, to prevent
2269 malformed trees in ASIS mode.
2270 * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous
2271 patch: the expression in the aspect for pre/post must be relocated
2272 to the pragma for proper analysis.
2274 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2276 * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect.
2277 * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id,
2278 Aspect_Argument, Aspect_Names.
2279 * atree.adb (Node32): New routine.
2280 (Set_Node32): New routine.
2281 * atree.ads (Node32): New routine.
2282 (Set_Node32): New routine.
2283 * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas.
2284 (Set_SPARK_Mode_Pragmas): New routine.
2285 (SPARK_Mode_Pragmas): New routine.
2286 (Write_Field32_Name): Add and entry for SPARK_Modes.
2287 * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage
2288 in various entities.
2289 (Set_SPARK_Mode_Pragmas): New routine and
2291 (SPARK_Mode_Pragmas): New routine and pragma Inline.
2292 * gnat_rm.texi: Add sections explaining the syntax and semantics
2293 of aspect/pragma SPARK_Mode.
2294 * gnat_ugn.texi: Add pragma SPARK_Mode to the list of
2295 configuration pragmas.
2296 * lib.adb (Set_SPARK_Mode_Pragma): New routine.
2297 (SPARK_Mode_Pragma): New routine.
2298 * lib.ads: Alphabetize the comments on fields of record
2299 Unit_Record. Add new field SPARK_Mode_Pragma along with
2300 comment on its usage. Update the layout of record Unit_Record.
2301 (Set_SPARK_Mode_Pragma): New routine and pragma Inline.
2302 (SPARK_Mode_Pragma): New routine and pragma Inline.
2303 * lib-load.adb (Create_Dummy_Package_Unit): Initialize
2304 field SPARK_Mode_Pragma.
2305 (Load_Main_Source): Initialize field SPARK_Mode_Pragma.
2306 (Load_Unit): Initialize field SPARK_Mode_Pragma.
2307 * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field
2309 (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma.
2310 * opt.ads: Alphabetize verification flags. Store the
2311 compilation-wide SPARK mode in variable Global_SPARK_Mode.
2312 * par-prag.adb: Pragma SPARK_Mode does not need special processing
2314 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
2315 SPARK_Mode into a pragma.
2316 (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need
2318 * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags.
2319 (Analyze_Pragma): Add processing for pragma SPARK_Mode.
2320 (Get_SPARK_Mode_Id): New routine.
2321 (Is_Elaboration_SPARK_Mode): New routine.
2322 (Is_Private_SPARK_Mode): New routine.
2323 * sem_prag.ads (Get_SPARK_Mode_Id): New routine.
2324 (Is_Elaboration_SPARK_Mode): New routine.
2325 (Is_Private_SPARK_Mode): New routine.
2326 * sinfo.ads: Update the comment on the usage of field Next_Pragma.
2327 * snames.ads-tmpl: Add new predefined name for SPARK_Mode and
2328 Auto. Add new pragma Id for SPARK_Mode.
2329 * types.ads: Add new type SPARK_Mode_Id.
2331 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2333 * sem_ch13.adb (Analyze_Aspect_Specifications): For
2334 pre/postconditions copy the expression to the generated pragma,
2335 to avoid sharing between the original aspect and the pragma node,
2336 because in ASIS_Mode both will be independently analyzed.
2338 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2340 * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of
2341 formals for each discriminant of an unchecked union.
2342 (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested
2343 variants are supported. New helper function Corresponding_Formal.
2344 * exp_ch4.adb (Build_Equality_Call): For unchecked unions,
2345 loop through discriminants to create list of inferred values,
2346 and modify call to equality routine accordingly.
2348 2013-07-05 Claire Dross <dross@adacore.com>
2350 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
2351 a-cforse.ads, a-cofove.ads: Add preconditions when needed +
2352 container types are not tagged any more.
2354 2013-07-05 Thomas Quinot <quinot@adacore.com>
2356 * freeze.adb (Freeze_Entity): For an object with captured
2357 initialization statements, do not remove Init_Stmts from the
2358 enclosing list, as Freeze_All might rely on it to know where to
2361 2013-07-05 Robert Dewar <dewar@adacore.com>
2363 * exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
2366 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2368 * exp_ch4.adb (Expand_Composite_Equality): Use the full view
2369 when the base type is private.
2371 2013-07-05 Claire Dross <dross@adacore.com>
2373 * a-cfdlli.ads: Add preconditions when needed.
2375 2013-07-05 Robert Dewar <dewar@adacore.com>
2377 * sem_ch8.adb: Minor reformatting.
2379 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2381 * sem_ch3.adb (Access_Subprogram_Declaration): Use
2382 Generate_Reference_To_Formals.
2383 * lib-xref.adb (Generate_Reference_To_Formals): In the case of
2384 access to subprograms, the formals are found in the designated
2387 2013-07-05 Robert Dewar <dewar@adacore.com>
2389 * gnat_ugn.texi: Document that comments can be lined up with
2390 previous non-blank line.
2391 * styleg.adb (Check_Comment): Allow indentation to match previous
2392 non-blank line (Same_Column_As_Previous_Line): New function
2394 2013-07-05 Robert Dewar <dewar@adacore.com>
2396 * gnat_rm.texi: Update doc on missing pragmas.
2397 * sem_ch12.adb: Minor comment additions.
2399 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2401 * sem_prag.adb (Analyze_Pragma): Ensure that
2402 Contract_Cases, Depends and Global are analyzed when they apply
2403 to a subprogram compilation unit. The pragmas are all added
2404 unconditionally to the construct's contract. This ensures that
2405 proof tools can locate the pragmas.
2407 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2409 * sem_ch8.adb (Freeze_Actual_Profile): An instance within
2410 a generic unit does not freeze a generic private type of the
2411 enclosing generic. This rule must also apply to a type derived
2412 from a generic private type.
2414 2013-07-05 Arnaud Charlet <charlet@adacore.com>
2416 * gnat_rm.texi: Add missing documentation for pragmas.
2418 2013-07-05 Yannick Moy <moy@adacore.com>
2420 * sem_ch12.adb: Minor comment.
2422 2013-07-05 Robert Dewar <dewar@adacore.com>
2424 * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
2426 * switch-c.adb: Do not allow -gnatD and -gnatR to both be
2429 2013-07-05 Robert Dewar <dewar@adacore.com>
2431 * gnat_rm.texi: Add missing documentation for pragmas.
2432 * sem_ch8.adb: Minor reformatting.
2433 * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
2436 2013-07-05 Yannick Moy <moy@adacore.com>
2438 * sem_ch12.ads, sem_ch12.adb (Need_Subprogram_Instance_Body): Force
2439 instance of subprogram body in SPARK mode, by testing Expander_Active
2440 (set in SPARK mode) instead of Full_Expander_Active (not set in
2442 * sem_ch8.adb: Minor reformatting.
2444 2013-07-05 Robert Dewar <dewar@adacore.com>
2446 * freeze.adb (Freeze_Entity): Remove test of obsolete flag
2447 Propagate_Exceptions, and associated useless code that did
2449 * gnat_rm.texi: Add documentation for obsolete pragma
2450 Propagate_Exceptions.
2451 * opt.ads (Propagate_Exceptions): Obsolete flag removed.
2452 * sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
2453 Remove useless and obsolete setting of Propagate_Exceptions flag.
2455 2013-07-05 Robert Dewar <dewar@adacore.com>
2457 * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
2459 2013-07-05 Robert Dewar <dewar@adacore.com>
2461 * gnat_rm.texi: Add missing doc for various pragmas.
2463 2013-07-05 Robert Dewar <dewar@adacore.com>
2465 * par_sco.adb, sem_ch12.adb, par-ch5.adb: Minor reformatting.
2466 * gnat_rm.texi: Document pragma Profile_Warnings.
2467 * restrict.ads, sem_prag.adb: Minor reformatting.
2469 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2471 * sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
2472 a formal subprogram that was defaulted in the formal package.
2474 2013-07-05 Thomas Quinot <quinot@adacore.com>
2476 * par_sco.adb (Traverse_Declarations_Or_Statements): Ignore
2477 N_Implicit_Label_Declaration nodes.
2479 2013-07-05 Robert Dewar <dewar@adacore.com>
2481 * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting.
2483 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2485 * sem_ch12.adb (Copy_Generic_Node): Check that name in function
2486 call is a valid entity name before preserving entity in generic
2489 2013-07-05 Thomas Quinot <quinot@adacore.com>
2491 * par-ch5.adb: Minor reformatting.
2493 2013-07-05 Thomas Quinot <quinot@adacore.com>
2495 * sinfo.ads: Minor clarification to documentation for
2496 N_Implicit_Label_Declaration.
2498 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
2500 * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the
2501 values of all remaining constants.
2502 (Rcheck_35): New routine along with pragmas Export and No_Return.
2503 (Rcheck_PE_Aliased_Parameters): New routine along with pragmas
2504 Export and No_Return.
2505 (Rcheck_PE_All_Guards_Closed,
2506 Rcheck_PE_Bad_Predicated_Generic_Type,
2507 Rcheck_PE_Current_Task_In_Entry_Body,
2508 Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise,
2509 Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value,
2510 Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object,
2511 Rcheck_PE_Potentially_Blocking_Operation
2512 Rcheck_PE_Stubbed_Subprogram_Called,
2513 Rcheck_PE_Unchecked_Union_Restriction,
2514 Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool,
2515 Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion,
2516 Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception):
2517 Update the use of Rmsg_XX.
2518 (Rcheck_17, Rcheck_18, Rcheck_19,
2519 Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25,
2520 Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31,
2521 Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding
2522 renamed subprograms.
2523 * checks.adb: Add with and use clause for Stringt.
2524 (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in
2525 all subprograms of Apply_Parameter_Aliasing_Checks. Remove local
2526 variable Cond. Initialize Check at the start of the routine. Use
2527 routine Overlap_Check to construct a simple or a detailed run-time
2528 check. Update the creation of the simple check.
2529 (Overlap_Check): New routine.
2530 * exp_ch11.adb (Get_RT_Exception_Name): Add a value for
2531 PE_Aliased_Parameters.
2532 * types.ads: Add new enumeration literal
2533 PE_Aliased_Parameters. Update the corresponding integer values
2534 of all RT_Exception_Code literals.
2535 * types.h: Add new constant PE_Aliased_Parameters. Correct the
2536 values of all remaining constants.
2538 2013-07-05 Yannick Moy <moy@adacore.com>
2540 * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in
2543 2013-07-05 Ed Schonberg <schonberg@adacore.com>
2545 * sem_prag.adb (Analyze_PPC_In_Decl_Part): For a class-wide
2546 condition, when replacing the name of a formal by a conversion
2547 to the class-wide type, exempt selector names that appear in
2548 parameter associations.
2550 2013-06-13 Eric Botcazou <ebotcazou@adacore.com>
2552 * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): Delete.
2553 * gcc-interface/gigi.h (annotate_object): Adjust prototype.
2554 (convert_vms_descriptor): Likewise.
2555 * gcc-interface/decl.c (gnat_to_gnu_param): Do not pass fat pointer
2556 types by double dereference.
2557 (annotate_object): Remove BY_DOUBLE_REF parameter and adjust.
2558 (gnat_to_gnu_entity): Adjust calls to annotate_object.
2559 * gcc-interface/trans.c (Identifier_to_gnu): Do not deal with double
2561 (Call_to_gnu): Likewise.
2562 (build_function_stub): Adjust call to convert_vms_descriptor.
2563 (Subprogram_Body_to_gnu): Adjust call to annotate_object.
2564 * gcc-interface/utils.c (convert_vms_descriptor): Remove BY_REF
2565 parameter and adjust.
2567 2013-05-30 Eric Botcazou <ebotcazou@adacore.com>
2569 * gcc-interface/Makefile.in (arm% androideabi): Robustify.
2571 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2573 * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not
2574 check that access types have a set size.
2576 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2578 * gcc-interface/decl.c (vinfo_t): New type and associated vector.
2579 (components_to_record): Change return type to bool.
2580 Lay out the variants in two passes. Do not force a specific layout for
2581 the variant part if the variants do not have a representation clause.
2582 Take the alignment of the variant part into account when laying out
2583 variants without rep clause in a record type with a partial rep clause.
2584 (create_rep_part): Do not set the position of the field.
2586 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2588 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
2589 to avoid generating an overflow for -1.
2591 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2593 * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
2594 (create_label_decl): Complete prototype.
2595 (process_attributes): Declare.
2596 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
2597 create_type_decl throughout.
2598 <E_Enumeration_Type>: Do the layout of the type manually and call
2599 process_attributes on it. Reindent.
2600 <E_Enumeration_Subtype>: Minor tweak.
2601 <E_Floating_Point_Subtype>: Reindent.
2602 <E_Array_Subtype>: Call process_attributes on the array type built
2603 for a packed array type.
2604 <E_Record_Type>: Call process_attributes on the type.
2605 <E_Record_Subtype>: Likewise.
2606 <E_Access_Type>: Likewise.
2607 <E_Subprogram_Type>: Likewise.
2608 Likewise for all types at the end of the processing.
2609 * gcc-interface/utils.c (make_aligning_type): Adjust call to
2611 (maybe_pad_type): Likewise.
2612 (create_index_type): Likewise.
2613 (create_type_decl): Remove attr_list parameter and associated code.
2614 (create_var_decl_1): Call process_attributes on the variable.
2615 (process_attributes): Take a pointer to the object and add in_place
2616 and gnat_node parameters and adjust throughout.
2617 <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
2618 and set the input location.
2619 Zap the attribute list at the end.
2620 (create_subprog_decl): Call process_attributes on the subprogram.
2621 (build_unc_object_type): Adjust call to create_type_decl.
2622 (handle_vector_type_attribute): Remove dead code.
2624 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2626 * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
2627 * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
2628 for the position of the associated TYPE_DECL.
2629 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
2630 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
2632 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2634 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
2635 elaborate the full view of a type with a freeze node.
2636 * gcc-interface/trans.c (process_type): Add explicit predicate.
2638 2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
2640 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
2641 UNC variable for aliased objects with unconstrained nominal subtype.
2643 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2645 * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
2646 * gcc-interface/trans.c (gigi): Call it.
2647 * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
2649 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2651 * gcc-interface/gigi.h (enum inline_status_t): New type.
2652 (create_subprog_decl): Adjust prototype.
2653 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
2654 calls to create_subprog_decl.
2655 (get_minimal_subprog_decl): Likewise.
2656 * gcc-interface/trans.c (gigi): Likewise.
2657 (build_raise_check): Likewise.
2658 (establish_gnat_vms_condition_handler): Likewise.
2659 (Compilation_Unit_to_gnu): Likewise.
2660 (gnat_to_gnu): Likewise.
2661 * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
2662 parameter to inline_status and implement for suppressed inlining.
2664 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2666 * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
2667 (LOOP_STMT_UNROLL): Likewise.
2668 (LOOP_STMT_NO_VECTOR): Likewise.
2669 (LOOP_STMT_VECTOR): Likewise.
2670 * gcc-interface/trans.c (struct loop_info_d): Replace label field
2672 (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
2673 (Loop_Statement_to_gnu): Save the loop statement onto the stack
2674 instead of the label.
2675 (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
2677 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2679 * gcc-interface/trans.c: Include diagnostic.h and opts.h.
2680 (Pragma_to_gnu) <Pragma_Warnings>: New case.
2682 2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
2684 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
2685 a handful of local variables.
2686 For a derived untagged type that renames discriminants, change the type
2687 of the stored discriminants to a subtype with the bounds of the type
2688 of the visible discriminants.
2689 (build_subst_list): Rename local variable.
2691 2013-05-16 Jason Merrill <jason@redhat.com>
2693 * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
2695 2013-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2698 * gcc-interface/Makefile.in: Allow for amd64 solaris2.
2700 2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
2703 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
2704 int_const_binop to shift bounds by 1 when they are integer constants.
2706 2013-04-25 Arnaud Charlet <charlet@adacore.com>>
2708 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
2710 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2712 * checks.adb (Apply_Predicate_Check): Update the comment associated
2713 with the call to Check_Expression_Against_Static_Predicate.
2714 * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
2715 associated with the call to Check_Expression_Against_Static_Predicate.
2716 * sem_util.adb (Check_Expression_Against_Static_Predicate):
2717 Broaden the check from a static expression to an expression with
2718 a known value at compile time.
2719 * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
2722 2013-04-25 Thomas Quinot <quinot@adacore.com>
2724 * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
2725 First_Bit, and Last_Bit): Fix incorrect test in implementation of
2726 RM 2005 13.5.2(3/2).
2728 2013-04-25 Claire Dross <dross@adacore.com>
2730 * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
2731 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
2732 (Query_Element): Removed.
2733 (Update_Element): Removed.
2734 (Insert): The version with no New_Item specified is removed.
2738 Every check of fields Busy and Lock has been removed.
2740 2013-04-25 Robert Dewar <dewar@adacore.com>
2742 * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
2743 call to S14_Pragma (Find_Related_Subprogram): Require proper
2744 placement in subprogram body (Find_Related_Subprogram): Detect
2745 duplicates for all cases (Find_Related_Subprogram): Handle case
2746 of spec nested inside body.
2748 2013-04-25 Arnaud Charlet <charlet@adacore.com>
2750 * par-prag.adb: Fix typo.
2752 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2754 * checks.adb (Apply_Predicate_Check): If the type has a static
2755 predicate and the expression is also static, check whether the
2756 expression satisfies the predicate.
2757 * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
2758 static predicate and the expression is also static, see if the
2759 expression satisfies the predicate.
2760 * sem_util.adb: Alphabetize several routines.
2761 (Check_Expression_Against_Static_Predicate): New routine.
2762 * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
2764 2013-04-25 Robert Dewar <dewar@adacore.com>
2766 * gnat_rm.texi: Document Reason argument for pragma Warnings.
2767 * par-prag.adb: Handle Reason parameter for pragma Warnings.
2768 * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
2769 * snames.ads-tmpl (Name_Reason): New name entry.
2771 2013-04-25 Yannick Moy <moy@adacore.com>
2773 * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
2774 (Expand_SPARK): Remove special expansion for membership tests.
2776 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2778 * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
2779 that should use constant Base_Typ. When building an invariant
2780 check, account for invariants coming from the base type. Prevent
2781 the creation of a junk invariant check when the related object
2782 is of an array type and it is initialized with an aggregate.
2783 * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
2784 the base type to create an invariant call when the type of the
2785 expression is a composite subtype.
2787 2013-04-25 Vasiliy Fofanov <fofanov@adacore.com>
2789 * a-cborse.adb: Fix minor typo.
2791 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2793 * sem_ch6.adb (Different_Generic_Profile): A spec and body
2794 match in an instance if a subtype declaration that renames a
2795 generic actual with the same name appears between spec and body.
2797 2013-04-25 Robert Dewar <dewar@adacore.com>
2799 * sem_util.adb: Minor reformatting.
2801 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2803 * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
2804 fold strings with a single others choice only if there are no
2805 expressions in the aggregate.
2807 2013-04-25 Arnaud Charlet <charlet@adacore.com>
2809 * gnat_ugn.texi: Update doc on Ada 2012 default mode.
2811 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2813 * exp_ch6.adb: Add with and use clause for Stringt.
2814 (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
2815 Decls and Stmts along with comments on their usage.
2816 * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
2817 * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
2818 (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
2820 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2822 * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
2823 * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
2824 aggregate for a packed type, which may be converted into an
2825 unchecked conversion of an object.
2827 2013-04-25 Robert Dewar <dewar@adacore.com>
2829 * sem_prag.adb: Minor code reorganization (correct misspelling
2831 * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
2832 * gnat_rm.texi: Document impl-defined aspects.
2833 * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
2836 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2838 * einfo.adb (Set_Abstract_States): The attribute now applies
2839 to generic packages.
2840 * sem_ch4.adb (Referenced): Moved to sem_util.
2841 * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
2842 a non-null abstract state needs a body.
2843 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
2844 to Collect_Subprogram_Inputs_Outputs.
2845 (Analyze_Global_Item): Verify the proper usage of an item with mode
2846 In_Out or Output relative to the enclosing context.
2847 (Analyze_Pragma): Abstract_State can now be applied to a generic
2848 package. Do not reset the Analyzed flag for pragmas Depends and Global
2849 as this is not needed.
2850 (Appears_In): Moved to library level.
2851 (Check_Mode_Restiction_In_Enclosing_Context): New routine.
2852 (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
2853 formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
2854 seen along with comments on usage.
2855 * sem_util.ads, sem_util.adb (Referenced): New routine.
2857 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2859 * sem_ch6.adb (Expand_Contract_Cases): Generate
2860 detailed error messages only when switch -gnateE is in effect.
2862 2013-04-25 Yannick Moy <moy@adacore.com>
2864 * sem_attr.adb (Analyze_Attribute): Do not issue
2865 an error for a possibly misplaced 'Result or 'Old attribute when
2866 analyzing the aspect.
2868 2013-04-25 Robert Dewar <dewar@adacore.com>
2870 * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
2872 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2874 * sem_ch4.adb (Analyze_Quantified_Expression):
2875 Add local variable Loop_Id. Verify that the loop variable
2876 is used within the condition of the quantified expression.
2877 (Referenced): New routine.
2879 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2881 * sem_case.adb (Analyze_Choices): Enhance the error message
2882 given on a bad use of subtype predicate.
2883 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
2884 the error message given on a bad use of subtype predicate.
2885 * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
2886 Suggest_Static. Emit an extra error message advising how to
2887 remedy the bad use of the predicate if the context warrants it.
2888 * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
2889 Suggest_Static along with a comment explaining its usage.
2891 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2893 * sem_disp.adb (Check_Dispatching_Operation): Further refinement
2894 to checks for AI05-0125: the check for a hidden primitive that
2895 may be overridden by the new declaration only applies if the
2896 hidden operation is never declared. This is not the case if the
2897 operation is declared in a parent unit.
2899 2013-04-25 Robert Dewar <dewar@adacore.com>
2901 * debug.adb: Remove d.X and d.Y entries and documentation.
2902 * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
2903 if expression with actions not available (now always available).
2904 (Expand_Short_Circuit_Operator): Same change.
2905 * gnat1drv.adb (Adjust_Global_Switches) Remove setting
2906 Use_Expression_With_Actions flag, since this is now obsolete.
2907 * opt.ads (Use_Expression_Actions): Removed (always True now).
2908 * sinfo.ads: Minor comment updates.
2910 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2912 * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
2913 subtype whose base type is currently private, install full view
2914 when compiling instance body.
2916 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2918 * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
2919 AI05-0125: the check for a hidden primitive that may be overridden
2920 by the new declaration is only performed if the declaration comes
2921 from source, and it must carry an explicit overriding indicator.
2923 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2925 * einfo.adb (Abstract_States): The attribute now applies to
2927 * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
2928 object declaration introduces an illegal hidden state.
2929 * sem_prag.adb (Analyze_Abstract_State): Check whether a state
2930 declaration introduces an illegal hidden state.
2931 * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
2933 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2935 * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
2936 be to a protected function, in which case the name in the call
2937 is a selected component.
2939 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2941 * sem_ch4.adb (Analyze_Quantified_Expression):
2942 Warn on a suspicious use of quantifier "some" when "all" was meant.
2943 (No_Else_Or_Trivial_True): New routine.
2945 2013-04-25 Robert Dewar <dewar@adacore.com>
2947 * einfo.ads, einfo.adb: Put back with/use for Namet.
2948 (Get_Pragma): New name (wi new spec) for Find_Pragma.
2949 * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
2950 different interface.
2952 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2954 * sem_ch3.adb (Is_Visible_Component): In an instance all
2955 components are visible.
2957 2013-04-25 Matthew Heaney <heaney@adacore.com>
2959 * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
2960 tampering when container empty.
2961 * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
2962 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
2965 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2967 * par-ch12.adb: Move aspects from package specification to
2968 generic package declaration.
2969 * sem_ch12.adb: Analyze aspect specifications before building
2970 and analyzing the generic copy, so that the generated pragmas
2971 are properly taken into account.
2972 * sem_ch13.adb: For compilation unit aspects that apply to a
2973 generic package declaration, insert corresponding pragmas ahead
2974 of visible declarations.
2975 * sprint.adb: Display properly the aspects of a generic type
2978 2013-04-25 Robert Dewar <dewar@adacore.com>
2980 * frontend.adb: Minor reformatting.
2982 2013-04-25 Ed Schonberg <schonberg@adacore.com>
2984 * einfo.ads: Extend documentation on use of Is_Private_Ancestor
2986 * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
2987 case of untagged types derived from private types, to reject
2988 illegal selected components.
2990 2013-04-25 Gary Dismukes <dismukes@adacore.com>
2992 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
2993 for case of selecting from an unexpanded implicit dereference
2994 and do not make a recursive call on such a prefix.
2996 2013-04-25 Doug Rupp <rupp@adacore.com>
2998 * targparm.adb (VXF{_Str}): New tag for vaxfloat.
2999 (Get_Target_Parameters): Handle VXF tag.
3000 * targparm.ads (VAX_Float_On_Target): New boolean.
3001 * system-vms-ia64.ads (VAX_Float): New boolean.
3002 * frontend.adb (Frontend): Handle VAX float boolean.
3004 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3006 * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
3007 (Find_Pragma): New routine.
3008 * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
3010 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3012 * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
3014 (Add_Predicates): Save the static predicate for diagnostics and error
3016 (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
3017 Static_Predicate_Present. Add local variable Static_Pred. Ensure that
3018 the expression of a static predicate is static.
3020 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3022 * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
3024 2013-04-25 Robert Dewar <dewar@adacore.com>
3026 * gnat_rm.texi: Minor addition of index entry.
3028 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3030 * sem_ch6.adb (Check_Access_Invariants): Test whether an
3031 invariant procedure is empty before generating a call to it.
3032 (Has_Enabled_Predicate): New routine.
3033 (Has_Null_Body): New routine.
3034 (Process_PPCs): Test whether an invariant procedure is
3035 empty before generating a call to it. Test whether predicates are
3036 enabled for a particular type before generating a predicate call.
3037 * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
3039 2013-04-25 Robert Dewar <dewar@adacore.com>
3041 * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
3042 snames.ads-tmpl: Minor reformatting.
3044 2013-04-25 Thomas Quinot <quinot@adacore.com>
3046 * sem_ch7.adb: Minor reformatting.
3048 2013-04-25 Robert Dewar <dewar@adacore.com>
3050 * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
3051 * s-tarest.adb: Minor reformatting.
3053 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3055 * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
3057 * einfo.adb: Remove with and use clause for Aspects.
3058 (Is_Ghost_Function): Removed.
3059 (Is_Ghost_Entity): New routine.
3060 (Is_Ghost_Subprogram): New routine.
3061 * einfo.ads: Remove synthesized attribute Is_Ghost_Function
3062 along with its uses in entities. Add synthesized attributes
3063 Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
3065 (Is_Ghost_Function): Removed.
3066 (Is_Ghost_Entity): New routine.
3067 (Is_Ghost_Subprogram): New routine.
3068 * par-prag.adb: Remove pragma Ghost from the processing machinery.
3069 * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
3070 * sem_attr.adb (Analyze_Access_Attribute): Update the check
3071 for ghost subprograms.
3072 * sem_ch4.adb (Analyze_Call): Update the check for calls
3073 to ghost subprograms.
3074 (Check_Ghost_Function_Call): Removed.
3075 (Check_Ghost_Subprogram_Call): New routine.
3076 * sem_ch6.adb (Check_Convention): Rewritten.
3077 (Check_Overriding_Indicator): Remove the check for overriding
3079 (Convention_Of): New routine.
3080 * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
3081 generic actual subprograms.
3082 * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
3083 * sem_prag.adb: Remove the value for pragma Ghost from
3085 (Analyze_Pragma): Remove the processing for pragma Ghost.
3086 (Process_Convention): Emit an error when a ghost
3087 subprogram attempts to override.
3088 (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
3089 attempts to override.
3090 * sinfo.ads: Clarify the usage of field Label_Construct.
3091 * snames.adb-tmpl (Get_Convention_Id): Add an entry for
3092 predefined name Ghost.
3093 (Get_Convention_Name): Add an entry for convention Ghost.
3094 * snames.ads-tmpl: Move predefined name Ghost to the sublist
3095 denoting conventions. Add convention id Ghost. Remove pragma
3098 2013-04-25 Ed Schonberg <schonberg@adacore.com>
3100 * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
3101 units if within a generic hierarchy.
3103 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3105 * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
3106 actual the related type has a predicate function.
3107 * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
3108 type has an invariant procedure before building a call to it.
3109 * sem_ch6.adb (Append_Enabled_Item): New routine.
3110 (Check_Access_Invariants): Use routine
3111 Append_Enabled_Item to chain onto the list of postconditions.
3112 (Contains_Enabled_Pragmas): Removed.
3113 (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
3114 the list of postconditions.
3115 (Invariants_Or_Predicates_Present): Removed.
3116 (Process_PPCs): Partially reimplemented.
3118 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
3120 * tree_io.ads: Update ASIS_Version_Number because of changes
3121 in the way how entities are chained in a scope by means of
3124 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3126 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
3127 Storage_Size): If the clause is not from an aspect, insert
3128 assignment to size variable of task type at the point of the
3129 clause, not after the task definition, to prevent access before
3130 elaboration in the back-end.
3132 2013-04-24 Yannick Moy <moy@adacore.com>
3134 * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
3136 2013-04-24 Yannick Moy <moy@adacore.com>
3138 * gnat_rm.texi: Document 'Loop_Entry.
3140 2013-04-24 Jose Ruiz <ruiz@adacore.com>
3142 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
3143 fall-back termination handlers from the parents, because they apply
3144 only to dependent tasks.
3145 * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
3146 termination handlers because the environment task has no parent,
3147 and if it defines one of these handlers it does not apply to
3148 itself because they apply only to dependent tasks.
3150 2013-04-24 Robert Dewar <dewar@adacore.com>
3152 * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
3154 2013-04-24 Robert Dewar <dewar@adacore.com>
3156 * gnat_rm.texi: Document 'Update attribute.
3157 * sem_attr.adb (Analyze_Attribute, case Update): Remove call
3158 to S14_Attribute (S14_Attribute): removed.
3160 2013-04-24 Robert Dewar <dewar@adacore.com>
3162 * interfac.ads: Add size clauses for IEEE_Float_32/64
3164 2013-04-24 Claire Dross <dross@adacore.com>
3166 * gnat1drv.adb (Adjust_Global_Switches): Remove
3167 special assignment of Use_Expression_With_Actions for SPARK_Mode.
3169 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3171 * checks.adb (Apply_Predicate_Check): Check for the presence
3172 of the dynamic predicate aspect when trying to determine if the
3173 predicate of a type is non-static.
3174 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
3175 for the presence of the dynamic predicate aspect when trying to
3176 determine if the predicate of a type is non- static.
3177 * sem_ch13.adb (Add_Call): Capture the nature of the
3178 inherited ancestor predicate.
3179 (Build_Predicate_Functions): Update comments. Rewrite the checks on
3180 static predicate application. Complain about the form of a non-static
3181 expression only when the type is static.
3183 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3185 * sem_prag.adb: Add guard to tree traversal.
3187 2013-04-24 Vincent Celier <celier@adacore.com>
3189 * clean.adb (Clean): Remove local variable Root_Environment,
3190 use Makeutl.Root_Environment instead.
3191 * gnatcmd.adb: Remove local variable Root_Environment, use
3192 Makeutl.Root_Environment instead.
3193 * make.adb (Gnatmake): Remove local variable Root_Environment,
3194 use Makeutl.Root_Environment instead.
3195 * prj-makr.adb: Remove local variable Root_Environment, use
3196 Makeutl.Root_Environment instead.
3198 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3200 * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
3201 extraction of the declarative part of the conditional block. Move
3202 the processing of simple infinite loops to the start of the
3203 expansion logic. Correct the check which determines whether the
3204 proper scope is installed in visibility.
3205 * sem_attr.adb (Analyze_Attribute): Add local variable Attr
3206 to keep track of the attribute in case the enclosing indexed
3207 component has to be rewritten. When searching for the enclosing
3208 loop, start from the proper attribute reference in case of a
3209 rewriting. Do not allow for 'Loop_Entry to appear in pragma
3210 Assert. Replace loop variable J with Index. Set the type of the
3212 * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
3213 block that services a loop statement subject to at least one
3214 'Loop_Entry attribute.
3216 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3218 * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
3219 resolve a fixed point operation, use first subtype to determine
3220 whether type and operator are declared in the same list of
3223 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3225 * par-ch6.adb (P_Subprogram): Detect an illegal
3226 placement of the aspect specification list in the context of
3227 expression functions.
3229 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3231 * exp_ch4.adb (Expand_N_Allocator): If the designated object
3232 has tasks, and the pointer type is an itype that has no master
3233 id, create a master renaming in the current context, which can
3234 only be an init_proc.
3236 2013-04-24 Robert Dewar <dewar@adacore.com>
3238 * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
3239 * gnat_rm.texi: Document pragma Loop_Invariant.
3240 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
3241 no longer an S14_Attribute.
3242 * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
3243 processing with Assert, allow message parameter, remove call
3246 2013-04-24 Thomas Quinot <quinot@adacore.com>
3248 * exp_ch4.adb: Minor reformatting.
3250 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3252 * sem_ch7.adb (Swap_Private_Dependents): New internal routine
3253 to Install_Private_Declarations, to make the installation of
3254 private dependents recursive in the presence of child units.
3255 * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
3256 the Private_Dependents of a private subtype.
3258 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3260 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
3261 retrieval of the block declarations.
3262 * par-ch4.adb (P_Name): Let the name parsing machinery create
3263 a sequence of nested indexed components for attribute Loop_Entry.
3264 * sem_attr.adb (Analyze_Attribute): Add local constant
3265 Context. Reimplement part of the analysis of attribute Loop_Entry.
3266 (Convert_To_Indexed_Component): Removed.
3267 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
3268 an indexed component after it has been rewritten into attribute
3271 2013-04-24 Yannick Moy <moy@adacore.com>
3273 * snames.ads-tmpl: Minor change to list
3274 Loop_(In)variant not in configuration pragma.
3275 * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
3276 for analyzing the expressions in pre/postconditions.
3278 2013-04-24 Robert Dewar <dewar@adacore.com>
3280 * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
3283 2013-04-24 Yannick Moy <moy@adacore.com>
3285 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
3286 Analyze_Subprogram_Body_Helper): Reset contract node to Empty
3287 before setting entity to E_Subprogram_Body.
3288 * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
3289 Empty before setting entity to E_Subprogram_Body.
3291 2013-04-24 Vincent Celier <celier@adacore.com>
3293 * gnat_ugn.texi: Document new gnatls switch -aPdir.
3294 * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
3295 * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
3296 a warning for unknown switches.
3297 (Usage): Add line for new switch -aPdir.
3299 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3301 * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
3302 if the type comes from a limited view, so that task attributes can be
3305 2013-04-24 Yannick Moy <moy@adacore.com>
3307 * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
3308 full expansion is not enabled.
3310 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3312 * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
3313 formals if the type does not yet have a completion, and thus
3314 has no underlying view.
3316 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3318 * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
3319 specification for Address as a reference, to suppress warnings
3320 on entities that may be read by an external device.
3322 2013-04-24 Sergey Rybin <rybin@adacore.com frybin>
3324 * gnat_ugn.texi: Add description of '--help' and '--version'
3325 options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
3327 2013-04-24 Arnaud Charlet <charlet@adacore.com>
3329 * gnat_rm.texi: Minor syntax fix.
3331 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3333 * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
3334 what and why is being analyzed. Remove the decoration of renamings as
3335 this simply falls out of the general analysis mechanism.
3337 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3339 * sem_res.adb (Explain_Redundancy): New routine.
3340 (Resolve_Equality_Op): Place the error concerning a redundant
3341 comparison to True at the "=". Try to explain the nature of the
3344 2013-04-24 Javier Miranda <miranda@adacore.com>
3347 * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
3348 check in interface thunks since it is performed at the caller
3350 (Expand_Simple_Function_Return): No accessibility check
3351 needed in thunks since the check is done by the target routine.
3353 2013-04-24 Vincent Celier <celier@adacore.com>
3355 * xref_lib.adb (Add_Entity): Use the canonical file names
3356 so that source file names with capital letters are found on
3357 platforms where file names are case insensitive.
3359 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3361 * par-ch4.adb (P_Name): Continue to parse the name extension when the
3362 construct is attribute Loop_Entry. Do not convert the attribute
3363 reference into an indexed component when there is at least one
3364 expression / range following 'Loop_Entry.
3366 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3368 * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
3369 (Process_PPCs): Generate procedure _Postconditions
3370 only when the context has invariants or predicates or enabled
3373 2013-04-24 Thomas Quinot <quinot@adacore.com>
3375 * g-socket.adb (Host_Entry): Introduce intermediate copy of
3376 memory location pointed to by Hostent_H_Addr, as it might not
3377 have sufficient alignment.
3379 2013-04-24 Yannick Moy <moy@adacore.com>
3381 * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
3382 calling subprograms which may read it.
3384 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3386 * einfo.adb: Remove Loop_Entry_Attributes from the usage of
3387 nodes. Flag 260 is now used.
3388 (Has_Loop_Entry_Attributes): New routine.
3389 (Loop_Entry_Attributes): Removed.
3390 (Set_Has_Loop_Entry_Attributes): New routine.
3391 (Set_Loop_Entry_Attributes): Removed.
3392 (Write_Entity_Flags): Write out Flag 260.
3393 (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
3394 * einfo.ads: Remove attribute Loop_Entry_Attributes,
3395 its related comment and uses in nodes. Add new attribute
3396 Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
3397 (Has_Loop_Entry_Attributes): New routine and pragma Inline.
3398 (Loop_Entry_Attributes): Removed along with pragma Inline.
3399 (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
3400 (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
3401 * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
3402 (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
3403 * exp_ch5.adb: Remove with and use clause for Elists.
3404 (Expand_Loop_Entry_Attributes): Removed.
3405 (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
3406 constant Isc to Scheme. When a loop is subject to attribute
3407 'Loop_Entry, retrieve the nested loop from the conditional
3408 block. Move the processing of controlled object at the end of
3410 * sem_attr.adb (Analyze_Attribute): Do not chain attribute
3411 'Loop_Entry to its related loop.
3412 * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
3413 Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
3414 the entire loop is rewritten into a block. Retrieve the nested
3415 loop in such cases to complete the analysis.
3416 * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
3418 (Subject_To_Loop_Entry_Attributes): New routine.
3420 2013-04-24 Robert Dewar <dewar@adacore.com>
3422 * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
3423 (Loop_Variant, xxx) rather than Assert (xxx).
3424 * gnat_rm.texi: Document pragma Loop_Variant.
3425 * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
3428 2013-04-24 Yannick Moy <moy@adacore.com>
3430 * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
3431 errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
3432 exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
3433 expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
3434 lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
3435 restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
3436 sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
3437 sem_res.adb, sem_util.adb: Everything with name
3438 'Alfa' renamed in 'SPARK'. Update comments.
3439 Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
3440 * exp_alfa.adb: renamed exp_spark.adb.
3441 * exp_alfa.ads: renamed exp_spark.ads.
3442 * get_alfa.adb: renamed get_spark_xrefs.adb.
3443 * get_alfa.ads: renamed get_spark_xrefs.ads.
3444 * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
3445 * put_alfa.adb: renamed put_spark_xrefs.adb.
3446 * put_alfa.ads: renamed put_spark_xrefs.ads.
3447 * alfa.adb: renamed spark_xrefs.adb.
3448 * alfa.ads: renamed spark_xrefs.ads.
3449 * alfa_test.adb: renamed spark_xrefs_test.adb.
3450 * gcc-interface/Make-lang.in: Update dependencies.
3452 2013-04-24 Robert Dewar <dewar@adacore.com>
3454 * gnat_rm.texi: Document pragma Assume.
3455 * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
3456 part of Assert, and no longer requires -gnatd.F
3458 2013-04-24 Robert Dewar <dewar@adacore.com>
3460 * gnat_rm.texi: Document pragma Assert_And_Cut.
3461 * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
3464 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3466 * sem_aux.adb: Add guard in Available_View.
3468 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3470 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
3471 Find_Related_Subprogram to find the associated subprogram.
3472 (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
3473 to find the associated subprogram.
3474 (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
3477 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3479 * exp_ch6.adb: Remove with and use clause for Sem_Prag.
3480 (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
3481 the contract of a subprogram.
3482 * sem_ch3.adb: Remove with and use clause for Sem_Prag.
3483 (Analyze_Declarations): Call Analyze_Subprogram_Contract to
3484 analyze the contract of a subprogram.
3485 * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
3486 (Check_Subprogram_Contract): Removed.
3487 * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
3488 (Check_Subprogram_Contract): Removed.
3489 (Expand_Contract_Cases): Add a guard against malformed contract cases.
3490 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3491 Decorate_Delayed_Aspect_And_Pragma to decorate aspects
3492 Contract_Cases, Depends and Global. Reimplement the analysis of
3493 aspect Contract_Cases.
3494 (Decorate_Delayed_Aspect_And_Pragma): New routine.
3495 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
3496 (Analyze_CTC_In_Decl_Part): Removed.
3497 (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
3498 (Analyze_Test_Case_In_Decl_Part): New routine.
3499 (Find_Related_Subprogram): New routine.
3500 (Requires_Profile_Installation): Add new formal Prag. Update
3501 the logic to take into account the origin of the pragma.
3502 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
3503 (Analyze_CTC_In_Decl_Part): Removed.
3504 (Analyze_Test_Case_In_Decl_Part): New routine.
3506 2013-04-24 Robert Dewar <dewar@adacore.com>
3508 * sem_prag.adb (Process_Convention): Move Stdcall tests to
3509 Set_Convention_From_Pragma so that they are applied to each
3510 entry of a homonym set.
3511 (Process_Convention): Don't try to set convention if already set.
3513 2013-04-24 Robert Dewar <dewar@adacore.com>
3515 * gnatbind.adb: Minor reformatting.
3517 2013-04-24 Vincent Celier <celier@adacore.com>
3519 * clean.adb (Gnatclean): Add the default project search
3520 directories in the project search path after scanning the
3521 switches on the command line.
3522 (Initialize): Do not put the default project search directories in the
3523 project search path.
3524 * gnatcmd.adb (GNATcmd): Add the default project search
3525 directories in the project search path after scanning the switches
3526 on the command line.
3527 * make.adb (Initialize): Add the default project search
3528 directories in the project search path after scanning the switches
3529 on the command line.
3531 2013-04-24 Yannick Moy <moy@adacore.com>
3533 * restrict.ads (Restriction_Warnings): Initialize with all False value.
3535 2013-04-24 Robert Dewar <dewar@adacore.com>
3537 * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
3538 * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
3540 * snames.ads-tmpl (Name_Predicate_Check): New check name.
3541 * types.ads (Predicate_Check): New definition.
3542 * gnat_rm.texi: Add documentation for Predicate_Check.
3544 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3546 * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
3547 is a renaming of predefined equality for an untagged record,
3548 add generated body to the freeze actions for the subprogram, to
3549 prevent freezing issues when the record has incomplete components.
3550 * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
3551 without completion, return a predefined comparison instead of
3552 just False. This may happen when building the expression for
3553 record equality, when some component has a type whose completion
3554 has not been seen yet. The operation will be analyzed an expanded
3555 after the type has been frozen, at which point all component
3556 types will have been completed, or an error reported.
3558 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3560 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
3561 analysis of a Convention aspect.
3563 2013-04-24 Eric Botcazou <ebotcazou@adacore.com>
3565 * fe.h (Machine_Overflows_On_Target): New macro and declaration.
3566 (Signed_Zeros_On_Target): Likewise.
3568 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3570 * exp_ch6.adb: Add with and use clause for Sem_Prag.
3571 (Freeze_Subprogram): Analyze all delayed aspects for a null
3572 procedure so that they are available when analyzing the
3573 internally-generated _Postconditions routine.
3574 * exp_ch13.adb: Remove with and use clause for Sem_Prag.
3575 (Expand_N_Freeze_Entity): Move the code that analyzes delayed
3576 aspects of null procedures to exp_ch6.Freeze_Subprogram.
3577 * sem_prag.adb (Analyze_Abstract_State): Update the check on
3578 volatile requirements.
3580 2013-04-24 Bob Duff <duff@adacore.com>
3582 * ali-util.ads (Source_Record): New component Stamp_File
3583 to record from whence the Stamp came.
3584 * ali-util.adb (Set_Source_Table): Set Stamp_File component.
3585 * bcheck.adb (Check_Consistency): Print additional information in
3587 * gnatbind.adb (Gnatbind): Print additional information in
3590 2013-04-24 Robert Dewar <dewar@adacore.com>
3592 * exp_ch13.adb, sem_prag.adb: Update comments.
3593 * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
3596 2013-04-24 Doug Rupp <rupp@adacore.com>
3598 * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
3600 2013-04-24 Yannick Moy <moy@adacore.com>
3602 * sinfo.ads: Minor correction of typo.
3604 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3606 * sem_ch3.adb: Create packed array only when expander is
3609 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
3611 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
3612 when the context warrants it.
3613 (Analyze_Global_In_Decl_List): Install the formals only when
3614 the context warrants it.
3615 (Requires_Profile_Installation): New routine.
3617 2013-04-24 Ed Schonberg <schonberg@adacore.com>
3619 * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
3620 type is a discriminated private type that does not require use
3621 of the secondary stack, a constrained subtype of the underlying
3622 type is created to convey the proper object size to the backend.
3623 If the return type is originally a private type, the return
3624 expression is wrapped in an unchecked_conversion. If the return
3625 expression is used subsequently in a call to the postcondition
3626 function, this conversion must be undone to prevent a spurious
3627 error on the analysis of that call.
3629 2013-04-23 Kai Tietz <ktietz@redhat.com>
3632 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
3634 2013-04-23 Eric Botcazou <ebotcazou@adacore.com>
3635 Pascal Obry <obry@adacore.com>
3637 * gcc-interface/Makefile.in (targ): Fix target name check.
3638 (../../gnatmake$(exeext)): Add '+' for LTO.
3639 (../../gnatlink$(exeext)): Likewise.
3641 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3643 * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
3644 pre- and post-conditions.
3645 (Expand_N_Task_Type_Declaration):
3646 Use the correct attribute to check for pre- and post-conditions.
3647 * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
3648 pre- and post-conditions. Analyze delayed classification items.
3649 * freeze.adb (Freeze_Entity): Use the correct attribute to
3650 check for pre- and post- conditions.
3651 * sem_ch3.adb (Analyze_Declarations): Correct the traversal
3652 of pre- and post-conditions as well as contract- and
3653 test-cases. Analyze delayed pragmas Depends and Global.
3654 * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
3655 attribute to check for pre- and post-conditions, as well as
3656 contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects):
3657 Correct the traversal of pre- and post- conditions.
3658 (Process_Contract_Cases): Update the comment on usage. Correct
3659 the traversal of contract-cases.
3660 (Process_Post_Conditions): Update the comment on usage. Correct the
3661 traversal of pre- and post-conditions.
3662 (Process_PPCs): Correct the traversal of pre- and post-conditions.
3663 (Spec_Postconditions): Use the correct
3664 attribute to check for pre- and post- conditions, as well as
3665 contract-cases and test-cases.
3666 * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
3667 actions related to aspects Depends and Global. Code refactoring
3668 for pre- and post-conditions.
3669 (Insert_Delayed_Pragma): New routine.
3670 * sem_prag.adb (Add_Item): New routine.
3671 (Analyze_Depends_In_Decl_Part): New routine.
3672 (Analyze_Global_In_Decl_Part): New routine.
3673 (Analyze_Pragma): Reimplement the actions related to aspects Depends and
3674 Global. Verify that a body acts as a spec for pragma Contract_Cases.
3675 (Chain_PPC): Use Add_Contract_Item to chain a pragma.
3676 (Chain_CTC): Correct the traversal of contract-
3677 and test-cases. Use Add_Contract_Item to chain a pragma.
3678 (Chain_Contract_Cases): Correct the traversal of contract-
3679 and test-cases. Use Add_Contract_Item to chain a pragma.
3680 (Check_Precondition_Postcondition): Update the comment on usage.
3681 (Check_Test_Case): Update the comment on usage.
3682 * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
3683 (Analyze_Global_In_Decl_Part): New routine.
3684 * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
3685 * sinfo.adb (Classifications): New routine.
3686 (Contract_Test_Cases): New routine.
3687 (Pre_Post_Conditions): New routine.
3688 (Set_Classifications): New routine.
3689 (Set_Contract_Test_Cases): New routine.
3690 (Set_Pre_Post_Conditions): New routine.
3691 (Set_Spec_CTC_List): Removed.
3692 (Set_Spec_PPC_List): Removed.
3693 (Spec_CTC_List): Removed.
3694 (Spec_PPC_List): Removed.
3695 * sinfo.ads: Update the structure of N_Contruct along with all
3697 (Classifications): New routine and pragma Inline.
3698 (Contract_Test_Cases): New routine and pragma Inline.
3699 (Pre_Post_Conditions): New routine and pragma Inline.
3700 (Set_Classifications): New routine and pragma Inline.
3701 (Set_Contract_Test_Cases): New routine and pragma Inline.
3702 (Set_Pre_Post_Conditions): New routine and pragma Inline.
3703 (Set_Spec_CTC_List): Removed.
3704 (Set_Spec_PPC_List): Removed.
3705 (Spec_CTC_List): Removed.
3706 (Spec_PPC_List): Removed.
3708 2013-04-23 Doug Rupp <rupp@adacore.com>
3710 * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
3711 to account for LIB$STOP not having the chance to add the PC and
3714 2013-04-23 Robert Dewar <dewar@adacore.com>
3716 * sem_ch13.adb: Minor code reorganization (remove some redundant
3718 * sem_ch3.adb, sem_prag.adb: Minor reformatting.
3720 2013-04-23 Yannick Moy <moy@adacore.com>
3722 * einfo.ads: Minor typo fix.
3723 * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
3724 Static_Predicate is applied to a non-scalar or non-static type.
3725 * sem_prag.adb: Minor typo fix.
3727 2013-04-23 Doug Rupp <rupp@adacore.com>
3729 * init.c (GNAT$STOP) [VMS]: New function.
3731 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3733 * sem_ch3.adb: Add exp_pakd to context.
3734 (Constrain_Component_Type): If the component of the parent is
3735 packed, and the record subtype being built is already frozen,
3736 as is the case for an itype, the component type itself will not
3737 be frozen, and the packed array type for it must be constructed
3740 2013-04-23 Thomas Quinot <quinot@adacore.com>
3742 * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
3744 2013-04-23 Yannick Moy <moy@adacore.com>
3746 * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
3748 * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
3749 * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
3750 * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
3751 * stylesw.adb (Save_Style_Check_Options): Protect testing the
3752 value of Style_Check_Comments_Spacing by a previous test that
3753 Style_Check_Comments is True.
3755 2013-04-23 Thomas Quinot <quinot@adacore.com>
3757 * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
3758 Original_Name, and move declaration to package body as this
3759 subprogram is not used from outside. Also clarify documentation.
3761 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3763 * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
3764 initialize_scalars, disable predicate checks on the generated
3765 assignment to an out scalar parameter.
3767 2013-04-23 Gary Dismukes <dismukes@adacore.com>
3769 * sem_ch4.adb (Analyze_Allocator): Remove error
3770 check for "constrained in partial view" constraints entirely.
3772 2013-04-23 Robert Dewar <dewar@adacore.com>
3774 * einfo.ads, sem_prag.ads: Minor reformatting.
3775 * errout.ads: Comment update.
3777 2013-04-23 Yannick Moy <moy@adacore.com>
3779 * exp_ch5.adb: Minor typo.
3781 2013-04-23 Thomas Quinot <quinot@adacore.com>
3783 * gnat_ugn.texi: Fix typo.
3785 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3787 * einfo.ads: Minor documentation clarification.
3789 2013-04-23 Bob Duff <duff@adacore.com>
3791 * types.ads: Fix incorrect comment.
3793 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3795 * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
3796 Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
3797 description of purpose.
3798 * checks.adb (Apply_Discriminant_Check): Use above renaming.
3799 * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
3800 of the base type, rather than using the Object_Type predicate.
3801 * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
3802 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
3803 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
3804 * exp_ch4.adb (Expand_N_Allocator): Ditto.
3806 2013-04-23 Robert Dewar <dewar@adacore.com>
3808 * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
3810 * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
3811 (Effective_Name): New function (Analyze_Pragma, case Check):
3812 Disallow [Statement_]Assertions (Check_Kind): Implement
3813 Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
3814 (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
3815 * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
3816 (Effective_Name): New function.
3817 * sem_res.adb: Minor reformatting.
3818 * snames.ads-tmpl (Name_Statement_Assertions): New entry.
3819 * gnat_rm.texi: Add documentation of new assertion kind
3820 Statement_Assertions.
3822 2013-04-23 Robert Dewar <dewar@adacore.com>
3824 * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
3825 reformatting and code clean up.
3827 2013-04-23 Vincent Celier <celier@adacore.com>
3829 * prj-part.ads, prj-conf.ads: Minor comment updates.
3831 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3833 * einfo.adb (Predicate_Function): For a private type, retrieve
3834 predicate function from full view.
3835 * aspects.adb (Find_Aspect): Ditto.
3836 * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
3837 the actual is a definite type, apply predicate check after call.
3838 * sem_res.adb: Do not apply a predicate check before the call to
3839 a generated Init_Proc.
3841 2013-04-23 Robert Dewar <dewar@adacore.com>
3843 * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
3844 rewrite to make sure Is_Ignore is properly captured when aspect
3846 * sem_ch6.adb: Minor reformatting.
3847 * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
3848 pragma for the case of a pragma coming from an aspect (already
3849 tested when we analyzed the aspect).
3851 2013-04-23 Vincent Celier <celier@adacore.com>
3853 * prj-conf.adb (Parse_Project_And_Apply_Config): New
3854 Boolean parameter Implicit_Project, defaulted to False. Call
3855 Prj.Part.Parse with Implicit_Project.
3856 * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
3857 parameter Implicit_Project, defaulted to False.
3858 * prj-part.adb (Parse_Single_Project): New Boolean parameter
3859 Implicit_Project, defaulted to False. When Implicit_Project is
3860 True, change the Directory of the project node to the Current_Dir.
3861 * prj-part.ads (Parse): New Boolean parameter, defaulted to False
3863 2013-04-23 Robert Dewar <dewar@adacore.com>
3865 * exp_util.adb: Minor reformatting.
3867 2013-04-23 Robert Dewar <dewar@adacore.com>
3869 * xoscons.adb: Minor reformatting.
3871 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3873 * sem_prag.adb (Check_Mode): Ensure that a
3874 self-referential output appears in both input and output lists of
3875 the subprogram as categorized by aspect Global.
3876 (Check_Usage): Rename formal parameters to better illustrate their
3877 function. Update all uses of the said formals.
3879 2013-04-23 Thomas Quinot <quinot@adacore.com>
3881 * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
3882 parameter Append_NUL to make NUL-termination optional.
3883 * exp_dist.adb: Consistently use the above throughout instead of
3884 Get_Library_Unit_Name_String.
3886 2013-04-23 Robert Dewar <dewar@adacore.com>
3888 * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
3891 2013-04-23 Pascal Obry <obry@adacore.com>
3893 * xoscons.adb: Remove unused use clause, minor code clean-up.
3895 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3897 * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
3898 (can apply to any scope entity).
3899 * sem_res.adb (Resolve_Call): If the call is within another
3900 expression function it does not constitute a freeze point.
3902 2013-04-23 Yannick Moy <moy@adacore.com>
3904 * exp_ch6.adb (Expand_Actuals): Test that Subp
3905 is overloadable before testing if it's an inherited operation.
3907 2013-04-23 Robert Dewar <dewar@adacore.com>
3909 * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
3912 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3914 * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
3915 * exp_util.adb (Expand_Subtype_From_Expr): If the expression
3916 is a source entity and the declaration is for an aliased
3917 unconstrained array, create a new subtype so that the flag
3918 Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
3920 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3922 * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
3923 from the spec to the body.
3924 (Find_Aspect): Update the call to Get_Aspect_Id.
3925 (Get_Aspect_Id): New version that takes an aspect specification.
3926 * aspects.ads: Reorganize all aspect related tables.
3927 (Get_Aspect_Id): New version that takes an aspect specification.
3928 * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
3929 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
3930 the call to Get_Aspect_Id.
3931 * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
3932 call to Get_Aspect_Id. (Analyze_Aspect_Specifications): Update
3933 the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
3935 2013-04-23 Robert Dewar <dewar@adacore.com>
3937 * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
3938 of getting proper name in the case where pragma comes from
3940 * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
3942 2013-04-23 Yannick Moy <moy@adacore.com>
3944 * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
3947 2013-04-23 Thomas Quinot <quinot@adacore.com>
3949 * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
3951 2013-04-23 Doug Rupp <rupp@adacore.com>
3953 * init.c: Move facility macros outside IN_RTS.
3955 2013-04-23 Thomas Quinot <quinot@adacore.com>
3957 * freeze.adb (Freeze_Entity): For the case of a bit-packed
3958 array time that is known at compile time to have more that
3959 Integer'Last+1 elements, issue an error, since such arrays are
3962 2013-04-23 Hristian Kirtchev <kirtchev@adacore.com>
3964 * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
3965 Analyze_Input_Output.
3966 (Analyze_Input_List): Update all calls to Analyze_Input_Output.
3967 (Analyze_Input_Output): Add formal parameter Self_Ref along with
3968 comment on its usage. Update all calls to Analyze_Input_Output.
3969 (Analyze_Pragma): Add new local variable Self_Ref to capture
3970 the presence of a self-referential dependency clause. Update
3971 all calls to Analyze_Input_Output.
3972 (Check_Mode): Add formal parameter Self_Ref along with comment on its
3973 usage. Verify the legality of a self-referential output.
3975 2013-04-23 Ed Schonberg <schonberg@adacore.com>
3977 * exp_ch6.adb: Add predicate checks on by-copy parameter.
3979 2013-04-23 Vincent Celier <celier@adacore.com>
3981 * a-envvar.adb, a-envvar.ads (Value): New.
3983 2013-04-22 Yannick Moy <moy@adacore.com>
3985 * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
3986 null statement if ignored.
3987 * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
3988 * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
3990 2013-04-22 Hristian Kirtchev <kirtchev@adacore.com>
3992 * sem_prag.adb (Analyze_Contract_Case): New routine.
3993 (Analyze_Pragma): Aspect/pragma Contract_Cases can
3994 now be associated with a library level subprogram.
3995 Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
3996 in a subprogram body.
3997 (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
3998 Subp_Id. Remove local constant Subp. The entity of the subprogram
3999 is now obtained via the formal paramter.
4001 2013-04-22 Ed Schonberg <schonberg@adacore.com>
4003 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
4004 Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
4005 if the expression is a source entity.
4007 2013-04-22 Yannick Moy <moy@adacore.com>
4009 * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
4011 * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
4013 2013-04-22 Thomas Quinot <quinot@adacore.com>
4015 * sem_prag.adb (Fix_Error): For a pragma rewritten from another
4016 pragma, fix up error message to include original pragma name.
4017 * par_sco.adb: Minor reformatting.
4019 2013-04-22 Robert Dewar <dewar@adacore.com>
4021 * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
4022 sem_ch6.adb, opt.ads: Minor reformatting.
4024 2013-04-22 Pascal Obry <obry@adacore.com>
4026 * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
4027 Library_Standalone and Library_Kind.
4029 2013-04-22 Ed Schonberg <schonberg@adacore.com>
4031 * exp_ch6.adb (Expand_Actuals): If the call is to an
4032 inherited operation and the actual is a by-reference type with
4033 predicates, add predicate call to post-call actions.
4034 * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
4035 error: a type declaration has a defining identifier, not an Etype.
4036 * sem_res.adb: Restore code removed because of above error.
4038 2013-04-22 Doug Rupp <rupp@adacore.com>
4040 * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
4042 2013-04-22 Yannick Moy <moy@adacore.com>
4044 * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
4045 opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
4047 2013-04-22 Vincent Celier <celier@adacore.com>
4049 * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
4050 No_Path_Information only when Directories_Must_Exist_In_Projects
4052 (Get_Directories): Set Object_Directory
4053 or Exec_Directory to No_Path_Information only when
4054 Directories_Must_Exist_In_Projects is False.
4056 2013-04-22 Yannick Moy <moy@adacore.com>
4058 * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
4059 snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
4060 Pragma_Contract_Case and Name_Contract_Case.
4062 2013-04-22 Yannick Moy <moy@adacore.com>
4064 * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
4066 * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
4067 description of Contract_Cases.
4069 2013-04-12 Robert Dewar <dewar@adacore.com>
4071 * makeutl.adb, prj-nmsc.adb: Minor reformatting.
4073 2013-04-12 Robert Dewar <dewar@adacore.com>
4075 * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
4077 * gnat_rm.texi (Check_Policy): Update documentation for new
4078 Check_Policy syntax.
4079 * sem_prag.adb (Check_Kind): Replaces Check_Enabled
4080 (Analyze_Pragma, case Check_Policy): Rework to accomodate new
4081 syntax (like Assertion_Policy).
4082 * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
4084 2013-04-12 Doug Rupp <rupp@adacore.com>
4086 * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
4087 (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
4088 handler if installed.
4089 * ctrl_c.c (__gnat_install_int_handler)
4090 [VMS]: Install a dummy sigaction handler to trigger the real
4091 user handler dispatch in init.c/__gnat_handle_vms_condition.
4092 (__gnat_uninstall_int_handler) [VMS]: Likewise.
4094 2013-04-12 Vincent Celier <celier@adacore.com>
4096 * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
4097 to False if switch is specified.
4098 * makeutl.adb (Initialize_Source_Record): Do not look for the
4099 object file if there is no object directory.
4100 * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
4101 variable, defaulted to True.
4102 * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
4103 directory does not exist when Directories_Must_Exist_In_Projects is
4105 (Get_Directories): Do not fail when the object or the exec directory
4106 do not exist when Directories_Must_Exist_In_Projects is False.
4108 2013-04-12 Robert Dewar <dewar@adacore.com>
4110 * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
4111 * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
4112 sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
4113 par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
4114 sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
4115 exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
4116 prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
4117 sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
4118 sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
4120 2013-04-12 Doug Rupp <rupp@adacore.com>
4122 * init.c: Don't clobber condition code on VMS.
4124 2013-04-12 Robert Dewar <dewar@adacore.com>
4126 * exp_aggr.adb: Minor reformatting.
4127 * namet.ads, namet.adb (Nam_In): New functions.
4129 2013-04-12 Robert Dewar <dewar@adacore.com>
4131 * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
4132 (Has_Static_Predicate_Aspect): New flag.
4133 * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
4134 (Has_Static_Predicate_Aspect): New flag.
4135 * exp_ch9.adb: Minor reformatting.
4136 * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
4138 * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
4139 since this switch is gone and control of Debug is done with
4141 * gnat_rm.texi: Update documentation for Assertion_Policy and
4142 Check_Policy pragmas.
4143 * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
4144 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
4145 controlled by Assertion_Enabled.
4146 * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
4147 (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
4148 controlled by Assertion_Enabled.
4149 * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
4151 * sem_attr.adb: Minor reformatting.
4152 * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
4153 if DISABLE policy applies.
4154 * sem_ch6.adb (Grab_PPC): Check original name of aspect for
4155 aspect from pragma (Process_PPCs): Properly check assertion policy.
4156 * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
4157 (Check_Appicable_Policy): New procedure.
4158 (Is_Valid_Assertion_Kind): New function.
4159 (Rewrite_Assertion_Kind): New procedure.
4160 (Analyze_Pragma): Handle case of disabled assertion pragma.
4161 (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
4162 (Analyze_Pragma, case Check): Deal with 'Class possibilities.
4163 (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
4164 (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
4165 (Analyze_Pragma, case Debug): New control with Assertion_Policy.
4166 (Analyze_Pragma, case Debug_Policy): Now consistent with
4168 (Analyze_Pragma, case Loop_Invariant): New handling of ignored
4170 (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
4171 (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
4172 (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
4173 * sem_prag.ads (Check_Enabled): Rewritten for new
4174 Assertion_Policy stuff.
4175 (Check_Appicable_Policy): New procedure.
4176 * sinfo.adb (Is_Disabled): New flag.
4177 (Is_Ignored): New flag.
4178 * sinfo.ads (Is_Disabled): New flag.
4179 (Is_Ignored): New flag.
4180 (N_Pragma_Argument_Association): New 'Class forms.
4181 * snames.ads-tmpl: New names Name_uPre, Name_uPost,
4182 Name_uType_Invariant, Name_uInvariant.
4183 * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
4184 * tree_io.ads (ASIS_Version_Number): Updated (remove
4185 read write of obsolete flags Debug_Pragmas_Disabled and
4186 Debug_Pragmas_Enabled.
4188 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4190 * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
4191 of Build_Record_Aggr_Code, used to retrieve explicit values
4192 for inherited discriminants in an extension aggregate, when the
4193 ancestor type is unconstrained.
4195 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4197 * sem_attr.adb (Check_Stream_Attribute): If restriction
4198 No_Default_Stream_Attributes is active, it is illegal to use a
4199 predefined elementary type stream attribute either by itself,
4200 or more importantly as part of the attribute subprogram for a
4201 composite type. However, if the broader restriction No_Streams
4202 is active, then stream operations are not generated, and there
4205 2013-04-12 Robert Dewar <dewar@adacore.com>
4207 * gnatbind.adb: Minor reformatting.
4209 2013-04-12 Bob Duff <duff@adacore.com>
4211 * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
4212 call only in the static elaboration model.
4214 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4216 * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
4217 clause where both input and output lists are null.
4218 (Analyze_Pragma): Update the grammar of pragma Depends.
4220 2013-04-12 Vincent Celier <celier@adacore.com>
4222 * gnatbind.adb (No_Restriction_List): Exclude restrictions that
4223 take a parameter value, not a count.
4224 * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
4225 * projects.texi: Complete documentation of attribute Roots.
4227 2013-04-12 Thomas Quinot <quinot@adacore.com>
4229 * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
4230 sem_ch3.adb: Minor reformatting.
4231 * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
4232 improvement: note that the computation is pessimistic for bit
4234 * gnat_rm.texi (Range_Length): Fix minor error in description
4237 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4239 * aspects.adb (Find_Aspect): New routine.
4240 (Find_Value_Of_Aspect): New routine.
4241 (Has_Aspect): Reimplemented.
4242 * aspects.ads (Find_Aspect): New routine.
4243 (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
4244 * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
4245 * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
4246 * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
4247 * sem_ch5.adb (Analyze_Iterator_Specification): Update
4248 the call to Find_Aspect. Use function Has_Aspect for better
4250 (Preanalyze_Range): Use function Has_Aspect for better readability.
4251 * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
4252 * sem_prag.adb (Analyze_Pragma): There is no longer need to
4253 look at the parent to extract the corresponding pragma for
4256 2013-04-12 Robert Dewar <dewar@adacore.com>
4258 * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
4259 restrict.ads: Minor reformatting.
4261 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4263 * lib-xref.adb: Retrieve original name of classwide type if any.
4265 2013-04-12 Thomas Quinot <quinot@adacore.com>
4267 * exp_ch11.ads: Minor reformatting.
4269 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4271 * aspects.adb: Alphabetize subprogram bodies in this unit. Add
4272 an entry for Aspect_Ghost in the table of canonical aspects.
4273 (Has_Aspect): New routine.
4274 * aspects.ads: Add Aspect_Ghost to all relevant
4275 tables. Alphabetize subprograms in this unit.
4276 (Has_Aspect): New routine.
4277 * einfo.adb: Add with and use clauses for Aspects.
4278 (Is_Ghost_Function): New routine.
4279 * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
4280 update the structure of the related nodes.
4281 (Is_Ghost_Function): New routine.
4282 * exp_ch4.adb (Find_Enclosing_Context): Use routine
4283 Is_Body_Or_Package_Declaration to terminate a search.
4284 (Is_Body_Or_Unit): Removed.
4285 * exp_util.adb (Within_Case_Or_If_Expression): Use routine
4286 Is_Body_Or_Package_Declaration to terminate a search.
4287 * par-prag.adb: Add pragma Ghost to the list of pragmas that do
4288 not need special processing by the parser.
4289 * sem_attr.adb (Analyze_Access_Attribute): Detect an
4290 illegal use of 'Access where the prefix is a ghost function.
4291 (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
4292 to terminate a search. (Check_References_In_Prefix): Use routine
4293 Is_Body_Or_Package_Declaration to terminate a search.
4294 * sem_ch4.adb (Analyze_Call): Mark a function when it appears
4295 inside an assertion expression. Verify the legality of a call
4296 to a ghost function.
4297 (Check_Ghost_Function_Call): New routine.
4298 * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
4299 the setting of attribute In_Assertion_Expression to Analyze_Call.
4300 (Check_Overriding_Indicator): Detect an illegal attempt to
4301 override a function with a ghost function.
4302 * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
4303 a ghost function as a generic actual.
4304 * sem_elab.adb (Check_Internal_Call_Continue): Update the call
4306 * sem_prag.adb: Add an entry for pragma Ghost in the table
4307 of significant arguments.
4308 (Analyze_Pragma): Do not analyze
4309 an "others" case guard. Add processing for pragma Ghost. Use
4310 Preanalyze_Assert_Expression when analyzing the expression of
4311 pragmas Loop_Invariant and Loop_Variant.
4312 * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
4313 (Is_Body_Or_Package_Declaration): New routine.
4314 * sem_util.ads: Alphabetize subprotrams in this unit.
4315 (Is_Body_Or_Package_Declaration): New routine.
4316 * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
4317 (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
4318 * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
4319 to better reflect its use. Update all places that mention the flag.
4320 (In_Assertion): Rename to In_Assertion_Expression. Update
4321 related pragma Inline. (Set_In_Assertion): Rename to
4322 Set_In_Assertion_Expression. Update related pragma Inline.
4323 * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
4326 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4328 * sem_prag.adb (Set_Imported): Do not generate error for multiple
4329 Import in CodePeer mode.
4330 * s-rident.ads: Fix minor typo.
4332 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4334 * checks.adb (Insert_Valid_Check): Do not insert validity check
4335 in the body of the generated predicate function, to prevent
4338 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4340 * s-rident.ads: Add various missing Ada 2012 restrictions:
4341 No_Access_Parameter_Allocators, No_Coextensions,
4342 No_Use_Of_Attribute, No_Use_Of_Pragma.
4343 * snames.ads-tmpl: Add corresponding names.
4344 * restrict.ads restrict.adb: Subprograms and data structures to
4345 handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
4346 * sem_ch4.adb: Correct name of restrictions is
4347 No_Standard_Allocators_After_Elaboration.
4348 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
4349 violation of restriction No_Use_Of_Attribute.
4350 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4351 Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
4352 (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
4353 * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
4354 and No_Coextensions.
4355 * bcheck.adb: Correct name of restrictions is
4356 No_Standard_Allocators_After_Elaboration.
4357 * gnatbind.adb: Correct name of restrictions is
4358 No_Standard_Allocators_After_Elaboration.
4360 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4362 * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
4363 Correct error message format.
4365 2013-04-12 Robert Dewar <dewar@adacore.com>
4367 * sem_attr.adb: Minor reformatting.
4369 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4371 * sem_elab.adb (Within_Elaborate_All): Do not examine a context
4372 item that has not been analyzed, because the unit may have errors,
4373 or the context item may come from a proper unit inserted at the
4374 point of a stub and not analyzed yet.
4376 2013-04-12 Thomas Quinot <quinot@adacore.com>
4378 * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
4379 List_Record_Info): Also include scalar storage order information in
4382 2013-04-12 Yannick Moy <moy@adacore.com>
4384 * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
4385 Contract_Cases instead of Contract_Case pragma.
4387 2013-04-12 Robert Dewar <dewar@adacore.com>
4389 * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
4391 2013-04-12 Yannick Moy <moy@adacore.com>
4393 * sem_attr.adb (Analyze_Attribute): Update analyse of
4394 Attribute_Old and Attribute_Result so they are allowed in the
4395 right-hand-side of an association in a Contract_Cases pragma.
4396 * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
4397 the expressions in a Contract_Cases pragma.
4399 2013-04-12 Robert Dewar <dewar@adacore.com>
4401 * sem.ads, opt.ads: Minor comment edits.
4402 * sem_warn.adb, sem_ch6.adb: Minor reformatting.
4404 2013-04-12 Claire Dross <dross@adacore.com>
4406 * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
4407 Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
4408 not suitable for formal analysis.
4410 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4412 * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
4413 to locate package entity, which may be a child unit.
4415 2013-04-12 Thomas Quinot <quinot@adacore.com>
4417 * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
4418 the specified timeout is 0, do not attempt to determine whether the
4419 connection succeeded.
4421 2013-04-12 Doug Rupp <rupp@adacore.com>
4423 * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
4425 2013-04-12 Doug Rupp <rupp@adacore.com>
4427 * s-fileio.adb: Minor reformatting.
4429 2013-04-12 Ed Schonberg <schonberg@adacore.com>
4431 * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
4432 the last statement in the analyzed loop is an unconditional
4435 2013-04-12 Robert Dewar <dewar@adacore.com>
4437 * opt.ads (Style_Check_Main): New switch.
4438 * sem.adb (Semantics): Set Style_Check flag properly for new
4439 unit to be analyzed.
4440 * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
4441 the proper setting of this flag is now part of the Semantics
4443 * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
4444 for -gnatg and -gnaty
4446 2013-04-12 Doug Rupp <rupp@adacore.com>
4448 * s-crtl.ads (fopen, freopen): Add vms_form parameter
4449 * i-cstrea.ads (fopen, freopen): Likewise.
4450 * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
4451 * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
4452 [VMS]: Split out RMS keys and call CRTL function appropriately.
4453 * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
4455 (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
4457 * gnat_rm.texi: Document implemented RMS keys.
4459 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4461 * sem_ch13.adb (Analyze_Aspect_Specifications):
4462 Insert the corresponding pragma for aspect Abstract_State at
4463 the top of the visible declarations of the related package.
4464 Previously this was only done when the package is a compilation
4467 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4469 * gnat_ugn.texi: Further menu clean ups.
4470 * sem_prag.adb, opt.ads: Minor reformatting.
4471 * sem_util.ads: Minor comment fix.
4473 2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
4475 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
4476 Depends is now a delayed aspect. The delay is required
4477 due to the interplay between aspects Depends and Global.
4478 (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
4479 * sem_prag.adb: Reformat various error messages.
4480 (Add_Item): New subsidiary routine.
4481 (Analyze_Pragma): Add new variables
4482 Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
4483 analysis of pragma Depends now has the capability to check
4484 the proper mode and usage of subprogram inputs and outputs.
4485 (Appears_In): New routine.
4486 (Check_Function_Return): New routine.
4487 (Check_Mode): New routine.
4488 (Check_Usage): New routine.
4489 (Collect_Subprogram_Inputs_Outputs): New routine.
4491 2013-04-12 Bob Duff <duff@adacore.com>
4493 * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
4496 2013-04-12 Robert Dewar <dewar@adacore.com>
4498 * switch-c.adb: Minor fix to wording of error message for
4501 2013-04-12 Robert Dewar <dewar@adacore.com>
4503 * impunit.adb: Add s-multip and s-mudido to list of impl defined
4505 * gnat_rm.texi: Add documentation for
4506 System.Multiprocessors[.Dispatching_Domains].
4508 2013-04-12 Ben Brosgol <brosgol@adacore.com>
4510 * gnat_ugn.texi: Completion of menu cleanups.
4512 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4514 * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
4515 in Relaxed_RM_Semantics.
4517 2013-04-12 Arnaud Charlet <charlet@adacore.com>
4519 * set_targ.adb (elab code): Add support for non gcc back-ends
4520 where save_argv is null.
4522 2013-04-12 Robert Dewar <dewar@adacore.com>
4524 * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
4525 * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
4526 type (Target_Dependent_Info_Write): Add _Name, now an access type.
4527 * set_targ.adb (Write_Target_Dependent_Values): Use name
4528 from -gnatet switch stored in Target_Dependent_Info_Write_Name
4529 (Read_Target_Dependent_Values): Use name from -gnateT switch
4530 stored in Target_Dependent_Info_Read_Name.
4531 * switch-c.adb: New form of -gnatet and -gnateT switches.
4532 * usage.adb: New form of -gnatet and -gnateT switches with
4535 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4537 * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
4538 arithmetics when looking for a read-only variable in the expression.
4540 2013-04-11 Javier Miranda <miranda@adacore.com>
4542 * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
4543 interface thunks since it is performed at the caller side.
4544 (Expand_Simple_Function_Return): No accessibility check needed in thunks
4545 since the check is done by the target routine.
4547 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4549 * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
4550 expression with type Any_Priority.
4551 * exp_ch9.adb (Initialize_Protection): Check that the value
4552 of the priority expression is within the bounds of the proper
4555 2013-04-11 Robert Dewar <dewar@adacore.com>
4557 * sem_prag.adb, prj-env.adb: Minor reformatting.
4559 2013-04-11 Ben Brosgol <brosgol@adacore.com>
4561 * gnat_ugn.texi: Clean ups.
4563 2013-04-11 Yannick Moy <moy@adacore.com>
4565 * set_targ.adb: Minor comment update.
4567 2013-04-11 Pascal Obry <obry@adacore.com>
4569 * gnat_ugn.texi: Remove obsolete comment about DLL calling
4572 2013-04-11 Javier Miranda <miranda@adacore.com>
4574 * exp_ch6.adb (Expand_Call): For the call to the target primitive
4575 of an interface thunks do not compute the extra actuals; just
4576 propagate the extra actuals received by the thunk.
4577 * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
4579 * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
4580 formals in interface thunks whose target primitive has no extra
4583 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4585 * sem_prag.adb (Analyze_Pragma): Detect
4586 a renaming by looking at the Renamed_Object attribute.
4587 (Is_Renaming): Removed.
4589 2013-04-11 Vincent Celier <celier@adacore.com>
4591 * prj-env.adb (Initialize_Default_Project_Path): Take
4592 into account a project path file, specified by environment
4593 variable GPR_PROJECT_PATH_FILE, before taking into account
4595 * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
4597 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4599 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
4600 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
4601 a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
4602 a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
4603 a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
4604 a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
4605 a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
4606 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
4607 Move Iterator operations from body to private part of spec.
4609 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4611 * ttypes.ads, get_targ.ads: More minor rewording of comments.
4613 2013-04-11 Johannes Kanig <kanig@adacore.com>
4615 * debug.adb: Document use of switch -gnatd.Z.
4617 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4619 * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
4620 support renamings of entire objects. Legal renamings are replaced by
4621 the object they rename.
4622 (Is_Renaming): New routine.
4624 2013-04-11 Yannick Moy <moy@adacore.com>
4626 * set_targ.adb, opt.ads: Minor changes in comments.
4628 2013-04-11 Ben Brosgol <brosgol@adacore.com>
4630 * gnat_ugn.texi: Minor clean ups.
4632 2013-04-11 Robert Dewar <dewar@adacore.com>
4634 * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
4635 function p from Nlists to Treepr.
4637 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4639 * sem_disp.adb (Check_Dispatching_Context): If the context is
4640 a contract for a null procedure defer error reporting until
4641 postcondition body is created.
4642 * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
4643 null procedure, complete the analysis of its contracts so that
4644 calls within classwide conditions are properly rewritten as
4647 2013-04-11 Thomas Quinot <quinot@adacore.com>
4649 * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
4651 2013-04-11 Robert Dewar <dewar@adacore.com>
4653 * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
4655 2013-04-11 Robert Dewar <dewar@adacore.com>
4657 * atree.adb, atree.ads (Node31): New function.
4658 (Set_Node31): New procedure.
4660 2013-04-11 Robert Dewar <dewar@adacore.com>
4662 * errout.ads: Minor typo correction.
4664 2013-04-11 Javier Miranda <miranda@adacore.com>
4666 * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
4668 2013-04-11 Robert Dewar <dewar@adacore.com>
4670 * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
4671 * back_end.ads (C_String): Moved to Get_Targ
4672 (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
4674 * cstand.adb (Register_Float_Type): New interface
4675 (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
4676 * get_targ.adb (Register_Back_End_Types): Moved here from
4678 * get_targ.ads (C_String): Moved here from Back_End
4679 (Register_Type_Proc): Moved here from Back_End
4680 (Register_Back_End_Types): here from Back_End.
4681 * gnat1drv.adb (GGnat11drv): Add call to
4682 Write_Target_Dependent_Values;
4683 * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
4684 obsolete target dependent info.
4685 * opt.ads (Generate_Target_Dependent_Info):
4686 Removed (Target_Dependent_Info_Read): New flag
4687 (Target_Dependent_Info_Write): New flag
4688 * output.adb: Minor comment change
4689 * s-os_lib.ads: Minor reformatting
4690 * set_targ.ads, set_targ.adb: Minor reformatting.
4691 * switch-c.adb (Scan_Switches.First_Ptr): New variable
4692 (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
4693 (Scan_Front_End_Switches): Handle -gnatet, -gnateT
4694 * ttypes.ads: Remove documentation section on target dependent
4695 info in ali file Remove four letter codes, no longer used Instead
4696 of using Get_Targ.Get_xxx, we use Set_Targ.xxx
4697 * usage.adb: Add usage lines for -gnatet/-gnateT
4698 * gcc-interface/Make-lang.in: Update dependencies.
4700 2013-04-11 Thomas Quinot <quinot@adacore.com>
4702 * sem_ch4.adb: Update documentation.
4703 * sinfo.ads (N_Expression_With_Actions): Ditto.
4705 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4707 * sem_ch13.adb (Analyze_Aspect_Specifications):
4708 Add a guard to prevent the double insertion of the same aspect
4709 into a rep item list. This previously led to a circularity.
4711 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4713 * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
4714 reference if the prefix is the dereference of an anonymous access
4716 * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
4717 properly a reference to the current instance of a protected type
4718 from within a protected subprogram.
4719 * sem_res.adb (Find_Unique_Access_Type): Treat
4720 Attribute_Access_Type like Allocator_Type when resolving an
4723 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4725 * xgnatugn.adb: Remove obsolete comments.
4727 2013-04-11 Robert Dewar <dewar@adacore.com>
4729 * back_end.ads, back_end.adb: Minor reformatting.
4730 * set_targ.ads, set_targ.adb: New files.
4732 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4734 * sem_case.adb (Check_Against_Predicate): New routine.
4735 (Check_Choices): When the type covered by the list of choices
4736 is a static subtype with a static predicate, check all choices
4737 agains the predicate.
4738 (Issue_Msg): All versions removed.
4739 (Missing_Choice): New routines.
4740 * sem_ch4.adb: Code and comment reformatting.
4741 (Analyze_Case_Expression): Do not check the choices when the case
4742 expression is being preanalyzed and the type of the expression
4743 is a subtype with a static predicate.
4744 (Has_Static_Predicate): New routine.
4745 * sem_ch13.adb: Code and comment reformatting. (Build_Range):
4746 Always build a range even if the low and hi bounds denote the
4747 same value. This is needed by the machinery in Check_Choices.
4748 (Build_Static_Predicate): Always build a range even if the low and
4749 hi bounds denote the same value. This is needed by the machinery
4752 2013-04-11 Robert Dewar <dewar@adacore.com>
4754 * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
4757 2013-04-11 Doug Rupp <rupp@adacore.com>
4759 * gnatlink.adb: Fold program basename to lower case on VMS for
4762 2013-04-11 Matthew Heaney <heaney@adacore.com>
4764 * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
4767 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4769 * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
4771 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4773 * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
4774 needed, and seems to confuse some versions of makeinfo.
4776 2013-04-11 Javier Miranda <miranda@adacore.com>
4778 * einfo.adb (Is_Thunk): Remove assertion.
4779 (Set_Is_Thunk): Add assertion.
4780 * einfo.ads (Is_Thunk): Complete documentation.
4781 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
4782 * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
4783 (Is_Variable_Size_Record): Moved to sem_util
4784 * exp_ch6.adb (Expand_Call): Code cleanup.
4785 (Expand_N_Extended_Return_Statement): Code cleanup.
4786 (Expand_Simple_Function_Return): Code cleanup.
4787 * exp_disp.adb Remove dependency on exp_ch3
4788 (Expand_Interface_Thunk): Add minimum decoration needed to set
4790 * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
4791 * sem_util.ad[sb] (Is_Constant_Bound): Moved from
4792 sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
4793 (Is_Variable_Size_Record): Moved from exp_ch3
4795 2013-04-11 Javier Miranda <miranda@adacore.com>
4797 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
4798 not add cleanup actions in thunks associated with interface types.
4799 * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
4801 * exp_ch4.adb (Tagged_Conversion): Update call to
4802 Expand_Interface_Conversion since the parameter Is_Static is no
4804 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
4805 assertion to ensure that interface thunks are never handled by
4807 (Expand_N_Simple_Function_Return): Do not rewrite this statement
4808 as an extended return statement in interface thunks, and do not
4809 perform copy in the secondary stack if the return statement is
4811 * exp_disp.adb (Expand_Dispatching_Call): No longer displace
4812 the pointer to the returned object in functions returning interface
4814 (Expand_Interface_Thunk): For functions returning interface types
4815 displace the pointer to the returned object.
4816 (Expand_Interface_Conversion): Remove formal
4817 Is_Static since this subprogram can now evaluate it locally.
4818 * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
4819 propagate the type returned by the covered interface primitive to
4820 the internal interface entity. Needed by the thunk to generate
4821 the code which displaces "this" to reference the corresponding
4822 secondary dispatch table.
4823 * sem_disp.adb (Propagate_Tag): Update call to
4824 Expand_Interface_Conversion since the parameter Is_Static is no
4826 * sem_res.adb (Resolve_Type_Conversion): Update calls to
4827 Expand_Interface_Conversion since the parameter Is_Static is no
4828 longer needed plus code cleanup.
4830 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4832 * init.c (RETURN_ADDR_OFFSET): Delete as unused.
4834 2013-04-11 Robert Dewar <dewar@adacore.com>
4836 * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
4837 a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
4839 2013-04-11 Yannick Moy <moy@adacore.com>
4841 * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
4842 discriminant check for Unchecked_Union.
4843 * sem_res.adb (Resolve_Selected_Component): Set flag
4844 Do_Discriminant_Check even when expansion is not performed.
4845 * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
4848 2013-04-11 Thomas Quinot <quinot@adacore.com>
4850 * sem_ch13.adb (Same_Representation): Two types with different scalar
4851 storage order never have the same representation.
4853 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4855 * xgnatugn.adb (Push_Conditional): Simplify handling,
4856 no longer need to keep track of "excluding" sections.
4857 (Currently_Excluding): Removed.
4858 (Process_Source_File):
4859 Set unw/vms flag so that texinfo can do the whole handling of
4860 @ifset/@ifclear sections. Fix handling of nested @ifset/@ifclear
4862 * gnat_ugn.texi: Add a section on performing unassisted install
4865 2013-04-11 Johannes Kanig <kanig@adacore.com>
4867 * debug.adb: Document usage of -gnatd.Q switch.
4869 2013-04-11 Matthew Heaney <heaney@adacore.com>
4871 * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
4872 before element comparisons.
4873 (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
4875 * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
4876 element comparisons.
4877 * a-rbtgso.adb (Difference, Intersection): Adjust locks
4878 before element comparisons.
4879 (Is_Subset, Overlap): Ditto
4880 (Symmetric_Difference, Union): Ditto
4881 * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
4882 before element comparisons.
4883 (Set_Subset, Set_Overlap): Ditto
4884 (Set_Symmetric_Difference, Set_Union): Ditto
4885 * a-coorse.adb, a-ciorse.adb, a-cborse.adb
4886 (Update_Element_Preserving_Key): Adjust locks before element
4887 comparisons (Replace_Element): Ditto
4889 2013-04-11 Pascal Obry <obry@adacore.com>
4891 * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
4894 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4896 * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
4897 Expand_N_Object_Declaration, used to construct an aggregate
4898 with static components whenever possible, so that objects of a
4899 discriminated type can be initialized without calling the init.
4902 2013-04-11 Vincent Celier <celier@adacore.com>
4904 * prj-makr.adb (Process_Directory): On VMS, always delete,
4905 then recreate the temporary file with Create_Output_Text_File,
4906 otherwise the output redirection does not work properly.
4908 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
4910 * urealp.ads: Fix minor typo.
4912 2013-04-11 Fabien Chouteau <chouteau@adacore.com>
4914 * cio.c (mktemp): Don't use tmpnam function from the
4915 system on VxWorks in kernel mode.
4917 2013-04-11 Vincent Celier <celier@adacore.com>
4919 * make.adb (Compile): Clarify the error message reported
4920 when gnatmake refuses to compile a runtime source.
4921 (Start_Compile_If_Possible): Ditto.
4923 2013-04-11 Vincent Celier <celier@adacore.com>
4925 * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
4927 2013-04-11 Vincent Celier <celier@adacore.com>
4929 * switch-c.adb: Document internal switches.
4930 * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
4931 -gnatez and -gnateO.
4933 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4935 * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
4936 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
4938 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
4939 pre/post pragmas at once before analyzing the proper body.
4940 * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
4941 aspect on a subprogram stub.
4942 * aspects.adb: Aspect specifications can appear on a
4943 subprogram_Body_Stub.
4945 2013-04-11 Vincent Celier <celier@adacore.com>
4947 * gnatname.adb: Minor comment fix.
4949 2013-04-11 Vincent Celier <celier@adacore.com>
4951 * prj-makr.adb (Process_Directory): Create a new temporary
4952 file for each invocation of the compiler, in directory pointed
4953 by environment variable TMPDIR if it exists.
4955 2013-04-11 Arnaud Charlet <charlet@adacore.com>
4957 * gnat_ugn.texi: Minor editing/clean ups.
4959 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4961 * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
4962 extracted from Analyze_Subprogram_Declaration, to handle null
4963 procedure declarations that in ada 2012 can be completions of
4964 previous declarations.
4966 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
4968 * sem_prag.adb (Entity_Of): Moved to Exp_Util.
4969 * exp_util.ads, exp_util.adb (Entity_Of): New routine.
4971 2013-04-11 Robert Dewar <dewar@adacore.com>
4973 * g-spipat.ads: Minor comment fix.
4975 2013-04-11 Robert Dewar <dewar@adacore.com>
4977 * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
4980 2013-04-11 Thomas Quinot <quinot@adacore.com>
4982 * exp_util.ads (Fully_Qualified_Name_String): Document that the
4983 constructed literal is the entity name in all upper case.
4985 2013-04-11 Thomas Quinot <quinot@adacore.com>
4987 * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
4988 check for implementation defined identifiers.
4990 2013-04-11 Yannick Moy <moy@adacore.com>
4992 * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
4993 of why range check and length are put on different nodes.
4994 * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
4995 when doing their expansion.
4997 2013-04-11 Ed Schonberg <schonberg@adacore.com>
4999 * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
5000 New function to implement the notion introduced in RM 7.3.1
5001 (5.2/3): in a child unit, a derived type is within the derivation
5002 class of an ancestor declared in a parent unit, even if there
5003 is an intermediate derivation that does not see the full view
5005 * sem_res.adb (Valid_Conversion): if all else fails, examine if an
5006 incomplete view of an ancestor makes a numeric conversion legal.
5008 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5010 * sem_ch6.adb: in Ada2012 operators can only have in
5013 2013-04-11 Vincent Celier <celier@adacore.com>
5015 * makeutl.adb (Create_Binder_Mapping_File): Do not put into
5016 the mapping file ALI files of sources that have been replaced.
5018 2013-04-11 Vincent Celier <celier@adacore.com>
5020 * projects.texi: Add subsection Duplicate Sources in Projects.
5022 2013-04-11 Vincent Celier <celier@adacore.com>
5024 * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
5026 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5028 * init.c (__gnat_install_handler): Only set up an alternate
5029 stack when installing a signal handler for SIGSEGV.
5031 2013-04-11 Thomas Quinot <quinot@adacore.com>
5033 * g-socket.adb (Connect_Socket, timeout version): Call
5034 underlying connect operation directly, not through the 2-argument
5035 Connect_Socket thick binding, in order to avoid raising a junk
5036 exception for the EINPROGRESS return.
5038 2013-04-11 Robert Dewar <dewar@adacore.com>
5040 * a-cdlili.adb: Minor addition of pragma Warnings (Off).
5042 2013-04-11 Robert Dewar <dewar@adacore.com>
5044 * hostparm.ads: Minor reformatting.
5046 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5048 * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
5050 * elists.ads, elists.adb (Contains): New routine.
5051 * par-prag.adb: Pragma Depends does not need any special treatment
5053 * sem_ch13.adb (Analyze_Aspect_Specifications):
5054 Transform aspect Depends into a corresponding pragma.
5055 (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
5056 inspection at its freeze point.
5057 * sem_prag.adb (Analyze_Pragma): Perform analysis and
5058 normalization of pragma Depends. Remove the use of function
5059 Is_Duplicate_Item. Use End_Scope to uninstalle the formal
5060 parameters of a subprogram. Add a value for pragma Depends in
5062 (Is_Duplicate_Item): Removed.
5063 * snames.ads-tmpl: Add predefined name for Depends as well as
5064 a pragma identifier.
5066 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5068 * gnat1drv.adb: Minor code clean up.
5070 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5072 * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
5073 Ignore enumeration rep clauses by default in CodePeer mode, unless
5074 -gnatd.I is specified.
5076 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5078 * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
5079 an expression that has been attached to the else_actions of an
5080 if-expression, the capture is not safe.
5082 2013-04-11 Yannick Moy <moy@adacore.com>
5084 * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
5085 conversion for arrays.
5087 2013-04-11 Robert Dewar <dewar@adacore.com>
5089 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
5091 2013-04-11 Johannes Kanig <kanig@adacore.com>
5093 * adabkend.adb: Minor comment addition.
5095 2013-04-11 Matthew Heaney <heaney@adacore.com>
5097 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
5098 lock counts before entering loop.
5100 (Is_Sorted, Merge, Sort): Ditto.
5101 (Reverse_Find): Ditto.
5102 (Splice_Internal): Internal operation to refactor splicing logic.
5103 (Splice): Some logic moved into Splice_Internal.
5105 2013-04-11 Johannes Kanig <kanig@adacore.com>
5107 * adabkend.adb (Scan_Compiler_Arguments): Do not call
5108 Set_Output_Object_File_Name in Alfa_Mode
5109 * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
5110 * opt.ads: Fix documentation.
5112 2013-04-11 Robert Dewar <dewar@adacore.com>
5114 * sem_res.adb: Minor code reorganization and comment fixes.
5115 * sem_type.adb: Minor reformatting.
5117 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5119 * exp_ch4.adb (Process_Transient_Object): Add new
5120 local variable Fin_Call. Remove and explain ??? comment. Use the
5121 Actions of logical operators "and then" and "or else" to insert
5122 the generated finalization call.
5124 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5126 * gnat_rm.texi: Fix typo.
5128 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5130 * sem_res.adb: Minor reformatting.
5132 2013-04-11 Robert Dewar <dewar@adacore.com>
5134 * atree.h: Add declarations for Flag255-Flag289 Fix declaration
5135 of Field30 (was wrong, but no effect, since not yet referenced by
5136 back end) Add declarations for Field31-Field35 Add declarations
5138 * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
5140 (Has_Predicates): No longer applies to functions.
5141 (Is_Predicate_Function): New flag.
5142 (Is_Predicate_Function_M): New flag.
5143 (Is_Invariant_Procedure): New flag.
5144 (Predicate_Function_M): New function.
5145 (Set_Predicate_Function_M): New procedure.
5146 * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
5147 case of appearing in predicate used for membership test.
5148 * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
5149 Is_Invariant_Procedure flag.
5150 * exp_ch4.adb (Expand_Op_In): Call special predicate function
5151 that takes care of raise_expression nodes in the predicate.
5152 * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
5154 * sem_ch13.adb (Build_Predicate_Functions): New name for
5155 Build_Predicate_Function. Major rewrite to take care of raise
5156 expression in predicate for membership tests.
5157 * sem_res.adb (Resolve_Actuals): Include both predicate functions
5158 in defense against infinite predicate function loops.
5159 * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
5161 2013-04-11 Robert Dewar <dewar@adacore.com>
5163 * sem_prag.adb: Minor reformatting.
5165 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5167 * lib-xref.adb: Generate reference for component of anonymous
5170 2013-04-11 Robert Dewar <dewar@adacore.com>
5172 * stand.ads: Minor reformatting.
5174 2013-04-11 Matthew Heaney <heaney@adacore.com>
5176 * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
5177 counts before entering loop.
5178 (Find, Find_Index): Ditto.
5179 (Is_Sorted, Merge, Sort): Ditto.
5180 (Reverse_Find, Reverse_Find_Index): Ditto.
5182 2013-04-11 Robert Dewar <dewar@adacore.com>
5184 * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
5185 * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
5186 * expander.adb: Add call to Expand_N_Raise_Expression.
5187 * par-ch11.adb (P_Raise_Expression): New procedure.
5188 * par-ch4.adb (P_Relation): Handle Raise_Expression.
5189 * par.adb (P_Raise_Expression): New procedure.
5190 * sem.adb: Add handling for N_Raise_Expression.
5191 * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
5192 * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
5193 * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
5194 * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
5195 * stand.ads (Any_Type): Document use with N_Raise_Expression.
5197 2013-04-11 Vincent Celier <celier@adacore.com>
5199 * gnat_ugn.texi: Remove section "The Development Environments"
5200 now that all predefined attributes are documented, including
5201 those in package IDE.
5203 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5205 * sem_ch6.adb: Preserve parent link in copy of expression.
5207 2013-04-11 Vincent Celier <celier@adacore.com>
5209 * projects.texi: Complete rewrite of the subsection Attributes
5210 in section "Project file Reference".
5212 2013-04-11 Robert Dewar <dewar@adacore.com>
5214 * exp_ch4.adb: Minor reformatting.
5216 2013-04-11 Robert Dewar <dewar@adacore.com>
5218 * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
5219 expression-with-actions node. No longer needed given fix to
5220 sem_prag and caused loss of some useful warnings.
5221 * sem.ads: Minor reformatting.
5222 * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
5223 Check_Enabled. These two routines were curiously incompatible
5225 (Analyze_Pragma, case Check): Make sure we do
5226 not expand the string argument if the check is disabled. Avoid
5227 use of Check_Disabled, which resulted in missing analysis in
5229 * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
5230 Check_Enabled. These two routines were curiously incompatible
5233 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5235 * exp_ch4.adb (Process_Transient_Object): Use
5236 an unchecked conversion when associating a transient controlled
5237 object with its "hook".
5239 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5241 * sem_prag.adb (Analyze_Pragma, case
5242 Preelaborable_Initialization): The pragma is legal if it comes
5243 from an aspect on the private view of the type, even though its
5244 analysis point takes place later at the freeze point.
5246 2013-04-11 Robert Dewar <dewar@adacore.com>
5248 * sem_ch6.adb: Minor reformatting.
5250 2013-04-11 Yannick Moy <moy@adacore.com>
5252 * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
5253 read ALI files with No_Object=True in Alfa mode.
5254 * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
5255 this is during frame condition generation of translation to Why.
5257 2013-04-11 Robert Dewar <dewar@adacore.com>
5259 * exp_ch4.adb: Minor code reorganization
5260 * types.ads: Minor reformatting.
5262 2013-04-11 Johannes Kanig <kanig@adacore.com>
5264 * opt.ads New global boolean Frame_Condition_Mode to avoid
5265 referring to command line switch.
5266 * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
5267 is present, and disable Code generation in that case. Disable
5268 ALI file generation when switch is *not* present.
5270 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5272 * sem_ch6.adb (Analyze_Expression_Function): Perform the
5273 pre-analysis on a copy of the expression, to prevent downstream
5274 visbility issues involving operators and instantiations.
5276 2013-04-11 Johannes Kanig <kanig@adacore.com>
5278 * debug.adb: Reservation and documentation for -gnatd.G switch.
5279 * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
5280 switch, and set ALI file generation accordingly.
5282 2013-04-11 Robert Dewar <dewar@adacore.com>
5284 * exp_ch4.adb, exp_dist.adb: Minor reformatting.
5285 * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
5286 check names introduced with pragma Check_Name are suppressed by -gnatp.
5288 2013-04-11 Vincent Celier <celier@adacore.com>
5290 * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
5291 Files" from projects.texi to gnat_ugn.texi.
5293 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5295 * gcc-interface/Make-lang.in: Update dependencies.
5297 2013-04-11 Yannick Moy <moy@adacore.com>
5299 * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
5302 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com>
5304 * exp_ch4.adb (Expand_N_Allocator): Detect the
5305 allocation of an anonymous controlled object where the type of
5306 the context is named. Use the pool and finalization master of
5307 the named access type to allocate the object.
5309 2013-04-11 Vincent Celier <celier@adacore.com>
5311 * gnat_ugn.texi: Remove most mentions of gprbuild.
5312 * projects.texi: Remove all mentions of asociative array
5315 2013-04-11 Robert Dewar <dewar@adacore.com>
5317 * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
5318 opt.ads, sem_ch13.adb: Minor reformatting.
5319 * debug.adb: Minor comment fix (remove junk .I doc).
5321 2013-04-11 Thomas Quinot <quinot@adacore.com>
5323 * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
5324 PolyORB): Bump to 6.
5325 (Exp_Dist.PolyORB_Support): Replace TC_Build with
5328 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5330 * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
5331 exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
5332 Enable this flag in CodePeer mode, and also via -gnatd.M.
5333 Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
5335 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5337 * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
5338 from the renamed object in an object renaming declaration with
5339 an unconstrained nominal subtype, freeze the created subtype at
5340 once, to prevent order of elaboration issues in the backend.
5342 2013-04-11 Arnaud Charlet <charlet@adacore.com>
5344 * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
5345 in particular in CodePeer mode.
5347 2013-04-11 Vincent Celier <celier@adacore.com>
5349 * gnat_ugn.texi: Add documentation for backup copies of project
5352 2013-04-11 Tristan Gingold <gingold@adacore.com>
5354 * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
5357 2013-04-11 Vincent Celier <celier@adacore.com>
5359 * gnatname.adb (Scan_Args): Recognize new switch --no-backup
5360 (Usage): Add line for --no-backup.
5361 * opt.ads (No_Backup): New Boolean variable, initialized to False.
5362 (Ada_Version_Default): Switch to Ada 2012 by default.
5363 * prj-makr.adb (Initialize): Create a backup for an existing
5364 project file if gnatname is not invoked with --no-backup.
5366 2013-04-11 Thomas Quinot <quinot@adacore.com>
5368 * exp_ch4.adb: Minor code improvement: replace various calls to
5369 Make_If_Statement in expansion with Make_Implicit_If_Statement.
5371 2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
5373 * ali.adb: Fix minor typo.
5375 2013-04-11 Thomas Quinot <quinot@adacore.com>
5377 * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
5378 N_Procedure_Call_Statement.
5380 2013-04-11 Robert Dewar <dewar@adacore.com>
5382 * debug.adb: Minor comment fix.
5384 2013-04-11 Johannes Kanig <kanig@adacore.com>
5386 * debug.adb: Remove comment for -gnatd.G.
5388 2013-04-11 Thomas Quinot <quinot@adacore.com>
5390 * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
5391 Remove recursive routine, replace with...
5392 (Expand_Record_Equality.Element_To_Compare): New subroutine,
5393 implement iterative search for next element to compare.
5394 Add explanatory comment in the tagged case.
5396 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5398 * sem_ch5.adb: remove spurious warning from non-empty loop.
5399 * sem_ch8.adb (Enclosing_Instance): Make public to other routines
5400 in the package, in order to suppress redundant semantic checks
5401 on subprogram renamings in nested instantiations.
5403 2013-04-11 Robert Dewar <dewar@adacore.com>
5405 * errout.ads: Minor reformatting.
5406 * sem_eval.adb (Why_Not_Static): Now issues continuation messages
5407 (Why_Not_Static): Test for aggregates behind string literals.
5408 * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
5410 2013-04-11 Robert Dewar <dewar@adacore.com>
5412 * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
5413 Expressions_With_Actions.
5415 2013-04-11 Ed Schonberg <schonberg@adacore.com>
5417 * sem_ch6.adb (Base_Types_Match): For an actual type in an
5418 instance, the base type may itself be a subtype, so find true
5419 base type to determine compatibility.
5421 2013-04-11 Robert Dewar <dewar@adacore.com>
5423 * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
5424 makeutl.adb, sem_ch8.adb: Minor reformatting.
5426 2013-04-11 Vincent Celier <celier@adacore.com>
5428 * gnat_ugn.texi: Minor fixes for VMS.
5429 * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
5431 2013-04-11 Robert Dewar <dewar@adacore.com>
5433 * usage.adb (Usage): Minor edit to -gnatW message
5435 2013-04-11 Robert Dewar <dewar@adacore.com>
5437 * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
5438 others for string literal case. Also add big ??? comment about
5439 this new code, which should be redundant, but is not.
5440 * sem_eval.adb (Eval_Concatenation): Handle non-static case
5441 properly (Eval_String_Literal): Handle non-static literal properly
5443 2013-03-20 Tobias Burnus <burnus@net-b.de>
5445 * i-fortra.ads: Update comment, add Ada 2012's optional
5446 Star and Kind data types for enhanced interoperability.
5448 2013-03-16 Eric Botcazou <ebotcazou@adacore.com>
5450 * gnatvsn.ads (Library_Version): Bump to 4.9.
5452 2013-03-08 Cesar Strauss <cestrauss@gmail.com>
5455 * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
5456 (__gnat_SEH_error_handler): Likewise. Remove final return.
5458 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5460 * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
5461 out for an unimplemented attribute.
5463 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5465 * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
5466 a misaligned integral type if a size is specified for the field.
5468 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5470 * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
5471 Record the unpadded type of the index type on the RCI stack.
5473 2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
5475 * gcc-interface/trans.c (emit_range_check): Assert that the range type
5476 is a numerical type and remove useless local variables.
5478 2013-02-25 Eric Botcazou <ebotcazou@adacore.com>
5480 * gcc-interface/ada-tree.h: Back out change accidentally committed.
5482 2013-02-21 Jakub Jelinek <jakub@redhat.com>
5485 * gnat-style.texi (@title): Remove @hfill.
5486 * projects.texi: Avoid line wrapping inside of @pxref or @xref.
5488 2013-02-14 Rainer Emrich <rainer@emrich-ebersheim.de>
5491 * tracebak.c: Cast from pointer via FARPROC.
5493 2013-02-07 Simon Wright <simon@pushface.org>
5496 * init.c (__darwin_major_version): New function for x86-64/Darwin.
5497 (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
5498 on Darwin 12 and above.
5500 2013-02-06 Rainer Emrich <rainer@emrich-ebersheim.de>
5503 * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
5504 SECURITY_DESCRIPTOR *
5505 (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
5506 (__gnat_portable_spawn): Fix cast to char* const*
5507 (add_handle): Cast from pointer via void **
5508 (add_handle): Cast from pointer via int *
5509 (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
5510 (__gnat_locate_exec_on_path): Cast from pointer via char *
5511 * initialize.c (append_arg): Cast from pointer via LPWSTR
5512 (__gnat_initialize): Cast from pointer via LPWSTR
5513 * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
5515 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5517 * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
5518 target pairs on VxWorks 5 only.
5520 2013-02-06 Arnaud Charlet <charlet@adacore.com>
5522 * gcc-interface/Make-lang.in: Update dependencies.
5524 2013-02-06 Vincent Celier <celier@adacore.com>
5526 * prj-proc.adb (Process_Aggregated_Projects): Use a new project
5527 node tree for each project tree rooted at an aggregated project.
5529 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5531 * sem_util.adb (Is_Interface_Conversion): New routine.
5532 (Object_Access_Level): Detect an interface conversion
5533 that has been rewritten into a different construct. Use the
5534 original form of the conversion to find the access level of
5537 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5539 * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
5540 (Has_Pragma_No_Inline): Declare and mark as inline.
5541 (Set_Has_Pragma_No_Inline): Likewise.
5542 * einfo.adb (Has_Pragma_No_Inline): New function.
5543 (Set_Has_Pragma_No_Inline): New procedure.
5544 (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
5545 * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
5546 (Pragma_Id): Add Pragma_No_Inline value.
5547 * par-prag.adb (Prag): Handle Pragma_Inline.
5548 * sem_prag.adb (Inline_Status): New enumeration type.
5549 (Process_Inline): Change Active parameter
5550 to Inline_Status and add support for suppressed inlining.
5551 (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
5552 <Pragma_Inline_Always>: Likewise.
5553 <Pragma_No_Inline>: Implement new pragma No_Inline.
5554 (Sig_Flags): Add Pragma_No_Inline.
5555 * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
5556 * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
5558 2013-02-06 Pascal Obry <obry@adacore.com>
5560 * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
5561 to avoid interleaved modifications that could happen from another
5562 task calling Get_Base_Data.
5563 (Get_Base_Data): Make it a critical section. Avoid updating if another
5564 task has already done it.
5566 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5568 * sem_prag.adb: Minor reformatting.
5570 2013-02-06 Pascal Obry <obry@adacore.com>
5572 * s-tasloc.ads: Set System.Task_Lock to preelaborate.
5574 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5576 * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
5577 Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
5579 (Pragma_Id): Add Pragma_Loop_Optimize value.
5580 * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
5581 * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
5582 (Check_Loop_Pragma_Placement): ...this.
5584 <Pragma_Loop_Invariant>: Adjust to above renaming.
5585 <Loop_Variant>: Likewise.
5586 <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
5587 (Sig_Flags): Add Pragma_Loop_Optimize.
5588 * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
5589 * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
5591 2013-02-06 Robert Dewar <dewar@adacore.com>
5593 * osint.ads: Minor fix of typo.
5595 2013-02-06 Sergey Rybin <rybin@adacore.com frybin>
5597 * gnat_ugn.texi: gnatmetric: update the documentation of
5598 complexity metrics for Ada 2012.
5600 2013-02-06 Javier Miranda <miranda@adacore.com>
5602 * exp_disp.adb (Make_Secondary_DT): Code cleanup:
5603 remove useless initialization.
5605 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5607 * sem_ch3.adb (Build_Discriminant_Constraints): Do not
5608 generate overflow checks on a discriminant expression if the
5609 discriminant constraint is applied to a private type that has
5610 a full view, because the check will be applied when the full
5611 view is elaborated. Removing the redundant check is not just
5612 an optimization, but it prevents spurious assembler errors,
5613 because of the way the backend generates names for expressions
5614 that require overflow checking.
5616 2013-02-06 Pascal Obry <obry@adacore.com>
5618 * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
5619 limitation on Windows.
5629 (Clock): Use variable corresponding to access.
5630 (Get_Base_Time): Likewise.
5631 (Monotonic_Clock): Likewise.
5633 2013-02-06 Vincent Celier <celier@adacore.com>
5635 * make.adb (Gnatmake): When gnatmake is called with a project
5636 file, do not invoke gnatbind with -I-.
5637 * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
5638 the infos from all the sources.
5640 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5642 * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
5643 Overriding_Renamings.
5644 * par-prag.adb: Recognize pragma Overriding_Renamings.
5645 * opt.ads (Overriding_Renamings): flag to control compatibility
5646 mode with Rational compiler, replaces Rational_Profile flag.
5647 * sem_ch8.adb (Analyze_Subprogram_Renaming): When
5648 Overriding_Renamings is enabled, accept renaming declarations
5649 where the new subprogram renames and overrides a locally inherited
5650 operation. Improve error message for some illegal renamings.
5651 * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
5652 (Set_Rational_Profile): The Rational_Profile enables
5653 Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
5655 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5657 * sem_util.adb: Set parent of copied aggregate component, to
5658 prevent infinite loop.
5660 2013-02-06 Robert Dewar <dewar@adacore.com>
5662 * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
5663 * exp_disp.adb: Minor comment update.
5664 * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
5667 2013-02-06 Thomas Quinot <quinot@adacore.com>
5669 * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
5670 parameter, defaulted to False for now, indicates targets where
5671 non-default scalar storage order may be specified.
5673 2013-02-06 Thomas Quinot <quinot@adacore.com>
5675 * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
5676 same as E_Record_Subtype. Display E_Class_Wide_Subtype as
5679 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5681 * sem_ch3.adb (Complete_Private_Subtype): Inherit the
5682 Has_Unknown_Discriminants from the full view of the base type.
5684 2013-02-06 Tristan Gingold <gingold@adacore.com>
5686 * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
5687 Enclosing debugging functions within #ifndef inhibit_libc to
5688 support builds without full C headers.
5690 2013-02-06 Thomas Quinot <quinot@adacore.com>
5692 * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
5694 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5696 * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
5697 check to detect a parent-child relationship between two units in
5698 order to correctly bypass the installation of a limited view. In
5699 other words, the comment on the intended usage of the check was
5700 correct, but the code itself did not reflect the behavior.
5702 2013-02-06 Javier Miranda <miranda@adacore.com>
5704 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
5705 runtime check on assignment to tagged types if compiling with checks
5708 2013-02-06 Robert Dewar <dewar@adacore.com>
5710 * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
5711 s-os_lib.adb: Minor reformatting
5713 2013-02-06 Vincent Celier <celier@adacore.com>
5715 * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
5717 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5719 * snames.ads-tmpl: Add Name_Rational and pragma Rational.
5720 * par-prag.adb: Recognize pragma Rational.
5721 * opt.ads (Rational_Profile): flag to control compatibility mode
5722 with Rational compiler.
5723 * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
5724 is enable, accept renaming declarations where the new subprogram
5725 and the renamed entity have the same name.
5726 * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
5727 Rational as a profile.
5729 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5731 * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
5732 dealing with a for loop that iterates over a subtype indication
5733 with a range, use the low and high bounds of the subtype.
5735 2013-02-06 Nicolas Roche <roche@adacore.com>
5737 * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
5740 2013-02-06 Vincent Celier <celier@adacore.com>
5742 * prj-conf.adb (Process_Project_And_Apply_Config): New variable
5743 Conf_Project. New recursive procedure Check_Project to find a non
5744 aggregate project and put its Project_Id in Conf_Project. Fails if
5745 no such project can be found.
5746 (Get_Or_Create_Configuration_File): New parameter Conf_Project.
5747 (Do_Autoconf): Use project directory of project Conf_Project to store
5748 the generated configuration project file.
5749 * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
5752 2013-02-06 Javier Miranda <miranda@adacore.com>
5754 * sem_res.adb (Resolve_Actuals): Generate a read
5755 reference for out-mode parameters in the cases specified by
5758 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5760 * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
5761 Loop_Entry, instead wait until the attribute has been expanded. The
5762 delay ensures that any generated checks or temporaries are inserted
5763 before the relocated prefix.
5765 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5767 * sem_ch12.adb: Code clean up.
5769 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5771 * checks.adb (Apply_Discriminant_Check): Look for discriminant
5772 constraint in full view of private type when needed.
5773 * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
5774 previous patch to components types that are private and without
5777 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5779 * exp_ch4.adb (Find_Enclosing_Context): Recognize
5780 a simple return statement as one of the cases that require special
5781 processing with respect to temporary controlled function results.
5782 (Process_Transient_Object): Do attempt to finalize a temporary
5783 controlled function result when the associated context is
5784 a simple return statement. Instead, leave this task to the
5785 general finalization mechanism.
5787 2013-02-06 Thomas Quinot <quinot@adacore.com>
5789 * einfo.ads: Minor reformatting.
5790 (Status_Flag_Or_Transient_Decl): Add ??? comment.
5792 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
5794 * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
5795 routine should be able to properly detect controlled transient
5796 objects in its actions and generate the appropriate finalization
5798 * exp_ch6.adb (Enclosing_Context): Removed.
5799 (Expand_Ctrl_Function_Call): Remove local subprogram and
5800 constant. Use routine Within_Case_Or_If_Expression to determine
5801 whether the lifetime of the function result must be extended to
5802 match that of the context.
5803 * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
5806 2013-02-06 Ed Schonberg <schonberg@adacore.com>
5808 * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
5809 for subtype matching of component type of formal array type,
5810 to avoid spurious error when component type is a separate actual
5811 in the instance, and there may be a discrepancy between private
5812 and full view of component type.
5814 2013-02-06 Robert Dewar <dewar@adacore.com>
5816 * s-dim.ads, clean.adb: Minor reformatting.
5818 2013-02-06 Javier Miranda <miranda@adacore.com>
5820 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
5821 (Can_Split_Unconstrained_Function): Only split the inlined function if
5822 the compiler generates the code of its body.
5824 2013-02-06 Robert Dewar <dewar@adacore.com>
5826 * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
5827 exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
5830 2013-02-06 Robert Dewar <dewar@adacore.com>
5832 * gnat_rm.texi: Minor text updates for pragma Warning.
5834 2013-02-06 Geert Bosch <bosch@adacore.com>
5836 * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
5839 2013-02-06 Vincent Celier <celier@adacore.com>
5841 * clean.adb (Delete): On VMS use host notation to delete all files.
5843 2013-02-06 Robert Dewar <dewar@adacore.com>
5845 * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
5848 2013-02-06 Gary Dismukes <dismukes@adacore.com>
5850 * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
5851 the special case of a user-defined equality that overrides
5852 the predefined equality of a nonderived type declared in a
5854 * sem_util.adb (Collect_Primitive_Operations): Add test for
5855 Is_Primitive when looping over the subprograms following a type,
5856 to catch the case of primitives such as a user-defined equality,
5857 which otherwise won't be found when the type is not a derived
5858 type and is declared in a declarative part.
5860 2013-02-06 Vincent Celier <celier@adacore.com>
5862 * prj-conf.adb (Check_Target): Always return True when Target
5863 is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
5864 New procedure to get the value of attribute Target in the main
5866 (Get_Or_Create_Configuration_File.Do_Autoconf): No
5867 need to get the value of attribute Target in the main project.
5868 (Get_Or_Create_Configuration_File): Call Get_Project_Target and
5869 use the target fom this call.
5871 2013-02-06 Eric Botcazou <ebotcazou@adacore.com>
5873 * erroutc.adb (Validate_Specific_Warning): Do not issue the
5874 warning about an ineffective Pragma Warnings for -Wxxx warnings.
5875 * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
5876 * gnat_rm.texi (Pragma Warnings): Document coordination with
5877 warnings of the GCC back-end.
5879 2013-02-06 Javier Miranda <miranda@adacore.com>
5881 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
5882 of an inlined function if we do not generate code for the function.
5884 2013-02-06 Pascal Obry <obry@adacore.com>
5886 * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
5887 with Resolve_Links set to False.
5889 2013-02-03 Eric Botcazou <ebotcazou@adacore.com>
5891 * gcc-interface/decl.c: Include diagnostic-core.h.
5892 (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
5893 is set on the entity.
5894 <E_Record_Type>: Likewise.
5895 * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
5897 2013-01-29 Ben Brosgol <brosgol@adacore.com>
5899 * gnat_rm.texi: Fixed typos. Minor edits.
5901 2013-01-29 Bob Duff <duff@adacore.com>
5903 * a-convec.adb: Minor reformatting.
5905 2013-01-29 Pascal Obry <obry@adacore.com>
5907 * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
5910 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5912 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
5913 identifier only if it comes from source.
5914 (Expand_N_Loop_Statement): If the domain of iteration is an
5915 enumeration type with a representation clause, remove from
5916 visibility the loop identifier before rewriting the loop as a
5917 block with a declaration for said identifier.
5918 * sem_util.adb (Remove_Homonym): Handle properly the default case.
5920 2013-01-29 Vincent Celier <celier@adacore.com>
5922 * prj-proc.adb: Minor comment spelling fix.
5924 2013-01-29 Pascal Obry <obry@adacore.com>
5926 * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
5927 Project_Path to current environment.
5929 2013-01-29 Thomas Quinot <quinot@adacore.com>
5931 * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
5932 itypes even if Dump_Freeze_Null is not set.
5934 2013-01-29 Robert Dewar <dewar@adacore.com>
5936 * sem_util.adb: Minor reformatting.
5937 * s-rident.ads: Minor comment fixes.
5939 2013-01-29 Pascal Obry <obry@adacore.com>
5941 * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
5942 control if the path is prepended or appended.
5944 2013-01-29 Ed Schonberg <schonberg@adacore.com>
5946 * sem_ch6.adb (Analyze_Expression_Function): An expression
5947 function declaration is not a subprogram declaration, and thus
5948 cannot appear in a protected definition.
5950 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
5952 * exp_util.adb (Insert_Actions): When new
5953 actions come from the expression of the expression with actions,
5954 then they must be added to the list of existing actions.
5956 2013-01-29 Eric Botcazou <ebotcazou@adacore.com>
5958 * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
5959 the subtype of a constrained private type with discriminants
5960 that has got a full view, show that the completion is a clone
5963 2013-01-29 Javier Miranda <miranda@adacore.com>
5965 * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
5966 * opt.ads (Warn_On_Overlap): Update documentation.
5967 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
5968 Check function writable actuals.
5969 * sem_ch3.adb (Build_Derived_Record_Type,
5970 Record_Type_Declaration): Check function writable actuals.
5971 * sem_ch4.adb (Analyze_Range): Check function writable actuals.
5972 * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
5973 implementation of AI05-0144.
5974 * sem_ch6.adb (Analyze_Function_Return,
5975 (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
5976 of the initial implementation of AI05-0144.
5977 * sem_res.adb (Resolve): Remove code of the initial implementation.
5978 (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
5979 of the initial implementation.
5980 (Resolve_Arithmetic_Op, Resolve_Logical_Op,
5981 Resolve_Membership_Op): Check function writable actuals.
5982 * sem_util.ad[sb] (Actuals_In_Call): Removed
5983 (Check_Order_Dependence): Removed (Save_Actual): Removed
5984 (Check_Function_Writable_Actuals): New subprogram.
5985 * usage.adb (Usage): Update documentation.
5986 * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
5987 setting all warnings.
5989 2013-01-29 Robert Dewar <dewar@adacore.com>
5991 * a-calend-vms.adb: Minor comment fix.
5993 2013-01-29 Robert Dewar <dewar@adacore.com>
5995 * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
5996 because of casing issues.
5997 * sem_util.ads: Minor comment fix.
5998 * style.adb (Check_Identifier): Set proper casing for entities
6000 * styleg.adb: Minor comment improvement.
6001 * stylesw.ads (Style_Check_Standard): Fix bad comments.
6003 2013-01-29 Hristian Kirtchev <kirtchev@adacore.com>
6005 * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
6006 (Analyze_Pragma): Push the scope of the related subprogram and install
6007 its formals once before starting the analysis of the [moded] global
6010 2013-01-29 Pascal Obry <obry@adacore.com>
6012 * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
6013 relative paths in Project_Path as relative to the aggregate
6014 project location. Note that this was what was documented.
6016 2013-01-29 Vincent Celier <celier@adacore.com>
6018 * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
6019 scheme for Ada, when Ada is not a language for the project.
6021 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6023 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
6024 Is_Generic_Actual_Type flag in a nested instance.
6025 * sem_ch12.adb (Restore_Private_Views): Preserve
6026 Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
6027 of an enclosing instance.
6028 * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
6029 which is an actual of an enclosing instance.
6030 * sem_type.adb (Real_Actual): If a generic_actual_type is the
6031 formal of an enclosing generic and thus renames the corresponding
6032 actual, use the actual of the enclosing instance to resolve
6033 spurious ambiguities in instantiations when two formals are
6034 instantiated with the same actual.
6036 2013-01-29 Robert Dewar <dewar@adacore.com>
6038 * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
6039 being available as implementation-defined pragmas in earlier
6042 2013-01-29 Vincent Celier <celier@adacore.com>
6044 * clean.adb (Delete): On VMS, delete all versions of the file.
6046 2013-01-29 Robert Dewar <dewar@adacore.com>
6048 * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
6049 * par-util.adb (No_Constraint): Undo special handling, moved
6052 2013-01-29 Robert Dewar <dewar@adacore.com>
6054 * aspects.ads: Aspect Warnings is implementation defined Add
6055 some other missing entries to impl-defined list Mark Warnings
6056 as GNAT pragma in main list.
6057 * sem_ch8.adb: Process aspects for all cases of renaming
6060 2013-01-29 Robert Dewar <dewar@adacore.com>
6062 * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
6063 * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
6064 warnings about possible elaboration error if call is within
6066 * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
6068 2013-01-29 Robert Dewar <dewar@adacore.com>
6070 * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
6071 * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
6072 s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
6074 2013-01-29 Robert Dewar <dewar@adacore.com>
6076 * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
6077 * par-prag.adb (Par, case Style_Checks): Recognize
6078 Ignore_Style_Checks_Pragmas.
6079 * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
6080 Ignore_Style_Checks_Pragmas.
6081 * switch-c.adb: Recognize -gnateY switch.
6082 * usage.adb: Add documentation for "-gnateY".
6083 * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
6085 2013-01-29 Vincent Celier <celier@adacore.com>
6087 * clean.adb (Clean_Executables): Add Sid component when calling
6089 * make.adb: When inserting in the Queue, add the Source_Id
6090 (Sid) when it is known (Start_Compile_If_Possible): When the
6091 Source_Id is known (Sid), get the path name of the ALI file
6092 (Full_Lib_File) from it, to avoid finding old ALI files in other
6094 * makeutl.ads (Source_Info): New Source_Id component Sid in
6095 Format_Gnatmake variant.
6097 2013-01-29 Robert Dewar <dewar@adacore.com>
6099 * gnat_ugn.texi: Document -gnateY.
6101 2013-01-29 Doug Rupp <rupp@adacore.com>
6103 * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
6104 system-vms-ia64.ads: Replace pragma Interface by pragma Import.
6106 2013-01-29 Robert Dewar <dewar@adacore.com>
6108 * atree.ads, atree.adb (Node30): New function.
6109 (Set_Node30): New procedure.
6110 (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
6111 * atree.h: Add macros for Field30 and Node30.
6112 * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
6113 * treepr.adb (Print_Entity_Information): Print fields 30-35.
6115 2013-01-29 Robert Dewar <dewar@adacore.com>
6117 * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
6118 be a violation of No_Obsolescent_Features even in Ada 95. Also
6119 generates a warning in -gnatwj mode.
6120 (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
6122 * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
6125 2013-01-29 Vincent Celier <celier@adacore.com>
6127 * snames.ads-tmpl: Add new standard name Trailing_Switches.
6129 2013-01-29 Ed Schonberg <schonberg@adacore.com>
6131 * sem_disp.adb (Check_Controlling_Type): If a designated type T
6132 of an anonymous access type is a limited view of a tagged type,
6133 it can be a controlling type only if the subprogram is in the
6136 2013-01-29 Vincent Celier <celier@adacore.com>
6138 * gnatcmd.adb: Use the project where the config pragmas file is
6139 declared to get its path.
6141 2013-01-29 Vincent Celier <celier@adacore.com>
6143 * prj-attr.adb: New attribute Linker'Trailing_Switches.
6145 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
6147 * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
6148 not translate the Etype of the node before translating the Actions.
6150 2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
6152 * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
6153 instead of optimize and adjust warning message.
6154 (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
6156 2013-01-22 Tristan Gingold <gingold@adacore.com>
6158 * gcc-interface/gigi.h (ADT_unhandled_except_decl,
6159 ADT_unhandled_others_decl): New.
6160 (unhandled_others_decl, unhandled_except_decl): Define.
6161 * gcc-interface/trans.c: Include common/common-target.h.
6162 (gigi): Initialize them.
6163 (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
6164 function in a try/catch clause.
6166 2013-01-11 Eric Botcazou <ebotcazou@adacore.com>
6168 * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
6169 (CHECKING_ADAFLAGS): New.
6170 (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
6172 2013-01-10 Eric Botcazou <ebotcazou@adacore.com>
6174 * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
6175 * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
6177 2013-01-07 Eric Botcazou <ebotcazou@adacore.com>
6179 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
6180 comment about type extension with discriminants.
6181 <E_Record_Subtype>: Remove useless test and reorder conditions.
6182 (elaborate_entity) <E_Record_Subtype>: Likewise.
6184 2013-01-07 Richard Biener <rguenther@suse.de>
6187 * gcc-interface/Make-lang.in (ada.install-common): Always apply
6188 program_transform_name.
6190 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6192 * gnatvsn.ads (Current_Year): Bump to 2013.
6194 2013-01-06 Olivier Hainque <hainque@adacore.com>
6196 * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
6197 diagnostic for component size mismatch wrt volatile requirements.
6198 Add a gcc_unreachable() at the end of the checks for size. Split
6199 the check on volatile for positions into one check on atomic and
6200 a subsequent one on volatile.
6202 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6204 * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
6206 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6208 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
6209 pack the field of the record type made for a misaligned type.
6211 2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
6213 * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
6214 for discriminants inherited from parent record types.
6216 2013-01-04 Robert Dewar <dewar@adacore.com>
6218 * warnsw.adb: Minor fixes to -gnatw.d handling.
6220 2013-01-04 Robert Dewar <dewar@adacore.com>
6222 * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
6225 2013-01-04 Joel Brobecker <brobecker@adacore.com>
6227 * gnat_ugn.texi: Fix typo.
6229 2013-01-04 Robert Dewar <dewar@adacore.com>
6231 * gnat_rm.texi: Document alignment choice for subtypes.
6233 2013-01-04 Robert Dewar <dewar@adacore.com>
6235 * validsw.ads: Minor fix to comment.
6237 2013-01-04 Doug Rupp <rupp@adacore.com>
6239 * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
6240 GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
6241 * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
6242 (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
6243 Rename leon vxworks toolchain as leon-wrs-vxworks.
6244 * gcc-interface/Make-lang.in: Update dependencies
6246 2013-01-04 Pascal Obry <obry@adacore.com>
6248 * prj.ads (For_Each_Source): Add Locally_Removed parameter.
6249 (Source_Iterator): Add Locally_Removed field.
6250 * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
6253 2013-01-04 Robert Dewar <dewar@adacore.com>
6255 * exp_attr.adb: Minor reformatting.
6257 2013-01-04 Robert Dewar <dewar@adacore.com>
6259 * checks.adb (Insert_Valid_Check): Fix handling of renamed
6260 packed array element.
6261 * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
6262 fields in generated code.
6263 * exp_util.adb (Side_Effect_Free): Improve detection of cases
6266 2013-01-04 Robert Dewar <dewar@adacore.com>
6268 * sinfo.ads: Clean up order of N_xxx subtypes
6270 2013-01-04 Vincent Celier <celier@adacore.com>
6272 * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
6274 2013-01-04 Robert Dewar <dewar@adacore.com>
6276 * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
6278 2013-01-04 Robert Dewar <dewar@adacore.com>
6280 * par-ch6.adb (P_Subprogram): Better handling of missing IS
6281 after expression function.
6282 * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
6284 2013-01-04 Robert Dewar <dewar@adacore.com>
6286 * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
6287 actions case, new actions are appended to the sequence rather than
6290 2013-01-04 Robert Dewar <dewar@adacore.com>
6292 * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
6293 * usage.adb: Add lines for -gnatw.d/w.D switches.
6294 * warnsw.adb: Minor fixes (some missing cases of setting
6295 Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
6297 2013-01-04 Robert Dewar <dewar@adacore.com>
6299 * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
6300 is restored on exit.
6302 2013-01-04 Robert Dewar <dewar@adacore.com>
6304 * usage.adb: Document -gnateF (check overflow for predefined Float).
6306 2013-01-04 Robert Dewar <dewar@adacore.com>
6308 * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
6309 prevention of call to Apply_Type_Conversion_Checks, which resulted
6310 in missing check flags in formal mode.
6312 2013-01-04 Vincent Celier <celier@adacore.com>
6314 * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
6315 * prj-conf.adb (Check_Builder_Switches): Check for switches
6316 --config= (Get_Db_Switches): New procedure to get the --db
6317 switches so that they are used when invoking gprconfig in
6319 (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
6321 2013-01-04 Pascal Obry <obry@adacore.com>
6323 * prj-nmsc.adb: Minor reformatting.
6325 2013-01-04 Vincent Celier <celier@adacore.com>
6327 * makeutl.ads (Root_Environment): New variable, moved rom
6328 gprbuild (Load_Standard_Base): New Boolean variable, moved
6330 * prj-conf.adb (Check_Builder_Switches): New procedure to check
6331 for switch --RTS in package Builder. If a runtime specified
6332 by --RTS is a relative path name, but not a base name, then
6333 find the path on the Project Search Path.
6334 (Do_Autoconf): Call Check_Builder_Switches.
6335 (Locate_Runtime): New procedure, moved from gprbuild, to get the
6336 absolute paths of runtimes when they are not specified as a base name.
6337 * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
6339 2013-01-04 Ed Schonberg <schonberg@adacore.com>
6341 * sem_ch3.adb (Build_Private_Derived_Type): Set
6342 Has_Private_Ancestor on type derived from an untagged private
6343 type whose full view has discriminants
6344 * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
6345 aggregate for untagged record type with private ancestor.
6347 2013-01-04 Thomas Quinot <quinot@adacore.com>
6349 * sem_elab.adb, sem_ch3.adb: Minor reformatting.
6351 2013-01-04 Robert Dewar <dewar@adacore.com>
6353 * table.adb: Minor reformatting.
6355 2013-01-04 Ed Schonberg <schonberg@adacore.com>
6357 * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
6358 not come from source does not generate a warning for redundant
6361 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
6363 * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
6364 * par-prag.adb: Add pragma Global to the list of pragmas that
6365 do not need special processing by the parser.
6366 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
6367 Global into a pragma without any form of legality checks. The
6368 work is done by Analyze_Pragma. The aspect and pragma are both
6369 marked as needing delayed processing. Insert the corresponding
6370 pragma of aspect Abstract_State in the visible declarations of the
6372 (Check_Aspect_At_Freeze_Point): Aspect Global
6373 does not need processing even though it is marked as delayed.
6374 Alphabetize the list on aspect names.
6375 * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
6376 (Analyze_Pragma): Add ??? comment about the grammar of pragma
6377 Abstract_State. Move the error location from the pragma to the
6378 state to improve the quality of error placement. Add legality
6379 checks for pragma Global.
6380 * snames.ads-tmpl Add the following specially recognized names
6382 2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
6384 * sem_ch3.adb: Fix minor typo.
6386 2013-01-04 Ed Schonberg <schonberg@adacore.com>
6388 * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
6389 accept an aspect name followed by a comma, indicating a defaulted
6392 2013-01-04 Joel Brobecker <brobecker@adacore.com brobecker>
6394 * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
6395 Update doc on gnattest --separates switch.
6397 2013-01-04 Thomas Quinot <quinot@adacore.com>
6399 * s-chepoo.ads: Minor reformatting.
6401 2013-01-04 Arnaud Charlet <charlet@adacore.com>
6403 * usage.adb: Remove mention of -gnatN in usage.
6405 2013-01-04 Robert Dewar <dewar@adacore.com>
6407 * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
6408 freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
6409 prj-conf.adb, sem_ch13.adb: Minor reformatting.
6411 2013-01-04 Thomas Quinot <quinot@adacore.com>
6413 * sinfo.ads: Minor documentation update.
6415 2013-01-04 Thomas Quinot <quinot@adacore.com>
6417 * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
6418 before resolving initialization expression.
6420 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com>
6422 * checks.adb (Generate_Index_Checks): Delay the generation of
6423 the check for an indexed component where the prefix mentions
6424 Loop_Entry until the attribute has been properly expanded.
6425 * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
6426 decoration of the constant that captures the value of Loop_Entry's
6427 prefix at the entry point into a loop. Generate index checks
6428 for an attribute reference that has been transformed into an
6431 2013-01-04 Thomas Quinot <quinot@adacore.com>
6433 * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
6434 sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
6435 do if Obj is already frozen.
6436 (Exp_Util.Find_Init_Call): Rename to...
6437 (Exp_Util.Remove_Init_Call): New subprogram, renamed from
6438 Find_Init_Call. Remove the initialization call from the enclosing
6439 list if found, and if it is from an Initialization_Statements
6440 attribute, reset it.
6441 (Exp_Util.Append_Freeze_Action): Minor code reorganization.
6442 (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
6443 allocated (as is already done in Append_Freeze_Action).
6444 (Freeze.Freeze_Entity): For an object with captured
6445 Initialization_Statements and non-delayed freezeing, unwrap the
6446 initialization statements and insert and them directly in the
6448 (Sem_Ch13.Check_Address_Clause): For an object
6449 with Initialization_Statements and an address clause, unwrap the
6450 initialization statements when moving them to the freeze actions.
6452 2013-01-03 Pascal Obry <obry@adacore.com>
6454 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
6455 corresponding attibutes.
6457 2013-01-03 Thomas Quinot <quinot@adacore.com>
6459 * exp_aggr.adb: Minor comment improvement.
6461 2013-01-03 Hristian Kirtchev <kirtchev@adacore.com>
6463 * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
6465 * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
6466 the description of fields (Abstract_States): New routine.
6467 (Integrity_Level): New routine.
6468 (Has_Property): New routine.
6469 (Is_Input_State): New routine.
6470 (Is_Null_State): New routine.
6471 (Is_Output_State): New routine.
6472 (Is_Volatile_State): New routine.
6473 (Refined_State): New routine.
6474 (Set_Abstract_States): New routine.
6475 (Set_Integrity_Level): New routine.
6476 (Set_Refined_State): New routine.
6477 (Write_Field8_Name): Add proper output for E_Abstract_State.
6478 (Write_Field9_Name): Add proper output for E_Abstract_State.
6479 (Write_Field25_Name): Add proper output for E_Package.
6480 * lib-xref.ads: Add new letter for an abstract state.
6481 * par-prag.adb: Add pragma Abstract_State to the list of pragma
6482 that do not need special processing by the parser.
6483 * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
6484 aspect Abstract_State into a pragma without any form
6485 of legality checks. The work is done by Analyze_Pragma.
6486 (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
6487 require delayed analysis.
6488 * sem_prag.adb: Add a value for pragma Abstract_State in table
6490 (Analyze_Pragma): Add legality checks for pragma
6491 Abstract_State. Analysis of individual states introduces a state
6492 abstraction entity into the visibility chain.
6493 * snames.ads-tmpl: Add new names for abstract state and
6494 integrity. Add new pragma id for abstract state.
6496 2013-01-03 Bob Duff <duff@adacore.com>
6498 * table.adb (Reallocate): Calculate new Length in
6499 Long_Integer to avoid overflow.
6501 2013-01-03 Thomas Quinot <quinot@adacore.com>
6503 * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
6504 (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
6505 it is set properly when expanding the initialization expression.
6506 (Freeze.Check_Address_Clause): Transfer initialization expression
6507 to an assignment in the freeze actions, so that the object is
6508 initialized only after being elaborated by GIGI.
6509 (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
6510 a Null_Statement as the expression in an Expression_With_Actions.
6511 (Exp_Aggr.Collect_Initialization_Statements): New subprogram
6512 shared by expansion of record and array aggregates, used to
6513 capture statements for an aggregate used to initalize an object
6514 into an Expression_With_Actions (which acts as a container for
6516 (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
6517 capture initialization statements, instead of the previously
6518 existing loop which left freeze nodes out of the capturing
6519 construct (causing out of order elaboration crashes in GIGI).
6520 (Exp_Aggr.Expand_Array_Aggregate): Use the above to capture
6521 initialization statements (this was previously not done for
6522 arrays). Also do not unconditionally prevent in place expansion
6523 for an object with address clause.
6525 2013-01-03 Thomas Quinot <quinot@adacore.com>
6527 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
6528 a record extension has the same scalar storage order as the parent type.
6530 2013-01-03 Thomas Quinot <quinot@adacore.com>
6532 * exp_ch4.adb: Add comment.
6534 2013-01-03 Vincent Celier <celier@adacore.com>
6536 * prj.adb: Minor spelling error correction in comment.
6538 2013-01-03 Vincent Celier <celier@adacore.com>
6540 * gnatcmd.adb (GNATCmd): If a single main has been specified
6541 as an absolute path, use its simple file name to find specific
6542 switches, instead of the absolute path.
6544 2013-01-03 Javier Miranda <miranda@adacore.com>
6546 * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
6547 parameters that are record types or array types generate warnings
6548 only compiling under -gnatw.i
6549 * opt.ads (Extensions_Allowed): Restore previous documentation.
6551 2013-01-03 Vincent Celier <celier@adacore.com>
6553 * prj-conf.adb (Do_Autoconf): If Target is specified in the
6554 main project, but not on the command line, use the Target in
6555 the project to invoke gprconfig in auto-configuration.
6556 * makeutl.ads (Default_Config_Name): New constant String.
6558 2013-01-03 Arnaud Charlet <charlet@adacore.com>
6560 * usage.adb: Minor: fix typo in usage.
6562 2013-01-03 Thomas Quinot <quinot@adacore.com>
6564 * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
6565 an illegal component clause for an inherited component in a
6568 2013-01-03 Emmanuel Briot <briot@adacore.com>
6570 * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
6571 have information in the ALI file for both the index and the component
6574 2013-01-03 Emmanuel Briot <briot@adacore.com>
6576 * projects.texi: Fix error in documenting the project path
6577 computed for an aggregate project.
6579 2013-01-03 Javier Miranda <miranda@adacore.com>
6581 * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
6582 plus restricting the functionality of this routine to cover the
6583 cases described in the Ada 2012 reference manual. The previous
6584 extended support is now available under -gnatX.
6585 * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
6586 variable to call Timed_Sleep. Required to avoid warning on
6587 overlapping out-mode actuals.
6588 * opt.ads (Extensions_Allowed): Update documentation.
6590 2013-01-03 Tristan Gingold <gingold@adacore.com>
6592 * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
6594 * gcc-interface/Makefile.in: Remove reference to arit64.c.
6596 2013-01-03 Thomas Quinot <quinot@adacore.com>
6598 * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
6599 be generated at the start of the freeze actions for the entity, not
6600 before (or after) the freeze node.
6602 2013-01-03 Thomas Quinot <quinot@adacore.com>
6604 * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
6605 Reorganize code to capture initialization statements in a block,
6606 so that freeze nodes are excluded from the captured block.
6608 2013-01-03 Thomas Quinot <quinot@adacore.com>
6610 * exp_ch11.adb: Minor reformatting.
6612 2013-01-03 Thomas Quinot <quinot@adacore.com>
6614 * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
6615 sem_ch13.adb (Einfo.Initialization_Statements,
6616 Einfo.Set_Initialization_Statements): New entity attribute
6618 (Exp_Util.Find_Init_Call): Handle case of an object initialized
6619 by an aggregate converted to a block of assignment statements.
6620 (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
6621 even for objects that require a constant address, because the
6622 address expression might involve entities that have yet to be
6623 elaborated at the point of the object declaration.
6624 (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
6625 not require a transient scope, capture the assignment statements
6626 in a block so that they can be moved down after elaboration of
6627 an address clause if needed.
6628 (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
6629 case N_Unchecked_Conversion): Do not replace operand subtype with
6630 its base type as this violates a GIGI invariant if the operand
6631 is an identifier (in which case the etype of the identifier
6632 is expected to be equal to that of the denoted entity).
6634 2013-01-03 Javier Miranda <miranda@adacore.com>
6636 * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
6637 functionality of this routine to cover cases described in the Ada 2012
6640 2013-01-03 Ed Schonberg <schonberg@adacore.com>
6642 * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
6643 a 'Access attribute reference when the subprogram is called
6646 2013-01-03 Arnaud Charlet <charlet@adacore.com>
6648 * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
6649 select statement may be called from a controlled (e.g. Initialize)
6650 operation and have abort always deferred.
6652 2013-01-03 Robert Dewar <dewar@adacore.com>
6654 * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
6656 2013-01-03 Javier Miranda <miranda@adacore.com>
6658 * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
6659 internal entities associated with interfaces and add minimum
6660 decoration to the defining entity of the generated wrapper to
6661 allow overriding interface primitives.
6662 * sem_disp.ads (Override_Dispatching_Operation): Addition of a
6663 new formal (Is_Wrapper).
6664 * sem_disp.adb (Override_Dispatching_Operation): When overriding
6665 interface primitives the new formal helps identifying that the
6666 new operation is not fully decorated.
6668 2013-01-03 Thomas Quinot <quinot@adacore.com>
6670 * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
6671 rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
6672 (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
6673 Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
6674 update spec accordingly (now also applies to root library units).
6675 (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
6676 on root library units, not only child units.
6677 (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
6678 (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
6679 even for root library units.
6680 (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
6681 Standard is an expanded name for a root library unit.
6683 2013-01-03 Thomas Quinot <quinot@adacore.com>
6685 * exp_ch3.adb: Minor reformatting.
6687 2013-01-03 Olivier Hainque <hainque@adacore.com>
6689 * tracebak.c: Reinstate changes to support ppc-lynx178.
6691 2013-01-03 Ed Schonberg <schonberg@adacore.com>
6693 * atree.ads: Minor reformatting and documentation enhancement.
6695 2013-01-03 Ed Schonberg <schonberg@adacore.com>
6697 * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
6698 a class-wide type and a renaming declaration is created for it,
6699 preserve entity chain, which already contains generated internal
6700 types. This ensures that freezing actions are properly generated
6701 for all objects declared subsequently in the same scope, and
6702 that debugging information is generated for them.
6703 * sem_util.adb, sem_util.ads (we): New debugging routine, to
6704 display entity chain of a given scope.
6706 2013-01-03 Robert Dewar <dewar@adacore.com>
6708 * exp_intr.adb: Minor reformatting.
6710 2013-01-03 Robert Dewar <dewar@adacore.com>
6712 * einfo.adb: Minor reformatting.
6714 2013-01-03 Pascal Obry <obry@adacore.com>
6716 * adaint.c, adaint.h (__gnat_get_module_name): Removed.
6717 (__gnat_is_module_name_supported): Removed.
6718 * s-win32.ads: Add some needed definitions.
6719 * g-trasym.ads: Update comments.
6721 2013-01-03 Robert Dewar <dewar@adacore.com>
6723 * layout.adb (Set_Composite_Alignment): Fix problems of
6724 interactions with Optimize_Alignment set to Space.
6726 2013-01-03 Thomas Quinot <quinot@adacore.com>
6728 * exp_disp.adb: Minor reformatting.
6730 2013-01-02 Richard Biener <rguenther@suse.de>
6733 * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
6735 2013-01-02 Thomas Quinot <quinot@adacore.com>
6737 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
6738 side effects from Tag_Arg early, doing it too late may cause a
6739 crash due to inconsistent Parent link.
6740 * sem_ch8.adb, einfo.ads: Minor reformatting.
6742 2013-01-02 Robert Dewar <dewar@adacore.com>
6744 * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
6745 * freeze.adb (Size_Known): We do not know the size of a packed
6746 record if it has atomic components, by reference type components,
6747 or independent components.
6748 * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
6749 flag Has_Independent_Components.
6751 2013-01-02 Yannick Moy <moy@adacore.com>
6753 * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
6754 * usage.adb (Usage): Update usage message.
6756 2013-01-02 Pascal Obry <obry@adacore.com>
6758 * adaint.c (__gnat_is_module_name_supported): New constant.
6760 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6762 * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
6763 array whose component type does not have a completion.
6765 2013-01-02 Geert Bosch <bosch@adacore.com>
6767 * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
6769 2013-01-02 Robert Dewar <dewar@adacore.com>
6771 * par_sco.adb: Minor reformatting.
6773 2013-01-02 Javier Miranda <miranda@adacore.com>
6775 * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
6777 2013-01-02 Olivier Hainque <hainque@adacore.com>
6779 * a-exctra.ads (Get_PC): New function.
6781 2013-01-02 Thomas Quinot <quinot@adacore.com>
6783 * sem_ch8.adb: Minor reformatting.
6785 2013-01-02 Thomas Quinot <quinot@adacore.com>
6787 * sem_ch7.adb: Minor reformatting.
6789 2013-01-02 Thomas Quinot <quinot@adacore.com>
6791 * freeze.adb (Check_Component_Storage_Order): Do not crash on
6794 2013-01-02 Robert Dewar <dewar@adacore.com>
6796 * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
6797 On_Target to Atomic_Sync_Default.
6799 2013-01-02 Robert Dewar <dewar@adacore.com>
6801 * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
6802 comparison of attribute result with constant
6803 * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
6804 Warnings (Off, "..");
6806 2013-01-02 Yannick Moy <moy@adacore.com>
6808 * sem_prag.ads: Minor correction of comment.
6810 2013-01-02 Thomas Quinot <quinot@adacore.com>
6812 * par_sco.adb (Traverse_Package_Declaration): The first
6813 declaration in a nested package is dominated by the preceding
6814 declaration in the enclosing scope.
6816 2013-01-02 Pascal Obry <obry@adacore.com>
6818 * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
6819 module containing a given address.
6821 2013-01-02 Thomas Quinot <quinot@adacore.com>
6823 * sem_ch3.adb: Minor reformatting.
6825 2013-01-02 Pascal Obry <obry@adacore.com>
6827 * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
6828 Win64 and default to ftell on other platforms.
6829 (__gnat_fsek64): Likewise.
6830 * i-cstrea.ads: Add fssek64 and ftell64 specs.
6831 * s-crtl.ads: Likewise.
6832 * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
6833 (Set_Position): Likewise.
6835 2013-01-02 Thomas Quinot <quinot@adacore.com>
6837 * par_sco.adb: Generate X SCOs for default expressions in
6838 subprogram body stubs. Do not generate any SCO for package,
6839 task, or protected body stubs.
6841 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6843 * sem_ch3.adb: Further improvement to ASIS mode for anonymous
6844 access to protected subprograms.
6846 2013-01-02 Robert Dewar <dewar@adacore.com>
6848 * par_sco.adb, vms_data.ads: Minor reformatting.
6850 2013-01-02 Thomas Quinot <quinot@adacore.com>
6852 * par_sco.adb (Traverse_Declarations_Or_Statement): Function
6853 form, returning value of Current_Dominant upon exit, for chaining
6855 (Traverse_Declarations_Or_Statement.Traverse_One, case
6856 N_Block_Statement): First statement is dominated by last declaration.
6857 (Traverse_Subprogram_Or_Task_Body): Ditto.
6858 (Traverse_Package_Declaration): First private
6859 declaration is dominated by last visible declaration.
6860 (Traverse_Sync_Definition): Ditto.
6862 2013-01-02 Thomas Quinot <quinot@adacore.com>
6864 * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
6865 matching Bit_Order to record types only, since array types do not
6868 2013-01-02 Vincent Celier <celier@adacore.com>
6870 * gnat_ugn.texi: Remove documentation of -gnateO, which is an
6872 * usage.adb: Indicate that -gnateO is an internal switch.
6874 2013-01-02 Thomas Quinot <quinot@adacore.com>
6876 * par_sco.adb: Add SCO generation for task types and single
6878 * get_scos.adb: When adding an instance table entry for a
6879 non-nested instantiation, make sure the Enclosing_Instance is
6882 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
6884 * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
6885 scope generated for subprogram inlining purposes while trying
6886 to locate the enclosing function.
6887 * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
6888 expression of pragma Postcondition when the pragma comes from
6889 source and appears inside a subprogram body.
6891 2013-01-02 Thomas Quinot <quinot@adacore.com>
6893 * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
6894 information in debug info unconditionally when using -fdump-scos,
6895 instead of relying on a separate command line switch -fdebug-instances.
6896 * gcc-interface/Make-lang.in: Update dependencies.
6898 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6900 * sem_ch12.adb: Additional refinement of predicate.
6902 2013-01-02 Vincent Celier <celier@adacore.com>
6904 * vms_data.ads: Remove incorrect spaces at end of descriptions
6905 of qualifiers for single switch.
6907 2013-01-02 Ben Brosgol <brosgol@adacore.com>
6909 * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
6910 Check_Float_Overflow.
6912 2013-01-02 Thomas Quinot <quinot@adacore.com>
6914 * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
6915 a conditional expression (CASE or IF expression) that already
6916 has parens. Also omit ELSE keyword for an IF expression without
6919 2013-01-02 Thomas Quinot <quinot@adacore.com>
6921 * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
6922 flag_debug_instances here, after front-end switches have been
6925 2013-01-02 Vincent Celier <celier@adacore.com>
6927 * usage.adb: Minor reformatting.
6929 2013-01-02 Arnaud Charlet <charlet@adacore.com>
6931 * opt.ads: Fix typo.
6933 2013-01-02 Thomas Quinot <quinot@adacore.com>
6935 * par_sco.adb: Generate P decision SCOs for SPARK pragmas
6936 Assume and Loop_Invariant.
6938 2013-01-02 Robert Dewar <dewar@adacore.com>
6940 * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
6941 * ug_words: Add entry for Float_Check_Overflow.
6942 * usage.adb: Minor reformatting.
6943 * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
6945 2013-01-02 Vincent Celier <celier@adacore.com>
6947 * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
6948 -gnateO=, -gnatet and -gnateV.
6949 * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
6950 -gnatet and -gnateV.
6951 * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
6952 * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
6953 (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
6954 /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
6957 2013-01-02 Robert Dewar <dewar@adacore.com>
6959 * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
6960 * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
6961 * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
6962 * sem_prag.adb: Implement pragma Check_Float_Overflow.
6963 * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
6964 * switch-c.adb: Recognize -gnateF switch.
6965 * tree_io.ads: Update ASIS version number.
6966 * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
6968 2013-01-02 Robert Dewar <dewar@adacore.com>
6970 * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
6971 exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
6972 freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
6973 par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
6974 sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
6975 sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
6976 * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
6978 2013-01-02 Robert Dewar <dewar@adacore.com>
6980 * err_vars.ads: Minor comment fix.
6982 2013-01-02 Ed Schonberg <schonberg@adacore.com>
6984 * sem_ch12.adb: Refine predicate.
6986 2013-01-02 Robert Dewar <dewar@adacore.com>
6988 * errout.ads: Minor comment fixes.
6989 * opt.ads: Minor comment additions.
6990 * exp_aggr.adb: Add tags to warning messages
6991 * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
6992 sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
6993 sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
6994 sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
6995 sem_warn.adb: Add tags to warning messages
6997 2013-01-02 Doug Rupp <rupp@adacore.com>
6999 * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
7001 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7003 * sem_ch12.adb: Recover source name for renamed packagea.
7005 2013-01-02 Robert Dewar <dewar@adacore.com>
7007 * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
7008 tests to fail if insertion sequence is at end of message string.
7009 * opt.ads: Minor comment fixes and additions.
7010 * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
7011 sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
7012 * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
7013 tags. Add tags to warning messages.
7015 2013-01-02 Robert Dewar <dewar@adacore.com>
7017 * err_vars.ads (Warning_Doc_Switch): New flag.
7018 * errout.adb (Error_Msg_Internal): Implement new warning flag
7019 doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
7020 * errout.ads: Document new insertion sequences ?? ?x? ?.x?
7021 * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
7023 * erroutc.ads (Warning_Msg_Char): New variable.
7024 (Warn_Chr): New field in error message object.
7025 * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
7026 * sem_ch13.adb: Minor reformatting.
7027 * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
7028 (Warning_Doc_Switch).
7029 * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
7032 2013-01-02 Robert Dewar <dewar@adacore.com>
7034 * opt.ads: Minor reformatting.
7036 2013-01-02 Doug Rupp <rupp@adacore.com>
7038 * init.c: Reorganize VMS section.
7039 (scan_condtions): New function for scanning condition tables.
7040 (__gnat_handle_vms_condtion): Use actual exception name for imported
7041 exceptions vice IMPORTED_EXCEPTION.
7042 Move condition table scanning into separate function. Move formerly
7043 special handled conditions to system condition table. Use SYS$PUTMSG
7044 output to fill exception message field for formally special handled
7045 condtions, in particular HPARITH to provide more clues about cause and
7046 location then raised from the translated image.
7048 2013-01-02 Thomas Quinot <quinot@adacore.com>
7050 * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
7051 aspect that applies to a library subprogram, prepend corresponding
7052 pragma to the Pragmas_After list, in order for split AND THEN
7053 sections to be processed in the expected order.
7055 2013-01-02 Thomas Quinot <quinot@adacore.com>
7057 * exp_prag.adb (Expand_Pragma_Check): The statements generated
7058 for the pragma must have the sloc of the pragma, not the
7059 sloc of the condition, otherwise this creates anomalies in the
7060 generated debug information that confuse coverage analysis tools.
7062 2013-01-02 Thomas Quinot <quinot@adacore.com>
7064 * sem_ch13.adb: Minor reformatting.
7066 2013-01-02 Arnaud Charlet <charlet@adacore.com>
7068 * g-excact.ads (Core_Dump): Clarify that this subprogram does
7069 not dump cores under Windows.
7071 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7073 * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
7074 view of a subprogram has convention Intrnnsic, and a renaming
7075 of a prefixed view cannot be the prefix of an Access attribute.
7077 2013-01-02 Robert Dewar <dewar@adacore.com>
7079 * restrict.adb: Minor reformatting.
7081 2013-01-02 Thomas Quinot <quinot@adacore.com>
7083 * exp_prag.adb: Minor reformatting.
7085 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7087 * sem_ch12.adb (Get_Associated_Node): If the node is an
7088 identifier that denotes an unconstrained array in an object
7089 declaration, it is rewritten as the name of an anonymous
7090 subtype whose bounds are given by the initial expression in the
7091 declaration. When checking whether that identifier is global
7092 reference, use the original node, not the local generated subtype.
7094 2013-01-02 Olivier Hainque <hainque@adacore.com>
7096 * tracebak.c: Revert previous change, incomplete.
7098 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7100 * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
7101 appears on a subprogram body that acts as a spec, place the
7102 corresponding pragma in the declarations of the body, so that
7103 e.g. pre/postcondition checks can be generated appropriately.
7105 2013-01-02 Robert Dewar <dewar@adacore.com>
7107 * sem_ch3.adb: Minor reformatting and code reorganization.
7109 2013-01-02 Vincent Celier <celier@adacore.com>
7111 * switch-m.adb (Normalize_Compiler_Switches): Record the
7112 complete switch -fstack-check=specific instead of its shorter
7113 alias -fstack-check.
7115 2013-01-02 Ed Schonberg <schonberg@adacore.com>
7117 * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
7118 if the derived type is a tagged generic formal type with
7119 unknown discriminants, the inherited operation has convention
7120 Intrinsic. As such, the 'Access attribute cannot be applied to it.
7122 2013-01-02 Thomas Quinot <quinot@adacore.com>
7124 * sem_attr.adb: Minor reformatting.
7126 2013-01-02 Thomas Quinot <quinot@adacore.com>
7128 * par_sco.adb: Add SCO generation for S of protected types and
7129 single protected object declarations.
7131 2013-01-02 Robert Dewar <dewar@adacore.com>
7133 * sem_eval.adb, osint.ads: Minor reformatting.
7135 2013-01-02 Hristian Kirtchev <kirtchev@adacore.com>
7137 * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
7139 2013-01-02 Thomas Quinot <quinot@adacore.com>
7141 * sem_eval.adb (Compile_Time_Compare): For static operands, we
7142 can perform a compile time comparison even if in preanalysis mode.
7144 2013-01-02 Thomas Quinot <quinot@adacore.com>
7146 * par_sco.adb (SCO_Record): Always use
7147 Traverse_Declarations_Or_Statements to process the library level
7148 declaration, so that SCOs are properly generated for its aspects.
7150 2013-01-02 Thomas Quinot <quinot@adacore.com>
7152 * scos.ads (In_Decision): Add missing entry for 'a'.
7153 * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
7154 call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
7155 * sem_ch13.adb: Minor comment update.
7157 Copyright (C) 2013 Free Software Foundation, Inc.
7159 Copying and distribution of this file, with or without modification,
7160 are permitted in any medium without royalty provided the copyright
7161 notice and this notice are preserved.