1 2012-02-17 Robert Dewar <dewar@adacore.com>
3 * sem_dim.adb, sem_dim.ads, s-tasren.adb, prj.adb, prj.ads, freeze.adb,
4 sem_res.adb, exp_ch4.adb, sinput.adb, sinput.ads, exp_aggr.adb,
5 exp_intr.adb, s-os_lib.adb: Minor reformatting.
7 2012-02-17 Ed Schonberg <schonberg@adacore.com>
9 * sem_ch6.adb (Is_Non_Overriding_Operation): Add warning if the
10 old operation is abstract, the relevant type is not abstract,
11 and the new subprogram fails to override.
13 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
15 * gcc-interface/trans.c (Identifier_to_gnu): Move block retrieving the
16 type of the result to the end and execute it for a deferred constant of
17 a discriminated type whose full view can be elaborated statically.
19 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
21 * gcc-interface/trans.c (gnat_to_gnu) <N_Qualified_Expression>: If the
22 type is tagged, mark it as used for debugging purposes.
23 <N_Allocator>: Likewise for a qualified expression.
25 2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
27 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
28 return value in the by-reference return type case if this isn't the
29 expression of an object declaration. Tidy up.
31 2012-02-09 Tristan Gingold <gingold@adacore.com>
33 * gcc-interface/Makefile.in: Remove .sym rule (not used).
34 Remove adamsg.o object (requires native message compiler).
35 * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
36 macro instead of as extern int.
37 (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
38 (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
39 (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
40 (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
41 (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
42 (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
43 (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
44 (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
45 (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
46 (struct cond_except): Field cond is now an unsigned int.
47 (dec_ada_cond_except_table): Adjust.
48 (cond_except_table): Likewise.
49 (cond_resignal_table): Likewise.
50 (__gnat_default_resignal_p): Fix style.
52 2012-02-08 Vincent Celier <celier@adacore.com>
54 * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
55 (g-buorma is now imported by sinput).
57 * scn.adb (Initialize_Scanner): Call Check_For_BOM
58 * sinput-p.adb (Source_File_Is_Subunit): Call Check_For_BOM
59 * sinput.adb: New procedure Check_For_BOM
60 * sinput.ads: New procedure Check_For_BOM
62 2012-02-08 Vincent Pucci <pucci@adacore.com>
64 * impunit.adb: Dimension package names updated
65 * Makefile.rtl: s-dim added
66 * sem_dim.adb (Is_Procedure_Put_Call): minor changes
67 (Is_Dim_IO_Package_Instantiation): minor changes
68 * sem_dim.ads: minor changes in comments
69 * snames.ads-tmpl: Name_Dim added Name_Dim_Float_IO and
70 Name_Dim_Integer_IO removed
71 * s-dim.ads: New package. Define the dimension terminology.
72 * s-diflio.adb, s-diinio.adb, s-dimkio.ads, s-dimmks.ads,
73 * s-dmotpr.ads: Package names updated.
74 * s-diflio.ads, s-diinio.ads: Documentation added and package
77 2012-02-08 Gary Dismukes <dismukes@adacore.com>
79 * gcc-interface/utils2.c (build_call_alloc_dealloc_proc): Revise test
80 for storage pools to test for an underlying record type rather than
81 testing Is_Tagged_Type, so that simple storage pools will be handled
82 the same as normal Ada storage pools.
84 2012-02-08 Yannick Moy <moy@adacore.com>
86 * gnat_rm.texi: Minor reshuffling to place restriction at
89 2012-02-08 Bob Duff <duff@adacore.com>
91 * warnsw.adb (Set_Warning_Switch): Set Warn_On_Suspicious_Modulus_Value
92 False for '-gnatwA', to suppress these warnings.
94 2012-02-08 Vincent Celier <celier@adacore.com>
96 * sinput-p.adb (Source_File_Is_Subunit): Check for BOM before
97 starting to scan, so that UTF8 encoding is taken into account.
99 2012-02-08 Arnaud Charlet <charlet@adacore.com>
101 * s-tasren.adb, s-tasren.ads (Internal_Complete_Rendezvous): New
103 (Complete_Rendezvous): Now call Internal_Complete_Rendezvous.
104 (Exceptional_Complete_Rendezvous): Mark No_Return.
106 2012-02-08 Eric Botcazou <ebotcazou@adacore.com>
108 * exp_aggr.adb (Compile_Time_Known_Composite_Value):
109 New predicate to compute whether a composite value can be
110 evaluated at compile time.
111 (Component_Not_OK_For_Backend): Use Compile_Time_Known_Value for all
112 expressions of elementary type and Compile_Time_Known_Composite_Value
113 for all other expressions.
114 (Expand_Record_Aggregate): Convert to assignments in the case
115 of a type with mutable components if the aggregate cannot be
118 2012-02-08 Gary Dismukes <dismukes@adacore.com>
120 * aspects.ads (type Aspect_Id): Add Simple_Storage_Pool_Type.
121 (Impl_Defined_Aspects): Add association for
122 Aspect_Simple_Storage_Pool_Type.
124 association for Aspect_Simple_Storage_Pool_Type.
126 (Canonical_Aspect): Add association for Simple_Storage_Pool_Type.
127 * exp_attr.adb (Expand_N_Attribute_Reference):
128 Change name to Name_Simple_Storage_Pool_Type.
129 * exp_ch4.adb (Expand_N_Allocator): Change
130 name to Name_Simple_Storage_Pool_Type.
131 * exp_intr.adb (Expand_Unc_Deallocation): Change name to
132 Name_Simple_Storage_Pool_Type. * freeze.adb (Freeze_Entity):
133 Change names to Name_Simple_Storage_Pool_Type. * par-prag.adb:
134 Change names to Name_Simple_Storage_Pool_Type. * sem_attr.adb:
135 (Analyze_Attribute): Change name to Name_Simple_Storage_Pool_Type.
136 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
137 Change name to Name_Simple_Storage_Pool_Type.
139 (Analyze_Pragma): Change name to Name_Simple_Storage_Pool_Type.
140 (Sig_Flags): Change name to Name_Simple_Storage_Pool_Type.
141 * sem_res.adb (Resolve_Allocator): Change name to
142 Name_Simple_Storage_Pool_Type. * snames.ads-tmpl:
143 (Name_Simple_Storage_Pool_Type): New name constant.
144 (type Pragma_Id): Change name to Name_Simple_Storage_Pool_Type and
145 move to main pragma section because it no longer matches the
147 * snames.adb-tmpl (Get_Pragma_Id): Remove test for
148 Name_Simple_Storage_Pool.
149 (Is_Pragma_Name): Remove test for Name_Simple_Storage_Pool.
151 2012-02-08 Robert Dewar <dewar@adacore.com>
153 * gnat_ugn.texi: Add some clarification to -gnatwA and -gnatws.
155 2012-02-08 Pascal Obry <obry@adacore.com>
157 * prj.adb (Compute_All_Imported_Projects): Use new
158 For_Project_And_Aggregated_Context to ensure proper context is
159 used for encapsulated aggregate libraries.
160 * prj-proc.adb (Recursive_Process): Call
161 Process_Aggregated_Projects earlier to ensure that all dependent
162 projects are set with the proper encapsulated status.
164 2012-02-08 Pascal Obry <obry@adacore.com>
166 * s-os_lib.adb (Normalize_Arguments): Properly escape last \ in null
169 2012-02-08 Pascal Obry <obry@adacore.com>
171 * prj.ads, prj.adb (For_Project_And_Aggregated_Context): New
172 generic routine with a context parameter.
174 2012-02-08 Robert Dewar <dewar@adacore.com>
176 * a-coinve.adb, sem_util.adb, sem_ch8.adb, a-cobove.adb,
177 a-convec.adb: Minor reformatting and code reorganization.
179 2012-02-08 Steve Baird <baird@adacore.com>
181 * sem_cat.adb (In_Preelaborated_Unit): A child
182 unit instantiation does not inherit preelaboration requirements
185 2012-02-08 Gary Dismukes <dismukes@adacore.com>
187 * aspects.ads (type Aspect_Id): Add Aspect_Simple_Storage_Pool.
188 (Impl_Defined_Aspects): Add entry for Aspect_Simple_Storage_Pool.
189 (Aspect_Argument): Add Name entry for Aspect_Simple_Storage_Pool.
190 (Aspect_Names): Add entry for Aspect_Simple_Storage_Pool.
191 * aspects.adb (Canonical_Aspect): Add entry for
192 Aspect_Simple_Storage_Pool.
193 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of
194 Attribute_Simple_Storage_Pool in the same way as Storage_Pool
195 (add conversion, analyze/resolve). For the Storage_Size attribute,
196 for the simple pool case, locate and use the simple pool type's
197 Storage_Size function (if any), otherwise evaluate to zero.
198 * exp_ch4.adb (Expand_N_Allocator): In the case of an allocator
199 for an access type with an associated simple storage pool,
200 locate and use the pool type's Allocate.
201 * exp_intr.adb (Expand_Unc_Deallocation): In the case where the
202 access type has a simple storage pool, locate the pool type's
203 Deallocate procedure (if present) and use it as the procedure
204 to call on the Free operation.
205 * freeze.adb (Freeze_Entity): In the case of a full type for
206 a private type defined with pragma Simple_Storage_Pool, check
207 that the full type is also appropriate for the pragma. For
208 a simple storage pool type, validate that the operations
209 Allocate, Deallocate (if present), and Storage_Size
210 (if present) are defined with appropriate expected profiles.
211 (Validate_Simple_Pool_Op_Formal): New procedure
212 (Validate_Simple_Pool_Operation): New procedure Add with and
214 * par-prag.adb: Add Pragma_Simple_Storage_Pool to case statement
215 (no action required).
216 * sem_attr.adb (Analyze_Attribute): For the case of the
217 Storage_Pool attribute, give a warning if the prefix type has an
218 associated simple storage pool, and rewrite the attribute as a
219 raise of Program_Error. In the case of the Simple_Storage_Pool
220 attribute, check that the prefix type has an associated simple
221 storage pool, and set the attribute type to the pool's type.
222 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
223 Aspect_Simple_Storage_Pool case choice.
224 (Analyze_Attribute_Definition_Clause): Add
225 Aspect_Simple_Storage_Pool to case for Ignore_Rep_Clauses
226 (no action). Add handling for Simple_Storage_Pool attribute
227 definition, requiring the name to denote a simple storage pool
229 (Check_Aspect_At_Freeze_Point): For a simple storage pool
230 aspect, set the type to that of the name specified for the aspect.
231 * sem_prag.adb (Analyze_Pragma): Add handling for pragma
232 Simple_Storage_Pool, requiring that it applies to a library-level
233 type declared in a package declaration that is a limited private
234 or limited record type.
235 * sem_res.adb (Resolve_Allocator): Flag an attempt to call a
236 build-in-place function in an allocator for an access type with
237 a simple storage pool as unsupported.
238 * snames.ads-tmpl: Add Name_Simple_Storage_Pool.
239 (type Attribute_Id): Add Attribute_Simple_Storage_Pool.
240 (type Pragma_Id): Add Pragma_Simple_Storage_Pool.
241 * snames.adb-tmpl (Get_Pragma_Id): Handle case of
242 Name_Simple_Storage_Pool.
243 (Is_Pragma_Name): Return True for Name_Simple_Storage_Pool.
245 2012-02-08 Cyrille Comar <comar@adacore.com>
247 * projects.texi: Clarify doc for interfaces.
249 2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
251 * gcc-interface/Make-lang.in (GCC_LINKERFLAGS): New variable.
254 2012-02-01 Tristan Gingold <gingold@adacore.com>
256 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use sizetype
257 instead of size_type_node.
259 2012-01-30 Nicolas Roche <roche@adacore.com>
261 * gcc-interface/Make-lang.in: Update dependencies.
262 * gcc-interface/Makefile.in: Use system-vxworks-system-ppc-mils.ads
264 Remove Linker_Options -crtbe when building sjlj run-time.
266 2012-01-30 Robert Dewar <dewar@adacore.com>
268 * sem.adb (Analyze): Call Analyze_Mod for N_Op_Mod mode.
269 * sem_ch3.adb (Modular_Type_Declaration): Warn on mod value of
270 form 2 * small-literal.
271 * sem_ch4.adb (Analyze_Mod): New procedure (warn on suspicious
273 * sem_ch4.ads (Analyze_Mod): New procedure.
275 2012-01-30 Ed Schonberg <schonberg@adacore.com>
277 * sem_ch6.adb: sem_ch6.adb (Analyze_Expression_Function): Copy
278 types and return expression when building spec for implicit
279 body, to preserve global references that may be present in an
282 2012-01-30 Matthew Heaney <heaney@adacore.com>
284 * a-convec.adb, a-coinve.adb, a-cobove.adb (Sort,
285 Reverse_Elements): Check for cursor tampering.
287 2012-01-30 Ed Schonberg <schonberg@adacore.com>
289 * sem_util.adb (Is_Fully_Initialized_Type): In Ada 2012, a
290 type with aspect Default_Value or Default_Component_Value is
291 fully initialized, and use of variables of such types do not
294 2012-01-30 Javier Miranda <miranda@adacore.com>
297 * sem_ch8.adb (Analyze_Subprogram_Renaming):
298 Handle self-renaming when the renamed entity is referenced using
301 2012-01-30 Vincent Celier <celier@adacore.com>
303 * projects.texi: Add documentation for attribute Interfaces.
305 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
307 * exp_ch7.adb (Build_Finalizer_Call): Set loc again.
308 * exp_ch11.adb (Expand_At_End_Handler): Do not provide a source
309 location for the wrapped call to the original AT_END routine
310 and the subsequent return statement.
312 2012-01-30 Pascal Obry <obry@adacore.com>
314 * s-rannum.adb: Minor reformatting.
316 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
318 * a-calend-vms.adb, a-calend.adb: Increment the number of leap seconds
319 to 25 and add the hard time value for 2012-06-30.
321 2012-01-30 Robert Dewar <dewar@adacore.com>
323 * a-strhas.ads, einfo.adb, einfo.ads, exp_ch7.adb, exp_ch9.adb,
324 freeze.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-proc.adb, s-llflex.ads,
325 s-ransee.adb, s-ransee.ads, sem_ch13.adb, sem_dim.adb, sem_prag.adb:
326 Minor reformatting/code reorganization.
328 2012-01-30 Thomas Quinot <quinot@adacore.com>
330 * s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
331 Unsigned_64 rather than Duration.
332 (System.Random_Numbers.Reset): Use full value of seed
333 (do not truncate sub-second bits).
335 2012-01-30 Thomas Quinot <quinot@adacore.com>
337 * sem_cat.adb, sem_ch12.adb: Minor reformatting.
339 2012-01-30 Yannick Moy <moy@adacore.com>
341 * gnat_ugn.texi: Minor correction of GNAT UG, to take into
342 account changes to -gnatwa and more recent warnings.
344 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
346 * exp_ch7.adb (Build_Finalizer_Call): Do not provide a source
347 location when creating a call to a finalizer.
348 * exp_ch11.adb (Expand_Exception_Handlers): Do not provide
349 a source location for the first actual of Save_Occurrence for
352 2012-01-30 Ed Schonberg <schonberg@adacore.com>
354 * einfo.ads, einfo,adb: New attribute on scalar types:
355 Default_Aspect_Value New attribute on array types:
356 Default_Aspect_Component_Value Move attribute Related_Array_Object
357 to a different position to accomodate new aspect attributes.
358 * freeze.adb (Freeze_Entity): Use new attributes to retrieve value
359 of defaults set with an aspect specification, rather than using
360 the list of aspects attached to the type, to prevent issues with
362 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
363 Default_Value and Default_Component _Value, store corresponding
364 expression in type entity.
365 (Check_Aspect_At_End_Of_Declaration): If the default aspects
366 are declared on the full view, use the full view to resolve the
367 correseponding expression.
368 * exp_ch3.adb (Init_Component): Use attribute
369 Default_Aspect_Component_Value to perform default initialization,
370 rather than relying on the rep item list for the type.
371 (Get_Simple_Init_Val): Ditto.
373 2012-01-30 Thomas Quinot <quinot@adacore.com>
375 * a-strhas.ads: Document risk of collision attack.
377 2012-01-30 Yannick Moy <moy@adacore.com>
379 * gnat_ugn.texi: Minor update wrt warning switches.
381 2012-01-30 Vincent Celier <celier@adacore.com>
383 * prj-nmsc.adb (Check_Interfaces): Report an error when a
384 unit from Library_Interface is not a unit of the project.
386 2012-01-30 Vincent Pucci <pucci@adacore.com>
388 * sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
389 links fixed inside PPC pragmas.
390 * sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
392 2012-01-30 Thomas Quinot <quinot@adacore.com>
394 * s-ransee.ads: Minor reformatting.
396 2012-01-30 Pascal Obry <obry@adacore.com>
398 * prj.ads, prj.adb (For_Each_Source): Add support for skipping
399 sources coming from an encapsulated library.
401 2012-01-30 Ed Schonberg <schonberg@adacore.com>
403 * sem_ch3.adb (Process-Full_View): fix typo.
404 * sem_ch13.adb (Aalyze_Aspect_Specifications): if predicates
405 appear on a private type and the full view is available, ensure
406 existence of freeze node for full view.
407 (Build_Predicate_Function): Attach predicate function to both
408 views of a private type.
410 2012-01-30 Vincent Celier <celier@adacore.com>
412 * prj-nmsc.adb (Check_Interfaces): Compute the Lib_Interface_ALIs
413 for the project if either attribute Library_Interface or
414 Interfaces is declared.
415 (Check_Stand_Alone_Library): Use Lib_Interface_ALIs computed in
418 2012-01-30 Pascal Obry <obry@adacore.com>
420 * prj-proc.adb (Recursive_Process): Set From_Encapsulated_Lib
421 boolean value to true in the process list created by this routine.
422 * prj.ads (Project_List_Element): New field From_Encapsulated_Lib.
423 Continued work for KA06-021.
424 * prj.adb (Compute_All_Imported_Projects): Set
425 From_Encapsulated_Lib boolean flag.
427 2012-01-30 Vincent Pucci <pucci@adacore.com>
429 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor
431 * s-diflio.ads: Minor change.
433 2012-01-30 Javier Miranda <miranda@adacore.com>
435 * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call
436 to Get_Entry_Index. Required to generate code which provides
437 the correct value of Entry_Index in the target entry.
439 2012-01-30 Nicolas Roche <roche@adacore.com>
441 * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to
442 fix issue with zcx on VxWorks5.
444 2012-01-30 Pascal Obry <obry@adacore.com>
446 * prj.ads, prj.adb (For_Every_Project_Imported): Remove
448 (For_Every_Project_Imported_Context): New generic routine with
450 * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid
451 distributed complexity.
452 * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto.
454 2012-01-30 Thomas Quinot <quinot@adacore.com>
456 * exp_aggr.adb (Expand_Record_Aggregate): After creating the
457 _parent aggregate for an extension aggregate, check whether it
458 requires delayed (top-down) expansion.
460 2012-01-30 Vincent Pucci <pucci@adacore.com>
462 * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
463 * snames.ads-tmpl: Name_Item and Name_Symbols added.
464 * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
465 and change the position of parameter Symbols in every Put routine.
466 * s-dimmks.ads: Convert long float type Mks_Type into long
468 * s-llflex.ads: Modifications in comments.
470 2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
472 * sem_ch12.adb (Earlier): Do not use the
473 top level source locations of the two input nodes.
475 2012-01-30 Robert Dewar <dewar@adacore.com>
477 * einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
478 sem_cat.adb, sem_aggr.adb, exp_aggr.adb: Minor reformatting.
480 2012-01-30 Robert Dewar <dewar@adacore.com>
482 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
484 2012-01-30 Olivier Hainque <hainque@adacore.com>
486 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Add rule for r1 back +
489 2012-01-30 Thomas Quinot <quinot@adacore.com>
491 * gnat_rm.texi, sem_dist.adb, sem_dist.ads, einfo.ads, sem_prag.adb,
492 sem_ch12.adb, sem_attr.adb, aspects.adb, aspects.ads, par-prag.adb,
493 sem_cat.adb, snames.ads-tmpl (Sem_Dist.Is_Valid_Remote_Object_Type):
494 New subprogram (extracted from
495 Sem_Cat.Validate_Remote_Access_Object_Type_Declaration).
496 (Einfo.Is_Remote_Types): Now applies to generic types. Update
497 documentation accordingly.
498 (Sem_Ch12.Analyze_Associations): A RACW type is acceptable as
499 actual for a formal type to which a pragma Remote_Access_Type
501 (Aspects, Par.Prag, Sem_Prag): Support for new pramga/aspect
503 (Sem_Attr.Analyze_Attribute, case Stub_Type): Attribute can
504 be applied to a generic type if pragma Remote_Access_Type
505 applies, in which case the type of the attribute is
506 System.Partition_Interface.RACW_Stub_Type.
508 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
510 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
511 an alignment on fields of the RETURN type built for the CICO mechanism.
513 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
515 * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
516 a call to a function that returns an unconstrained type with default
517 discriminant. Similarly, avoid doing the conversion to the nominal
518 result type in this case.
520 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
522 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
523 * gcc-interface/decl.c (is_variable_size): Rename to...
524 (type_has_variable_size): ...this.
525 (adjust_packed): Adjust to above renaming.
526 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
527 (field_is_artificial): New predicate.
528 (field_is_aliased): Likewise.
529 (field_has_self_size): Likewise.
530 (field_has_variable_size): Likewise.
531 (components_to_record): Record information for the final layout during
532 the first pass on fields.
533 If there is an aliased field placed after a field whose length depends
534 on discriminants, put all the fields of the latter sort, last.
536 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
538 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
539 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
540 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
541 Access-like attribute in a dispatch table if the subprogram is public.
543 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
545 * gcc-interface/gigi.h (create_label_decl): Adjust.
546 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
547 and invoke gnat_pushdecl on it. Remove obsolete settings.
548 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
550 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
551 label for debugging purposes.
553 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
555 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
556 object with an unconstrained nominal subtype and if optimization isn't
557 enabled, create a special VAR_DECL for debugging purposes.
559 2012-01-23 Robert Dewar <dewar@adacore.com>
561 * sem_prag.ads, sem_prag.adb: Minor reformatting.
563 2012-01-23 Robert Dewar <dewar@adacore.com>
565 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
566 language defined aspect applied to renaming or formal type
567 declaration (not permitted)
569 2012-01-23 Matthew Heaney <heaney@adacore.com>
571 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
572 comment with pragma Assert.
574 2012-01-23 Vincent Pucci <pucci@adacore.com>
576 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
577 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
578 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
579 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
580 subprogram declaration in order to enable the analysis of PPC boolean
583 2012-01-23 Robert Dewar <dewar@adacore.com>
585 * sem_ch3.adb (Analyze_Object_Declaration): Properly
586 handle Current_Value for volatile variables (also propagate
587 Treat_As_Volatile from type to object).
589 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
591 * sem_ch12.adb (Install_Body): Detect the case
592 where the enclosing context is a package with a stub body that
593 has already been replaced by the actual body. In such cases,
594 the freeze node for the enclosing context must be inserted after
597 2012-01-23 Ed Schonberg <schonberg@adacore.com>
599 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
600 subprogram before expanding the pragma into an if-statement with
601 a block, to ensure that when the subprogram is null its body is
602 properly generated before expansion.
604 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
606 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
607 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
609 Freeze all eligible subprograms which appear as actuals in
611 (Has_Fully_Defined_Profile): New routine.
612 (Renames_Standard_Subprogram): New routine.
613 (Earlier): Add local variable N. Comment update. Do not use source
614 locations when trying to determine whether one node precedes another.
616 2012-01-23 Gary Dismukes <dismukes@adacore.com>
618 * exp_ch4.adb (Expand_Concatenate): In the case
619 where the result of a concatentation can be null, set the to
620 result have both the low and high bounds of the right operand (not
621 just the high bound, as was the case prior to this fix). Also,
622 fix the saved high bound setting (Last_Opnd_High_Bound) in the
623 empty string literal case (should have been low bound minus one,
624 rather than plus one).
626 2012-01-23 Thomas Quinot <quinot@adacore.com>
628 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
629 omit statement SCOs for disabled pragmas.
631 2012-01-23 Matthew Heaney <heaney@adacore.com>
633 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
634 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
635 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
636 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
637 Cursor'Write): Declare in private part.
638 (Reference_Type'Read, Reference_Type'Write): Ditto.
639 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
641 2012-01-23 Robert Dewar <dewar@adacore.com>
643 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
646 2012-01-23 Ed Schonberg <schonberg@adacore.com>
648 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
649 Corresponding_Body on a defaulted null formal subprogram.
650 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
651 on a defaulted formal subprogram that is a null procedure.
653 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
655 * exp_ch9.adb: Update the comments involving pragma Implemented.
656 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
657 constant Subp_Alias and local variable Impl_Subp. Properly
658 handle aliases of synchronized wrappers. Code cleanup.
659 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
660 Name_Optional as part of the condition.
661 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
662 valid choices of implementation kind.
663 (Check_Arg_Is_One_Of): New routine.
664 * snames.ads-tmlp: Add Name_Optional.
666 2012-01-23 Ed Schonberg <schonberg@adacore.com>
668 * par-ch13.adb: Better error recovery in illegal aspect
671 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
673 * a-calend.adb: Add with clause for Interfaces.C. Add constant
675 (Day_Of_Week): Call the internal UTC_Time_Offset.
676 (Split): Call the internal UTC_Time_Offset.
677 (Time_Of): Call the internal UTC_Time_Offset.
678 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
679 (UTC_Time_Offset): New library-level routine.
680 * a-calend.ads (UTC_Time_Offset): Remove parameter
681 Is_Historic. Update related comment on usage.
682 * a-catizo.adb (UTC_Time_Offset): Removed.
683 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
684 * a-caltizo.ads (UTC_Time_Offset): Removed.
685 (UTC_Time_Offset (Time)): Add back the default expression of parameter
688 2012-01-23 Robert Dewar <dewar@adacore.com>
690 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
691 (pg,po,ps): Make sure each entry starts on new line.
693 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
695 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
696 the parameter profile of procedure localtime_tzoff and its associated
698 (Day_Of_Week): Do not treat the input date as historical
699 with respect to time zones.
700 (Split): Do not treat the input
701 date as historical with respect to time zones. (Time_Of): Do
702 not treat the input constituents as forming a historical date
703 with respect to time zones.
704 (UTC_Time_Offset): Add new formal
705 parameter Is_Historic. Add local variable Flag. Update the call
707 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
708 (UTC_Time_Offset (Time)): Update the call to
709 Time_Zone_Operations.UTC_Time_Offset.
710 * sysdep.c (__gnat_localtime_tzoff): Update parameter
711 profile. Split the processing of offsets on Windows into two - one
712 part of historic time stamps and the other for the current time.
714 2012-01-23 Robert Dewar <dewar@adacore.com>
716 * a-calend.adb: Minor reformatting.
718 2012-01-23 Ed Schonberg <schonberg@adacore.com>
720 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
721 interface in requeue statement.
723 2012-01-23 Cyrille Comar <comar@adacore.com>
725 * projects.texi: Remove references to main units and replace
726 with references to main programs to be coherent with the
729 2012-01-23 Robert Dewar <dewar@adacore.com>
731 * s-utf_32.adb: Minor reformatting.
733 2012-01-23 Vincent Celier <celier@adacore.com>
735 * snames.ads-tmpl: Minor comment addition Indicate that
736 Name_Library_Encapsulated_Options is only used in gprbuild.
738 2012-01-23 Robert Dewar <dewar@adacore.com>
740 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
743 2012-01-23 Ed Schonberg <schonberg@adacore.com>
745 * snames.ads-tmpl: Add Name_Synchronization.
746 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
747 enumeration type and related maps.
748 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
749 Synchronization, build corresponding pragma Implemented.
750 * sem_util.adb (Implementation_Kind): Handle both explicit and
751 implicit pragma_argument association to retrieve the given
752 synchronization mode.
754 2012-01-23 Robert Dewar <dewar@adacore.com>
756 * sem_ch10.adb, errout.adb: Minor reformatting.
758 2012-01-23 Ed Schonberg <schonberg@adacore.com>
760 * sem_res.adb (Resolve_Actuals): An actual in a call to an
761 Ada 2012 Reference function does not lead to a dangerous order
764 2012-01-23 Gary Dismukes <dismukes@adacore.com>
766 * exp_util.adb (Is_Iterated_Container): Test
767 Is_Entity_Name when searching for calls to the default iterator,
768 to avoid blowing up on indirect calls which have an explicit
769 dereference as the call name.
771 2012-01-23 Thomas Quinot <quinot@adacore.com>
773 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
774 the complete expanded name, rather than just its Selector_Name.
776 2012-01-23 Thomas Quinot <quinot@adacore.com>
778 * a-textio.adb (Put): Rewrite one-parameter Character version to
779 just call the two-parameter one with Current_Out.
781 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
783 * freeze.adb (Check_Current_Instance): Issue an
784 error when the prefix of 'Unchecked_Access or 'Access does not
785 denote a legal aliased view of a type.
786 (Freeze_Record_Type): Do not halt the processing of record components
787 once the Has_Controlled_Component is set as this bypasses the remaining
789 (Is_Aliased_View_Of_Type): New routine.
791 2012-01-23 Thomas Quinot <quinot@adacore.com>
793 * errout.ads, freeze.adb: Minor reformatting.
795 2012-01-23 Thomas Quinot <quinot@adacore.com>
797 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
800 2012-01-23 Olivier Hainque <hainque@adacore.com>
802 * adadecode.c (__gnat_decode): Deal with empty input early,
803 preventing potential erroneous memory access later on.
805 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
808 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
809 renaming, preserve the volatileness through the indirection, if any.
811 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
813 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
816 2012-01-10 Pascal Obry <obry@adacore.com>
818 * prj-nmsc.adb (Check_Library_Attributes):
819 Kill check for object/source directories for aggregate libraries.
821 2012-01-10 Matthew Heaney <heaney@adacore.com>
823 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
824 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
825 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
826 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
827 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
828 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
829 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
830 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
831 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
832 container parameter as aliased in/in out.
835 2012-01-10 Bob Duff <duff@adacore.com>
837 * s-os_lib.ads: Improve comment.
839 2012-01-10 Geert Bosch <bosch@adacore.com>
841 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
844 2012-01-10 Bob Duff <duff@adacore.com>
846 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
847 checking that the 'Size is correct. If the type is "mod 2**12",
848 for example, it's illegal, but Esize is the 'Object_Size, which
849 will be something like 16 or 32, so the error ('Size = 12) was
851 * gnat_rm.texi: Improve documentation of shift
852 and rotate intrinsics.
854 2012-01-10 Pascal Obry <obry@adacore.com>
856 * prj.adb (For_Every_Project_Imported): Fix
857 implementation to make sure we return each project only once
858 for aggragte libraries. It is fine to return a project twice for
859 aggregate projects, this was the case as a Project_Id is different
860 in each project tree. The new implementation use a table based on
861 the project name to ensure proper detection of duplicate project
862 in aggregate library. A new context is then created to continue
863 retrurning duplicate project for aggregate libraries.
865 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
867 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
868 return value in the variable-sized return type case if the target is
869 an array with fixed size. However, do not create it if this is the
870 expression of an object declaration.
872 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
874 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
876 2012-01-06 Robert Dewar <dewar@adacore.com>
878 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
879 s-utf_32.ads: Add pragma Pure
880 * s-utf_32.adb: Suppress warnings on non-static constants (now
883 2012-01-06 Bob Duff <duff@adacore.com>
885 * s-rpc.ads (Read, Write): Add overriding indicators.
887 2012-01-06 Robert Dewar <dewar@adacore.com>
889 * gnat_rm.texi: Add documentation for conventions
890 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
892 2012-01-06 Gary Dismukes <dismukes@adacore.com>
894 * a-tienio.adb (Put): Add exception message on
895 raise statements. Remove unneeded blocks and object declarations.
897 2012-01-06 Robert Dewar <dewar@adacore.com>
899 * sem_prag.adb: Minor reformatting.
901 2012-01-06 Ed Schonberg <schonberg@adacore.com>
903 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
904 that a selected component within a generic unit has been resolved
905 as a prefixed call with local references.
906 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
907 component is always visible.
908 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
909 prefixed call in an instance, do not look for visible components
911 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
912 to a prefixed call, mark the node accordingly when prefix and
913 selector are local references.
915 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
917 * gnatvsn.ads (Current_Year): Bump to 2012.
919 Copyright (C) 2012 Free Software Foundation, Inc.
921 Copying and distribution of this file, with or without modification,
922 are permitted in any medium without royalty provided the copyright
923 notice and this notice are preserved.