]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/ChangeLog
gnatcmd.adb, [...] (Shared_Project_Tree_Data): new type An aggregate project and...
[thirdparty/gcc.git] / gcc / ada / ChangeLog
1 2011-08-03 Emmanuel Briot <briot@adacore.com>
2
3 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6 prj-env.ads (Shared_Project_Tree_Data): new type
7 An aggregate project and its aggregated trees need to share the common
8 data structures used for lists of strings, packages,... This makes the
9 code simpler since otherwise we have to pass the root tree (also used
10 for the configuration file data) in addition to the current project
11 tree. This also avoids ambiguities as to which tree should be used.
12 And finally this saves a bit of memory.
13 (For_Every_Project_Imported): new parameter Tree.
14 Since aggregated projects are using a different tree, we need to let
15 the caller know which tree to use to manipulate the returned project.
16
17 2011-08-03 Robert Dewar <dewar@adacore.com>
18
19 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
20 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
21 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
22 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
23
24 2011-08-03 Javier Miranda <miranda@adacore.com>
25
26 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
27 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
28
29 2011-08-03 Bob Duff <duff@adacore.com>
30
31 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
32 the Base_Type.
33
34 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
35
36 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
37 g-sehash.ads: Fix typo. Update header.
38
39 2011-08-03 Thomas Quinot <quinot@adacore.com>
40
41 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
42 expansion.
43
44 2011-08-03 Gary Dismukes <dismukes@adacore.com>
45
46 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
47 prefixes of private types along with records, since the selector may be
48 a discriminant.
49 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
50 private types along with records, since the selector may be a
51 discriminant.
52
53 2011-08-03 Emmanuel Briot <briot@adacore.com>
54
55 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
56
57 2011-08-03 Javier Miranda <miranda@adacore.com>
58
59 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
60 Tagged_Type_Expansion.
61
62 2011-08-03 Yannick Moy <moy@adacore.com>
63
64 * sem_res.adb
65 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
66 concatenation is the name of a constant
67
68 2011-08-03 Emmanuel Briot <briot@adacore.com>
69
70 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
71 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
72 (Process_Declarative_Items): new parameter Child_Env.
73
74 2011-08-03 Yannick Moy <moy@adacore.com>
75
76 * alfa.ads Update format of ALFA section in ALI file in order to add a
77 mapping from bodies to specs when both are present
78 (ALFA_Scope_Record): add components for spec file/scope
79 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
80 * lib-xref-alfa.adb
81 (Collect_ALFA): after all scopes have been collected, fill in the spec
82 information when relevant
83 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
84 present.
85
86 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
87
88 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
89 code unit to decide whether to add internally generated subprograms.
90
91 2011-08-03 Javier Miranda <miranda@adacore.com>
92
93 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
94 * exp_ch9.adb
95 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
96 in VM targets.
97
98 2011-08-03 Emmanuel Briot <briot@adacore.com>
99
100 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
101 code with Makeutl.Get_Switches.
102 * prj-tree.adb: Update comment.
103
104 2011-08-03 Thomas Quinot <quinot@adacore.com>
105
106 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
107 subprogram with a limited formal that does not support external
108 streaming.
109
110 2011-08-03 Yannick Moy <moy@adacore.com>
111
112 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
113 continuation line
114 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
115 not from current unit in two phases, because it is not possible to
116 change the table while iterating over its content.
117 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
118
119 2011-08-03 Sergey Rybin <rybin@adacore.com>
120
121 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
122 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
123
124 2011-08-03 Ed Schonberg <schonberg@adacore.com>
125
126 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
127 and the component type is composite, this is ambiguous for predefined
128 concatenation, but if the node is not overloaded and the entity is a use
129 -defined function its profile can be used to resolve that aggregate.
130
131 2011-08-03 Robert Dewar <dewar@adacore.com>
132
133 * exp_ch4.adb: Minor code cleanup.
134
135 2011-08-03 Thomas Quinot <quinot@adacore.com>
136
137 * exp_dist.adb: Do not generate distribution stubs if serious errors
138 have been diagnosed.
139
140 2011-08-03 Ed Schonberg <schonberg@adacore.com>
141
142 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
143 the first formal of a primitive operation, go to the base type to
144 handle properly an access to a derived type with constrained
145 discriminants.
146 * sem_type.adb (Disambiguate): an immediately visible operator hides a
147 user-defined function that is only use-visible.
148
149 2011-08-03 Robert Dewar <dewar@adacore.com>
150
151 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
152 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
153 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
154 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
155 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
156 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
157 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
158 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
159
160 2011-08-03 Robert Dewar <dewar@adacore.com>
161
162 * repinfo.adb (List_Mechanism): Add handling of
163 Convention_Ada_Pass_By_XXX.
164 * sem_mech.adb (Set_Mechanism): Ditto.
165 * sem_prag.adb (Process_Convention): Add entries for
166 Convention_Ada_Pass_By_XXX.
167 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
168
169 2011-08-03 Pascal Obry <obry@adacore.com>
170
171 * makeutl.adb: Minor reformatting.
172
173 2011-08-03 Vincent Celier <celier@adacore.com>
174
175 * fname-uf.adb
176 (Get_File_Name) If the file cannot be found when there are no config
177 pragmas file and May_Fail is True, return No_File instead of the file
178 name, to be consistent.
179
180 2011-08-03 Pascal Obry <obry@adacore.com>
181
182 * adaint.c (__gnat_is_executable_file_attr): Avoid access
183 to null pointer.
184
185 2011-08-03 Javier Miranda <miranda@adacore.com>
186
187 * sem_ch13.adb
188 (Same_Representation): In VM targets the representation of arrays with
189 aliased components differs from arrays with non-aliased components.
190
191 2011-08-03 Emmanuel Briot <briot@adacore.com>
192
193 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
194 not systematically lower case attribute indexes that contain no "."
195 Fix definition of several Naming attributes, which take
196 a unit name as index and therefore should be case insensitive.
197 Minor refactoring (reduce length of variable names).
198
199 2011-08-03 Emmanuel Briot <briot@adacore.com>
200
201 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
202
203 2011-08-03 Emmanuel Briot <briot@adacore.com>
204
205 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
206 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
207 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
208 prj-tree.ads (Prj.Tree.Environment): new type.
209
210 2011-08-03 Emmanuel Briot <briot@adacore.com>
211
212 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
213 prj-tree.adb, prj-tree.ads (Environment): new type.
214
215 2011-08-03 Emmanuel Briot <briot@adacore.com>
216
217 * prj-tree.ads: Remove unused variable.
218
219 2011-08-03 Yannick Moy <moy@adacore.com>
220
221 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
222 issuing messages related to SPARK restriction violation.
223
224 2011-08-03 Ed Schonberg <schonberg@adacore.com>
225
226 * sem_ch6.adb: guard against error nodes in return statements.
227
228 2011-08-03 Arnaud Charlet <charlet@adacore.com>
229
230 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
231 a warning can only appear on a configuration file, so emit warning
232 without further checks.
233
234 2011-08-03 Arnaud Charlet <charlet@adacore.com>
235
236 * s-interr.ads: add overriding keyword.
237
238 2011-08-03 Geert Bosch <bosch@adacore.com>
239
240 * exp_attr.adb: Fix minor typo.
241
242 2011-08-03 Ed Schonberg <schonberg@adacore.com>
243
244 * par-ch4.adb: improve error recovery.
245
246 2011-08-03 Emmanuel Briot <briot@adacore.com>
247
248 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
249 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
250 to Errout_Handling.
251
252 2011-08-03 Emmanuel Briot <briot@adacore.com>
253
254 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
255 "external" as an attribute name in aggregate projects.
256
257 2011-08-03 Jose Ruiz <ruiz@adacore.com>
258
259 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
260 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
261 from 0, so we need to adjust.
262
263 2011-08-03 Emmanuel Briot <briot@adacore.com>
264
265 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
266 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
267
268 2011-08-03 Yannick Moy <moy@adacore.com>
269
270 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
271 restriction on overloaded entity if the entity is not an operator.
272
273 2011-08-03 Yannick Moy <moy@adacore.com>
274
275 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
276 restrict.ads: Rename remaining Check_Formal_Restriction* into
277 Check_SPARK_Restriction*.
278
279 2011-08-03 Emmanuel Briot <briot@adacore.com>
280
281 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
282 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
283 qualifier.
284 (Project_Empty): removed
285 (Empty_Project): new parameter Qualifier
286 This is used to have fields specific to aggregate projects, cleaner
287 New field to store the list of aggregated projects.
288 (Check_Aggregate_Project): removed
289 (Process_Aggregated_Projects, Free): new subprograms.
290
291 2011-08-03 Olivier Hainque <hainque@adacore.com>
292
293 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
294
295 2011-08-03 Ed Schonberg <schonberg@adacore.com>
296
297 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
298 explicit dereference of an unconstrained type, create a constrained
299 subtype for it, as is done for function calls that return an
300 unconstrained type.
301
302 2011-08-03 Thomas Quinot <quinot@adacore.com>
303
304 * g-pehage.adb (Finalize): Avoid possible double-free.
305
306 2011-08-03 Steve Baird <baird@adacore.com>
307
308 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
309 Elab_Spec/Body attrs in CodePeer_Mode.
310
311 2011-08-03 Javier Miranda <miranda@adacore.com>
312
313 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
314 low bound is not known at compile time but they have no others choice.
315 Done because in this case the bounds can be obtained directly from the
316 aggregate.
317
318 2011-08-03 Ed Falis <falis@adacore.com>
319
320 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
321 on VxWorks SMP. Remove unusable constant ANY_CPU.
322
323 2011-08-03 Emmanuel Briot <briot@adacore.com>
324
325 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
326 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
327 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
328 Prj.Env.Initialize_Empty): new subprograms
329 (Get_Env, Find_Project): remove parameter Target_Name.
330
331 2011-08-03 Gary Dismukes <dismukes@adacore.com>
332
333 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
334 as a condition for the delayed call to Derived_Subprograms done for the
335 case of the rewriting of a derived type that constrains the
336 discriminants of its parent type.
337 Avoids redundant subprogram derivations for private subtype derivations.
338
339 2011-08-03 Javier Miranda <miranda@adacore.com>
340
341 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
342 Build_Record_Aggr_Code.
343 (Build_Record_Aggr_Code): Add missing support to initialize hidden
344 discriminants in extension aggregates.
345
346 2011-08-03 Emmanuel Briot <briot@adacore.com>
347
348 * prj-pp.adb (Print): also output project qualifiers, since in
349 particular "aggregate" is mandatory in an aggregate project.
350
351 2011-08-03 Emmanuel Briot <briot@adacore.com>
352
353 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
354 (Debug_Output): new function.
355
356 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
357
358 * gnat_ugn.texi: Document -Wstack-usage.
359 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
360
361 2011-08-03 Thomas Quinot <quinot@adacore.com>
362
363 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
364 have keyword LIMITED.
365
366 2011-08-03 Yannick Moy <moy@adacore.com>
367
368 * alfa.adb, alfa.ads, alfa_test.adb: New files.
369 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
370 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
371 section (does not happen in compiler, only if code directly calls
372 Scan_ALI).
373 * get_alfa.adb, get_alfa.ads: New files.
374 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
375 needed.
376 * lib-xref-alfa.adb: New file.
377 * lib-xref.adb, lib-xref.ads
378 (Xref_Entry): redefine information needed in cross-references for ALFA.
379 Push ALFA treatments in separated local package.
380 (Enclosing_Subpragram_Or_Package): treat specially subprogram
381 identifiers. Return entity of package body instead of spec. Return
382 Empty for a scope with no location.
383 (Generate_Reference): adapt to new components for ALFA information.
384 Remove the need for D references on definitions.
385 (Is_Local_Reference): moved to ALFA local package
386 (Output_References): extract subfunction as Extract_Source_Name
387 (Output_Local_References): remove procedure, replaced by filtering of
388 cross-references in package ALFA and printing in Put_ALFA.
389 (Write_Entity_Name): remove procedure
390 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
391 print exact name of entity as it appears in source file
392 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
393 * put_alfa.adb, put_alfa.ads: New files.
394 * xref_lib.adb (Search_Xref): protect read of cross-references against
395 reading other sections of the ALI file, in gnatxref
396 (Search): protect read of cross-references against reading other
397 sections of the ALI file, in gnatfind.
398 * gcc-interface/Make-lang.in: Update dependencies.
399
400 2011-08-03 Thomas Quinot <quinot@adacore.com>
401
402 * sem_ch3.adb: Minor reformatting.
403
404 2011-08-03 Jose Ruiz <ruiz@adacore.com>
405
406 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
407 raising an exception.
408
409 2011-08-03 Ed Schonberg <schonberg@adacore.com>
410
411 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
412 type, always use 1 as the lower bound or string, even if lower bound of
413 context is not static, to handle properly null strings in a non-static
414 context.
415
416 2011-08-03 Bob Duff <duff@adacore.com>
417
418 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
419 always legal on the right-hand side of an assignment statement; there
420 is always an applicable index constraint in this case. Therefore, the
421 check for Pkind = N_Assignment_Statement is now unconditional -- it
422 doesn't depend on whether Is_Constrained (Typ).
423
424 2011-08-03 Robert Dewar <dewar@adacore.com>
425
426 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
427
428 2011-08-03 Ed Schonberg <schonberg@adacore.com>
429
430 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
431 for an itype created within a generic unit.
432
433 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
434
435 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
436 suppresses all inlining.
437
438 2011-08-03 Robert Dewar <dewar@adacore.com>
439
440 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
441 exp_aggr.adb: Minor reformatting.
442
443 2011-08-03 Thomas Quinot <quinot@adacore.com>
444
445 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
446 tagged assignment when discriminant checks are suppressed. This is
447 useless and extremely costly in terms of static stack usage.
448
449 2011-08-03 Bob Duff <duff@adacore.com>
450
451 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
452 of generics, because this leads to the wrong entity in the wrong scope,
453 causing (e.g.) pragma Export_Procedure to get an error if the entity is
454 an instance.
455 (Process_Interface_Name): Follow Alias for instances of generics, to
456 correct for the above change.
457
458 2011-08-03 Ed Schonberg <schonberg@adacore.com>
459
460 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
461 is an integer literal it is always safe to replace the reference. In
462 addition, if the reference appears in the generated code for an object
463 declaration it is necessary to copy because otherwise the reference
464 might be to the uninitilized value of the discriminant of the object
465 itself.
466
467 2011-08-03 Pascal Obry <obry@adacore.com>
468
469 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
470 ACL used, in this case we want to check for ending .exe, not .exe
471 anywhere in the path.
472
473 2011-08-03 Sergey Rybin <rybin@adacore.com>
474
475 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
476 the tree structure (semantic decoration of references to record
477 discriminants).
478
479 2011-08-03 Gary Dismukes <dismukes@adacore.com>
480
481 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
482 choices of a named array aggregate, bail out when any choices are
483 marked as Errors_Posted.
484
485 2011-08-03 Ed Schonberg <schonberg@adacore.com>
486
487 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
488 in which entity is frozen, to handle properly loop variables in
489 iterators.
490
491 2011-08-03 Ed Schonberg <schonberg@adacore.com>
492
493 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
494 subtype is not static, compute the upper bound using attributes, to
495 handle properly index types that are not integer types.
496
497 2011-08-03 Bob Duff <duff@adacore.com>
498
499 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
500 Update copyright notice.
501
502 2011-08-03 Ed Schonberg <schonberg@adacore.com>
503
504 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
505 Original_Discriminant if within an instance.
506 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
507
508 2011-08-03 Thomas Quinot <quinot@adacore.com>
509
510 * einfo.ads: Minor reformatting.
511
512 2011-08-03 Ed Schonberg <schonberg@adacore.com>
513
514 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
515 composite type with an unfrozen subcomponent, in the profile of a
516 primitive operation.
517
518 2011-08-03 Robert Dewar <dewar@adacore.com>
519
520 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
521
522 2011-08-03 Ed Schonberg <schonberg@adacore.com>
523
524 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
525 unconstrained type with discriminants is initialized with an aggregate,
526 use the constrained subtype of the aggregate as the type of the object,
527 because it is immutable, and this allows the back-end to generate no
528 code for the object declaration.
529
530 2011-08-03 Robert Dewar <dewar@adacore.com>
531
532 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
533 comparison operand is variable, and turns out to be zero or negative.
534
535 2011-08-03 Javier Miranda <miranda@adacore.com>
536
537 * exp_intr.adb
538 (Expand_Dispatching_Constructor_Call): Disable expansion of
539 code required for native targets. Done to avoid generating
540 references to unavailable runtime entities in VM targets.
541 * exp_ch3.adb
542 (Expand_N_Object_Declaration): Add missing support to handle
543 the explicit initialization of class-wide interface objects.
544 Fix documentation.
545
546 2011-08-03 Matthew Heaney <heaney@adacore.com>
547
548 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
549
550 2011-08-03 Matthew Heaney <heaney@adacore.com>
551
552 * a-cbdlli.adb (Splice): move source items from first to last
553
554 2011-08-03 Yannick Moy <moy@adacore.com>
555
556 * sem_util.ads: comment added.
557
558 2011-08-03 Javier Miranda <miranda@adacore.com>
559
560 * exp_aggr.adb
561 (Expand_Record_Aggregate): In VM targets disable the expansion into
562 assignments of aggregates whose type is not known at compile time.
563
564 2011-08-03 Ed Schonberg <schonberg@adacore.com>
565
566 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
567 protected entries and task entries, to build the proper renaming
568 declaration for entry formals, used in debugging.
569 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
570 parameters in the same way.
571
572 2011-08-02 Robert Dewar <dewar@adacore.com>
573
574 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
575 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
576 code reorganization.
577
578 2011-08-02 Robert Dewar <dewar@adacore.com>
579
580 * debug.adb: Debug flag d.P to suppress length comparison optimization
581 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
582 comparison of Length by comparing First/Last instead.
583
584 2011-08-02 Matthew Heaney <heaney@adacore.com>
585
586 * a-cobove.ads: Code clean up.
587
588 2011-08-02 Vincent Celier <celier@adacore.com>
589
590 * adaint.c (file_names_case_sensitive_cache): New static int.
591 (__gnat_get_file_names_case_sensitive): Cache the return value in
592 file_names_case_sensitive_cache at the first invocation, to avoid
593 multiple calls to getenv.
594
595 2011-08-02 Bob Duff <duff@adacore.com>
596
597 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
598
599 2011-08-02 Yannick Moy <moy@adacore.com>
600
601 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
602 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
603 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
604 indicate that we are in a precondition or postcondition. This is used in
605 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
606 decide whether to flag the spec or body of the current subprogram as
607 not in ALFA.
608
609 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
610
611 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
612 list.
613 * a-extiin.ads: New file.
614
615 2011-08-02 Bob Duff <duff@adacore.com>
616
617 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
618 now raises Name_Error instead of Use_Error in certain cases. The other
619 parts of this AI were already implemented properly.
620
621 2011-08-02 Vincent Celier <celier@adacore.com>
622
623 * link.c: Only import "auto-host.h" when building the gnattools.
624
625 2011-08-02 Yannick Moy <moy@adacore.com>
626
627 * sem_util.adb: Inter-unit inlining does not work for a subprogram
628 which calls a local subprogram, so extract subprogram
629 from Mark_Non_ALFA_Subprogram_Body.
630
631 2011-08-02 Javier Miranda <miranda@adacore.com>
632
633 * exp_ch9.adb
634 (Extract_Dispatching_Call): If the type of the dispatching object is an
635 access type then return an explicit dereference in the Object out-mode
636 parameter.
637
638 2011-08-02 Gary Dismukes <dismukes@adacore.com>
639
640 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
641 compatibility checks for all indexes of an array subtype, not just the
642 first. Reset Has_Dynamic_Range_Check on the subtype before each
643 potential check to ensure that Insert_Range_Checks will not elide any
644 of the dynamic checks.
645
646 2011-08-02 Yannick Moy <moy@adacore.com>
647
648 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
649 SPARK restriction at parsing time.
650 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
651 directive only if the SPARK restriction is set for this unit.
652
653 2011-08-02 Yannick Moy <moy@adacore.com>
654
655 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
656 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
657 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
658 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
659 Mark_Non_ALFA_Subprogram_Body.
660 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
661 inlined.
662
663 2011-08-02 Yannick Moy <moy@adacore.com>
664
665 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
666 might be costly.
667
668 2011-08-02 Robert Dewar <dewar@adacore.com>
669
670 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
671 exp_ch3.adb: Minor reformatting.
672
673 2011-08-02 Emmanuel Briot <briot@adacore.com>
674
675 * adaint.c (__gnat_locate_exec_on_path): only returns executable
676 files, not any regular file.
677 (__gnat_locate_file_with_predicate): new subprogram.
678
679 2011-08-02 Yannick Moy <moy@adacore.com>
680
681 * sinfo.adb, sinfo.ads: Restrict the use of flags
682 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
683 nodes, plus N_Subtype_Declaration for the 2nd one.
684
685 2011-08-02 Sergey Rybin <rybin@adacore.com>
686
687 * gnat_rm.texi: Ramification of pragma Eliminate documentation
688 - fix bugs in the description of Source_Trace;
689 - get rid of UNIT_NAME;
690
691 2011-08-02 Javier Miranda <miranda@adacore.com>
692
693 * exp_ch9.adb
694 (Build_Dispatching_Requeue): Adding support for VM targets
695 since we cannot directly reference the Tag entity.
696 * exp_sel.adb (Build_K): Adding support for VM targets.
697 (Build_S_Assignment): Adding support for VM targets.
698 * exp_disp.adb
699 (Default_Prim_Op_Position): In VM targets do not restrict availability
700 of predefined interface primitives to compiling in Ada 2005 mode.
701 (Is_Predefined_Interface_Primitive): In VM targets this service is not
702 restricted to compiling in Ada 2005 mode.
703 (Make_VM_TSD): Generate code that declares and initializes the OSD
704 record. Needed to support dispatching calls through synchronized
705 interfaces.
706 * exp_ch3.adb
707 (Make_Predefined_Primitive_Specs): Enable generation of predefined
708 primitives associated with synchronized interfaces.
709 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
710 primitives associated with synchronized interfaces.
711
712 2011-08-02 Yannick Moy <moy@adacore.com>
713
714 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
715 statements hidden in SPARK if preceded by the HIDE directive
716 (Parse_Exception_Handlers): mark each exception handler in a sequence of
717 exception handlers as hidden in SPARK if preceded by the HIDE directive
718 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
719 if starting with the HIDE directive
720 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
721 starting with the HIDE directive; mark the declarations in a private
722 part as hidden in SPARK if the private part starts with the HIDE
723 directive
724 * restrict.adb, restrict.ads
725 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
726 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
727 argument node belongs to a part which is hidden in SPARK
728 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
729 parts in SPARK; protect the possibly costly call to
730 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
731 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
732 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
733 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
734 Tok_SPARK_Hide.
735 (Scan): recognize special comment starting with '#' and followed by
736 SPARK keyword "hide" as a HIDE directive.
737
738 2011-08-02 Yannick Moy <moy@adacore.com>
739
740 * types.ads, erroutc.ads: Minor reformatting.
741
742 2011-08-02 Vincent Celier <celier@adacore.com>
743
744 * link.c: Add response file support for cross platforms.
745
746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
747
748 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
749 in an association, set parent field of copy before partial analysis.
750 * sem_res.adb (Resolve_Slice): create reference to itype only when
751 expansion is enabled.
752
753 2011-08-02 Yannick Moy <moy@adacore.com>
754
755 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
756 for new flag denoting which subprogram bodies are in ALFA
757 * restrict.adb, sem_ch7.adb: Update comment
758 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
759 sem_ch9.adb, sem_res.adb: Add calls to
760 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
761 * sem_ch6.adb (Analyze_Function_Return): add calls to
762 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
763 middle of the body, and extended return.
764 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
765 False when missing return.
766 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
767 to True for subprograms whose spec is in ALFA. Remove later on the flag
768 on the entity used for a subprogram body when there exists a separate
769 declaration.
770 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
771 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
772 False, otherwise do nothing.
773
774 2011-08-02 Robert Dewar <dewar@adacore.com>
775
776 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
777
778 2011-08-02 Yannick Moy <moy@adacore.com>
779
780 * sem_ch4.ads: minor formatting.
781
782 2011-08-02 Yannick Moy <moy@adacore.com>
783
784 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
785 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
786 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
787 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
788 opt.ads: cleanup of SPARK mode
789
790 2011-08-02 Yannick Moy <moy@adacore.com>
791
792 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
793 types.
794 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
795 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
796 * sem_ch3.adb
797 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
798 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
799 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
800 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
801 types.
802 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
803 non-static range.
804 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
805 functions whose return type is not in ALFA.
806 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
807 specifications.
808 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
809 parameter's type is not in ALFA.
810 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
811 types are in ALFA.
812
813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
814
815 * sem_ch6 (Analyze_Expression_Function): treat the function as
816 Inline_Always, and introduce a subprogram declaration for it when it is
817 not a completion.
818 * inline.adb (Add_Inlined_Body): recognize bodies that come from
819 expression functions, so that the back-end can determine whether they
820 can in fact be inlined.
821 * sem_util.adb (Is_Expression_Function): predicate to determine whether
822 a function body comes from an expression function.
823
824 2011-08-02 Gary Dismukes <dismukes@adacore.com>
825
826 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
827 null exclusions to test Can_Never_Be_Null on the anonymous access types
828 of the formals rather than testing the formals themselves. Exclude this
829 check in cases where the Old_Formal is marked as a controlling formal,
830 to avoid issuing spurious errors for bodies completing dispatching
831 operations (due to the flag not getting set on controlling access
832 formals in body specs).
833 (Find_Corresponding_Spec): When checking full and subtype conformance of
834 subprogram bodies in instances, pass Designated and E in that order, for
835 consistency with the expected order of the formals (New_Id followed by
836 Old_Id).
837
838 2011-08-02 Robert Dewar <dewar@adacore.com>
839
840 * sem_ch8.adb: Minor reformatting.
841
842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
843
844 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
845 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
846 primitive operations of class-wide actuals.
847
848 2011-08-02 Javier Miranda <miranda@adacore.com>
849
850 * exp_atag.ads, exp_atag.adb
851 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
852 since its value is implicitly passed in argument Typ.
853 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
854 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
855 Build_Common_Dispatching_Select_Statements.
856
857 2011-08-02 Robert Dewar <dewar@adacore.com>
858
859 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
860 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
861 Minor reformatting.
862
863 2011-08-02 Robert Dewar <dewar@adacore.com>
864
865 * sem_res.adb: Minor reformatting.
866 * sem_prag.adb: Minor reformatting.
867
868 2011-08-02 Javier Miranda <miranda@adacore.com>
869
870 * exp_atag.adb, exp_atags.ads
871 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
872 by the tagged type Entity. Required to use this routine in the VM
873 targets since we do not have available the Tag entity in the VM
874 platforms.
875 * exp_ch6.adb
876 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
877 Ada.Tags has not been previously loaded.
878 * exp_ch7.adb
879 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
880 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
881 * sem_aux.adb
882 (Enclosing_Dynamic_Scope): Add missing support to handle the full
883 view of enclosing scopes. Required to handle enclosing scopes that
884 are synchronized types whose full view is a task type.
885 * exp_disp.adb
886 (Build_VM_TSDs): Minor code improvement to avoid generating and
887 analyzing lists with empty nodes.
888 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
889 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
890 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
891 (Make_Disp_Timed_Select_Body): Add support for VM targets.
892 (Make_Select_Specific_Data_Table): Add support for VM targets.
893 (Make_VM_TSD): Generate code to initialize the SSD structure of
894 the TSD.
895
896 2011-08-02 Yannick Moy <moy@adacore.com>
897
898 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
899 cross-references section in ALI.
900 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
901 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
902 Sub).
903 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
904 subprogram or package entity of a node
905 (Is_Local_Reference_Type): new function returns True for references
906 selected in local cross-references.
907 (Lt): function extracted from Lt in Output_References
908 (Write_Entity_Name): function extracted from Output_References
909 (Generate_Definition): generate reference with type 'D' for definition
910 of objects (object declaration and parameter specification), with
911 appropriate locations and units, for use in local cross-references.
912 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
913 references of type 'I' for initialization in object definition.
914 (Output_References): move part of function Lt and procedure
915 Write_Entity_Name outside of the body. Ignore references of types 'D'
916 and 'I' introduced for local cross-references.
917 (Output_Local_References): new procedure to output the local
918 cross-references sections.
919 (Lref_Entity_Status): new array defining whether an entity is a local
920 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
921 with 'I' type when initialization expression is present.
922 * get_scos.adb, get_scos.ads: Correct comments and typos
923
924 2011-08-02 Javier Miranda <miranda@adacore.com>
925
926 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
927 the JVM target.
928 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
929 the JVM target.
930 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
931 TSD support.
932
933 2011-08-02 Vincent Celier <celier@adacore.com>
934
935 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
936 (No_Space_Img): New function
937 (Find_Excluded_Sources): When reading from a file, record the file name
938 and the line number for each excluded source.
939 (Mark_Excluded_Sources): When reporting an error, if the excluded
940 sources were read from a file, include file name and line number in
941 the error message.
942
943 2011-08-02 Ed Schonberg <schonberg@adacore.com>
944
945 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
946
947 2011-08-02 Robert Dewar <dewar@adacore.com>
948
949 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
950
951 2011-08-02 Javier Miranda <miranda@adacore.com>
952
953 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
954 generation of TSDs to the DOTNET compiler.
955 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
956 generation of TSDs to the DOTNET compiler.
957
958 2011-08-02 Javier Miranda <miranda@adacore.com>
959
960 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
961 record of all the tagged types declared inside library level package
962 declarations, library level package bodies or library level subprograms.
963 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
964 associated with a given tagged type.
965 (Build_VM_TSDs): New subprogram.
966 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
967 compilation units that are subprograms.
968 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
969 compilation units that are package bodies.
970 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
971 units that are a package declaration or a package instantiation.
972 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
973 reorganization to improve the error generated by the frontend when the
974 function Ada.Tags.Secondary_Tag is not available.
975 * rtsfind.ads (RE_Register_TSD): New runtime entity.
976 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
977
978 2011-08-02 Javier Miranda <miranda@adacore.com>
979
980 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
981
982 2011-08-02 Robert Dewar <dewar@adacore.com>
983
984 * s-imenne.ads: Minor reformatting.
985
986 2011-08-02 Robert Dewar <dewar@adacore.com>
987
988 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
989 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
990 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
991
992 2011-08-02 Robert Dewar <dewar@adacore.com>
993
994 * einfo.ads (Materialize_Entity): Document this is only for renamings
995 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
996 required debug information in the case where we transform the object
997 declaration into a renaming declaration.
998 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
999 object
1000 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
1001 Materialize_Entity.
1002
1003 2011-08-02 Robert Dewar <dewar@adacore.com>
1004
1005 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
1006 Suppress_Init_Procs.
1007 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
1008 Suppress_Initialization/Initialization_Suppressed.
1009 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
1010 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
1011 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
1012 * sem_prag.adb: New processing for pragma Suppress_Initialization.
1013
1014 2011-08-02 Robert Dewar <dewar@adacore.com>
1015
1016 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
1017 Minor reformatting.
1018
1019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1020
1021 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
1022 only have inheritable classwide pre/postconditions.
1023
1024 2011-08-02 Javier Miranda <miranda@adacore.com>
1025
1026 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
1027 * rtsfind.ads (RE_Check_TSD): New runtime entity.
1028 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
1029 checks if the external tag of a type is the same as the external tag
1030 of some other declaration.
1031
1032 2011-08-02 Thomas Quinot <quinot@adacore.com>
1033
1034 * s-taskin.ads: Minor reformatting.
1035
1036 2011-08-02 Emmanuel Briot <briot@adacore.com>
1037
1038 * g-comlin.adb (Display_Help): swap the order in which it prints the
1039 short help and the general usage.
1040
1041 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1042
1043 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
1044 the aspect declarations and attach them to the generic copy for
1045 subsequent analysis.
1046 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
1047 declarations of the generic tree to the new subprogram declarations.
1048 * sem_attr.adb (Check_Precondition_Postcondition): recognize
1049 conditions that apply to a subprogram instance.
1050
1051 2011-08-02 Robert Dewar <dewar@adacore.com>
1052
1053 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
1054
1055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1056
1057 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
1058 private type with a tagged full view is not derived in the immediate
1059 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
1060
1061 2011-08-02 Robert Dewar <dewar@adacore.com>
1062
1063 * exp_ch4.adb: Minor reformatting.
1064
1065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1066
1067 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
1068 Ada2012 iterator, the loop will be rewritten during expansion into a
1069 while loop with a cursor and an element declaration. Do not analyze the
1070 body in this case, because if the container is for indefinite types the
1071 actual subtype of the elements will only be determined when the cursor
1072 declaration is analyzed.
1073
1074 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1075
1076 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
1077 size/alignment related attributes in CodePeer_Mode.
1078
1079 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1080
1081 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
1082 Prepend_Element, since this can result in the operation getting the
1083 wrong slot in the full type's dispatch table if the full type has
1084 inherited operations. The incomplete type's operation will get added
1085 to the proper position in the full type's primitives
1086 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
1087 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
1088 dispatching operations, since there are cases where nonprimitive
1089 subprograms can get added to the list of incomplete dependents (such
1090 as subprograms in nested packages).
1091 * sem_ch6.adb (Process_Formals): First, remove test for being in a
1092 private part when determining whether to add a primitive with a
1093 parameter of a tagged incomplete type to the Private_Dependents list.
1094 Such primitives can also occur in the visible part, and should not have
1095 been excluded from being private dependents.
1096 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
1097 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
1098 list of a Taft-amendment incomplete type is a primitive before issuing
1099 an error that the full type must appear in the same unit. There are
1100 cases where nonprimitives can be in the list (such as subprograms in
1101 nested packages).
1102 * sem_disp.adb (Derives_From): Use correct condition for checking that
1103 a formal's type is derived from the type of the corresponding formal in
1104 the parent subprogram (the condition was completely wrong). Add
1105 checking that was missing for controlling result types being derived
1106 from the result type of the parent operation.
1107
1108 2011-08-02 Yannick Moy <moy@adacore.com>
1109
1110 * errout.adb (First_Node): minor renaming
1111 * restrict.adb (Check_Formal_Restriction): put restriction warning on
1112 first node.
1113
1114 2011-08-02 Yannick Moy <moy@adacore.com>
1115
1116 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
1117 before accessing operands.
1118 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
1119 decide whether an initialization expression respects SPARK rules, as
1120 the plain node is the expanded one. This allows for more valid warnings
1121 to be issued.
1122 * gnat_rm.texi: Minor update.
1123
1124 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1125
1126 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
1127 previous change.
1128
1129 2011-08-02 Robert Dewar <dewar@adacore.com>
1130
1131 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
1132
1133 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1134
1135 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
1136 loop statements and the element renaming declaration with a block when
1137 the element type is controlled.
1138
1139 2011-08-02 Yannick Moy <moy@adacore.com>
1140
1141 * sinfo.ads: Minor formatting.
1142
1143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1144
1145 * sem_aggr.adb (Add_Association): if the association has a box and no
1146 expression, use the Sloc of the aggregate itself for the new
1147 association.
1148 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
1149 the Original_Node.
1150
1151 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1152
1153 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
1154 When a container is provided via a function call, generate a renaming
1155 of the function result. This avoids the creation of a transient scope
1156 and the premature finalization of the container.
1157 * exp_ch7.adb (Is_Container_Cursor): Removed.
1158 (Wrap_Transient_Declaration): Remove the supression of the finalization
1159 of the list controller when the declaration denotes a container cursor,
1160 it is not needed.
1161
1162 2011-08-02 Yannick Moy <moy@adacore.com>
1163
1164 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
1165 node is from source, instead of the original node being from source.
1166 * sem_aggr.adb
1167 (Resolve_Array_Aggregate): refine the check for a static expression, to
1168 recognize also static ranges
1169 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
1170 Array_Type_Declaration): postpone the test for the type being a subtype
1171 mark after the type has been resolved, so that component-selection and
1172 expanded-name are discriminated.
1173 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
1174 to distinguish the case of an iteration scheme, so that an error is
1175 issed on a non-static range in SPARK except in an iteration scheme.
1176 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
1177 In_Iter_Schm = True.
1178 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
1179 user-defined operators so that they are allowed in renaming
1180 * sem_ch8.adb
1181 (Find_Selected_Component): refine the check for prefixing of operators
1182 so that they are allowed in renaming. Move the checks for restrictions
1183 on selector name after analysis discriminated between
1184 component-selection and expanded-name.
1185 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
1186 concatenation argument of string type if it is static.
1187 * sem_util.adb, sem_util.ads
1188 (Check_Later_Vs_Basic_Declarations): add a new function
1189 Is_Later_Declarative_Item to decice which declarations are allowed as
1190 later items, in the two different modes Ada 83 and SPARK. In the SPARK
1191 mode, add that renamings are considered as later items.
1192 (Enclosing_Package): new function to return the enclosing package
1193 (Enter_Name): correct the rule for homonyms in SPARK
1194 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
1195 from source (result of expansion) to avoid issuing wrong warnings.
1196
1197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1198
1199 * errout.adb: On anything but an expression First_Node returns its
1200 argument.
1201
1202 2011-08-02 Pascal Obry <obry@adacore.com>
1203
1204 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
1205
1206 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1207
1208 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
1209 Set the associated loop as the related expression of internally
1210 generated cursors.
1211 * exp_ch7.adb (Is_Container_Cursor): New routine.
1212 (Wrap_Transient_Declaration): Supress the finalization of the list
1213 controller when the declaration denotes a container cursor.
1214
1215 2011-08-02 Yannick Moy <moy@adacore.com>
1216
1217 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
1218 command line now.
1219 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
1220 expression is a simple expression. This check cannot be performed in
1221 the semantics, so just drop it.
1222 (P_Index_Or_Discriminant_Constraint): move check that the index or
1223 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
1224 semantics. Other cases were previously checked in the semantics.
1225 * par-ch4.adb (P_Name): move checks that a selector name is not
1226 character literal or an operator symbol to Find_Selected_Component in
1227 the semantics
1228 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
1229 declarations are not placed after later declarations in a separate
1230 procedure in Sem_Util (possibly not the best choice?), to be used both
1231 during parsing, for Ada 83 mode, and during semantic analysis, for
1232 SPARK mode.
1233 * par-endh.adb (Check_End): move check that end label is not missing
1234 to Process_End_Label in the semantics
1235 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
1236 the special case for SPARK restriction
1237 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
1238 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
1239 parameter Force to issue the error message even on internal node (used
1240 for generated end label). Call Check_Restriction to check when an error
1241 must be issued. In SPARK mode, issue an error message even if the
1242 restriction is not set.
1243 (Check_Restriction): new procedure with an additional out parameter to
1244 inform the caller that a message has been issued
1245 * sem_aggr.adb: Minor modification of message
1246 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
1247 instead of issuing an error message directly
1248 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
1249 declarations are not placed after later declarations, by calling
1250 Check_Later_Vs_Basic_Declarations
1251 (Analyze_Subtype_Declaration): move here the check that an index or
1252 discriminant constraint must be a subtype mark. Change the check that
1253 a subtype of String must start at one so that it works on subtype marks.
1254 * sem_ch4.adb (Analyze_Call): move here the check that a named
1255 association cannot follow a positional one in a call
1256 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
1257 instead of issuing an error message directly
1258 * sem_ch8.adb (Find_Selected_Component): move here the check that a
1259 selector name is not a character literal or an operator symbol. Move
1260 here the check that the prefix of an expanded name cannot be a
1261 subprogram or a loop statement.
1262 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
1263 procedure called from parsing and semantics to check that basic
1264 declarations are not placed after later declarations
1265 (Process_End_Label): move here the check that end label is not missing
1266
1267 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1268
1269 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
1270 representation clause in codepeer mode, since it confuses CodePeer and
1271 does not bring useful info.
1272
1273 2011-08-02 Ed Falis <falis@adacore.com>
1274
1275 * init.c: initialize fp hw on MILS.
1276
1277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1278
1279 * errout.adb (First_Node): for bodies, return the node itself (small
1280 optimization). For other nodes, do not check source_unit if the node
1281 comes from Standard.
1282
1283 2011-08-02 Robert Dewar <dewar@adacore.com>
1284
1285 * exp_ch3.adb: Minor comment additions.
1286 * sem_ch13.adb: Minor reformatting.
1287
1288 2011-08-02 Pascal Obry <obry@adacore.com>
1289
1290 * make.adb, makeutl.adb: Removes some superfluous directory separator.
1291
1292 2011-08-02 Robert Dewar <dewar@adacore.com>
1293
1294 * sem_attr.adb: Minor reformatting.
1295
1296 2011-08-02 Robert Dewar <dewar@adacore.com>
1297
1298 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
1299 (Has_Default_Component_Value): Removed
1300 * einfo.ads Comment updates
1301 (Has_Default_Aspect): Replaces Has_Default_Value
1302 (Has_Default_Component_Value): Removed
1303 * exp_ch13.adb
1304 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
1305 * exp_ch3.adb
1306 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
1307 (Get_Simple_Init_Val): Handle Default_Value aspect
1308 (Needs_Simple_Initialization): Handle Default_Value aspect
1309 * exp_ch3.ads: Needs_Simple_Initialization
1310 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
1311 * par-prag.adb (Pragma_Default[_Component]Value) Removed
1312 * sem_ch13.adb
1313 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
1314 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
1315 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
1316
1317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1318
1319 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
1320 package containing iteration primitives.
1321 exp_ch5.adb (Expand_Iterator_Loop): ditto.
1322
1323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1324
1325 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
1326 "of", pre-analyze expression in case it is a function call with
1327 finalization actions that must be placed ahead of the loop.
1328 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
1329 on an Ada2012 iterator, insert them ahead of the rewritten loop.
1330
1331 2011-08-02 Geert Bosch <bosch@adacore.com>
1332
1333 * cstand.adb (Create_Float_Types): Only consider C's long double for
1334 Long_Long_Float, in addition to double.
1335
1336 2011-08-02 Robert Dewar <dewar@adacore.com>
1337
1338 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
1339 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
1340 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
1341 Minor reformatting.
1342
1343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1344
1345 * sem_attr.adb: handle properly 'Result when it is a prefix of an
1346 indexed component.
1347
1348 2011-08-02 Javier Miranda <miranda@adacore.com>
1349
1350 * einfo.ads, einfo.adb
1351 (Original_Access_Type): Move this attribute to Node26 since there was
1352 an undocumented use of Node21 in E_Access_Subprogram_Type entities
1353 which causes conflicts and breaks the generation of the .NET compiler.
1354 (Interface_Name): Add missing documentation on JGNAT only uses of
1355 this attribute.
1356
1357 2011-08-02 Geert Bosch <bosch@adacore.com>
1358
1359 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
1360 (Find_Back_End_Float_Type): Likewise
1361 (Create_Back_End_Float_Types): Likewise
1362 (Create_Float_Types): Likewise
1363 (Register_Float_Type): Likewise
1364 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
1365 Nlist and split out type selection in new local Find_Base_Type function.
1366 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
1367 Nlist
1368 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
1369
1370 2011-08-02 Robert Dewar <dewar@adacore.com>
1371
1372 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
1373 alpha order).
1374 * opt.ads: Minor comment change.
1375 * sem_ch12.adb: Minor code reorganization.
1376
1377 2011-08-02 Gary Dismukes <dismukes@adacore.com>
1378
1379 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
1380 subtype's list of rep items to the list on the full subtype in the case
1381 where the lists are the same.
1382
1383 2011-08-02 Geert Bosch <bosch@adacore.com>
1384
1385 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
1386 using the one from System.Strings, which also deallocates all strings.
1387
1388 2011-08-02 Geert Bosch <bosch@adacore.com>
1389
1390 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
1391 function.
1392 * gcc-interface/Make-lang.in: Update dependencies.
1393
1394 2011-08-02 Olivier Hainque <hainque@adacore.com>
1395
1396 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
1397 end_locus.
1398
1399 2011-08-02 Javier Miranda <miranda@adacore.com>
1400
1401 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
1402 associated with anonymous access to subprograms.
1403
1404 2011-08-02 Geert Bosch <bosch@adacore.com>
1405
1406 * opt.ads
1407 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
1408 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
1409 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
1410 (Add_Symbol_Definition): Move to switch-c.adb
1411 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
1412 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
1413 (Add_Symbol_Definition): Move to switch-c.adb.
1414 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
1415 * sem_warn.adb
1416 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1417 Move to warnsw.adb.
1418 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
1419 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1420 Move to warnsw.adb.
1421 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
1422 (Add_Symbol_Definition): Moved from Prepcomp.
1423 * switch-c.ads: Update copyright notice. Use String_List instead of
1424 Argument_List, removing dependency on System.OS_Lib.
1425
1426 2011-08-02 Yannick Moy <moy@adacore.com>
1427
1428 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
1429 mode on initialization expression which does not respect SPARK
1430 restrictions.
1431 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
1432 if the tree referenced by its argument represents an initialization
1433 expression in SPARK, suitable for initializing an object in an object
1434 declaration.
1435
1436 2011-08-02 Javier Miranda <miranda@adacore.com>
1437
1438 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
1439 internally generated access to subprogram with its associated protected
1440 subprogram type.
1441 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
1442
1443 2011-08-02 Geert Bosch <bosch@adacore.com>
1444
1445 * cstand.adb (Register_Float_Type): Print information about type to
1446 register, if the Debug_Flag_Dot_B is set.
1447 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
1448 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
1449 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
1450 with a requested precision of more than Max_Digits digits and no more
1451 than Max_Base_Digits digits, if a range specification is present and the
1452 Predefined_Float_Types list has a suitable type to derive from.
1453 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
1454 case of type completion with pragma Import
1455 * sem_prag.adb
1456 (Process_Import_Predefined_Type): Processing to complete a type
1457 with pragma Import. Currently supports floating point types only.
1458 (Set_Convention_From_Pragma): Do nothing without underlying type.
1459 (Process_Convention): Guard against absence of underlying type,
1460 which may happen when importing incomplete types.
1461 (Process_Import_Or_Interface): Handle case of importing predefined
1462 types. Tweak error message.
1463
1464 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1465
1466 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
1467 functions to previous change. Reorganize code slightly.
1468
1469 2011-08-02 Geert Bosch <bosch@adacore.com>
1470
1471 * back_end.ads (Register_Type_Proc): New call back procedure type for
1472 allowing the back end to provide information about available types.
1473 (Register_Back_End_Types): New procedure to register back end types.
1474 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
1475 available types.
1476 * cstand.adb (Back_End_Float_Types): New list for floating point types
1477 supported by the back end.
1478 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
1479 (Copy_Float_Type): New procedure to make new copies of predefined types.
1480 (Register_Float_Type): New call back procedure to populate the BEFT list
1481 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
1482 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
1483 (Create_Float_Types): New procedure to create entities for floating
1484 point types predefined in Standard, and put these and any remaining
1485 BEFTs on the Predefined_Float_Types list.
1486 * stand.ads (Predefined_Float_Types): New list for predefined floating
1487 point types that do not have declarations in package Standard.
1488
1489 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1490
1491 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
1492 entity node for the unit containing the parameter.
1493 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
1494 (Add_Inlined_Subprogram): Likewise.
1495 * gcc-interface/Make-lang.in: Update dependencies.
1496
1497 2011-08-02 Thomas Quinot <quinot@adacore.com>
1498
1499 * s-stusta.adb (Print): Make sure Pos is always initialized to a
1500 suitable value.
1501
1502 2011-08-02 Geert Bosch <bosch@adacore.com>
1503
1504 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
1505
1506 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1507
1508 * sem_type.adb (Covers): Move trivial case to the top and reuse the
1509 computed value of Base_Type.
1510
1511 2011-08-02 Yannick Moy <moy@adacore.com>
1512
1513 * restrict.adb (Check_Restriction): issue an error for any use of
1514 class-wide, even if the No_Dispatch restriction is not set.
1515 * sem_aggr.adb: Correct typos in comments and messages in formal mode
1516 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
1517 when completing a private extension, the type named in the private part
1518 is not the same as that named in the visible part.
1519 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
1520 of an inherited primitive operations of a tagged type or type extension
1521 that returns the tagged type.
1522 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
1523 function which returns True for an implicit operation inherited by the
1524 derived type declaration for the argument type.
1525 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
1526 order.
1527
1528 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1529
1530 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
1531 Process_Bounds, to perform analysis with expansion of a range or an
1532 expression that is the iteration scheme for a loop.
1533 (Analyze_Iterator_Specification): If domain of iteration is given by a
1534 function call with a controlled result, as is the case if call returns
1535 a predefined container, ensure that finalization actions are properly
1536 generated.
1537 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
1538
1539 2011-08-02 Javier Miranda <miranda@adacore.com>
1540
1541 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
1542 * gcc-interface/Make-lang.in: Update dependencies.
1543
1544 2011-08-02 Javier Miranda <miranda@adacore.com>
1545
1546 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
1547 determine if the analysis is performed using N or Original_Node (N).
1548 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
1549 functionality of routine Is_Variable avoids code duplication.
1550 * checks.adb (Determine_Range): Handle temporaries generated by
1551 Remove_Side_Effects.
1552
1553 2011-08-02 Javier Miranda <miranda@adacore.com>
1554
1555 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
1556 expansion of the condition. Required since the previous analysis was
1557 done with expansion disabled (see Resolve_Quantified_Expression) and
1558 hence checks were not inserted and record comparisons have not been
1559 expanded.
1560
1561 2011-08-02 Ed Falis <falis@adacore.com>
1562
1563 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
1564 Update header.
1565
1566 2011-08-02 Bob Duff <duff@adacore.com>
1567
1568 * opt.ads: Minor comment fix.
1569
1570 2011-08-02 Bob Duff <duff@adacore.com>
1571
1572 * sem_ch12.adb (Analyze_Package_Instantiation,
1573 Analyze_Subprogram_Instantiation): Turn off style checking while
1574 analyzing an instance. Whatever style checks that apply to the generic
1575 unit should apply, so it makes no sense to apply them in an instance.
1576 This was causing trouble when compiling an instance of a runtime
1577 unit that violates the -gnatyO switch.
1578 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
1579 one of the two case statements, causing spurious errors.
1580
1581 2011-08-02 Robert Dewar <dewar@adacore.com>
1582
1583 * uname.adb: Minor reformatting.
1584 * gnatcmd.adb: Minor reformatting.
1585 * exp_attr.adb: Minor reformatting.
1586
1587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1588
1589 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
1590 No_Dispatching_Calls, do not look for the Assign primitive, because
1591 predefined primitives are not created in this case.
1592
1593 2011-08-02 Bob Duff <duff@adacore.com>
1594
1595 * stylesw.ads: Minor comment fixes.
1596
1597 2011-08-02 Robert Dewar <dewar@adacore.com>
1598
1599 * freeze.adb (Add_To_Result): New procedure.
1600
1601 2011-08-02 Jose Ruiz <ruiz@adacore.com>
1602
1603 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
1604 time, if the specific run-time routines for handling streams of strings
1605 are not available, use the default mechanism.
1606
1607 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1608
1609 * s-regpat.ads: Fix typo.
1610
1611 2011-08-02 Vincent Celier <celier@adacore.com>
1612
1613 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
1614 not null, call it to create the in memory config project file without
1615 parsing an existing default config project file.
1616
1617 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1618
1619 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
1620
1621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1622
1623 * sem_elim.adb: an abstract subprogram does not need an eliminate
1624 pragma for its descendant to be eliminable.
1625
1626 2011-08-02 Ed Falis <falis@adacore.com>
1627
1628 * init.c: revert to handling before previous checkin for VxWorks
1629 * s-intman-vxworks.adb: delete unnecessary declarations related to
1630 using Ada interrupt facilities for handling signals.
1631 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
1632 * s-intman-vxworks.ads: Import __gnat_install_handler as
1633 Initialize_Interrupts.
1634 * s-taprop-vxworks.adb: Delete Signal_Mask.
1635 (Abort_Handler): change construction of mask to unblock exception
1636 signals.
1637
1638 2011-08-02 Jerome Guitton <guitton@adacore.com>
1639
1640 * a-except-2005.adb (Raise_From_Signal_Handler): Call
1641 Debug_Raise_Exception before propagation starts.
1642
1643 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1644
1645 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
1646 to Restriction_Check_Required.
1647 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
1648 * sem_res.adb (Resolve_Call): Likewise.
1649 * sem_attr.adb (Check_Stream_Attribute): Likewise.
1650
1651 2011-08-02 Bob Duff <duff@adacore.com>
1652
1653 * stylesw.ads: Update comment.
1654 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
1655 * errout.ads: Remove obsolete comment.
1656
1657 2011-08-02 Javier Miranda <miranda@adacore.com>
1658
1659 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
1660 (Set_Is_Safe_To_Reevaluate): new procedure.
1661 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
1662 assignment is allowed on safe-to-reevaluate variables.
1663 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
1664 temporary created to remove side effects in expressions that use
1665 the secondary stack as safe-to-reevaluate.
1666 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
1667 variables that are not true constants.
1668
1669 2011-08-02 Robert Dewar <dewar@adacore.com>
1670
1671 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
1672 sem_res.adb, sem_ch6.adb: Minor reformatting.
1673
1674 2011-08-02 Jerome Guitton <guitton@adacore.com>
1675
1676 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
1677
1678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1679
1680 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
1681 not set Overridden_Operation if subprogram is an initialization
1682 procedure.
1683
1684 2011-08-02 Yannick Moy <moy@adacore.com>
1685
1686 * par-ch6.adb: Correct obsolete name in comments
1687 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
1688 which takes two message arguments (existing function takes one), with
1689 second message used for continuation.
1690 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
1691 block statements that originate from a source block statement, not
1692 generated block statements
1693 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
1694 symmetry with procedure case
1695 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
1696 function to issue an error in formal mode if a package specification
1697 contains more than one tagged type or type extension.
1698 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
1699 parameters matching formals of tagged types are objects (or ancestor
1700 type conversions of objects), not general expressions. Issue an error
1701 on view conversions that are not involving ancestor conversion of an
1702 extended type.
1703 (Resolve_Type_Conversion): in formal mode, issue an error on the
1704 operand of an ancestor type conversion which is not an object
1705 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
1706 procedure so that it works also for actuals of function calls
1707 (Is_Actual_Tagged_Parameter): new function which determines if its
1708 argument is an actual parameter of a formal of tagged type in a
1709 subprogram call
1710 (Is_SPARK_Object_Reference): new function which determines if the tree
1711 referenced by its argument represents an object in SPARK
1712
1713 2011-08-02 Robert Dewar <dewar@adacore.com>
1714
1715 * sem_ch3.adb: Minor reformatting
1716 Minor comment addition
1717 Minor error msg text change
1718
1719 2011-08-02 Javier Miranda <miranda@adacore.com>
1720
1721 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
1722 function. Used to be more precise when we generate a variable plus one
1723 assignment to remove side effects in the evaluation of the Bound
1724 expressions.
1725 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
1726 of the bound expression to force its re-analysis and thus expand the
1727 associated transient scope (if required). Code cleanup replacing the
1728 previous code that declared the constant entity by an invocation to
1729 routine Force_Evaluation which centralizes this work in the frontend.
1730
1731 2011-08-02 Robert Dewar <dewar@adacore.com>
1732
1733 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
1734 (Base_Type): Now uses improved Is_Base_Type function
1735 * einfo.ads (Base_Type): Inline this function
1736
1737 2011-08-02 Robert Dewar <dewar@adacore.com>
1738
1739 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
1740 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
1741
1742 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1743
1744 * gcc-interface/Make-lang.in: Update dependencies.
1745 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
1746 targets.
1747
1748 2011-08-02 Yannick Moy <moy@adacore.com>
1749
1750 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
1751 non-simple expression used in delta constraint
1752 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
1753 index constraint which is not a subtype mark
1754 * par.adb: With and use Restrict
1755 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
1756 mode on component type which is not a subtype mark and default
1757 expression on component
1758 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
1759 of string which does not have a lower index bound equal to 1
1760 (Array_Type_Declaration): issue an error in formal mode on index or
1761 component type which is not a subtype mark, and on aliased keyword on
1762 component
1763 (Derived_Type_Declaration): issue an error in formal mode on interface,
1764 limited or abstract type
1765 (Record_Type_Declaration): issue an error in formal mode on interface
1766 (Record_Type_Definition): issue an error in formal mode on tagged types
1767 and type extensions not declared in the specification of a library unit
1768 package; on null non-tagged record; on variant part
1769
1770 2011-08-02 Vincent Celier <celier@adacore.com>
1771
1772 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
1773 not declared for qualified library project when Library_Name is not
1774 declared, but Library_Dir is.
1775
1776 2011-08-02 Robert Dewar <dewar@adacore.com>
1777
1778 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
1779 pragmas (affects aspects [Component_]Default_Value
1780 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
1781 component type for the resolution
1782
1783 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1784
1785 * einfo.adb (Base_Type): Tune implementation for speed.
1786
1787 2011-08-02 Robert Dewar <dewar@adacore.com>
1788
1789 * freeze.adb: Minor reformatting.
1790
1791 2011-08-02 Thomas Quinot <quinot@adacore.com>
1792
1793 * scos.ads: Update comments.
1794
1795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1796
1797 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
1798 base type, because the parent may be a subtype of a private type whose
1799 convention is established in a private part.
1800
1801 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1802
1803 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
1804 statement in a block when the expansion of the return expression has
1805 created a finalization chain.
1806 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
1807 with the parent node.
1808 Add N_Extended_Return_Statement to handle the case where a transient
1809 object declaration appears in the Return_Object_Declarations list of
1810 an extended return statement.
1811
1812 2011-08-02 Matthew Gingell <gingell@adacore.com>
1813
1814 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
1815 unused parameter 'name'.
1816
1817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1818
1819 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
1820 inherited operation, check whether its alias, which is the source
1821 operastion that it renames, has been marked eliminated.
1822
1823 2011-08-02 Javier Miranda <miranda@adacore.com>
1824
1825 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
1826 in-mode parameter whose type is an access type since it can be used to
1827 modify its designated object. Enforce code that handles as safe an
1828 access type that is not access-to-constant but it is the result of a
1829 previous removal of side-effects.
1830 (Remove_Side_Effects): Minor code reorganization of cases which require
1831 no action. Done to incorporate documentation on new cases uncovered
1832 working in this ticket: no action needed if this routine was invoked
1833 too early and the nodes are not yet decorated.
1834 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
1835 to routine Remove_Side_Effects by calls to Force_Evaluation since they
1836 were issued with actuals that are implicitly provided by
1837 Force_Evaluation.
1838
1839 2011-08-02 Robert Dewar <dewar@adacore.com>
1840
1841 * sem_ch3.adb, sem_res.adb: Minor reformatting.
1842
1843 2011-08-02 Yannick Moy <moy@adacore.com>
1844
1845 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
1846 to issue an error in formal mode on attribute not supported in this mode
1847 (Analyze_Attribute): issue errors on standard attributes not supported
1848 in formal mode.
1849 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
1850 comment, and issue error in formal mode on modulus which is not a power
1851 of 2.
1852 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
1853 range.
1854 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
1855 subtype mark.
1856 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
1857 operator on modular type (except 'not').
1858
1859 2011-08-02 Robert Dewar <dewar@adacore.com>
1860
1861 * gnat_rm.texi: Minor reformatting.
1862
1863 2011-08-02 Arnaud Charlet <charlet@adacore.com>
1864
1865 * s-osinte-linux.ads: Minor comment update and reformatting.
1866 * i-cexten.ads: Make this unit pure, as for its parent.
1867 Will allow its usage in more contexts if needed.
1868
1869 2011-08-02 Robert Dewar <dewar@adacore.com>
1870
1871 * s-utf_32.ads: Minor comment fix.
1872
1873 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1874
1875 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
1876 operation of a tagged synchronized type, handle the case where the
1877 controlling argument is overloaded.
1878
1879 2011-08-02 Yannick Moy <moy@adacore.com>
1880
1881 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
1882 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
1883 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
1884 SPARK mode and formal verification mode on processing SPARK restriction
1885 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
1886 requiring consistency checking.
1887
1888 2011-08-02 Robert Dewar <dewar@adacore.com>
1889
1890 * sem_res.adb: Minor reformatting.
1891
1892 2011-08-02 Robert Dewar <dewar@adacore.com>
1893
1894 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1895 a-cforse.ads: Remove unneeded with of Ada.Containers
1896 Remove commented out pragma Inline's
1897 Move specifications of new subprograms to the actual specs
1898
1899 2011-08-02 Yannick Moy <moy@adacore.com>
1900
1901 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1902 a-cforse.ads: Update comments.
1903
1904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1905
1906 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
1907
1908 2011-08-02 Robert Dewar <dewar@adacore.com>
1909
1910 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1911 a-cforse.ads, a-cofove.ads: Minor reformatting.
1912
1913 2011-08-02 Claire Dross <dross@adacore.com>
1914
1915 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1916 a-cofove.ads: Add comments.
1917
1918 2011-08-02 Yannick Moy <moy@adacore.com>
1919
1920 * gnat_rm.texi: Document formal containers.
1921
1922 2011-08-02 Emmanuel Briot <briot@adacore.com>
1923
1924 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
1925 are empty sections.
1926
1927 2011-08-02 Robert Dewar <dewar@adacore.com>
1928
1929 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
1930 reformatting.
1931
1932 2011-08-02 Robert Dewar <dewar@adacore.com>
1933
1934 * aspects.adb: New aspects Default_Value and Default_Component_Value
1935 New format of Aspect_Names table checks for omitted entries
1936 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
1937 handling of boolean aspects for derived types.
1938 New aspects Default_Value and Default_Component_Value
1939 New format of Aspect_Names table checks for omitted entries
1940 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
1941 (Has_Default_Value): New flag
1942 (Has_Default_Component_Value): New flag
1943 (Has_Default_Value): New flag
1944 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
1945 table.
1946 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
1947 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
1948 Default_Value and Default_Component_Value
1949 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
1950 New aspects Default_Value and Default_Component_Value
1951 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
1952 * sprint.adb: Print N_Aspect_Specification node when called from gdb
1953
1954 2011-08-02 Vincent Celier <celier@adacore.com>
1955
1956 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
1957 inherit library kind.
1958
1959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
1960
1961 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
1962 Minor reformatting.
1963
1964 2011-08-02 Robert Dewar <dewar@adacore.com>
1965
1966 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
1967
1968 2011-08-02 Yannick Moy <moy@adacore.com>
1969
1970 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
1971
1972 2011-08-02 Robert Dewar <dewar@adacore.com>
1973
1974 * impunit.adb: Add comment.
1975
1976 2011-08-02 Yannick Moy <moy@adacore.com>
1977
1978 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
1979 qualification of aggregates in formal mode
1980 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
1981 another aggregate
1982 (Resolve_Aggregate): complete the test that an aggregate is adequately
1983 qualified in formal mode
1984
1985 2011-08-02 Pascal Obry <obry@adacore.com>
1986
1987 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
1988 * mlib-prj.adb: Supress warning when compiling binder generated file.
1989 (Build_Library): Supress all warnings when compiling the binder
1990 generated file.
1991
1992 2011-08-02 Yannick Moy <moy@adacore.com>
1993
1994 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
1995 from here...
1996 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
1997 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
1998 Add with/use clauses to make Check_Formal_Restriction visible
1999
2000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2001
2002 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
2003 in-parameters when type of the generic formal is private in the generic
2004 spec and non-private in the body.
2005
2006 2011-08-02 Claire Dross <dross@adacore.com>
2007
2008 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
2009 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
2010 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
2011 * impunit.adb, Makefile.rtl: Take new files into account.
2012
2013 2011-08-02 Robert Dewar <dewar@adacore.com>
2014
2015 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
2016 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2017
2018 2011-08-02 Yannick Moy <moy@adacore.com>
2019
2020 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
2021 formal mode
2022 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
2023 matching static array bounds, taking into account the special case of
2024 string literals
2025 * sem_ch3.adb: Typo in comment.
2026
2027 2011-08-02 Yannick Moy <moy@adacore.com>
2028
2029 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
2030 which issues an error in formal mode if its argument node is originally
2031 from source
2032 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
2033 has a discriminant specification so that it does not include the case
2034 of derived types
2035 (Derived_Type_Declaration): move here the test that a derived type has a
2036 discriminant specification
2037 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
2038 first element of a component association before accessing its choices
2039 (presence of component association is not enough)
2040 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
2041 declaration is a library item before accessing the next element in a
2042 list, as library items are not member of lists
2043 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
2044 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
2045 Check_Formal_Restriction whenever possible.
2046
2047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2048
2049 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
2050 reference when needed.
2051
2052 2011-08-02 Bob Duff <duff@adacore.com>
2053
2054 * gnat_ugn.texi: Fix typo.
2055
2056 2011-08-02 Vincent Celier <celier@adacore.com>
2057
2058 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
2059 archive file name. Do not use the full path name of archives for Open
2060 VMS.
2061
2062 2011-08-02 Robert Dewar <dewar@adacore.com>
2063
2064 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
2065 Analyze_Aspect_Specifications
2066 * sem_ch13.adb
2067 (Analyze_Aspect_Specifications): New handling for boolean aspects
2068 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
2069 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
2070 sequence for Analyze_Aspect_Specifications
2071 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
2072 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
2073
2074 2011-08-02 Robert Dewar <dewar@adacore.com>
2075
2076 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
2077 aspects, since these no longer exist.
2078
2079 2011-08-02 Robert Dewar <dewar@adacore.com>
2080
2081 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
2082 semicolon, do not try to see if there are aspects following it.
2083 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
2084 aspect spec.
2085
2086 2011-08-02 Robert Dewar <dewar@adacore.com>
2087
2088 * sem_ch8.adb, aspects.ads: Minor reformatting.
2089
2090 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
2091
2092 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
2093 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
2094 extracted from...
2095 (Analyze_Aspect_Specifications): ...here. Call above procedure.
2096
2097 2011-08-02 Yannick Moy <moy@adacore.com>
2098
2099 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
2100 mode on subprogram declaration outside of package specification, unless
2101 it is followed by a pragma Import
2102 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
2103 Access_Type_Declaration): issue error in formal mode on access type
2104 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
2105 incomplete type
2106 (Analyze_Object_Declaration): issue error in formal mode on object
2107 declaration which does not respect SPARK restrictions
2108 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
2109 declaration which does not respect SPARK restrictions
2110 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
2111 error in formal mode on digits or delta constraint
2112 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
2113 decimal fixed point type
2114 (Derived_Type_Declaration): issue error in formal mode on derived type
2115 other than type extensions of tagged record types
2116 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
2117 with check on access definition
2118 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
2119 mode on protected definition.
2120 (Analyze_Task_Definition): issue error in formal mode on task definition
2121
2122 2011-08-02 Robert Dewar <dewar@adacore.com>
2123
2124 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
2125
2126 2011-08-02 Javier Miranda <miranda@adacore.com>
2127
2128 * sem_ch6.adb (Can_Override_Operator): New function.
2129 (Verify_Overriding_Indicator): Add missing code to check overriding
2130 indicator in operators. Fixes regression.
2131 (Check_Overriding_Indicator): Minor reformating after replacing the
2132 code that evaluates if the subprogram can override an operator by
2133 invocations to the above new function.
2134 * einfo.adb
2135 (Write_Field26_Name): Add missing code to ensure that, following
2136 the documentation in einfo.ads, this field is not shown as attribute
2137 "Static_Initialization" on non-dispatching functions.
2138
2139 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2140
2141 * sem_res.adb (Resolve_Call): A call to
2142 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
2143 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
2144 i.e., when the second parameter is of type Time_Span.
2145
2146 2011-08-02 Vincent Celier <celier@adacore.com>
2147
2148 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
2149 with an archive instead of -L<library dir> -l<library name>.
2150
2151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2152
2153 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
2154 mark the base types In_Use in addition to making the operations
2155 use_visible.
2156
2157 2011-08-02 Ed Falis <falis@adacore.com>
2158
2159 * init.c: add and setup __gnat_signal_mask for the exception signals
2160 * s-inmaop-vxworks.adb: new file.
2161 * s-intman-vxworks.adb: remove unnecessary initializations and
2162 simplify remaining
2163 * s-intman-vxworks.ads: remove unnecessary variable
2164 * s-taprop-vxworks.adb: simplify signal initialization
2165
2166 2011-08-02 Robert Dewar <dewar@adacore.com>
2167
2168 * sem_ch8.adb: Minor code reorganization, comment updates.
2169
2170 2011-08-02 Robert Dewar <dewar@adacore.com>
2171
2172 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
2173 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
2174 here from Sem_Res.
2175 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
2176 (Matching_Static_Array_Bounds): Moved here from Sem_Res
2177
2178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2179
2180 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
2181 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
2182 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
2183 use_type_clauses, to handle more efficiently use_type and use_all_type
2184 constructs.
2185 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
2186 Ada2012 Use_All_Type clause.
2187 (Use_Class_Wide_Operations): new procedure.
2188
2189 2011-08-02 Robert Dewar <dewar@adacore.com>
2190
2191 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
2192 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
2193 expression to expression function.
2194
2195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2196
2197 * sem_ch4.adb: transform simple Ada2012 membership into equality only
2198 if types are compatible.
2199
2200 2011-08-02 Yannick Moy <moy@adacore.com>
2201
2202 * sem_res.adb (Matching_Static_Array_Bounds): new function which
2203 returns True if its argument array types have same dimension and same
2204 static bounds at each index.
2205 (Resolve_Actuals): issue an error in formal mode on actuals passed as
2206 OUT or IN OUT paramaters which are not view conversions in SPARK.
2207 (Resolve_Arithmetic_Op): issue an error in formal mode on
2208 multiplication or division with operands of fixed point types which are
2209 not qualified or explicitly converted.
2210 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
2211 Boolean or array type (except String) operands.
2212 (Resolve_Equality_Op): issue an error in formal mode on equality
2213 operators for array types other than String with non-matching static
2214 bounds.
2215 (Resolve_Logical_Op): issue an error in formal mode on logical operators
2216 for array types with non-matching static bounds. Factorize the code in
2217 Matching_Static_Array_Bounds.
2218 (Resolve_Qualified_Expression): issue an error in formal mode on
2219 qualified expressions for array types with non-matching static bounds.
2220 (Resolve_Type_Conversion): issue an error in formal mode on type
2221 conversion for array types with non-matching static bounds
2222
2223 2011-08-02 Robert Dewar <dewar@adacore.com>
2224
2225 * par-ch10.adb: Minor code reorganization (use Nkind_In).
2226
2227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
2228
2229 * par-ch9.adb: save location of entry for proper error message.
2230
2231 2011-08-02 Javier Miranda <miranda@adacore.com>
2232
2233 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
2234 (Use_Full_View) which permits this routine to climb through the
2235 ancestors using the full-view of private parents.
2236 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
2237 Use_Full_View to true in calls to Is_Ancestor.
2238 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
2239 true in call to Is_Ancestor.
2240 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
2241 Use_Full_View to true in call to Is_Ancestor.
2242 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
2243 call to Is_Ancestor.
2244 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
2245 Use_Full_View to true in calls to Is_Ancestor.
2246 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
2247 Make_Select_Specific_Data_Table, Register_Primitive,
2248 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
2249 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
2250 to true in call to Is_Ancestor.
2251 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
2252 Use_Full_View to true in calls to Is_Ancestor.
2253 * exp_cg.adb
2254 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
2255 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
2256
2257 2011-08-02 Robert Dewar <dewar@adacore.com>
2258
2259 * gnat_rm.texi: Minor reformatting.
2260 * sem_prag.adb: Minor reformatting.
2261
2262 2011-08-02 Tristan Gingold <gingold@adacore.com>
2263
2264 * vms_data.ads: Add VMS qualifier for -gnateP.
2265
2266 2011-08-02 Robert Dewar <dewar@adacore.com>
2267
2268 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
2269 * par-ch7.adb (P_Package): Proper placement of aspects for package
2270 decl/instantiation.
2271 * par-endh.adb (Check_End): Ad Is_Sloc parameter
2272 (End_Statements): Add Is_Sloc parameterr
2273 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
2274 (Check_End): Ad Is_Sloc parameter
2275 (End_Statements): Add Is_Sloc parameterr
2276
2277 2011-08-02 Vincent Celier <celier@adacore.com>
2278
2279 * ug_words: Add VMS qualifier equivalent to -gnateP:
2280 /SYMBOL_PREPROCESSING.
2281
2282 2011-08-02 Jose Ruiz <ruiz@adacore.com>
2283
2284 * gnat-style.texi: For hexadecimal numeric literals the typical
2285 grouping of digits is 4 to represent 2 bytes.
2286 A procedure spec which is split into several lines is indented two
2287 characters.
2288
2289 2011-08-02 Yannick Moy <moy@adacore.com>
2290
2291 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
2292 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
2293 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
2294 properly qualified
2295 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
2296 choice in array aggregate
2297 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
2298 mark as ancestor
2299 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
2300 positional and named aggregate for record, or others in record
2301 aggregate, or multiple choice in record aggregate
2302 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
2303 array operands to logical operations AND, OR and XOR do not have the
2304 same static lower and higher bounds
2305 * sem_ch5.adb, sinfo.ads: Correct typos in comments
2306
2307 2011-08-01 Robert Dewar <dewar@adacore.com>
2308
2309 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
2310 Replaces Last_Source_Node_In_Sequence.
2311 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
2312 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
2313 parens and blank in string (this was inconsistently implemented).
2314 * errout.ads
2315 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
2316 blank in string (this was inconsistently implemented).
2317 * gnat1drv.adb
2318 (Set_Global_Switches): Set formal mode switches appropriately
2319 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
2320 * par-prag.adb
2321 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
2322 call Set_Error_Msg_Lang to set "spark" as language name.
2323 * par.adb: Remove unnecessary call to set formal language for errout
2324 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
2325 appropriately and call Set_Error_Msg_Lang to set "spark" as language
2326 name.
2327 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
2328 calls to it, moved after resolution so that types are known
2329 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
2330 result of concatenation is not of type String
2331 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
2332 concatenation is not properly restricted
2333 * gnat_rm.texi: Add doc on pragma Spark_95.
2334 * gcc-interface/Makefile.in: Remove obsolete target pairs for
2335 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
2336 * gcc-interface/Make-lang.in: Update dependencies.
2337
2338 2011-08-01 Javier Miranda <miranda@adacore.com>
2339
2340 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
2341 condition that detects if the overridden operation must replace an
2342 existing entity.
2343
2344 2011-08-01 Javier Miranda <miranda@adacore.com>
2345
2346 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
2347 code declarations inserted by Insert_Actions in each alternative of the
2348 N_Case_Expression node.
2349
2350 2011-08-01 Robert Dewar <dewar@adacore.com>
2351
2352 * sem_ch6.adb: Minor code reorganization.
2353 * sem_util.adb: Minor reformatting.
2354
2355 2011-08-01 Pascal Obry <obry@adacore.com>
2356
2357 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
2358 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
2359
2360 2011-08-01 Yannick Moy <moy@adacore.com>
2361
2362 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
2363 literal or operator symbol which is prefixed
2364 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
2365 mode on access attributes.
2366 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
2367 that concatenation operands are properly restricted in formal mode
2368 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
2369 Analyze_Concatenation_Operand. Issue an error in formal mode if the
2370 result of the concatenation has a type different from String.
2371 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
2372 Analyze_Quantified_Expression, Analyze_Slice,
2373 Analyze_Null): issue an error in formal mode on unsupported constructs
2374 * sem_ch5.adb
2375 (Analyze_Block_Statement): only issue error on source block statement
2376 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
2377 function which returns the last node in a list of nodes for which
2378 Comes_From_Source returns True, if any
2379 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
2380 Last_Source_Node_In_Sequence
2381 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2382 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
2383 mode on unsupported constructs
2384 * sem_ch9.adb Do not return after issuing error in formal mode, as the
2385 rest of the actions may be needed later on since the error is marked as
2386 not serious.
2387 * sinfo.ads: Typos in comments.
2388
2389 2011-08-01 Pascal Obry <obry@adacore.com>
2390
2391 * projects.texi: Minor editing.
2392
2393 2011-08-01 Yannick Moy <moy@adacore.com>
2394
2395 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
2396 insertion character ~~
2397 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
2398 (Set_Error_Msg_Lang): new procedure which fixes the language for use
2399 with insertion character ~~
2400 (Set_Msg_Text): treat insertion character ~~
2401 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
2402 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
2403 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
2404 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
2405 errors related to the formal language restriction not serious
2406 (insertion character |).
2407 * par.adb (Par): set formal language for error messages if needed
2408 * sem_ch6.adb (Check_Missing_Return): take into account possible
2409 generated statements at the end of the function
2410 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
2411 enumeration value to define a new pragma SPARK_95
2412 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
2413 SPARK_Version): new type and variables to store the SPARK version
2414 (none by default).
2415 (SPARK_Mode): return True when SPARK_Version is set
2416 * par-prag.adb: Correct indentation
2417 (Prag): take Pragma_SPARK_95 into account
2418 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
2419 into account.
2420
2421 2011-08-01 Robert Dewar <dewar@adacore.com>
2422
2423 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
2424 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
2425 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
2426
2427 2011-08-01 Pascal Obry <obry@adacore.com>
2428
2429 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
2430 Target_Name to Get_Path call.
2431 (Parse_Single_Project): Likewise.
2432 (Post_Parse_Context_Clause): Likewise.
2433 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
2434 Call Initialise_Project_Path with the proper Target_Name.
2435 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
2436 search path.
2437 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
2438 with the proper Target_Name.
2439 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
2440 Part.Parse routine.
2441 (Parse_Project_And_Apply_Config): Likewise.
2442 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
2443 This is fine as this part of the code is supporting only native
2444 compilation.
2445 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
2446 is fine as this part of the code is supporting only native compilation.
2447
2448 2011-08-01 Yannick Moy <moy@adacore.com>
2449
2450 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
2451 of homonym, unless the homonym is one of the cases allowed in SPARK
2452 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
2453 package declaration occurring after a body.
2454
2455 2011-08-01 Robert Dewar <dewar@adacore.com>
2456
2457 * checks.adb, exp_ch4.adb: Minor reformatting.
2458
2459 2011-08-01 Javier Miranda <miranda@adacore.com>
2460
2461 * einfo.ads (Access_Disp_Table): Fix documentation.
2462 (Dispatch_Table_Wrappers): Fix documentation.
2463
2464 2011-08-01 Pascal Obry <obry@adacore.com>
2465
2466 * prj-env.adb, prj-env.ads: Minor reformatting.
2467
2468 2011-08-01 Yannick Moy <moy@adacore.com>
2469
2470 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
2471 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2472 procedures out of these packages.
2473 * errout.ads, errout.adb
2474 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2475 procedures in of this package
2476 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
2477 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
2478 on misplaced later vs initial declarations, like in Ada 83
2479 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
2480 formal mode on attribute of private type whose full type declaration
2481 is not visible
2482 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
2483 package declaration inside a package specification
2484 (Analyze_Full_Type_Declaration): issue error in formal mode on
2485 controlled type or discriminant type
2486 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
2487 user-defined operator means that it should come from the source
2488 (New_Overloaded_Entity): issue error in formal mode on overloaded
2489 entity.
2490 * sem_ch6.ads, sem_ch13.ads: typos in comments.
2491
2492 2011-08-01 Thomas Quinot <quinot@adacore.com>
2493
2494 * atree.adb: Minor reformatting.
2495 * checks.adb: Minor reformatting.
2496
2497 2011-08-01 Vincent Celier <celier@adacore.com>
2498
2499 * s-parame-vms-ia64.ads: Fix typo in comment
2500 Minor reformatting
2501 * s-parame-vms-restrict.ads: Removed, unused.
2502
2503 2011-08-01 Javier Miranda <miranda@adacore.com>
2504
2505 * exp_ch3.adb
2506 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
2507 * sem_ch3.adb
2508 (Constrain_Index): Remove side effects in the evaluation of the bounds.
2509 * sem_ch3.ads, sem_ch3.adb
2510 (Is_Constant_Bound): New extended version of the subprogram that was
2511 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
2512 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
2513 * sem_aux.ads (Constant_Value): Fix typo in comment.
2514 * checks.adb (Generate_Index_Checks): New implementation which, for
2515 array objects with constant bounds, generates the runtime check
2516 referencing the bounds of the array type. For other cases this routine
2517 provides its previous behavior obtaining such values from the array
2518 object.
2519 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
2520 parent type.
2521 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
2522 we cannot have semantic interpretations of the new node.
2523
2524 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2525
2526 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
2527 expressions.
2528
2529 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2530
2531 * sem_ch8.adb: Minor code editing.
2532 * s-vxwext.adb: Remove trailing space.
2533 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
2534 consistency with other files.
2535
2536 2011-08-01 Thomas Quinot <quinot@adacore.com>
2537
2538 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
2539
2540 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2541
2542 * par-ch10.adb: reject parameterized expressions as compilation unit.
2543 * sem_ch4.adb: handle properly conditional expression with overloaded
2544 then_clause and no else_clause.
2545
2546 2011-08-01 Tristan Gingold <gingold@adacore.com>
2547
2548 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
2549 like done by System.Aux_DEC.
2550 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
2551
2552 2011-08-01 Yannick Moy <moy@adacore.com>
2553
2554 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
2555 missing label at end of declaration (subprogram or package)
2556 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
2557 of positional and named parameter association
2558 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
2559 Error_Msg_SP which adds a prefix to the error message giving the name
2560 of the formal language analyzed
2561 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
2562 access result type in subprogram, unconstrained array as result type,.
2563 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
2564 procedure
2565 * sem_ch8.adb: Code clean up.
2566
2567 2011-08-01 Javier Miranda <miranda@adacore.com>
2568
2569 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
2570 * einfo.ads (Access_Disp_Table): Fix documentation.
2571 (Dispatch_Table_Wrappers): Fix documentation.
2572 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
2573 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
2574 to enforce the documentation of this attribute.
2575 (Set_Is_Interface): Cleanup the assertion.
2576 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
2577 the Underlying_Type entity before reading attribute Access_Disp_Table.
2578 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
2579 Locate the Underlying_Type before reading attribute Access_Disp_Table.
2580 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
2581 the Underlying_Type entity before reading attribute Access_Disp_Table.
2582 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
2583 Locate the Underlying_Type entity before reading attribute
2584 Access_Disp_Table.
2585
2586 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2587
2588 * s-poosiz.ads: Additional overriding indicators.
2589
2590 2011-08-01 Yannick Moy <moy@adacore.com>
2591
2592 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
2593 formal mode.
2594 (Analyze_Iteration_Scheme): issue error in formal mode when loop
2595 parameter specification does not include a subtype mark.
2596 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
2597 formal mode on abstract subprogram.
2598 (Analyze_Subprogram_Specification): issue error in formal mode on
2599 user-defined operator.
2600 (Process_Formals): issue error in formal mode on access parameter and
2601 default expression.
2602 * sem_ch9.adb (Analyze_Abort_Statement,
2603 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
2604 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
2605 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
2606 Analyze_Requeue, Analyze_Selective_Accept,
2607 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
2608 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
2609 issue error in formal mode on user-defined raise statement.
2610
2611 2011-08-01 Thomas Quinot <quinot@adacore.com>
2612
2613 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
2614 declaration being hidden when overriding an implicit inherited
2615 subprogram.
2616 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
2617 (-gnats), do not complain about a source file that contains only a
2618 pragma No_Body.
2619
2620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2621
2622 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
2623 variable if already set.
2624
2625 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2626
2627 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
2628 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
2629 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
2630 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
2631 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
2632 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
2633 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
2634 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
2635 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
2636 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
2637 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
2638 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
2639 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
2640 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
2641 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
2642 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
2643 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
2644 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
2645 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
2646 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
2647 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
2648 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
2649 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
2650 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
2651 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
2652 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
2653 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
2654 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
2655 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
2656 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
2657 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
2658 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
2659 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
2660 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
2661 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
2662 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
2663 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
2664 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
2665 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
2666 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
2667 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
2668 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
2669 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
2670 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
2671 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
2672 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
2673 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
2674 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
2675 s-osinte-mingw.ads: Update to GPLv3 run-time license.
2676 Use GNAT instead of GNARL.
2677
2678 2011-08-01 Bob Duff <duff@adacore.com>
2679
2680 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2681 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
2682 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
2683 reformatting.
2684
2685 2011-08-01 Yannick Moy <moy@adacore.com>
2686
2687 * debug.adb (d.D) reverve flag for the SPARK mode
2688 (d.E) reverve flag for SPARK generation mode
2689 (d.F) reverve flag for Why generation mode
2690 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
2691 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
2692 functions which return True when the corresponding modes are set
2693 (Formal_Language): return "spark" or "alfa" when in formal verification
2694 mode.
2695 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
2696 Error_Msg to prefix the error message with a tag giving the formal
2697 language
2698 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
2699 message with a tag giving the formal language
2700 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
2701 block statement
2702 (Analyze_Case_Statement): issue error in formal mode on case statement
2703 with a single "others" case alternative
2704 (Analyze_Exit_Statement): issue errors in formal mode on exit
2705 statements which do not respect SPARK restrictions
2706 (Analyze_Goto_Statement): issue error in formal mode on goto statement
2707 (Check_Unreachable_Code): always issue an error (not a warning) in
2708 formal mode on unreachable code (concerns both code after an infinite
2709 loop and after an unconditional jump, both not allowed in SPARK)
2710 * sem_ch6.adb (Analyze_Return_Statement): add call to
2711 Set_Return_Present for a procedure containing a return statement
2712 (already done for functions in Analyze_Function_Return)
2713 (Analyze_Function_Return): issue error in formal mode on extended
2714 return or if return is not last statement in function
2715 (Check_Missing_Return): issue error in formal mode if function does
2716 not end with return or if procedure contains a return
2717 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
2718 function to detect if there is an inner scope of its parameter S which
2719 is a loop.
2720
2721 2011-08-01 Thomas Quinot <quinot@adacore.com>
2722
2723 * sem_ch6.ads: Minor reformatting.
2724
2725 2011-08-01 Javier Miranda <miranda@adacore.com>
2726
2727 * sem_util.adb (Abstract_Interface_List): Complete condition when
2728 processing private type declarations to avoid reading unavailable
2729 attribute.
2730 (Is_Synchronized_Tagged_Type): Complete condition when processing
2731 private extension declaration nodes to avoid reading unavailable
2732 attribute.
2733
2734 2011-08-01 Thomas Quinot <quinot@adacore.com>
2735
2736 * sem_ch3.adb: Minor reformatting.
2737
2738 2011-08-01 Thomas Quinot <quinot@adacore.com>
2739
2740 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
2741 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
2742 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
2743 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
2744 for VMS, instead parametrize the common implementation with
2745 System.Parameters declarations.
2746
2747 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
2748
2749 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
2750
2751 2011-08-01 Tristan Gingold <gingold@adacore.com>
2752
2753 * seh_init.c: Fix SEH handler installation on win64.
2754
2755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2756
2757 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
2758 double analysis of an anonymous access to subprogram, because it can
2759 lead to improper sharing of profiles and a back-end crash.
2760
2761 2011-08-01 Robert Dewar <dewar@adacore.com>
2762
2763 * make.adb, sem_ch4.adb: Minor reformatting.
2764 * gcc-interface/Make-lang.in: Update dependencies.
2765 * sem_util.adb, exp_ch5.adb: Minor reformatting.
2766
2767 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2768
2769 * gnat_rm.texi: Fix definition of Long_Integer.
2770
2771 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2772
2773 * exp_aggr.adb: check limit size of static aggregate unconditionally,
2774 to prevent storage exhaustion.
2775 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
2776 finalized is a function body, insert the cleanup code before the final
2777 return statement, to prevent spurious warnings.
2778 * s-pooglo.ads: add overriding indicator.
2779
2780 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2781
2782 * sem_ch4.adb (Operator_Check): improve error message when both a
2783 with_clause and a use_clause are needed to make operator usage legal.
2784 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
2785 determine whether a compilation unit is visible within an other,
2786 either through a with_clause in the current unit, or a with_clause in
2787 its library unit or one one of its parents.
2788
2789 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2790
2791 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
2792 over an arbitrary expression of an array or container type.
2793 * lib-xref.adb: clarify comment.
2794
2795 2011-08-01 Bob Duff <duff@adacore.com>
2796
2797 * einfo.ads: Minor reformatting.
2798 * debug.adb: Minor comment improvement.
2799
2800 2011-08-01 Javier Miranda <miranda@adacore.com>
2801
2802 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
2803 consider hidden subprograms as valid candidates.
2804
2805 2011-08-01 Arnaud Charlet <charlet@adacore.com>
2806
2807 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
2808
2809 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
2810
2811 * gnat_ugn.texi: Fix typo.
2812
2813 2011-08-01 Robert Dewar <dewar@adacore.com>
2814
2815 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
2816 lib-xref.adb: Minor reformatting
2817
2818 2011-08-01 Gary Dismukes <dismukes@adacore.com>
2819
2820 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
2821 when to generate a call to Move_Final_List.
2822 (Has_Controlled_Parts): Remove this function.
2823
2824 2011-08-01 Geert Bosch <bosch@adacore.com>
2825
2826 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
2827 "," in choice list.
2828
2829 2011-08-01 Thomas Quinot <quinot@adacore.com>
2830
2831 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
2832 explicit raise of a predefined exception as Comes_From_Source if the
2833 original N_Raise_Statement comes from source.
2834
2835 2011-08-01 Robert Dewar <dewar@adacore.com>
2836
2837 * sinfo.ads: Add comment.
2838 * sem_ch6.adb: Minor reformatting.
2839
2840 2011-08-01 Robert Dewar <dewar@adacore.com>
2841
2842 * freeze.adb (Freeze_Entity): Refine check for bad component size
2843 clause to avoid rejecting confirming clause when atomic/aliased present.
2844
2845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2846
2847 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
2848 better determine whether an entity reference is a write.
2849 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
2850 subcomponent.
2851 * lib-xref.adb (Output_References): Do no suppress a read reference at
2852 the same location as an immediately preceeding modify-reference, to
2853 handle properly in-out actuals.
2854
2855 2011-08-01 Tristan Gingold <gingold@adacore.com>
2856
2857 * env.c (__gnat_setenv) [VMS]: Refine previous change.
2858
2859 2011-08-01 Quentin Ochem <ochem@adacore.com>
2860
2861 * i-cstrin.adb (New_String): Changed implementation, now uses only the
2862 heap to compute the result.
2863
2864 2011-08-01 Robert Dewar <dewar@adacore.com>
2865
2866 * atree.ads: Minor reformatting.
2867
2868 2011-08-01 Emmanuel Briot <briot@adacore.com>
2869
2870 * g-expect.adb (Get_Command_Output): Fix memory leak.
2871
2872 2011-08-01 Geert Bosch <bosch@adacore.com>
2873
2874 * cstand.adb (P_Float_Type): New procedure to print the definition of
2875 predefined fpt types.
2876 (P_Mixed_Name): New procedure to print a name using mixed case
2877 (Print_Standard): Use P_Float_Type for printing floating point types
2878 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
2879 precision IEEE float.
2880
2881 2011-08-01 Thomas Quinot <quinot@adacore.com>
2882
2883 * sem_ch3.adb: Minor reformatting.
2884
2885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2886
2887 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
2888 the completion of a generic function, insert the new body rather than
2889 rewriting the original.
2890
2891 2011-08-01 Yannick Moy <moy@adacore.com>
2892
2893 * sinfo.ads, errout.ads: Typos in comments.
2894
2895 2011-08-01 Robert Dewar <dewar@adacore.com>
2896
2897 * par-endh.adb: Minor reformatting.
2898
2899 2011-08-01 Robert Dewar <dewar@adacore.com>
2900
2901 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
2902 (Pre_Post_Aspects): New subtype.
2903 * par-ch12.adb (P_Generic): New syntax for aspects in packages
2904 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
2905 * par-ch7.adb (P_Package): Remove Decl parameter
2906 (P_Package): Handle new syntax for aspects (before IS)
2907 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
2908 new aspect syntax
2909 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
2910 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
2911 (P_Package): Remove Decl parameter
2912 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
2913 aspects
2914 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
2915 specs
2916 * sem_util.ads, sem_util.adb (Static_Boolean): New function
2917 * sinfo.ads: Document new syntax for aspects in packages etc.
2918 * sprint.adb: Handle new syntax of aspects before IS in package
2919
2920 2011-08-01 Thomas Quinot <quinot@adacore.com>
2921
2922 * atree.ads: Minor reformatting.
2923 * sem_prag.adb: Minor reformatting.
2924
2925 2011-08-01 Robert Dewar <dewar@adacore.com>
2926
2927 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
2928 case expr alternative.
2929
2930 2011-08-01 Ed Schonberg <schonberg@adacore.com>
2931
2932 * sem_ch12.adb: Fix typo.
2933
2934 2011-08-01 Geert Bosch <bosch@adacore.com>
2935
2936 * sem_prag.adb (Check_No_Link_Name): New procedure.
2937 (Process_Import_Or_Interface): Use Check_No_Link_Name.
2938 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
2939 instead of Standard_Long_Long_Float_Size global. Preparation for
2940 eventual removal of per type constants.
2941 * exp_util.ads (Get_Stream_Size): New function returning the stream
2942 size value of subtype E.
2943 * exp_util.adb (Get_Stream_Size): Implement new function.
2944 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
2945 function.
2946 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
2947 * einfo.adb:
2948 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
2949
2950 2011-08-01 Geert Bosch <bosch@adacore.com>
2951
2952 * cstand.adb: Fix comments.
2953 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
2954 count of arguments.
2955
2956 2011-08-01 Robert Dewar <dewar@adacore.com>
2957
2958 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
2959
2960 2011-08-01 Geert Bosch <bosch@adacore.com>
2961
2962 * atree.ads: Fix comment.
2963
2964 2011-08-01 Robert Dewar <dewar@adacore.com>
2965
2966 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
2967 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
2968 * par.adb: Add with for Namet.Sp.
2969 * par-tchk.adb: Minor reformatting.
2970
2971 2011-08-01 Vincent Celier <celier@adacore.com>
2972
2973 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
2974 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
2975 of the init procedure of a SAL.
2976 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
2977 New procedure.
2978
2979 2011-08-01 Thomas Quinot <quinot@adacore.com>
2980
2981 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
2982 reformatting.
2983
2984 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2985
2986 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
2987
2988 2011-08-01 Thomas Quinot <quinot@adacore.com>
2989
2990 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
2991 conformant with its spec (return True only for types that have
2992 an overriding Initialize primitive operation that prevents them from
2993 having preelaborable initialization).
2994 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
2995 initialization for controlled types in Ada 2005 or later mode.
2996
2997 2011-08-01 Robert Dewar <dewar@adacore.com>
2998
2999 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
3000 Postcondition.
3001 (Same_Aspect): New function.
3002 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
3003 Type_Invariant, Precondition, Postcondition.
3004 * snames.ads-tmpl: Add Name_Type_Invariant.
3005
3006 2011-08-01 Robert Dewar <dewar@adacore.com>
3007
3008 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
3009 here.
3010 (Freeze_All_Ent): Fix error in handling inherited aspects.
3011 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
3012 already analyzed, but don't skip entire processing of a declaration,
3013 that's wrong in some cases of declarations being rewritten.
3014 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
3015 Don't delay for integer, string literals
3016 Treat predicates in usual manner for delay, remove special case code,
3017 not needed.
3018 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
3019 (Build_Predicate_Function): Update saved expression in aspect
3020 (Build_Invariant_Procedure): Update saved expression in aspect
3021 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
3022 of replacement of discriminant references if the reference is simple.
3023
3024 2011-08-01 Robert Dewar <dewar@adacore.com>
3025
3026 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
3027 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
3028 Static_Predicate and Dynamic_Predicate.
3029 (Build_Predicate_Function): Add processing for Static_Predicate
3030 and Dynamic_Predicate.
3031 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
3032 (From_Static_Predicate): New flag
3033 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
3034
3035 2011-08-01 Robert Dewar <dewar@adacore.com>
3036
3037 * usage.adb: Documentation cleanup for Ada version modes in usage.
3038 * expander.adb: Minor reformatting.
3039
3040 2011-08-01 Robert Dewar <dewar@adacore.com>
3041
3042 * atree.ads: Minor comment fix.
3043 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
3044 a-witeio.ads, sem_prag.adb: Minor reformatting.
3045
3046 2011-08-01 Doug Rupp <rupp@adacore.com>
3047
3048 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
3049 pointers. Use descrip.h header file for convenience. Add some
3050 comments.
3051
3052 2011-08-01 Robert Dewar <dewar@adacore.com>
3053
3054 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
3055 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
3056 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
3057 New procedure.
3058 (Check_Aspect_At_End_Of_Declarations): New procedure
3059 (Analye_Aspect_Specification): Minor changes for above procedures
3060 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
3061 specification node as well.
3062
3063 2011-08-01 Pascal Obry <obry@adacore.com>
3064
3065 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
3066 Windows files. Use GetFilesAttributes() in this case to check for file
3067 existence instead of returning with an error code.
3068
3069 2011-08-01 Vincent Celier <celier@adacore.com>
3070
3071 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
3072 High is above Source length.
3073
3074 2011-08-01 Robert Dewar <dewar@adacore.com>
3075
3076 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
3077
3078 2011-08-01 Robert Dewar <dewar@adacore.com>
3079
3080 * aspects.ads (Boolean_Aspects): New subtype.
3081 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
3082 for derived types in cases where the parent type and derived type have
3083 aspects.
3084 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
3085 with aspects when parent type also has aspects.
3086 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
3087 boolean expression at this point).
3088 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
3089 accordance with final decision on the Ada 2012 feature.
3090 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
3091
3092 2011-08-01 Matthew Heaney <heaney@adacore.com>
3093
3094 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
3095
3096 2011-08-01 Pascal Obry <obry@adacore.com>
3097
3098 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
3099 Fix Replace_Slice when High is above current string size.
3100 (Replace_Slice): Fix DL computation when High is above current
3101 string length.
3102
3103 2011-08-01 Gary Dismukes <dismukes@adacore.com>
3104
3105 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
3106
3107 2011-08-01 Matthew Heaney <heaney@adacore.com>
3108
3109 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
3110 of node.
3111
3112 2011-08-01 Pascal Obry <obry@adacore.com>
3113
3114 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
3115 reformatting.
3116
3117 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3118
3119 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
3120 access to protected subprograms in generic bodies.
3121 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
3122 protected type, indicate that the convention of the subprogram is
3123 Convention_Protected, because it may be used in subsequent declarations
3124 within the protected declaration.
3125
3126 2011-08-01 Vincent Celier <celier@adacore.com>
3127
3128 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
3129 and "final" procedures when the name of the library is "ada", to avoid
3130 duplicate symbols "adainit" and "adafinal" in executables.
3131
3132 2011-08-01 Ed Schonberg <schonberg@adacore.com>
3133
3134 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
3135 quantified expression that appears within a postcondition and uses the
3136 Ada2012 'Result attribute.
3137
3138 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3139
3140 * init.c (__gnat_error_handler): Cast reason to int.
3141 (__gnat_install_handler): Explain sa_sigaction use.
3142
3143 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
3144
3145 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
3146 subprogram has copy-in copy-out parameters, try to promote the mode of
3147 the return type if it is passed in registers.
3148
3149 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
3150
3151 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
3152 left operand as addressable.
3153
3154 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
3155
3156 * gcc-interface/gigi.h (build_function_stub): Remove.
3157 (build_return_expr): Likewise.
3158 (convert_vms_descriptor): Declare.
3159 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
3160 (build_function_stub): Move to...
3161 * gcc-interface/utils2.c (build_return_expr): Move to...
3162 * gcc-interface/trans.c (build_function_stub): ...here.
3163 (build_return_expr): ...here.
3164 (Subprogram_Body_to_gnu): Add local variable for language_function.
3165 Disconnect the parameter attributes cache, if any, once done with it.
3166 Call end_subprog_body only after setting the end_locus.
3167 Build the stub associated with the function, if any, at the very end.
3168 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
3169 variables and streamline control flow.
3170
3171 2011-07-23 Arnaud Charlet <charlet@adacore.com>
3172
3173 PR ada/49819
3174 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
3175 g-trasym-dwarf.adb.
3176
3177 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3178
3179 PR bootstrap/49794
3180 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
3181 Assign to act.sa_sigaction.
3182 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
3183 current->return_address to char * before arithmetic.
3184
3185 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3186
3187 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
3188 Correct argument types.
3189 Extract code from reason.
3190 (__gnat_install_handler): Assign to act.sa_sigaction.
3191
3192 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
3193
3194 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
3195 (GNAT1_OBJS): ...here.
3196
3197 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
3198
3199 PR ada/48711
3200 * g-socthi-mingw.adb (Fill): Fix formatting.
3201
3202 * gcc-interface/gigi.h: Move around comment.
3203
3204 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3205
3206 PR ada/46350
3207 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
3208
3209 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
3210
3211 PR ada/48711
3212 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
3213
3214 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
3215
3216 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
3217 range comparison if Pmode is SImode.
3218
3219 2011-07-12 Laurent GUERBY <laurent@guerby.net>
3220 Eric Botcazou <ebotcazou@adacore.com>
3221
3222 * adadecode.c: Wrap up in extern "C" block.
3223 * adadecode.h: Likewise.
3224 * adaint.c: Likewise. Remove 'const' keyword.
3225 * adaint.h: Likewise.
3226 * argv.c: Likewise.
3227 * atree.h: Likewise.
3228 * cio.c: Likewise.
3229 * cstreams.c: Likewise.
3230 * env.c: Likewise.
3231 * exit.c: Likewise.
3232 * fe.h: Likewise.
3233 * final.c: Likewise.
3234 * init.c: Likewise.
3235 * initialize.c: Likewise.
3236 * link.c: Likewise.
3237 * namet.h: Likewise.
3238 * nlists.h: Likewise.
3239 * raise.c: Likewise.
3240 * raise.h: Likewise.
3241 * repinfo.h: Likewise.
3242 * seh_init.c: Likewise.
3243 * targext.c: Likewise.
3244 * tracebak.c: Likewise.
3245 * uintp.h: Likewise.
3246 * urealp.h: Likewise.
3247 * xeinfo.adb: Wrap up generated C code in extern "C" block.
3248 * xsinfo.adb: Likewise.
3249 * xsnamest.adb: Likewise.
3250 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
3251 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
3252 * gcc-interface/misc.c: Likewise.
3253 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
3254 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
3255 ada/targext.o here...
3256 (GNAT_ADA_OBJS): ...and not here.
3257 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
3258 (GNATBIND_OBJS): Reorder.
3259
3260 2011-07-07 Richard Henderson <rth@redhat.com>
3261
3262 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
3263 dwarf2out_frame_init.
3264
3265 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
3266
3267 * gcc-interface/misc.c (gnat_init): Tweak previous change.
3268
3269 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3270
3271 PR target/39150
3272 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
3273
3274 2011-07-06 Richard Guenther <rguenther@suse.de>
3275
3276 * gcc-interface/misc.c (gnat_init): Merge calls to
3277 build_common_tree_nodes and build_common_tree_nodes_2.
3278 Re-initialize boolean_false_node.
3279
3280 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
3281 Olivier Hainque <hainque@adacore.com>
3282 Nicolas Setton <setton@adacore.com>
3283
3284 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
3285 the type according to the ARTIFICIAL_P parameter.
3286 (create_type_decl): Likewise.
3287 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
3288
3289 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
3290
3291 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
3292 (gnatbind): Likewise.
3293
3294 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3295
3296 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
3297
3298 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3299
3300 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
3301 local variable throughout. Remove useless call to Base_Type.
3302 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
3303 Take it also into account for the volatileness of the field. Set the
3304 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
3305
3306 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3307
3308 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
3309 on a dereference built for a by-ref object if it has an address clause.
3310
3311 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
3312
3313 * einfo.ads (Address_Taken): Document use for the second argument of
3314 Asm_Input and Asm_Output attributes.
3315 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
3316 argument is an entity name, then set Address_Taken on it.
3317 <Attribute_Asm_Output>: Likewise.
3318 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
3319 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
3320 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
3321 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
3322
3323 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
3324
3325 PR middle-end/46500
3326 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
3327
3328 2011-06-14 Joseph Myers <joseph@codesourcery.com>
3329
3330 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
3331 (ada/utils.o): Update dependencies.
3332 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
3333 ../../../libcpp/libcpp.a.
3334 * gcc-interface/utils.c: Include common/common-target.h.
3335 (process_attributes): Use targetm_common.have_named_sections.
3336
3337 2011-06-07 Richard Guenther <rguenther@suse.de>
3338
3339 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
3340 set_sizetype.
3341
3342 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3343
3344 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3345 TREE_THIS_NOTRAP flag.
3346
3347 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3348
3349 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
3350 Fix thinko.
3351
3352 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3353
3354 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
3355 constants whose full view has discriminants specially.
3356
3357 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3358
3359 * gcc-interface/utils.c: Include diagnostic.h.
3360 (gnat_write_global_declarations): Output debug information for all
3361 global type declarations before finalizing the compilation unit.
3362 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
3363
3364 2011-05-25 Jakub Jelinek <jakub@redhat.com>
3365
3366 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
3367
3368 2011-05-25 Kai Tietz <ktietz@redhat.com>
3369
3370 * adaint.c (__gnat_to_canonical_file_list_next): Use array
3371 initialization instead of const/none-const pointer assignment.
3372
3373 2011-05-24 Joseph Myers <joseph@codesourcery.com>
3374
3375 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
3376 $(EXTRA_GNAT1_OBJS).
3377 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
3378 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
3379 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
3380 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
3381 libcommon-target.a instead of prefix.o.
3382
3383 2011-05-21 Joseph Myers <joseph@codesourcery.com>
3384
3385 PR ada/49097
3386 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
3387
3388 2011-05-20 Joseph Myers <joseph@codesourcery.com>
3389
3390 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
3391 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
3392 instead of version.o.
3393
3394 2011-05-18 Kai Tietz <ktietz@redhat.com>
3395
3396 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
3397 boolean_false_node instead of integer_zero_node.
3398 (convert_with_check): Likewise.
3399 * gcc-interface/decl.c (choices_to_gnu): Likewise.
3400
3401 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
3402
3403 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
3404 type of the parameter is an unconstrained array, convert the actual to
3405 the type of the formal in the In Out and Out cases as well.
3406
3407 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3408
3409 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
3410 call build_function_type_array or build_varargs_function_type_array
3411 instead.
3412 (create_subprog_type): Don't call build_function_type; call
3413 build_function_type_vec instead.
3414
3415 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3416
3417 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
3418 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
3419 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
3420
3421 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
3422
3423 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
3424
3425 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
3426 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
3427
3428 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3429
3430 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3431
3432 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3433
3434 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
3435 instead of accessing TYPE_ARG_TYPES directly.
3436 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
3437
3438 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3439
3440 PR ada/48844
3441 * gcc-interface/gigi.h (get_variant_part): Declare.
3442 * gcc-interface/decl.c (get_variant_part): Make global.
3443 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
3444 types have the same constant size, are record types and T1 has a
3445 variant part while T2 doesn't.
3446
3447 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3448
3449 * gcc-interface/utils.c (begin_subprog_body): Do not call
3450 get_pending_sizes.
3451 (end_subprog_body): Likewise.
3452
3453 2011-05-04 Richard Guenther <rguenther@suse.de>
3454
3455 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
3456 int_const_binop.
3457 (pos_to_constructor): Likewise.
3458
3459 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
3460 Eric Botcazou <ebotcazou@adacore.com>
3461
3462 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
3463 of build_function_type. Adjust calls to...
3464 (build_raise_check): ...this. Do not take a void_tree parameter.
3465 Call build_function_type_list instead of build_function_type.
3466 Fix head comment and swap couple of conditional blocks.
3467
3468 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
3469
3470 * gnatvsn.ads (Library_Version): Bump to 4.7.
3471 (Current_Year): Bump to 2011.
3472
3473 2011-04-29 Michael Matz <matz@suse.de>
3474
3475 * gcc-interface/misc.c (gnat_handle_option): Set
3476 warn_maybe_uninitialized.
3477
3478 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
3479
3480 * gnat_ugn.texi (Complexity Metrics Control): Update link to
3481 the Watson/McCabe paper.
3482
3483 2011-04-23 Jim Meyering <meyering@redhat.com>
3484
3485 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
3486
3487 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3488
3489 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
3490 onto the new type.
3491
3492 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3493
3494 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
3495 parameter.
3496 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
3497 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
3498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
3499 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
3500 <all>: Do not set flags on the reused DECL node coming from an alias.
3501 Set DECL_IGNORED_P on the DECL node built for subprograms if they
3502 don't need debug info here...
3503 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
3504 (gigi): Adjust calls to create_subprog_decl.
3505 (build_raise_check): Likewise.
3506 (establish_gnat_vms_condition_handler): Likewise.
3507 (Compilation_Unit_to_gnu): Likewise.
3508 (gnat_to_gnu): Likewise.
3509
3510 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
3511
3512 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
3513 (NO_REORDER_ADAFLAGS): New variable.
3514 (EXTRA_GNATTOOLS): Always define.
3515 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
3516 Clean up and adjust list of files compiled with special options.
3517 * gcc-interface/Make-lang.in: Likewise.
3518 (ada/decl.o): Cosmetical change.
3519 (ada/misc.o): Remove dependency on $(PLUGIN_H).
3520
3521 2011-04-20 Jim Meyering <meyering@redhat.com>
3522
3523 * initialize.c (__gnat_initialize): Remove useless if-before-free.
3524
3525 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3526
3527 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
3528 $(CFLAGS) on the link line.
3529
3530 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3531
3532 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
3533 padded type built for the return type if it is unconstrained.
3534
3535 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
3536
3537 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
3538
3539 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3540
3541 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
3542 before calling TREE_CHAIN.
3543 * gcc-interface/misc.c (gnat_init_ts): New function.
3544 (LANG_HOOKS_INIT_TS): Define.
3545
3546 2011-04-12 Martin Jambor <mjambor@suse.cz>
3547
3548 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
3549 instead of cgraph_node.
3550
3551 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3552
3553 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
3554 alignment on fields of the RETURN type built for the Copy-In Copy-Out
3555 mechanism.
3556
3557 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3558
3559 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
3560 of aggregate types that contain a placeholder.
3561
3562 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
3563
3564 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
3565 TYPE_ARG_TYPES.
3566 (handle_type_generic_attribute): Likewise.
3567
3568 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
3569
3570 PR ada/47163
3571 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
3572
3573 2011-04-04 Kai Tietz <ktietz@redhat.com>
3574
3575 PR ada/47163
3576 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
3577 to flag value.
3578
3579 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3580
3581 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
3582 type case, do not strip a padding type around the array type.
3583
3584 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3585
3586 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
3587 types.
3588
3589 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3590
3591 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
3592 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
3593 code for -feliminate-unused-debug-types.
3594 (gnat_post_options): Likewise.
3595
3596 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3597
3598 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3599 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
3600 distinct copy.
3601
3602 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3603
3604 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
3605 DECL_ARTIFICIAL flag on enumeration types.
3606
3607 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3608
3609 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
3610 fat pointer types artificial unconditionally.
3611 <E_Array_Subtype>: Attach the base array type as a parallel type if it
3612 isn't artificial.
3613
3614 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3615
3616 * gcc-interface/gigi.h (get_dummy_type): Declare.
3617 (build_dummy_unc_pointer_types): Likewise.
3618 (finish_fat_pointer_type): Likewise.
3619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
3620 fat pointer type has been built, complete it in place.
3621 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
3622 and thin pointers. Remove useless variable.
3623 (finish_fat_pointer_type): Make global and move to...
3624 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
3625 (get_dummy_type): New function.
3626 (build_dummy_unc_pointer_types): Likewise.
3627 (gnat_pushdecl): Propage the name to the anonymous variants only.
3628 (update_pointer_to): Only adjust the pointer types in the unconstrained
3629 array case.
3630
3631 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3632
3633 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
3634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
3635 if this is a Taft amendment type and the full declaration is available.
3636 * gcc-interface/trans.c (process_type): Likewise.
3637 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
3638 (process_freeze_entity): Likewise.
3639 * gcc-interface/utils.c (dummy_global): New static variable.
3640 (gnat_write_global_declarations): If there are types declared as used
3641 at the global level, insert them in the global hash table.
3642
3643 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3644
3645 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
3646 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3647 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
3648 copy.
3649 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
3650 flag of the type accordingly.
3651 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
3652
3653 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3654
3655 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3656 finalizing types when updating the pointers to the designated type.
3657 <all>: Finalize the deferred types even if we didn't defer processing
3658 of incomplete types in this invocation.
3659
3660 2011-04-01 Olivier Hainque <hainque@adacore.com>
3661 Nicolas Setton <setton@adacore.com>
3662 Eric Botcazou <ebotcazou@adacore.com>
3663
3664 * gcc-interface/misc.c (gnat_descriptive_type): New function.
3665 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
3666
3667 2011-03-28 Kai Tietz <ktietz@redhat.com>
3668
3669 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
3670 Windows targets.
3671 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
3672 * system-mingw.ads (System): Change ZCX_By_Default default to True.
3673
3674 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
3675
3676 2011-03-28 Tristan Gingold <gingold@adacore.com>
3677
3678 PR ada/44431
3679 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
3680 Use ada output of gnatbind.
3681 (ada/b_gnatb.adb): Ditto.
3682 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
3683 (ada.mostlyclean, ada.stage1)
3684 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
3685 (ada.stagefeedback): Adjust.
3686 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
3687 Use ada output of gnatbind.
3688 (b_gnatm.adb): Ditto.
3689 (b_gnatl.o, b_gnatm.o): New rules.
3690
3691 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3692
3693 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3694 for the padded type built to support a specified size or alignment.
3695
3696 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3697
3698 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
3699 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3700 unconditionally to the end of the unit when the designated type is
3701 limited_with'ed.
3702 <all>: Rename local variable. Attempt to un-defer types only and do it
3703 for limited_with'ed types as well.
3704 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
3705 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
3706 consistently and remove redundant call to finalize_from_with_types.
3707
3708 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3709
3710 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
3711 subprograms without a previous spec declared in the same unit.
3712 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
3713 subprograms at the end of the unit instead of at the beginning.
3714 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
3715 isn't public for the special handling of non-inline functions nested
3716 inside inline external functions.
3717
3718 2011-03-25 Jeff Law <law@redhat.com>
3719
3720 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
3721
3722 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3723
3724 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
3725 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
3726 to compute Set_Size_Depends_On_Discriminant.
3727 (Layout_Type): Call it on array types in back-end layout mode.
3728 * sem_util.adb (Requires_Transient_Scope): Return true for array
3729 types only if the size depends on the value of discriminants.
3730 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
3731 type if the RHS is a call to a function that returns an unconstrained
3732 type with default discriminant.
3733
3734 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3735
3736 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
3737 non-conversion to the nominal result type at the end.
3738
3739 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3740
3741 * gcc-interface/trans.c (create_temporary): New function taken from...
3742 (create_init_temporary): ...here. Call it.
3743 (call_to_gnu): Create the temporary for the return value early, if any.
3744 Create it for a function with copy-in/copy-out parameters if there is
3745 no target; in other cases of copy-in/copy-out, use another temporary.
3746 Push the new binding level lazily. Add and rename local variables.
3747
3748 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3749
3750 * gcc-interface/decl.c (validate_size): Improve comments and tweak
3751 error message.
3752 (set_rm_size): Likewise.
3753
3754 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3755
3756 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3757 for the padded type built in order to support a specified alignment.
3758 Fix incorrect formatting.
3759
3760 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3761
3762 PR bootstrap/48216
3763 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
3764
3765 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3766
3767 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
3768 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
3769 to the end of the list. Adjust recursive call. Rename local variable.
3770 If REORDER is true, reorder components of the record type.
3771 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
3772 components_to_record and adjust the parameter list.
3773
3774 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3775
3776 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
3777 disabled, use the variable for bounds of loop iteration scheme.
3778
3779 2011-03-21 Kai Tietz <ktietz@redhat.com>
3780
3781 PR target/12171
3782 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
3783
3784 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3785
3786 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
3787 out whether the expression is read-only. Short-circuit placeholder
3788 case and rename a couple of local variables.
3789
3790 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3791
3792 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
3793 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
3794 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
3795 (convert): Deal with conversions from a smaller form type specially.
3796
3797 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
3798
3799 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
3800 its argument, except for the special -I- switch.
3801
3802 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
3803
3804 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
3805 "Ada Issues".
3806
3807 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
3808
3809 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
3810
3811 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
3812
3813 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
3814 GNAT_FORMAL.
3815 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
3816 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
3817 instead of GNAT_FORMAL. Protect the expression against multiple uses.
3818 Do not generate the check directly, instead instantiate the template
3819 check present in the descriptor.
3820 (make_descriptor_field): Move around.
3821 (build_vms_descriptor32): Build a template check in the POINTER field.
3822 (build_vms_descriptor): Remove useless suffixes.
3823 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
3824
3825 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
3826
3827 PR bootstrap/47467
3828 * targext.c: Include target files if IN_RTS is defined.
3829
3830 2011-01-26 Richard Guenther <rguenther@suse.de>
3831
3832 PR bootstrap/47467
3833 * targext.c: Include config.h.
3834 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
3835 dependency.
3836
3837 2011-01-04 Pascal Obry <obry@adacore.com>
3838 Eric Botcazou <ebotcazou@adacore.com>
3839
3840 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
3841
3842 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3843
3844 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
3845 end-of-case on the end label and its associated gotos, if any.
3846
3847 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3848
3849 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
3850 expressions of the parameter cache within the statement group of
3851 the CICO mechanism.
3852
3853 2011-01-04 Olivier Hainque <hainque@adacore.com>
3854 Eric Botcazou <ebotcazou@adacore.com>
3855
3856 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
3857 (set_end_locus_from_node): New function.
3858 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
3859 make and the function end_locus.
3860 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
3861 for the elaboration subprogram.
3862 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
3863 set the end_locus of the expression as well.
3864
3865 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3866
3867 PR ada/47131
3868 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
3869 variables that are referenced in exception handlers volatile.
3870
3871
3872 \f
3873 Copyright (C) 2011 Free Software Foundation, Inc.
3874
3875 Copying and distribution of this file, with or without modification,
3876 are permitted in any medium without royalty provided the copyright
3877 notice and this notice are preserved.
3878
3879 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3880 - fix bugs in the description of Source_Trace;
3881 - get rid of UNIT_NAME;
3882
3883 2011-08-02 Javier Miranda <miranda@adacore.com>
3884
3885 * exp_ch9.adb
3886 (Build_Dispatching_Requeue): Adding support for VM targets
3887 since we cannot directly reference the Tag entity.
3888 * exp_sel.adb (Build_K): Adding support for VM targets.
3889 (Build_S_Assignment): Adding support for VM targets.
3890 * exp_disp.adb
3891 (Default_Prim_Op_Position): In VM targets do not restrict availability
3892 of predefined interface primitives to compiling in Ada 2005 mode.
3893 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3894 restricted to compiling in Ada 2005 mode.
3895 (Make_VM_TSD): Generate code that declares and initializes the OSD
3896 record. Needed to support dispatching calls through synchronized
3897 interfaces.
3898 * exp_ch3.adb
3899 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3900 primitives associated with synchronized interfaces.
3901 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3902 primitives associated with synchronized interfaces.
3903
3904 2011-08-02 Yannick Moy <moy@adacore.com>
3905
3906 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3907 statements hidden in SPARK if preceded by the HIDE directive
3908 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3909 exception handlers as hidden in SPARK if preceded by the HIDE directive
3910 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3911 if starting with the HIDE directive
3912 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3913 starting with the HIDE directive; mark the declarations in a private
3914 part as hidden in SPARK if the private part starts with the HIDE
3915 directive
3916 * restrict.adb, restrict.ads
3917 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3918 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3919 argument node belongs to a part which is hidden in SPARK
3920 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3921 parts in SPARK; protect the possibly costly call to
3922 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3923 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3924 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3925 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3926 Tok_SPARK_Hide.
3927 (Scan): recognize special comment starting with '#' and followed by
3928 SPARK keyword "hide" as a HIDE directive.
3929
3930 2011-08-02 Yannick Moy <moy@adacore.com>
3931
3932 * types.ads, erroutc.ads: Minor reformatting.
3933
3934 2011-08-02 Vincent Celier <celier@adacore.com>
3935
3936 * link.c: Add response file support for cross platforms.
3937
3938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3939
3940 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3941 in an association, set parent field of copy before partial analysis.
3942 * sem_res.adb (Resolve_Slice): create reference to itype only when
3943 expansion is enabled.
3944
3945 2011-08-02 Yannick Moy <moy@adacore.com>
3946
3947 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3948 for new flag denoting which subprogram bodies are in ALFA
3949 * restrict.adb, sem_ch7.adb: Update comment
3950 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3951 sem_ch9.adb, sem_res.adb: Add calls to
3952 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3953 * sem_ch6.adb (Analyze_Function_Return): add calls to
3954 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3955 middle of the body, and extended return.
3956 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3957 False when missing return.
3958 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3959 to True for subprograms whose spec is in ALFA. Remove later on the flag
3960 on the entity used for a subprogram body when there exists a separate
3961 declaration.
3962 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3963 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3964 False, otherwise do nothing.
3965
3966 2011-08-02 Robert Dewar <dewar@adacore.com>
3967
3968 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3969
3970 2011-08-02 Yannick Moy <moy@adacore.com>
3971
3972 * sem_ch4.ads: minor formatting.
3973
3974 2011-08-02 Yannick Moy <moy@adacore.com>
3975
3976 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3977 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3978 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3979 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3980 opt.ads: cleanup of SPARK mode
3981
3982 2011-08-02 Yannick Moy <moy@adacore.com>
3983
3984 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3985 types.
3986 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3987 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3988 * sem_ch3.adb
3989 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3990 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3991 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3992 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3993 types.
3994 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3995 non-static range.
3996 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3997 functions whose return type is not in ALFA.
3998 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3999 specifications.
4000 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4001 parameter's type is not in ALFA.
4002 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4003 types are in ALFA.
4004
4005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4006
4007 * sem_ch6 (Analyze_Expression_Function): treat the function as
4008 Inline_Always, and introduce a subprogram declaration for it when it is
4009 not a completion.
4010 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4011 expression functions, so that the back-end can determine whether they
4012 can in fact be inlined.
4013 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4014 a function body comes from an expression function.
4015
4016 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4017
4018 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4019 null exclusions to test Can_Never_Be_Null on the anonymous access types
4020 of the formals rather than testing the formals themselves. Exclude this
4021 check in cases where the Old_Formal is marked as a controlling formal,
4022 to avoid issuing spurious errors for bodies completing dispatching
4023 operations (due to the flag not getting set on controlling access
4024 formals in body specs).
4025 (Find_Corresponding_Spec): When checking full and subtype conformance of
4026 subprogram bodies in instances, pass Designated and E in that order, for
4027 consistency with the expected order of the formals (New_Id followed by
4028 Old_Id).
4029
4030 2011-08-02 Robert Dewar <dewar@adacore.com>
4031
4032 * sem_ch8.adb: Minor reformatting.
4033
4034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4035
4036 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4037 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4038 primitive operations of class-wide actuals.
4039
4040 2011-08-02 Javier Miranda <miranda@adacore.com>
4041
4042 * exp_atag.ads, exp_atag.adb
4043 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4044 since its value is implicitly passed in argument Typ.
4045 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4046 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4047 Build_Common_Dispatching_Select_Statements.
4048
4049 2011-08-02 Robert Dewar <dewar@adacore.com>
4050
4051 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4052 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4053 Minor reformatting.
4054
4055 2011-08-02 Robert Dewar <dewar@adacore.com>
4056
4057 * sem_res.adb: Minor reformatting.
4058 * sem_prag.adb: Minor reformatting.
4059
4060 2011-08-02 Javier Miranda <miranda@adacore.com>
4061
4062 * exp_atag.adb, exp_atags.ads
4063 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4064 by the tagged type Entity. Required to use this routine in the VM
4065 targets since we do not have available the Tag entity in the VM
4066 platforms.
4067 * exp_ch6.adb
4068 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4069 Ada.Tags has not been previously loaded.
4070 * exp_ch7.adb
4071 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4072 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4073 * sem_aux.adb
4074 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4075 view of enclosing scopes. Required to handle enclosing scopes that
4076 are synchronized types whose full view is a task type.
4077 * exp_disp.adb
4078 (Build_VM_TSDs): Minor code improvement to avoid generating and
4079 analyzing lists with empty nodes.
4080 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4081 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4082 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4083 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4084 (Make_Select_Specific_Data_Table): Add support for VM targets.
4085 (Make_VM_TSD): Generate code to initialize the SSD structure of
4086 the TSD.
4087
4088 2011-08-02 Yannick Moy <moy@adacore.com>
4089
4090 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4091 cross-references section in ALI.
4092 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4093 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4094 Sub).
4095 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4096 subprogram or package entity of a node
4097 (Is_Local_Reference_Type): new function returns True for references
4098 selected in local cross-references.
4099 (Lt): function extracted from Lt in Output_References
4100 (Write_Entity_Name): function extracted from Output_References
4101 (Generate_Definition): generate reference with type 'D' for definition
4102 of objects (object declaration and parameter specification), with
4103 appropriate locations and units, for use in local cross-references.
4104 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4105 references of type 'I' for initialization in object definition.
4106 (Output_References): move part of function Lt and procedure
4107 Write_Entity_Name outside of the body. Ignore references of types 'D'
4108 and 'I' introduced for local cross-references.
4109 (Output_Local_References): new procedure to output the local
4110 cross-references sections.
4111 (Lref_Entity_Status): new array defining whether an entity is a local
4112 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4113 with 'I' type when initialization expression is present.
4114 * get_scos.adb, get_scos.ads: Correct comments and typos
4115
4116 2011-08-02 Javier Miranda <miranda@adacore.com>
4117
4118 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4119 the JVM target.
4120 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4121 the JVM target.
4122 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4123 TSD support.
4124
4125 2011-08-02 Vincent Celier <celier@adacore.com>
4126
4127 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4128 (No_Space_Img): New function
4129 (Find_Excluded_Sources): When reading from a file, record the file name
4130 and the line number for each excluded source.
4131 (Mark_Excluded_Sources): When reporting an error, if the excluded
4132 sources were read from a file, include file name and line number in
4133 the error message.
4134
4135 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4136
4137 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4138
4139 2011-08-02 Robert Dewar <dewar@adacore.com>
4140
4141 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4142
4143 2011-08-02 Javier Miranda <miranda@adacore.com>
4144
4145 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4146 generation of TSDs to the DOTNET compiler.
4147 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4148 generation of TSDs to the DOTNET compiler.
4149
4150 2011-08-02 Javier Miranda <miranda@adacore.com>
4151
4152 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4153 record of all the tagged types declared inside library level package
4154 declarations, library level package bodies or library level subprograms.
4155 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4156 associated with a given tagged type.
4157 (Build_VM_TSDs): New subprogram.
4158 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4159 compilation units that are subprograms.
4160 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4161 compilation units that are package bodies.
4162 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4163 units that are a package declaration or a package instantiation.
4164 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4165 reorganization to improve the error generated by the frontend when the
4166 function Ada.Tags.Secondary_Tag is not available.
4167 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4168 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4169
4170 2011-08-02 Javier Miranda <miranda@adacore.com>
4171
4172 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4173
4174 2011-08-02 Robert Dewar <dewar@adacore.com>
4175
4176 * s-imenne.ads: Minor reformatting.
4177
4178 2011-08-02 Robert Dewar <dewar@adacore.com>
4179
4180 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4181 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4182 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4183
4184 2011-08-02 Robert Dewar <dewar@adacore.com>
4185
4186 * einfo.ads (Materialize_Entity): Document this is only for renamings
4187 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4188 required debug information in the case where we transform the object
4189 declaration into a renaming declaration.
4190 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4191 object
4192 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4193 Materialize_Entity.
4194
4195 2011-08-02 Robert Dewar <dewar@adacore.com>
4196
4197 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4198 Suppress_Init_Procs.
4199 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4200 Suppress_Initialization/Initialization_Suppressed.
4201 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4202 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4203 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4204 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4205
4206 2011-08-02 Robert Dewar <dewar@adacore.com>
4207
4208 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4209 Minor reformatting.
4210
4211 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4212
4213 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4214 only have inheritable classwide pre/postconditions.
4215
4216 2011-08-02 Javier Miranda <miranda@adacore.com>
4217
4218 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4219 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4220 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4221 checks if the external tag of a type is the same as the external tag
4222 of some other declaration.
4223
4224 2011-08-02 Thomas Quinot <quinot@adacore.com>
4225
4226 * s-taskin.ads: Minor reformatting.
4227
4228 2011-08-02 Emmanuel Briot <briot@adacore.com>
4229
4230 * g-comlin.adb (Display_Help): swap the order in which it prints the
4231 short help and the general usage.
4232
4233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4234
4235 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4236 the aspect declarations and attach them to the generic copy for
4237 subsequent analysis.
4238 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4239 declarations of the generic tree to the new subprogram declarations.
4240 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4241 conditions that apply to a subprogram instance.
4242
4243 2011-08-02 Robert Dewar <dewar@adacore.com>
4244
4245 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4246
4247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4248
4249 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4250 private type with a tagged full view is not derived in the immediate
4251 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4252
4253 2011-08-02 Robert Dewar <dewar@adacore.com>
4254
4255 * exp_ch4.adb: Minor reformatting.
4256
4257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4258
4259 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4260 Ada2012 iterator, the loop will be rewritten during expansion into a
4261 while loop with a cursor and an element declaration. Do not analyze the
4262 body in this case, because if the container is for indefinite types the
4263 actual subtype of the elements will only be determined when the cursor
4264 declaration is analyzed.
4265
4266 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4267
4268 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4269 size/alignment related attributes in CodePeer_Mode.
4270
4271 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4272
4273 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4274 Prepend_Element, since this can result in the operation getting the
4275 wrong slot in the full type's dispatch table if the full type has
4276 inherited operations. The incomplete type's operation will get added
4277 to the proper position in the full type's primitives
4278 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4279 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4280 dispatching operations, since there are cases where nonprimitive
4281 subprograms can get added to the list of incomplete dependents (such
4282 as subprograms in nested packages).
4283 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4284 private part when determining whether to add a primitive with a
4285 parameter of a tagged incomplete type to the Private_Dependents list.
4286 Such primitives can also occur in the visible part, and should not have
4287 been excluded from being private dependents.
4288 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4289 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4290 list of a Taft-amendment incomplete type is a primitive before issuing
4291 an error that the full type must appear in the same unit. There are
4292 cases where nonprimitives can be in the list (such as subprograms in
4293 nested packages).
4294 * sem_disp.adb (Derives_From): Use correct condition for checking that
4295 a formal's type is derived from the type of the corresponding formal in
4296 the parent subprogram (the condition was completely wrong). Add
4297 checking that was missing for controlling result types being derived
4298 from the result type of the parent operation.
4299
4300 2011-08-02 Yannick Moy <moy@adacore.com>
4301
4302 * errout.adb (First_Node): minor renaming
4303 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4304 first node.
4305
4306 2011-08-02 Yannick Moy <moy@adacore.com>
4307
4308 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4309 before accessing operands.
4310 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4311 decide whether an initialization expression respects SPARK rules, as
4312 the plain node is the expanded one. This allows for more valid warnings
4313 to be issued.
4314 * gnat_rm.texi: Minor update.
4315
4316 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4317
4318 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4319 previous change.
4320
4321 2011-08-02 Robert Dewar <dewar@adacore.com>
4322
4323 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4324
4325 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4326
4327 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4328 loop statements and the element renaming declaration with a block when
4329 the element type is controlled.
4330
4331 2011-08-02 Yannick Moy <moy@adacore.com>
4332
4333 * sinfo.ads: Minor formatting.
4334
4335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4336
4337 * sem_aggr.adb (Add_Association): if the association has a box and no
4338 expression, use the Sloc of the aggregate itself for the new
4339 association.
4340 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4341 the Original_Node.
4342
4343 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4344
4345 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4346 When a container is provided via a function call, generate a renaming
4347 of the function result. This avoids the creation of a transient scope
4348 and the premature finalization of the container.
4349 * exp_ch7.adb (Is_Container_Cursor): Removed.
4350 (Wrap_Transient_Declaration): Remove the supression of the finalization
4351 of the list controller when the declaration denotes a container cursor,
4352 it is not needed.
4353
4354 2011-08-02 Yannick Moy <moy@adacore.com>
4355
4356 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4357 node is from source, instead of the original node being from source.
4358 * sem_aggr.adb
4359 (Resolve_Array_Aggregate): refine the check for a static expression, to
4360 recognize also static ranges
4361 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4362 Array_Type_Declaration): postpone the test for the type being a subtype
4363 mark after the type has been resolved, so that component-selection and
4364 expanded-name are discriminated.
4365 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4366 to distinguish the case of an iteration scheme, so that an error is
4367 issed on a non-static range in SPARK except in an iteration scheme.
4368 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4369 In_Iter_Schm = True.
4370 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4371 user-defined operators so that they are allowed in renaming
4372 * sem_ch8.adb
4373 (Find_Selected_Component): refine the check for prefixing of operators
4374 so that they are allowed in renaming. Move the checks for restrictions
4375 on selector name after analysis discriminated between
4376 component-selection and expanded-name.
4377 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4378 concatenation argument of string type if it is static.
4379 * sem_util.adb, sem_util.ads
4380 (Check_Later_Vs_Basic_Declarations): add a new function
4381 Is_Later_Declarative_Item to decice which declarations are allowed as
4382 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4383 mode, add that renamings are considered as later items.
4384 (Enclosing_Package): new function to return the enclosing package
4385 (Enter_Name): correct the rule for homonyms in SPARK
4386 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4387 from source (result of expansion) to avoid issuing wrong warnings.
4388
4389 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4390
4391 * errout.adb: On anything but an expression First_Node returns its
4392 argument.
4393
4394 2011-08-02 Pascal Obry <obry@adacore.com>
4395
4396 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4397
4398 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4399
4400 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4401 Set the associated loop as the related expression of internally
4402 generated cursors.
4403 * exp_ch7.adb (Is_Container_Cursor): New routine.
4404 (Wrap_Transient_Declaration): Supress the finalization of the list
4405 controller when the declaration denotes a container cursor.
4406
4407 2011-08-02 Yannick Moy <moy@adacore.com>
4408
4409 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4410 command line now.
4411 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4412 expression is a simple expression. This check cannot be performed in
4413 the semantics, so just drop it.
4414 (P_Index_Or_Discriminant_Constraint): move check that the index or
4415 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4416 semantics. Other cases were previously checked in the semantics.
4417 * par-ch4.adb (P_Name): move checks that a selector name is not
4418 character literal or an operator symbol to Find_Selected_Component in
4419 the semantics
4420 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4421 declarations are not placed after later declarations in a separate
4422 procedure in Sem_Util (possibly not the best choice?), to be used both
4423 during parsing, for Ada 83 mode, and during semantic analysis, for
4424 SPARK mode.
4425 * par-endh.adb (Check_End): move check that end label is not missing
4426 to Process_End_Label in the semantics
4427 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4428 the special case for SPARK restriction
4429 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4430 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4431 parameter Force to issue the error message even on internal node (used
4432 for generated end label). Call Check_Restriction to check when an error
4433 must be issued. In SPARK mode, issue an error message even if the
4434 restriction is not set.
4435 (Check_Restriction): new procedure with an additional out parameter to
4436 inform the caller that a message has been issued
4437 * sem_aggr.adb: Minor modification of message
4438 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4439 instead of issuing an error message directly
4440 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4441 declarations are not placed after later declarations, by calling
4442 Check_Later_Vs_Basic_Declarations
4443 (Analyze_Subtype_Declaration): move here the check that an index or
4444 discriminant constraint must be a subtype mark. Change the check that
4445 a subtype of String must start at one so that it works on subtype marks.
4446 * sem_ch4.adb (Analyze_Call): move here the check that a named
4447 association cannot follow a positional one in a call
4448 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4449 instead of issuing an error message directly
4450 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4451 selector name is not a character literal or an operator symbol. Move
4452 here the check that the prefix of an expanded name cannot be a
4453 subprogram or a loop statement.
4454 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4455 procedure called from parsing and semantics to check that basic
4456 declarations are not placed after later declarations
4457 (Process_End_Label): move here the check that end label is not missing
4458
4459 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4460
4461 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4462 representation clause in codepeer mode, since it confuses CodePeer and
4463 does not bring useful info.
4464
4465 2011-08-02 Ed Falis <falis@adacore.com>
4466
4467 * init.c: initialize fp hw on MILS.
4468
4469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4470
4471 * errout.adb (First_Node): for bodies, return the node itself (small
4472 optimization). For other nodes, do not check source_unit if the node
4473 comes from Standard.
4474
4475 2011-08-02 Robert Dewar <dewar@adacore.com>
4476
4477 * exp_ch3.adb: Minor comment additions.
4478 * sem_ch13.adb: Minor reformatting.
4479
4480 2011-08-02 Pascal Obry <obry@adacore.com>
4481
4482 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4483
4484 2011-08-02 Robert Dewar <dewar@adacore.com>
4485
4486 * sem_attr.adb: Minor reformatting.
4487
4488 2011-08-02 Robert Dewar <dewar@adacore.com>
4489
4490 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4491 (Has_Default_Component_Value): Removed
4492 * einfo.ads Comment updates
4493 (Has_Default_Aspect): Replaces Has_Default_Value
4494 (Has_Default_Component_Value): Removed
4495 * exp_ch13.adb
4496 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4497 * exp_ch3.adb
4498 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4499 (Get_Simple_Init_Val): Handle Default_Value aspect
4500 (Needs_Simple_Initialization): Handle Default_Value aspect
4501 * exp_ch3.ads: Needs_Simple_Initialization
4502 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4503 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4504 * sem_ch13.adb
4505 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4506 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4507 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4508
4509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4510
4511 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4512 package containing iteration primitives.
4513 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4514
4515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4516
4517 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4518 "of", pre-analyze expression in case it is a function call with
4519 finalization actions that must be placed ahead of the loop.
4520 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4521 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4522
4523 2011-08-02 Geert Bosch <bosch@adacore.com>
4524
4525 * cstand.adb (Create_Float_Types): Only consider C's long double for
4526 Long_Long_Float, in addition to double.
4527
4528 2011-08-02 Robert Dewar <dewar@adacore.com>
4529
4530 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4531 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4532 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4533 Minor reformatting.
4534
4535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4536
4537 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4538 indexed component.
4539
4540 2011-08-02 Javier Miranda <miranda@adacore.com>
4541
4542 * einfo.ads, einfo.adb
4543 (Original_Access_Type): Move this attribute to Node26 since there was
4544 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4545 which causes conflicts and breaks the generation of the .NET compiler.
4546 (Interface_Name): Add missing documentation on JGNAT only uses of
4547 this attribute.
4548
4549 2011-08-02 Geert Bosch <bosch@adacore.com>
4550
4551 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4552 (Find_Back_End_Float_Type): Likewise
4553 (Create_Back_End_Float_Types): Likewise
4554 (Create_Float_Types): Likewise
4555 (Register_Float_Type): Likewise
4556 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4557 Nlist and split out type selection in new local Find_Base_Type function.
4558 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4559 Nlist
4560 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4561
4562 2011-08-02 Robert Dewar <dewar@adacore.com>
4563
4564 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4565 alpha order).
4566 * opt.ads: Minor comment change.
4567 * sem_ch12.adb: Minor code reorganization.
4568
4569 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4570
4571 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4572 subtype's list of rep items to the list on the full subtype in the case
4573 where the lists are the same.
4574
4575 2011-08-02 Geert Bosch <bosch@adacore.com>
4576
4577 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4578 using the one from System.Strings, which also deallocates all strings.
4579
4580 2011-08-02 Geert Bosch <bosch@adacore.com>
4581
4582 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4583 function.
4584 * gcc-interface/Make-lang.in: Update dependencies.
4585
4586 2011-08-02 Olivier Hainque <hainque@adacore.com>
4587
4588 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4589 end_locus.
4590
4591 2011-08-02 Javier Miranda <miranda@adacore.com>
4592
4593 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4594 associated with anonymous access to subprograms.
4595
4596 2011-08-02 Geert Bosch <bosch@adacore.com>
4597
4598 * opt.ads
4599 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4600 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4601 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4602 (Add_Symbol_Definition): Move to switch-c.adb
4603 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4604 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4605 (Add_Symbol_Definition): Move to switch-c.adb.
4606 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4607 * sem_warn.adb
4608 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4609 Move to warnsw.adb.
4610 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4611 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4612 Move to warnsw.adb.
4613 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4614 (Add_Symbol_Definition): Moved from Prepcomp.
4615 * switch-c.ads: Update copyright notice. Use String_List instead of
4616 Argument_List, removing dependency on System.OS_Lib.
4617
4618 2011-08-02 Yannick Moy <moy@adacore.com>
4619
4620 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4621 mode on initialization expression which does not respect SPARK
4622 restrictions.
4623 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4624 if the tree referenced by its argument represents an initialization
4625 expression in SPARK, suitable for initializing an object in an object
4626 declaration.
4627
4628 2011-08-02 Javier Miranda <miranda@adacore.com>
4629
4630 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4631 internally generated access to subprogram with its associated protected
4632 subprogram type.
4633 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4634
4635 2011-08-02 Geert Bosch <bosch@adacore.com>
4636
4637 * cstand.adb (Register_Float_Type): Print information about type to
4638 register, if the Debug_Flag_Dot_B is set.
4639 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4640 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4641 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4642 with a requested precision of more than Max_Digits digits and no more
4643 than Max_Base_Digits digits, if a range specification is present and the
4644 Predefined_Float_Types list has a suitable type to derive from.
4645 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4646 case of type completion with pragma Import
4647 * sem_prag.adb
4648 (Process_Import_Predefined_Type): Processing to complete a type
4649 with pragma Import. Currently supports floating point types only.
4650 (Set_Convention_From_Pragma): Do nothing without underlying type.
4651 (Process_Convention): Guard against absence of underlying type,
4652 which may happen when importing incomplete types.
4653 (Process_Import_Or_Interface): Handle case of importing predefined
4654 types. Tweak error message.
4655
4656 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4657
4658 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4659 functions to previous change. Reorganize code slightly.
4660
4661 2011-08-02 Geert Bosch <bosch@adacore.com>
4662
4663 * back_end.ads (Register_Type_Proc): New call back procedure type for
4664 allowing the back end to provide information about available types.
4665 (Register_Back_End_Types): New procedure to register back end types.
4666 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4667 available types.
4668 * cstand.adb (Back_End_Float_Types): New list for floating point types
4669 supported by the back end.
4670 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4671 (Copy_Float_Type): New procedure to make new copies of predefined types.
4672 (Register_Float_Type): New call back procedure to populate the BEFT list
4673 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4674 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4675 (Create_Float_Types): New procedure to create entities for floating
4676 point types predefined in Standard, and put these and any remaining
4677 BEFTs on the Predefined_Float_Types list.
4678 * stand.ads (Predefined_Float_Types): New list for predefined floating
4679 point types that do not have declarations in package Standard.
4680
4681 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4682
4683 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4684 entity node for the unit containing the parameter.
4685 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4686 (Add_Inlined_Subprogram): Likewise.
4687 * gcc-interface/Make-lang.in: Update dependencies.
4688
4689 2011-08-02 Thomas Quinot <quinot@adacore.com>
4690
4691 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4692 suitable value.
4693
4694 2011-08-02 Geert Bosch <bosch@adacore.com>
4695
4696 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4697
4698 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4699
4700 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4701 computed value of Base_Type.
4702
4703 2011-08-02 Yannick Moy <moy@adacore.com>
4704
4705 * restrict.adb (Check_Restriction): issue an error for any use of
4706 class-wide, even if the No_Dispatch restriction is not set.
4707 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4708 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4709 when completing a private extension, the type named in the private part
4710 is not the same as that named in the visible part.
4711 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4712 of an inherited primitive operations of a tagged type or type extension
4713 that returns the tagged type.
4714 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4715 function which returns True for an implicit operation inherited by the
4716 derived type declaration for the argument type.
4717 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4718 order.
4719
4720 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4721
4722 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4723 Process_Bounds, to perform analysis with expansion of a range or an
4724 expression that is the iteration scheme for a loop.
4725 (Analyze_Iterator_Specification): If domain of iteration is given by a
4726 function call with a controlled result, as is the case if call returns
4727 a predefined container, ensure that finalization actions are properly
4728 generated.
4729 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4730
4731 2011-08-02 Javier Miranda <miranda@adacore.com>
4732
4733 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4734 * gcc-interface/Make-lang.in: Update dependencies.
4735
4736 2011-08-02 Javier Miranda <miranda@adacore.com>
4737
4738 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4739 determine if the analysis is performed using N or Original_Node (N).
4740 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4741 functionality of routine Is_Variable avoids code duplication.
4742 * checks.adb (Determine_Range): Handle temporaries generated by
4743 Remove_Side_Effects.
4744
4745 2011-08-02 Javier Miranda <miranda@adacore.com>
4746
4747 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4748 expansion of the condition. Required since the previous analysis was
4749 done with expansion disabled (see Resolve_Quantified_Expression) and
4750 hence checks were not inserted and record comparisons have not been
4751 expanded.
4752
4753 2011-08-02 Ed Falis <falis@adacore.com>
4754
4755 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4756 Update header.
4757
4758 2011-08-02 Bob Duff <duff@adacore.com>
4759
4760 * opt.ads: Minor comment fix.
4761
4762 2011-08-02 Bob Duff <duff@adacore.com>
4763
4764 * sem_ch12.adb (Analyze_Package_Instantiation,
4765 Analyze_Subprogram_Instantiation): Turn off style checking while
4766 analyzing an instance. Whatever style checks that apply to the generic
4767 unit should apply, so it makes no sense to apply them in an instance.
4768 This was causing trouble when compiling an instance of a runtime
4769 unit that violates the -gnatyO switch.
4770 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4771 one of the two case statements, causing spurious errors.
4772
4773 2011-08-02 Robert Dewar <dewar@adacore.com>
4774
4775 * uname.adb: Minor reformatting.
4776 * gnatcmd.adb: Minor reformatting.
4777 * exp_attr.adb: Minor reformatting.
4778
4779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4780
4781 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4782 No_Dispatching_Calls, do not look for the Assign primitive, because
4783 predefined primitives are not created in this case.
4784
4785 2011-08-02 Bob Duff <duff@adacore.com>
4786
4787 * stylesw.ads: Minor comment fixes.
4788
4789 2011-08-02 Robert Dewar <dewar@adacore.com>
4790
4791 * freeze.adb (Add_To_Result): New procedure.
4792
4793 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4794
4795 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4796 time, if the specific run-time routines for handling streams of strings
4797 are not available, use the default mechanism.
4798
4799 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4800
4801 * s-regpat.ads: Fix typo.
4802
4803 2011-08-02 Vincent Celier <celier@adacore.com>
4804
4805 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4806 not null, call it to create the in memory config project file without
4807 parsing an existing default config project file.
4808
4809 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4810
4811 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4812
4813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4814
4815 * sem_elim.adb: an abstract subprogram does not need an eliminate
4816 pragma for its descendant to be eliminable.
4817
4818 2011-08-02 Ed Falis <falis@adacore.com>
4819
4820 * init.c: revert to handling before previous checkin for VxWorks
4821 * s-intman-vxworks.adb: delete unnecessary declarations related to
4822 using Ada interrupt facilities for handling signals.
4823 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4824 * s-intman-vxworks.ads: Import __gnat_install_handler as
4825 Initialize_Interrupts.
4826 * s-taprop-vxworks.adb: Delete Signal_Mask.
4827 (Abort_Handler): change construction of mask to unblock exception
4828 signals.
4829
4830 2011-08-02 Jerome Guitton <guitton@adacore.com>
4831
4832 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4833 Debug_Raise_Exception before propagation starts.
4834
4835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4836
4837 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4838 to Restriction_Check_Required.
4839 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4840 * sem_res.adb (Resolve_Call): Likewise.
4841 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4842
4843 2011-08-02 Bob Duff <duff@adacore.com>
4844
4845 * stylesw.ads: Update comment.
4846 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4847 * errout.ads: Remove obsolete comment.
4848
4849 2011-08-02 Javier Miranda <miranda@adacore.com>
4850
4851 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4852 (Set_Is_Safe_To_Reevaluate): new procedure.
4853 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4854 assignment is allowed on safe-to-reevaluate variables.
4855 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4856 temporary created to remove side effects in expressions that use
4857 the secondary stack as safe-to-reevaluate.
4858 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4859 variables that are not true constants.
4860
4861 2011-08-02 Robert Dewar <dewar@adacore.com>
4862
4863 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4864 sem_res.adb, sem_ch6.adb: Minor reformatting.
4865
4866 2011-08-02 Jerome Guitton <guitton@adacore.com>
4867
4868 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4869
4870 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4871
4872 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4873 not set Overridden_Operation if subprogram is an initialization
4874 procedure.
4875
4876 2011-08-02 Yannick Moy <moy@adacore.com>
4877
4878 * par-ch6.adb: Correct obsolete name in comments
4879 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4880 which takes two message arguments (existing function takes one), with
4881 second message used for continuation.
4882 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4883 block statements that originate from a source block statement, not
4884 generated block statements
4885 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4886 symmetry with procedure case
4887 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4888 function to issue an error in formal mode if a package specification
4889 contains more than one tagged type or type extension.
4890 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4891 parameters matching formals of tagged types are objects (or ancestor
4892 type conversions of objects), not general expressions. Issue an error
4893 on view conversions that are not involving ancestor conversion of an
4894 extended type.
4895 (Resolve_Type_Conversion): in formal mode, issue an error on the
4896 operand of an ancestor type conversion which is not an object
4897 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4898 procedure so that it works also for actuals of function calls
4899 (Is_Actual_Tagged_Parameter): new function which determines if its
4900 argument is an actual parameter of a formal of tagged type in a
4901 subprogram call
4902 (Is_SPARK_Object_Reference): new function which determines if the tree
4903 referenced by its argument represents an object in SPARK
4904
4905 2011-08-02 Robert Dewar <dewar@adacore.com>
4906
4907 * sem_ch3.adb: Minor reformatting
4908 Minor comment addition
4909 Minor error msg text change
4910
4911 2011-08-02 Javier Miranda <miranda@adacore.com>
4912
4913 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4914 function. Used to be more precise when we generate a variable plus one
4915 assignment to remove side effects in the evaluation of the Bound
4916 expressions.
4917 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4918 of the bound expression to force its re-analysis and thus expand the
4919 associated transient scope (if required). Code cleanup replacing the
4920 previous code that declared the constant entity by an invocation to
4921 routine Force_Evaluation which centralizes this work in the frontend.
4922
4923 2011-08-02 Robert Dewar <dewar@adacore.com>
4924
4925 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4926 (Base_Type): Now uses improved Is_Base_Type function
4927 * einfo.ads (Base_Type): Inline this function
4928
4929 2011-08-02 Robert Dewar <dewar@adacore.com>
4930
4931 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4932 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4933
4934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4935
4936 * gcc-interface/Make-lang.in: Update dependencies.
4937 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4938 targets.
4939
4940 2011-08-02 Yannick Moy <moy@adacore.com>
4941
4942 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4943 non-simple expression used in delta constraint
4944 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4945 index constraint which is not a subtype mark
4946 * par.adb: With and use Restrict
4947 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4948 mode on component type which is not a subtype mark and default
4949 expression on component
4950 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4951 of string which does not have a lower index bound equal to 1
4952 (Array_Type_Declaration): issue an error in formal mode on index or
4953 component type which is not a subtype mark, and on aliased keyword on
4954 component
4955 (Derived_Type_Declaration): issue an error in formal mode on interface,
4956 limited or abstract type
4957 (Record_Type_Declaration): issue an error in formal mode on interface
4958 (Record_Type_Definition): issue an error in formal mode on tagged types
4959 and type extensions not declared in the specification of a library unit
4960 package; on null non-tagged record; on variant part
4961
4962 2011-08-02 Vincent Celier <celier@adacore.com>
4963
4964 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4965 not declared for qualified library project when Library_Name is not
4966 declared, but Library_Dir is.
4967
4968 2011-08-02 Robert Dewar <dewar@adacore.com>
4969
4970 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4971 pragmas (affects aspects [Component_]Default_Value
4972 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4973 component type for the resolution
4974
4975 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4976
4977 * einfo.adb (Base_Type): Tune implementation for speed.
4978
4979 2011-08-02 Robert Dewar <dewar@adacore.com>
4980
4981 * freeze.adb: Minor reformatting.
4982
4983 2011-08-02 Thomas Quinot <quinot@adacore.com>
4984
4985 * scos.ads: Update comments.
4986
4987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4988
4989 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4990 base type, because the parent may be a subtype of a private type whose
4991 convention is established in a private part.
4992
4993 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4994
4995 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4996 statement in a block when the expansion of the return expression has
4997 created a finalization chain.
4998 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4999 with the parent node.
5000 Add N_Extended_Return_Statement to handle the case where a transient
5001 object declaration appears in the Return_Object_Declarations list of
5002 an extended return statement.
5003
5004 2011-08-02 Matthew Gingell <gingell@adacore.com>
5005
5006 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5007 unused parameter 'name'.
5008
5009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5010
5011 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5012 inherited operation, check whether its alias, which is the source
5013 operastion that it renames, has been marked eliminated.
5014
5015 2011-08-02 Javier Miranda <miranda@adacore.com>
5016
5017 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5018 in-mode parameter whose type is an access type since it can be used to
5019 modify its designated object. Enforce code that handles as safe an
5020 access type that is not access-to-constant but it is the result of a
5021 previous removal of side-effects.
5022 (Remove_Side_Effects): Minor code reorganization of cases which require
5023 no action. Done to incorporate documentation on new cases uncovered
5024 working in this ticket: no action needed if this routine was invoked
5025 too early and the nodes are not yet decorated.
5026 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5027 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5028 were issued with actuals that are implicitly provided by
5029 Force_Evaluation.
5030
5031 2011-08-02 Robert Dewar <dewar@adacore.com>
5032
5033 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5034
5035 2011-08-02 Yannick Moy <moy@adacore.com>
5036
5037 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5038 to issue an error in formal mode on attribute not supported in this mode
5039 (Analyze_Attribute): issue errors on standard attributes not supported
5040 in formal mode.
5041 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5042 comment, and issue error in formal mode on modulus which is not a power
5043 of 2.
5044 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5045 range.
5046 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5047 subtype mark.
5048 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5049 operator on modular type (except 'not').
5050
5051 2011-08-02 Robert Dewar <dewar@adacore.com>
5052
5053 * gnat_rm.texi: Minor reformatting.
5054
5055 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5056
5057 * s-osinte-linux.ads: Minor comment update and reformatting.
5058 * i-cexten.ads: Make this unit pure, as for its parent.
5059 Will allow its usage in more contexts if needed.
5060
5061 2011-08-02 Robert Dewar <dewar@adacore.com>
5062
5063 * s-utf_32.ads: Minor comment fix.
5064
5065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5066
5067 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5068 operation of a tagged synchronized type, handle the case where the
5069 controlling argument is overloaded.
5070
5071 2011-08-02 Yannick Moy <moy@adacore.com>
5072
5073 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5074 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5075 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5076 SPARK mode and formal verification mode on processing SPARK restriction
5077 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5078 requiring consistency checking.
5079
5080 2011-08-02 Robert Dewar <dewar@adacore.com>
5081
5082 * sem_res.adb: Minor reformatting.
5083
5084 2011-08-02 Robert Dewar <dewar@adacore.com>
5085
5086 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5087 a-cforse.ads: Remove unneeded with of Ada.Containers
5088 Remove commented out pragma Inline's
5089 Move specifications of new subprograms to the actual specs
5090
5091 2011-08-02 Yannick Moy <moy@adacore.com>
5092
5093 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5094 a-cforse.ads: Update comments.
5095
5096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5097
5098 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5099
5100 2011-08-02 Robert Dewar <dewar@adacore.com>
5101
5102 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5103 a-cforse.ads, a-cofove.ads: Minor reformatting.
5104
5105 2011-08-02 Claire Dross <dross@adacore.com>
5106
5107 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5108 a-cofove.ads: Add comments.
5109
5110 2011-08-02 Yannick Moy <moy@adacore.com>
5111
5112 * gnat_rm.texi: Document formal containers.
5113
5114 2011-08-02 Emmanuel Briot <briot@adacore.com>
5115
5116 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5117 are empty sections.
5118
5119 2011-08-02 Robert Dewar <dewar@adacore.com>
5120
5121 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5122 reformatting.
5123
5124 2011-08-02 Robert Dewar <dewar@adacore.com>
5125
5126 * aspects.adb: New aspects Default_Value and Default_Component_Value
5127 New format of Aspect_Names table checks for omitted entries
5128 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5129 handling of boolean aspects for derived types.
5130 New aspects Default_Value and Default_Component_Value
5131 New format of Aspect_Names table checks for omitted entries
5132 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5133 (Has_Default_Value): New flag
5134 (Has_Default_Component_Value): New flag
5135 (Has_Default_Value): New flag
5136 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5137 table.
5138 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5139 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5140 Default_Value and Default_Component_Value
5141 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5142 New aspects Default_Value and Default_Component_Value
5143 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5144 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5145
5146 2011-08-02 Vincent Celier <celier@adacore.com>
5147
5148 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5149 inherit library kind.
5150
5151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5152
5153 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5154 Minor reformatting.
5155
5156 2011-08-02 Robert Dewar <dewar@adacore.com>
5157
5158 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5159
5160 2011-08-02 Yannick Moy <moy@adacore.com>
5161
5162 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5163
5164 2011-08-02 Robert Dewar <dewar@adacore.com>
5165
5166 * impunit.adb: Add comment.
5167
5168 2011-08-02 Yannick Moy <moy@adacore.com>
5169
5170 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5171 qualification of aggregates in formal mode
5172 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5173 another aggregate
5174 (Resolve_Aggregate): complete the test that an aggregate is adequately
5175 qualified in formal mode
5176
5177 2011-08-02 Pascal Obry <obry@adacore.com>
5178
5179 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5180 * mlib-prj.adb: Supress warning when compiling binder generated file.
5181 (Build_Library): Supress all warnings when compiling the binder
5182 generated file.
5183
5184 2011-08-02 Yannick Moy <moy@adacore.com>
5185
5186 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5187 from here...
5188 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5189 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5190 Add with/use clauses to make Check_Formal_Restriction visible
5191
5192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5193
5194 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5195 in-parameters when type of the generic formal is private in the generic
5196 spec and non-private in the body.
5197
5198 2011-08-02 Claire Dross <dross@adacore.com>
5199
5200 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5201 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5202 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5203 * impunit.adb, Makefile.rtl: Take new files into account.
5204
5205 2011-08-02 Robert Dewar <dewar@adacore.com>
5206
5207 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5208 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5209
5210 2011-08-02 Yannick Moy <moy@adacore.com>
5211
5212 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5213 formal mode
5214 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5215 matching static array bounds, taking into account the special case of
5216 string literals
5217 * sem_ch3.adb: Typo in comment.
5218
5219 2011-08-02 Yannick Moy <moy@adacore.com>
5220
5221 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5222 which issues an error in formal mode if its argument node is originally
5223 from source
5224 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5225 has a discriminant specification so that it does not include the case
5226 of derived types
5227 (Derived_Type_Declaration): move here the test that a derived type has a
5228 discriminant specification
5229 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5230 first element of a component association before accessing its choices
5231 (presence of component association is not enough)
5232 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5233 declaration is a library item before accessing the next element in a
5234 list, as library items are not member of lists
5235 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5236 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5237 Check_Formal_Restriction whenever possible.
5238
5239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5240
5241 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5242 reference when needed.
5243
5244 2011-08-02 Bob Duff <duff@adacore.com>
5245
5246 * gnat_ugn.texi: Fix typo.
5247
5248 2011-08-02 Vincent Celier <celier@adacore.com>
5249
5250 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5251 archive file name. Do not use the full path name of archives for Open
5252 VMS.
5253
5254 2011-08-02 Robert Dewar <dewar@adacore.com>
5255
5256 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5257 Analyze_Aspect_Specifications
5258 * sem_ch13.adb
5259 (Analyze_Aspect_Specifications): New handling for boolean aspects
5260 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5261 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5262 sequence for Analyze_Aspect_Specifications
5263 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5264 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5265
5266 2011-08-02 Robert Dewar <dewar@adacore.com>
5267
5268 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5269 aspects, since these no longer exist.
5270
5271 2011-08-02 Robert Dewar <dewar@adacore.com>
5272
5273 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5274 semicolon, do not try to see if there are aspects following it.
5275 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5276 aspect spec.
5277
5278 2011-08-02 Robert Dewar <dewar@adacore.com>
5279
5280 * sem_ch8.adb, aspects.ads: Minor reformatting.
5281
5282 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5283
5284 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5285 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5286 extracted from...
5287 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5288
5289 2011-08-02 Yannick Moy <moy@adacore.com>
5290
5291 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5292 mode on subprogram declaration outside of package specification, unless
5293 it is followed by a pragma Import
5294 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5295 Access_Type_Declaration): issue error in formal mode on access type
5296 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5297 incomplete type
5298 (Analyze_Object_Declaration): issue error in formal mode on object
5299 declaration which does not respect SPARK restrictions
5300 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5301 declaration which does not respect SPARK restrictions
5302 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5303 error in formal mode on digits or delta constraint
5304 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5305 decimal fixed point type
5306 (Derived_Type_Declaration): issue error in formal mode on derived type
5307 other than type extensions of tagged record types
5308 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5309 with check on access definition
5310 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5311 mode on protected definition.
5312 (Analyze_Task_Definition): issue error in formal mode on task definition
5313
5314 2011-08-02 Robert Dewar <dewar@adacore.com>
5315
5316 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5317
5318 2011-08-02 Javier Miranda <miranda@adacore.com>
5319
5320 * sem_ch6.adb (Can_Override_Operator): New function.
5321 (Verify_Overriding_Indicator): Add missing code to check overriding
5322 indicator in operators. Fixes regression.
5323 (Check_Overriding_Indicator): Minor reformating after replacing the
5324 code that evaluates if the subprogram can override an operator by
5325 invocations to the above new function.
5326 * einfo.adb
5327 (Write_Field26_Name): Add missing code to ensure that, following
5328 the documentation in einfo.ads, this field is not shown as attribute
5329 "Static_Initialization" on non-dispatching functions.
5330
5331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5332
5333 * sem_res.adb (Resolve_Call): A call to
5334 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5335 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5336 i.e., when the second parameter is of type Time_Span.
5337
5338 2011-08-02 Vincent Celier <celier@adacore.com>
5339
5340 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5341 with an archive instead of -L<library dir> -l<library name>.
5342
5343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5344
5345 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5346 mark the base types In_Use in addition to making the operations
5347 use_visible.
5348
5349 2011-08-02 Ed Falis <falis@adacore.com>
5350
5351 * init.c: add and setup __gnat_signal_mask for the exception signals
5352 * s-inmaop-vxworks.adb: new file.
5353 * s-intman-vxworks.adb: remove unnecessary initializations and
5354 simplify remaining
5355 * s-intman-vxworks.ads: remove unnecessary variable
5356 * s-taprop-vxworks.adb: simplify signal initialization
5357
5358 2011-08-02 Robert Dewar <dewar@adacore.com>
5359
5360 * sem_ch8.adb: Minor code reorganization, comment updates.
5361
5362 2011-08-02 Robert Dewar <dewar@adacore.com>
5363
5364 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5365 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5366 here from Sem_Res.
5367 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5368 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5369
5370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5371
5372 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5373 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5374 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5375 use_type_clauses, to handle more efficiently use_type and use_all_type
5376 constructs.
5377 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5378 Ada2012 Use_All_Type clause.
5379 (Use_Class_Wide_Operations): new procedure.
5380
5381 2011-08-02 Robert Dewar <dewar@adacore.com>
5382
5383 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5384 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5385 expression to expression function.
5386
5387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5388
5389 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5390 if types are compatible.
5391
5392 2011-08-02 Yannick Moy <moy@adacore.com>
5393
5394 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5395 returns True if its argument array types have same dimension and same
5396 static bounds at each index.
5397 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5398 OUT or IN OUT paramaters which are not view conversions in SPARK.
5399 (Resolve_Arithmetic_Op): issue an error in formal mode on
5400 multiplication or division with operands of fixed point types which are
5401 not qualified or explicitly converted.
5402 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5403 Boolean or array type (except String) operands.
5404 (Resolve_Equality_Op): issue an error in formal mode on equality
5405 operators for array types other than String with non-matching static
5406 bounds.
5407 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5408 for array types with non-matching static bounds. Factorize the code in
5409 Matching_Static_Array_Bounds.
5410 (Resolve_Qualified_Expression): issue an error in formal mode on
5411 qualified expressions for array types with non-matching static bounds.
5412 (Resolve_Type_Conversion): issue an error in formal mode on type
5413 conversion for array types with non-matching static bounds
5414
5415 2011-08-02 Robert Dewar <dewar@adacore.com>
5416
5417 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5418
5419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5420
5421 * par-ch9.adb: save location of entry for proper error message.
5422
5423 2011-08-02 Javier Miranda <miranda@adacore.com>
5424
5425 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5426 (Use_Full_View) which permits this routine to climb through the
5427 ancestors using the full-view of private parents.
5428 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5429 Use_Full_View to true in calls to Is_Ancestor.
5430 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5431 true in call to Is_Ancestor.
5432 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5433 Use_Full_View to true in call to Is_Ancestor.
5434 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5435 call to Is_Ancestor.
5436 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5437 Use_Full_View to true in calls to Is_Ancestor.
5438 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5439 Make_Select_Specific_Data_Table, Register_Primitive,
5440 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5441 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5442 to true in call to Is_Ancestor.
5443 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5444 Use_Full_View to true in calls to Is_Ancestor.
5445 * exp_cg.adb
5446 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5447 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5448
5449 2011-08-02 Robert Dewar <dewar@adacore.com>
5450
5451 * gnat_rm.texi: Minor reformatting.
5452 * sem_prag.adb: Minor reformatting.
5453
5454 2011-08-02 Tristan Gingold <gingold@adacore.com>
5455
5456 * vms_data.ads: Add VMS qualifier for -gnateP.
5457
5458 2011-08-02 Robert Dewar <dewar@adacore.com>
5459
5460 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5461 * par-ch7.adb (P_Package): Proper placement of aspects for package
5462 decl/instantiation.
5463 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5464 (End_Statements): Add Is_Sloc parameterr
5465 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5466 (Check_End): Ad Is_Sloc parameter
5467 (End_Statements): Add Is_Sloc parameterr
5468
5469 2011-08-02 Vincent Celier <celier@adacore.com>
5470
5471 * ug_words: Add VMS qualifier equivalent to -gnateP:
5472 /SYMBOL_PREPROCESSING.
5473
5474 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5475
5476 * gnat-style.texi: For hexadecimal numeric literals the typical
5477 grouping of digits is 4 to represent 2 bytes.
5478 A procedure spec which is split into several lines is indented two
5479 characters.
5480
5481 2011-08-02 Yannick Moy <moy@adacore.com>
5482
5483 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5484 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5485 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5486 properly qualified
5487 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5488 choice in array aggregate
5489 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5490 mark as ancestor
5491 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5492 positional and named aggregate for record, or others in record
5493 aggregate, or multiple choice in record aggregate
5494 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5495 array operands to logical operations AND, OR and XOR do not have the
5496 same static lower and higher bounds
5497 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5498
5499 2011-08-01 Robert Dewar <dewar@adacore.com>
5500
5501 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5502 Replaces Last_Source_Node_In_Sequence.
5503 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5504 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5505 parens and blank in string (this was inconsistently implemented).
5506 * errout.ads
5507 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5508 blank in string (this was inconsistently implemented).
5509 * gnat1drv.adb
5510 (Set_Global_Switches): Set formal mode switches appropriately
5511 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5512 * par-prag.adb
5513 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5514 call Set_Error_Msg_Lang to set "spark" as language name.
5515 * par.adb: Remove unnecessary call to set formal language for errout
5516 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5517 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5518 name.
5519 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5520 calls to it, moved after resolution so that types are known
5521 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5522 result of concatenation is not of type String
5523 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5524 concatenation is not properly restricted
5525 * gnat_rm.texi: Add doc on pragma Spark_95.
5526 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5527 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5528 * gcc-interface/Make-lang.in: Update dependencies.
5529
5530 2011-08-01 Javier Miranda <miranda@adacore.com>
5531
5532 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5533 condition that detects if the overridden operation must replace an
5534 existing entity.
5535
5536 2011-08-01 Javier Miranda <miranda@adacore.com>
5537
5538 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5539 code declarations inserted by Insert_Actions in each alternative of the
5540 N_Case_Expression node.
5541
5542 2011-08-01 Robert Dewar <dewar@adacore.com>
5543
5544 * sem_ch6.adb: Minor code reorganization.
5545 * sem_util.adb: Minor reformatting.
5546
5547 2011-08-01 Pascal Obry <obry@adacore.com>
5548
5549 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5550 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5551
5552 2011-08-01 Yannick Moy <moy@adacore.com>
5553
5554 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5555 literal or operator symbol which is prefixed
5556 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5557 mode on access attributes.
5558 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5559 that concatenation operands are properly restricted in formal mode
5560 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5561 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5562 result of the concatenation has a type different from String.
5563 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5564 Analyze_Quantified_Expression, Analyze_Slice,
5565 Analyze_Null): issue an error in formal mode on unsupported constructs
5566 * sem_ch5.adb
5567 (Analyze_Block_Statement): only issue error on source block statement
5568 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5569 function which returns the last node in a list of nodes for which
5570 Comes_From_Source returns True, if any
5571 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5572 Last_Source_Node_In_Sequence
5573 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5574 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5575 mode on unsupported constructs
5576 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5577 rest of the actions may be needed later on since the error is marked as
5578 not serious.
5579 * sinfo.ads: Typos in comments.
5580
5581 2011-08-01 Pascal Obry <obry@adacore.com>
5582
5583 * projects.texi: Minor editing.
5584
5585 2011-08-01 Yannick Moy <moy@adacore.com>
5586
5587 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5588 insertion character ~~
5589 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5590 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5591 with insertion character ~~
5592 (Set_Msg_Text): treat insertion character ~~
5593 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5594 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5595 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5596 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5597 errors related to the formal language restriction not serious
5598 (insertion character |).
5599 * par.adb (Par): set formal language for error messages if needed
5600 * sem_ch6.adb (Check_Missing_Return): take into account possible
5601 generated statements at the end of the function
5602 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5603 enumeration value to define a new pragma SPARK_95
5604 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5605 SPARK_Version): new type and variables to store the SPARK version
5606 (none by default).
5607 (SPARK_Mode): return True when SPARK_Version is set
5608 * par-prag.adb: Correct indentation
5609 (Prag): take Pragma_SPARK_95 into account
5610 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5611 into account.
5612
5613 2011-08-01 Robert Dewar <dewar@adacore.com>
5614
5615 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5616 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5617 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5618
5619 2011-08-01 Pascal Obry <obry@adacore.com>
5620
5621 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5622 Target_Name to Get_Path call.
5623 (Parse_Single_Project): Likewise.
5624 (Post_Parse_Context_Clause): Likewise.
5625 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5626 Call Initialise_Project_Path with the proper Target_Name.
5627 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5628 search path.
5629 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5630 with the proper Target_Name.
5631 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5632 Part.Parse routine.
5633 (Parse_Project_And_Apply_Config): Likewise.
5634 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5635 This is fine as this part of the code is supporting only native
5636 compilation.
5637 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5638 is fine as this part of the code is supporting only native compilation.
5639
5640 2011-08-01 Yannick Moy <moy@adacore.com>
5641
5642 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5643 of homonym, unless the homonym is one of the cases allowed in SPARK
5644 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5645 package declaration occurring after a body.
5646
5647 2011-08-01 Robert Dewar <dewar@adacore.com>
5648
5649 * checks.adb, exp_ch4.adb: Minor reformatting.
5650
5651 2011-08-01 Javier Miranda <miranda@adacore.com>
5652
5653 * einfo.ads (Access_Disp_Table): Fix documentation.
5654 (Dispatch_Table_Wrappers): Fix documentation.
5655
5656 2011-08-01 Pascal Obry <obry@adacore.com>
5657
5658 * prj-env.adb, prj-env.ads: Minor reformatting.
5659
5660 2011-08-01 Yannick Moy <moy@adacore.com>
5661
5662 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5663 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5664 procedures out of these packages.
5665 * errout.ads, errout.adb
5666 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5667 procedures in of this package
5668 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5669 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5670 on misplaced later vs initial declarations, like in Ada 83
5671 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5672 formal mode on attribute of private type whose full type declaration
5673 is not visible
5674 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5675 package declaration inside a package specification
5676 (Analyze_Full_Type_Declaration): issue error in formal mode on
5677 controlled type or discriminant type
5678 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5679 user-defined operator means that it should come from the source
5680 (New_Overloaded_Entity): issue error in formal mode on overloaded
5681 entity.
5682 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5683
5684 2011-08-01 Thomas Quinot <quinot@adacore.com>
5685
5686 * atree.adb: Minor reformatting.
5687 * checks.adb: Minor reformatting.
5688
5689 2011-08-01 Vincent Celier <celier@adacore.com>
5690
5691 * s-parame-vms-ia64.ads: Fix typo in comment
5692 Minor reformatting
5693 * s-parame-vms-restrict.ads: Removed, unused.
5694
5695 2011-08-01 Javier Miranda <miranda@adacore.com>
5696
5697 * exp_ch3.adb
5698 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5699 * sem_ch3.adb
5700 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5701 * sem_ch3.ads, sem_ch3.adb
5702 (Is_Constant_Bound): New extended version of the subprogram that was
5703 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5704 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5705 * sem_aux.ads (Constant_Value): Fix typo in comment.
5706 * checks.adb (Generate_Index_Checks): New implementation which, for
5707 array objects with constant bounds, generates the runtime check
5708 referencing the bounds of the array type. For other cases this routine
5709 provides its previous behavior obtaining such values from the array
5710 object.
5711 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5712 parent type.
5713 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5714 we cannot have semantic interpretations of the new node.
5715
5716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5717
5718 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5719 expressions.
5720
5721 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5722
5723 * sem_ch8.adb: Minor code editing.
5724 * s-vxwext.adb: Remove trailing space.
5725 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5726 consistency with other files.
5727
5728 2011-08-01 Thomas Quinot <quinot@adacore.com>
5729
5730 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5731
5732 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5733
5734 * par-ch10.adb: reject parameterized expressions as compilation unit.
5735 * sem_ch4.adb: handle properly conditional expression with overloaded
5736 then_clause and no else_clause.
5737
5738 2011-08-01 Tristan Gingold <gingold@adacore.com>
5739
5740 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5741 like done by System.Aux_DEC.
5742 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5743
5744 2011-08-01 Yannick Moy <moy@adacore.com>
5745
5746 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5747 missing label at end of declaration (subprogram or package)
5748 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5749 of positional and named parameter association
5750 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5751 Error_Msg_SP which adds a prefix to the error message giving the name
5752 of the formal language analyzed
5753 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5754 access result type in subprogram, unconstrained array as result type,.
5755 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5756 procedure
5757 * sem_ch8.adb: Code clean up.
5758
5759 2011-08-01 Javier Miranda <miranda@adacore.com>
5760
5761 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5762 * einfo.ads (Access_Disp_Table): Fix documentation.
5763 (Dispatch_Table_Wrappers): Fix documentation.
5764 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5765 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5766 to enforce the documentation of this attribute.
5767 (Set_Is_Interface): Cleanup the assertion.
5768 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5769 the Underlying_Type entity before reading attribute Access_Disp_Table.
5770 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5771 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5772 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5773 the Underlying_Type entity before reading attribute Access_Disp_Table.
5774 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5775 Locate the Underlying_Type entity before reading attribute
5776 Access_Disp_Table.
5777
5778 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5779
5780 * s-poosiz.ads: Additional overriding indicators.
5781
5782 2011-08-01 Yannick Moy <moy@adacore.com>
5783
5784 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5785 formal mode.
5786 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5787 parameter specification does not include a subtype mark.
5788 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5789 formal mode on abstract subprogram.
5790 (Analyze_Subprogram_Specification): issue error in formal mode on
5791 user-defined operator.
5792 (Process_Formals): issue error in formal mode on access parameter and
5793 default expression.
5794 * sem_ch9.adb (Analyze_Abort_Statement,
5795 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5796 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5797 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5798 Analyze_Requeue, Analyze_Selective_Accept,
5799 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5800 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5801 issue error in formal mode on user-defined raise statement.
5802
5803 2011-08-01 Thomas Quinot <quinot@adacore.com>
5804
5805 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5806 declaration being hidden when overriding an implicit inherited
5807 subprogram.
5808 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5809 (-gnats), do not complain about a source file that contains only a
5810 pragma No_Body.
5811
5812 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5813
5814 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5815 variable if already set.
5816
5817 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5818
5819 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5820 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5821 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5822 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5823 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5824 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5825 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5826 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5827 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5828 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5829 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5830 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5831 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5832 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5833 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5834 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5835 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5836 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5837 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5838 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5839 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5840 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5841 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5842 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5843 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5844 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5845 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5846 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5847 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5848 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5849 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5850 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5851 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5852 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5853 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5854 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5855 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5856 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5857 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5858 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5859 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5860 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5861 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5862 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5863 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5864 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5865 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5866 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5867 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5868 Use GNAT instead of GNARL.
5869
5870 2011-08-01 Bob Duff <duff@adacore.com>
5871
5872 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5873 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5874 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5875 reformatting.
5876
5877 2011-08-01 Yannick Moy <moy@adacore.com>
5878
5879 * debug.adb (d.D) reverve flag for the SPARK mode
5880 (d.E) reverve flag for SPARK generation mode
5881 (d.F) reverve flag for Why generation mode
5882 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5883 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5884 functions which return True when the corresponding modes are set
5885 (Formal_Language): return "spark" or "alfa" when in formal verification
5886 mode.
5887 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5888 Error_Msg to prefix the error message with a tag giving the formal
5889 language
5890 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5891 message with a tag giving the formal language
5892 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5893 block statement
5894 (Analyze_Case_Statement): issue error in formal mode on case statement
5895 with a single "others" case alternative
5896 (Analyze_Exit_Statement): issue errors in formal mode on exit
5897 statements which do not respect SPARK restrictions
5898 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5899 (Check_Unreachable_Code): always issue an error (not a warning) in
5900 formal mode on unreachable code (concerns both code after an infinite
5901 loop and after an unconditional jump, both not allowed in SPARK)
5902 * sem_ch6.adb (Analyze_Return_Statement): add call to
5903 Set_Return_Present for a procedure containing a return statement
5904 (already done for functions in Analyze_Function_Return)
5905 (Analyze_Function_Return): issue error in formal mode on extended
5906 return or if return is not last statement in function
5907 (Check_Missing_Return): issue error in formal mode if function does
5908 not end with return or if procedure contains a return
5909 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5910 function to detect if there is an inner scope of its parameter S which
5911 is a loop.
5912
5913 2011-08-01 Thomas Quinot <quinot@adacore.com>
5914
5915 * sem_ch6.ads: Minor reformatting.
5916
5917 2011-08-01 Javier Miranda <miranda@adacore.com>
5918
5919 * sem_util.adb (Abstract_Interface_List): Complete condition when
5920 processing private type declarations to avoid reading unavailable
5921 attribute.
5922 (Is_Synchronized_Tagged_Type): Complete condition when processing
5923 private extension declaration nodes to avoid reading unavailable
5924 attribute.
5925
5926 2011-08-01 Thomas Quinot <quinot@adacore.com>
5927
5928 * sem_ch3.adb: Minor reformatting.
5929
5930 2011-08-01 Thomas Quinot <quinot@adacore.com>
5931
5932 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5933 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5934 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5935 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5936 for VMS, instead parametrize the common implementation with
5937 System.Parameters declarations.
5938
5939 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5940
5941 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5942
5943 2011-08-01 Tristan Gingold <gingold@adacore.com>
5944
5945 * seh_init.c: Fix SEH handler installation on win64.
5946
5947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5948
5949 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5950 double analysis of an anonymous access to subprogram, because it can
5951 lead to improper sharing of profiles and a back-end crash.
5952
5953 2011-08-01 Robert Dewar <dewar@adacore.com>
5954
5955 * make.adb, sem_ch4.adb: Minor reformatting.
5956 * gcc-interface/Make-lang.in: Update dependencies.
5957 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5958
5959 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5960
5961 * gnat_rm.texi: Fix definition of Long_Integer.
5962
5963 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5964
5965 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5966 to prevent storage exhaustion.
5967 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5968 finalized is a function body, insert the cleanup code before the final
5969 return statement, to prevent spurious warnings.
5970 * s-pooglo.ads: add overriding indicator.
5971
5972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5973
5974 * sem_ch4.adb (Operator_Check): improve error message when both a
5975 with_clause and a use_clause are needed to make operator usage legal.
5976 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5977 determine whether a compilation unit is visible within an other,
5978 either through a with_clause in the current unit, or a with_clause in
5979 its library unit or one one of its parents.
5980
5981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5982
5983 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5984 over an arbitrary expression of an array or container type.
5985 * lib-xref.adb: clarify comment.
5986
5987 2011-08-01 Bob Duff <duff@adacore.com>
5988
5989 * einfo.ads: Minor reformatting.
5990 * debug.adb: Minor comment improvement.
5991
5992 2011-08-01 Javier Miranda <miranda@adacore.com>
5993
5994 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5995 consider hidden subprograms as valid candidates.
5996
5997 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5998
5999 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6000
6001 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6002
6003 * gnat_ugn.texi: Fix typo.
6004
6005 2011-08-01 Robert Dewar <dewar@adacore.com>
6006
6007 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6008 lib-xref.adb: Minor reformatting
6009
6010 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6011
6012 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6013 when to generate a call to Move_Final_List.
6014 (Has_Controlled_Parts): Remove this function.
6015
6016 2011-08-01 Geert Bosch <bosch@adacore.com>
6017
6018 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6019 "," in choice list.
6020
6021 2011-08-01 Thomas Quinot <quinot@adacore.com>
6022
6023 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6024 explicit raise of a predefined exception as Comes_From_Source if the
6025 original N_Raise_Statement comes from source.
6026
6027 2011-08-01 Robert Dewar <dewar@adacore.com>
6028
6029 * sinfo.ads: Add comment.
6030 * sem_ch6.adb: Minor reformatting.
6031
6032 2011-08-01 Robert Dewar <dewar@adacore.com>
6033
6034 * freeze.adb (Freeze_Entity): Refine check for bad component size
6035 clause to avoid rejecting confirming clause when atomic/aliased present.
6036
6037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6038
6039 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6040 better determine whether an entity reference is a write.
6041 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6042 subcomponent.
6043 * lib-xref.adb (Output_References): Do no suppress a read reference at
6044 the same location as an immediately preceeding modify-reference, to
6045 handle properly in-out actuals.
6046
6047 2011-08-01 Tristan Gingold <gingold@adacore.com>
6048
6049 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6050
6051 2011-08-01 Quentin Ochem <ochem@adacore.com>
6052
6053 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6054 heap to compute the result.
6055
6056 2011-08-01 Robert Dewar <dewar@adacore.com>
6057
6058 * atree.ads: Minor reformatting.
6059
6060 2011-08-01 Emmanuel Briot <briot@adacore.com>
6061
6062 * g-expect.adb (Get_Command_Output): Fix memory leak.
6063
6064 2011-08-01 Geert Bosch <bosch@adacore.com>
6065
6066 * cstand.adb (P_Float_Type): New procedure to print the definition of
6067 predefined fpt types.
6068 (P_Mixed_Name): New procedure to print a name using mixed case
6069 (Print_Standard): Use P_Float_Type for printing floating point types
6070 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6071 precision IEEE float.
6072
6073 2011-08-01 Thomas Quinot <quinot@adacore.com>
6074
6075 * sem_ch3.adb: Minor reformatting.
6076
6077 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6078
6079 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6080 the completion of a generic function, insert the new body rather than
6081 rewriting the original.
6082
6083 2011-08-01 Yannick Moy <moy@adacore.com>
6084
6085 * sinfo.ads, errout.ads: Typos in comments.
6086
6087 2011-08-01 Robert Dewar <dewar@adacore.com>
6088
6089 * par-endh.adb: Minor reformatting.
6090
6091 2011-08-01 Robert Dewar <dewar@adacore.com>
6092
6093 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6094 (Pre_Post_Aspects): New subtype.
6095 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6096 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6097 * par-ch7.adb (P_Package): Remove Decl parameter
6098 (P_Package): Handle new syntax for aspects (before IS)
6099 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6100 new aspect syntax
6101 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6102 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6103 (P_Package): Remove Decl parameter
6104 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6105 aspects
6106 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6107 specs
6108 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6109 * sinfo.ads: Document new syntax for aspects in packages etc.
6110 * sprint.adb: Handle new syntax of aspects before IS in package
6111
6112 2011-08-01 Thomas Quinot <quinot@adacore.com>
6113
6114 * atree.ads: Minor reformatting.
6115 * sem_prag.adb: Minor reformatting.
6116
6117 2011-08-01 Robert Dewar <dewar@adacore.com>
6118
6119 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6120 case expr alternative.
6121
6122 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6123
6124 * sem_ch12.adb: Fix typo.
6125
6126 2011-08-01 Geert Bosch <bosch@adacore.com>
6127
6128 * sem_prag.adb (Check_No_Link_Name): New procedure.
6129 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6130 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6131 instead of Standard_Long_Long_Float_Size global. Preparation for
6132 eventual removal of per type constants.
6133 * exp_util.ads (Get_Stream_Size): New function returning the stream
6134 size value of subtype E.
6135 * exp_util.adb (Get_Stream_Size): Implement new function.
6136 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6137 function.
6138 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6139 * einfo.adb:
6140 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6141
6142 2011-08-01 Geert Bosch <bosch@adacore.com>
6143
6144 * cstand.adb: Fix comments.
6145 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6146 count of arguments.
6147
6148 2011-08-01 Robert Dewar <dewar@adacore.com>
6149
6150 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6151
6152 2011-08-01 Geert Bosch <bosch@adacore.com>
6153
6154 * atree.ads: Fix comment.
6155
6156 2011-08-01 Robert Dewar <dewar@adacore.com>
6157
6158 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6159 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6160 * par.adb: Add with for Namet.Sp.
6161 * par-tchk.adb: Minor reformatting.
6162
6163 2011-08-01 Vincent Celier <celier@adacore.com>
6164
6165 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6166 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6167 of the init procedure of a SAL.
6168 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6169 New procedure.
6170
6171 2011-08-01 Thomas Quinot <quinot@adacore.com>
6172
6173 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6174 reformatting.
6175
6176 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6177
6178 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6179
6180 2011-08-01 Thomas Quinot <quinot@adacore.com>
6181
6182 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6183 conformant with its spec (return True only for types that have
6184 an overriding Initialize primitive operation that prevents them from
6185 having preelaborable initialization).
6186 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6187 initialization for controlled types in Ada 2005 or later mode.
6188
6189 2011-08-01 Robert Dewar <dewar@adacore.com>
6190
6191 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6192 Postcondition.
6193 (Same_Aspect): New function.
6194 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6195 Type_Invariant, Precondition, Postcondition.
6196 * snames.ads-tmpl: Add Name_Type_Invariant.
6197
6198 2011-08-01 Robert Dewar <dewar@adacore.com>
6199
6200 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6201 here.
6202 (Freeze_All_Ent): Fix error in handling inherited aspects.
6203 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6204 already analyzed, but don't skip entire processing of a declaration,
6205 that's wrong in some cases of declarations being rewritten.
6206 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6207 Don't delay for integer, string literals
6208 Treat predicates in usual manner for delay, remove special case code,
6209 not needed.
6210 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6211 (Build_Predicate_Function): Update saved expression in aspect
6212 (Build_Invariant_Procedure): Update saved expression in aspect
6213 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6214 of replacement of discriminant references if the reference is simple.
6215
6216 2011-08-01 Robert Dewar <dewar@adacore.com>
6217
6218 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6219 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6220 Static_Predicate and Dynamic_Predicate.
6221 (Build_Predicate_Function): Add processing for Static_Predicate
6222 and Dynamic_Predicate.
6223 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6224 (From_Static_Predicate): New flag
6225 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6226
6227 2011-08-01 Robert Dewar <dewar@adacore.com>
6228
6229 * usage.adb: Documentation cleanup for Ada version modes in usage.
6230 * expander.adb: Minor reformatting.
6231
6232 2011-08-01 Robert Dewar <dewar@adacore.com>
6233
6234 * atree.ads: Minor comment fix.
6235 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6236 a-witeio.ads, sem_prag.adb: Minor reformatting.
6237
6238 2011-08-01 Doug Rupp <rupp@adacore.com>
6239
6240 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6241 pointers. Use descrip.h header file for convenience. Add some
6242 comments.
6243
6244 2011-08-01 Robert Dewar <dewar@adacore.com>
6245
6246 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6247 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6248 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6249 New procedure.
6250 (Check_Aspect_At_End_Of_Declarations): New procedure
6251 (Analye_Aspect_Specification): Minor changes for above procedures
6252 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6253 specification node as well.
6254
6255 2011-08-01 Pascal Obry <obry@adacore.com>
6256
6257 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6258 Windows files. Use GetFilesAttributes() in this case to check for file
6259 existence instead of returning with an error code.
6260
6261 2011-08-01 Vincent Celier <celier@adacore.com>
6262
6263 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6264 High is above Source length.
6265
6266 2011-08-01 Robert Dewar <dewar@adacore.com>
6267
6268 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6269
6270 2011-08-01 Robert Dewar <dewar@adacore.com>
6271
6272 * aspects.ads (Boolean_Aspects): New subtype.
6273 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6274 for derived types in cases where the parent type and derived type have
6275 aspects.
6276 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6277 with aspects when parent type also has aspects.
6278 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6279 boolean expression at this point).
6280 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6281 accordance with final decision on the Ada 2012 feature.
6282 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6283
6284 2011-08-01 Matthew Heaney <heaney@adacore.com>
6285
6286 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6287
6288 2011-08-01 Pascal Obry <obry@adacore.com>
6289
6290 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6291 Fix Replace_Slice when High is above current string size.
6292 (Replace_Slice): Fix DL computation when High is above current
6293 string length.
6294
6295 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6296
6297 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6298
6299 2011-08-01 Matthew Heaney <heaney@adacore.com>
6300
6301 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6302 of node.
6303
6304 2011-08-01 Pascal Obry <obry@adacore.com>
6305
6306 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6307 reformatting.
6308
6309 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6310
6311 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6312 access to protected subprograms in generic bodies.
6313 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6314 protected type, indicate that the convention of the subprogram is
6315 Convention_Protected, because it may be used in subsequent declarations
6316 within the protected declaration.
6317
6318 2011-08-01 Vincent Celier <celier@adacore.com>
6319
6320 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6321 and "final" procedures when the name of the library is "ada", to avoid
6322 duplicate symbols "adainit" and "adafinal" in executables.
6323
6324 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6325
6326 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6327 quantified expression that appears within a postcondition and uses the
6328 Ada2012 'Result attribute.
6329
6330 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6331
6332 * init.c (__gnat_error_handler): Cast reason to int.
6333 (__gnat_install_handler): Explain sa_sigaction use.
6334
6335 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6336
6337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6338 subprogram has copy-in copy-out parameters, try to promote the mode of
6339 the return type if it is passed in registers.
6340
6341 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6342
6343 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6344 left operand as addressable.
6345
6346 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6347
6348 * gcc-interface/gigi.h (build_function_stub): Remove.
6349 (build_return_expr): Likewise.
6350 (convert_vms_descriptor): Declare.
6351 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6352 (build_function_stub): Move to...
6353 * gcc-interface/utils2.c (build_return_expr): Move to...
6354 * gcc-interface/trans.c (build_function_stub): ...here.
6355 (build_return_expr): ...here.
6356 (Subprogram_Body_to_gnu): Add local variable for language_function.
6357 Disconnect the parameter attributes cache, if any, once done with it.
6358 Call end_subprog_body only after setting the end_locus.
6359 Build the stub associated with the function, if any, at the very end.
6360 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6361 variables and streamline control flow.
6362
6363 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6364
6365 PR ada/49819
6366 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6367 g-trasym-dwarf.adb.
6368
6369 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6370
6371 PR bootstrap/49794
6372 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6373 Assign to act.sa_sigaction.
6374 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6375 current->return_address to char * before arithmetic.
6376
6377 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6378
6379 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6380 Correct argument types.
6381 Extract code from reason.
6382 (__gnat_install_handler): Assign to act.sa_sigaction.
6383
6384 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6385
6386 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6387 (GNAT1_OBJS): ...here.
6388
6389 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6390
6391 PR ada/48711
6392 * g-socthi-mingw.adb (Fill): Fix formatting.
6393
6394 * gcc-interface/gigi.h: Move around comment.
6395
6396 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6397
6398 PR ada/46350
6399 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6400
6401 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6402
6403 PR ada/48711
6404 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6405
6406 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6407
6408 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6409 range comparison if Pmode is SImode.
6410
6411 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6412 Eric Botcazou <ebotcazou@adacore.com>
6413
6414 * adadecode.c: Wrap up in extern "C" block.
6415 * adadecode.h: Likewise.
6416 * adaint.c: Likewise. Remove 'const' keyword.
6417 * adaint.h: Likewise.
6418 * argv.c: Likewise.
6419 * atree.h: Likewise.
6420 * cio.c: Likewise.
6421 * cstreams.c: Likewise.
6422 * env.c: Likewise.
6423 * exit.c: Likewise.
6424 * fe.h: Likewise.
6425 * final.c: Likewise.
6426 * init.c: Likewise.
6427 * initialize.c: Likewise.
6428 * link.c: Likewise.
6429 * namet.h: Likewise.
6430 * nlists.h: Likewise.
6431 * raise.c: Likewise.
6432 * raise.h: Likewise.
6433 * repinfo.h: Likewise.
6434 * seh_init.c: Likewise.
6435 * targext.c: Likewise.
6436 * tracebak.c: Likewise.
6437 * uintp.h: Likewise.
6438 * urealp.h: Likewise.
6439 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6440 * xsinfo.adb: Likewise.
6441 * xsnamest.adb: Likewise.
6442 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6443 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6444 * gcc-interface/misc.c: Likewise.
6445 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6446 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6447 ada/targext.o here...
6448 (GNAT_ADA_OBJS): ...and not here.
6449 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6450 (GNATBIND_OBJS): Reorder.
6451
6452 2011-07-07 Richard Henderson <rth@redhat.com>
6453
6454 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6455 dwarf2out_frame_init.
6456
6457 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6458
6459 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6460
6461 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6462
6463 PR target/39150
6464 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6465
6466 2011-07-06 Richard Guenther <rguenther@suse.de>
6467
6468 * gcc-interface/misc.c (gnat_init): Merge calls to
6469 build_common_tree_nodes and build_common_tree_nodes_2.
6470 Re-initialize boolean_false_node.
6471
6472 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6473 Olivier Hainque <hainque@adacore.com>
6474 Nicolas Setton <setton@adacore.com>
6475
6476 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6477 the type according to the ARTIFICIAL_P parameter.
6478 (create_type_decl): Likewise.
6479 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6480
6481 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6482
6483 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6484 (gnatbind): Likewise.
6485
6486 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6487
6488 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6489
6490 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6491
6492 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6493 local variable throughout. Remove useless call to Base_Type.
6494 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6495 Take it also into account for the volatileness of the field. Set the
6496 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6497
6498 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6499
6500 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6501 on a dereference built for a by-ref object if it has an address clause.
6502
6503 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6504
6505 * einfo.ads (Address_Taken): Document use for the second argument of
6506 Asm_Input and Asm_Output attributes.
6507 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6508 argument is an entity name, then set Address_Taken on it.
6509 <Attribute_Asm_Output>: Likewise.
6510 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6511 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6512 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6513 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6514
6515 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6516
6517 PR middle-end/46500
6518 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6519
6520 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6521
6522 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6523 (ada/utils.o): Update dependencies.
6524 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6525 ../../../libcpp/libcpp.a.
6526 * gcc-interface/utils.c: Include common/common-target.h.
6527 (process_attributes): Use targetm_common.have_named_sections.
6528
6529 2011-06-07 Richard Guenther <rguenther@suse.de>
6530
6531 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6532 set_sizetype.
6533
6534 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6535
6536 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6537 TREE_THIS_NOTRAP flag.
6538
6539 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6540
6541 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6542 Fix thinko.
6543
6544 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6545
6546 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6547 constants whose full view has discriminants specially.
6548
6549 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6550
6551 * gcc-interface/utils.c: Include diagnostic.h.
6552 (gnat_write_global_declarations): Output debug information for all
6553 global type declarations before finalizing the compilation unit.
6554 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6555
6556 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6557
6558 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6559
6560 2011-05-25 Kai Tietz <ktietz@redhat.com>
6561
6562 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6563 initialization instead of const/none-const pointer assignment.
6564
6565 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6566
6567 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6568 $(EXTRA_GNAT1_OBJS).
6569 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6570 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6571 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6572 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6573 libcommon-target.a instead of prefix.o.
6574
6575 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6576
6577 PR ada/49097
6578 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6579
6580 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6581
6582 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6583 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6584 instead of version.o.
6585
6586 2011-05-18 Kai Tietz <ktietz@redhat.com>
6587
6588 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6589 boolean_false_node instead of integer_zero_node.
6590 (convert_with_check): Likewise.
6591 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6592
6593 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6594
6595 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6596 type of the parameter is an unconstrained array, convert the actual to
6597 the type of the formal in the In Out and Out cases as well.
6598
6599 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6600
6601 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6602 call build_function_type_array or build_varargs_function_type_array
6603 instead.
6604 (create_subprog_type): Don't call build_function_type; call
6605 build_function_type_vec instead.
6606
6607 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6608
6609 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6610 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6611 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6612
6613 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6614
6615 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6616
6617 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6618 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6619
6620 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6621
6622 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6623
6624 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6625
6626 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6627 instead of accessing TYPE_ARG_TYPES directly.
6628 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6629
6630 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6631
6632 PR ada/48844
6633 * gcc-interface/gigi.h (get_variant_part): Declare.
6634 * gcc-interface/decl.c (get_variant_part): Make global.
6635 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6636 types have the same constant size, are record types and T1 has a
6637 variant part while T2 doesn't.
6638
6639 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6640
6641 * gcc-interface/utils.c (begin_subprog_body): Do not call
6642 get_pending_sizes.
6643 (end_subprog_body): Likewise.
6644
6645 2011-05-04 Richard Guenther <rguenther@suse.de>
6646
6647 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6648 int_const_binop.
6649 (pos_to_constructor): Likewise.
6650
6651 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6652 Eric Botcazou <ebotcazou@adacore.com>
6653
6654 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6655 of build_function_type. Adjust calls to...
6656 (build_raise_check): ...this. Do not take a void_tree parameter.
6657 Call build_function_type_list instead of build_function_type.
6658 Fix head comment and swap couple of conditional blocks.
6659
6660 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6661
6662 * gnatvsn.ads (Library_Version): Bump to 4.7.
6663 (Current_Year): Bump to 2011.
6664
6665 2011-04-29 Michael Matz <matz@suse.de>
6666
6667 * gcc-interface/misc.c (gnat_handle_option): Set
6668 warn_maybe_uninitialized.
6669
6670 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6671
6672 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6673 the Watson/McCabe paper.
6674
6675 2011-04-23 Jim Meyering <meyering@redhat.com>
6676
6677 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6678
6679 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6680
6681 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6682 onto the new type.
6683
6684 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6685
6686 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6687 parameter.
6688 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6689 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6691 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6692 <all>: Do not set flags on the reused DECL node coming from an alias.
6693 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6694 don't need debug info here...
6695 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6696 (gigi): Adjust calls to create_subprog_decl.
6697 (build_raise_check): Likewise.
6698 (establish_gnat_vms_condition_handler): Likewise.
6699 (Compilation_Unit_to_gnu): Likewise.
6700 (gnat_to_gnu): Likewise.
6701
6702 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6703
6704 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6705 (NO_REORDER_ADAFLAGS): New variable.
6706 (EXTRA_GNATTOOLS): Always define.
6707 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6708 Clean up and adjust list of files compiled with special options.
6709 * gcc-interface/Make-lang.in: Likewise.
6710 (ada/decl.o): Cosmetical change.
6711 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6712
6713 2011-04-20 Jim Meyering <meyering@redhat.com>
6714
6715 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6716
6717 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6718
6719 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6720 $(CFLAGS) on the link line.
6721
6722 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6723
6724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6725 padded type built for the return type if it is unconstrained.
6726
6727 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6728
6729 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6730
6731 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6732
6733 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6734 before calling TREE_CHAIN.
6735 * gcc-interface/misc.c (gnat_init_ts): New function.
6736 (LANG_HOOKS_INIT_TS): Define.
6737
6738 2011-04-12 Martin Jambor <mjambor@suse.cz>
6739
6740 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6741 instead of cgraph_node.
6742
6743 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6744
6745 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6746 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6747 mechanism.
6748
6749 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6750
6751 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6752 of aggregate types that contain a placeholder.
6753
6754 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6755
6756 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6757 TYPE_ARG_TYPES.
6758 (handle_type_generic_attribute): Likewise.
6759
6760 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6761
6762 PR ada/47163
6763 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6764
6765 2011-04-04 Kai Tietz <ktietz@redhat.com>
6766
6767 PR ada/47163
6768 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6769 to flag value.
6770
6771 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6772
6773 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6774 type case, do not strip a padding type around the array type.
6775
6776 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6777
6778 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6779 types.
6780
6781 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6782
6783 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6784 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6785 code for -feliminate-unused-debug-types.
6786 (gnat_post_options): Likewise.
6787
6788 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6789
6790 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6791 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6792 distinct copy.
6793
6794 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6795
6796 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6797 DECL_ARTIFICIAL flag on enumeration types.
6798
6799 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6800
6801 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6802 fat pointer types artificial unconditionally.
6803 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6804 isn't artificial.
6805
6806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6807
6808 * gcc-interface/gigi.h (get_dummy_type): Declare.
6809 (build_dummy_unc_pointer_types): Likewise.
6810 (finish_fat_pointer_type): Likewise.
6811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6812 fat pointer type has been built, complete it in place.
6813 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6814 and thin pointers. Remove useless variable.
6815 (finish_fat_pointer_type): Make global and move to...
6816 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6817 (get_dummy_type): New function.
6818 (build_dummy_unc_pointer_types): Likewise.
6819 (gnat_pushdecl): Propage the name to the anonymous variants only.
6820 (update_pointer_to): Only adjust the pointer types in the unconstrained
6821 array case.
6822
6823 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6824
6825 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6827 if this is a Taft amendment type and the full declaration is available.
6828 * gcc-interface/trans.c (process_type): Likewise.
6829 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6830 (process_freeze_entity): Likewise.
6831 * gcc-interface/utils.c (dummy_global): New static variable.
6832 (gnat_write_global_declarations): If there are types declared as used
6833 at the global level, insert them in the global hash table.
6834
6835 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6836
6837 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6838 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6839 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6840 copy.
6841 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6842 flag of the type accordingly.
6843 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6844
6845 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6846
6847 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6848 finalizing types when updating the pointers to the designated type.
6849 <all>: Finalize the deferred types even if we didn't defer processing
6850 of incomplete types in this invocation.
6851
6852 2011-04-01 Olivier Hainque <hainque@adacore.com>
6853 Nicolas Setton <setton@adacore.com>
6854 Eric Botcazou <ebotcazou@adacore.com>
6855
6856 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6857 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6858
6859 2011-03-28 Kai Tietz <ktietz@redhat.com>
6860
6861 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6862 Windows targets.
6863 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6864 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6865
6866 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6867
6868 2011-03-28 Tristan Gingold <gingold@adacore.com>
6869
6870 PR ada/44431
6871 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6872 Use ada output of gnatbind.
6873 (ada/b_gnatb.adb): Ditto.
6874 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6875 (ada.mostlyclean, ada.stage1)
6876 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6877 (ada.stagefeedback): Adjust.
6878 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6879 Use ada output of gnatbind.
6880 (b_gnatm.adb): Ditto.
6881 (b_gnatl.o, b_gnatm.o): New rules.
6882
6883 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6884
6885 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6886 for the padded type built to support a specified size or alignment.
6887
6888 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6889
6890 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6892 unconditionally to the end of the unit when the designated type is
6893 limited_with'ed.
6894 <all>: Rename local variable. Attempt to un-defer types only and do it
6895 for limited_with'ed types as well.
6896 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6897 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6898 consistently and remove redundant call to finalize_from_with_types.
6899
6900 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6901
6902 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6903 subprograms without a previous spec declared in the same unit.
6904 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6905 subprograms at the end of the unit instead of at the beginning.
6906 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6907 isn't public for the special handling of non-inline functions nested
6908 inside inline external functions.
6909
6910 2011-03-25 Jeff Law <law@redhat.com>
6911
6912 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6913
6914 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6915
6916 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6917 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6918 to compute Set_Size_Depends_On_Discriminant.
6919 (Layout_Type): Call it on array types in back-end layout mode.
6920 * sem_util.adb (Requires_Transient_Scope): Return true for array
6921 types only if the size depends on the value of discriminants.
6922 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6923 type if the RHS is a call to a function that returns an unconstrained
6924 type with default discriminant.
6925
6926 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6927
6928 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6929 non-conversion to the nominal result type at the end.
6930
6931 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6932
6933 * gcc-interface/trans.c (create_temporary): New function taken from...
6934 (create_init_temporary): ...here. Call it.
6935 (call_to_gnu): Create the temporary for the return value early, if any.
6936 Create it for a function with copy-in/copy-out parameters if there is
6937 no target; in other cases of copy-in/copy-out, use another temporary.
6938 Push the new binding level lazily. Add and rename local variables.
6939
6940 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6941
6942 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6943 error message.
6944 (set_rm_size): Likewise.
6945
6946 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6947
6948 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6949 for the padded type built in order to support a specified alignment.
6950 Fix incorrect formatting.
6951
6952 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6953
6954 PR bootstrap/48216
6955 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6956
6957 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6958
6959 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6960 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6961 to the end of the list. Adjust recursive call. Rename local variable.
6962 If REORDER is true, reorder components of the record type.
6963 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6964 components_to_record and adjust the parameter list.
6965
6966 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6967
6968 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6969 disabled, use the variable for bounds of loop iteration scheme.
6970
6971 2011-03-21 Kai Tietz <ktietz@redhat.com>
6972
6973 PR target/12171
6974 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6975
6976 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6977
6978 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6979 out whether the expression is read-only. Short-circuit placeholder
6980 case and rename a couple of local variables.
6981
6982 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6983
6984 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6985 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6986 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6987 (convert): Deal with conversions from a smaller form type specially.
6988
6989 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6990
6991 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6992 its argument, except for the special -I- switch.
6993
6994 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6995
6996 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6997 "Ada Issues".
6998
6999 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7000
7001 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7002
7003 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7004
7005 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7006 GNAT_FORMAL.
7007 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7008 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7009 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7010 Do not generate the check directly, instead instantiate the template
7011 check present in the descriptor.
7012 (make_descriptor_field): Move around.
7013 (build_vms_descriptor32): Build a template check in the POINTER field.
7014 (build_vms_descriptor): Remove useless suffixes.
7015 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7016
7017 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7018
7019 PR bootstrap/47467
7020 * targext.c: Include target files if IN_RTS is defined.
7021
7022 2011-01-26 Richard Guenther <rguenther@suse.de>
7023
7024 PR bootstrap/47467
7025 * targext.c: Include config.h.
7026 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7027 dependency.
7028
7029 2011-01-04 Pascal Obry <obry@adacore.com>
7030 Eric Botcazou <ebotcazou@adacore.com>
7031
7032 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7033
7034 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7035
7036 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7037 end-of-case on the end label and its associated gotos, if any.
7038
7039 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7040
7041 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7042 expressions of the parameter cache within the statement group of
7043 the CICO mechanism.
7044
7045 2011-01-04 Olivier Hainque <hainque@adacore.com>
7046 Eric Botcazou <ebotcazou@adacore.com>
7047
7048 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7049 (set_end_locus_from_node): New function.
7050 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7051 make and the function end_locus.
7052 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7053 for the elaboration subprogram.
7054 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7055 set the end_locus of the expression as well.
7056
7057 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7058
7059 PR ada/47131
7060 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7061 variables that are referenced in exception handlers volatile.
7062
7063
7064 \f
7065 Copyright (C) 2011 Free Software Foundation, Inc.
7066
7067 Copying and distribution of this file, with or without modification,
7068 are permitted in any medium without royalty provided the copyright
7069 notice and this notice are preserved.