]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
gnatcmd.adb, [...] (Prj.Env.Initialize_Default_Project_Path, [...]): new subprograms
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
a96ca600
EB
12011-08-03 Emmanuel Briot <briot@adacore.com>
2
3 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6 Prj.Env.Initialize_Empty): new subprograms
7 (Get_Env, Find_Project): remove parameter Target_Name.
8
3e582869
AC
92011-08-03 Gary Dismukes <dismukes@adacore.com>
10
11 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
12 as a condition for the delayed call to Derived_Subprograms done for the
13 case of the rewriting of a derived type that constrains the
14 discriminants of its parent type.
15 Avoids redundant subprogram derivations for private subtype derivations.
16
172011-08-03 Javier Miranda <miranda@adacore.com>
18
19 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
20 Build_Record_Aggr_Code.
21 (Build_Record_Aggr_Code): Add missing support to initialize hidden
22 discriminants in extension aggregates.
23
242011-08-03 Emmanuel Briot <briot@adacore.com>
25
26 * prj-pp.adb (Print): also output project qualifiers, since in
27 particular "aggregate" is mandatory in an aggregate project.
28
292011-08-03 Emmanuel Briot <briot@adacore.com>
30
31 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
32 (Debug_Output): new function.
33
56e94186
AC
342011-08-03 Eric Botcazou <ebotcazou@adacore.com>
35
36 * gnat_ugn.texi: Document -Wstack-usage.
37 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
38
392011-08-03 Thomas Quinot <quinot@adacore.com>
40
41 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
42 have keyword LIMITED.
43
442011-08-03 Yannick Moy <moy@adacore.com>
45
46 * alfa.adb, alfa.ads, alfa_test.adb: New files.
47 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
48 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
49 section (does not happen in compiler, only if code directly calls
50 Scan_ALI).
51 * get_alfa.adb, get_alfa.ads: New files.
52 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
53 needed.
54 * lib-xref-alfa.adb: New file.
55 * lib-xref.adb, lib-xref.ads
56 (Xref_Entry): redefine information needed in cross-references for ALFA.
57 Push ALFA treatments in separated local package.
58 (Enclosing_Subpragram_Or_Package): treat specially subprogram
59 identifiers. Return entity of package body instead of spec. Return
60 Empty for a scope with no location.
61 (Generate_Reference): adapt to new components for ALFA information.
62 Remove the need for D references on definitions.
63 (Is_Local_Reference): moved to ALFA local package
64 (Output_References): extract subfunction as Extract_Source_Name
65 (Output_Local_References): remove procedure, replaced by filtering of
66 cross-references in package ALFA and printing in Put_ALFA.
67 (Write_Entity_Name): remove procedure
68 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
69 print exact name of entity as it appears in source file
70 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
71 * put_alfa.adb, put_alfa.ads: New files.
72 * xref_lib.adb (Search_Xref): protect read of cross-references against
73 reading other sections of the ALI file, in gnatxref
74 (Search): protect read of cross-references against reading other
75 sections of the ALI file, in gnatfind.
76 * gcc-interface/Make-lang.in: Update dependencies.
77
782011-08-03 Thomas Quinot <quinot@adacore.com>
79
80 * sem_ch3.adb: Minor reformatting.
81
822011-08-03 Jose Ruiz <ruiz@adacore.com>
83
84 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
85 raising an exception.
86
872011-08-03 Ed Schonberg <schonberg@adacore.com>
88
89 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
90 type, always use 1 as the lower bound or string, even if lower bound of
91 context is not static, to handle properly null strings in a non-static
92 context.
93
942011-08-03 Bob Duff <duff@adacore.com>
95
96 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
97 always legal on the right-hand side of an assignment statement; there
98 is always an applicable index constraint in this case. Therefore, the
99 check for Pkind = N_Assignment_Statement is now unconditional -- it
100 doesn't depend on whether Is_Constrained (Typ).
101
4317e442
AC
1022011-08-03 Robert Dewar <dewar@adacore.com>
103
104 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
105
1062011-08-03 Ed Schonberg <schonberg@adacore.com>
107
108 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
109 for an itype created within a generic unit.
110
1112011-08-03 Eric Botcazou <ebotcazou@adacore.com>
112
113 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
114 suppresses all inlining.
115
53f29d4f
AC
1162011-08-03 Robert Dewar <dewar@adacore.com>
117
118 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
119 exp_aggr.adb: Minor reformatting.
120
1212011-08-03 Thomas Quinot <quinot@adacore.com>
122
123 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
124 tagged assignment when discriminant checks are suppressed. This is
125 useless and extremely costly in terms of static stack usage.
126
1272011-08-03 Bob Duff <duff@adacore.com>
128
129 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
130 of generics, because this leads to the wrong entity in the wrong scope,
131 causing (e.g.) pragma Export_Procedure to get an error if the entity is
132 an instance.
133 (Process_Interface_Name): Follow Alias for instances of generics, to
134 correct for the above change.
135
1362011-08-03 Ed Schonberg <schonberg@adacore.com>
137
138 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
139 is an integer literal it is always safe to replace the reference. In
140 addition, if the reference appears in the generated code for an object
141 declaration it is necessary to copy because otherwise the reference
142 might be to the uninitilized value of the discriminant of the object
143 itself.
144
1452011-08-03 Pascal Obry <obry@adacore.com>
146
147 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
148 ACL used, in this case we want to check for ending .exe, not .exe
149 anywhere in the path.
150
1512011-08-03 Sergey Rybin <rybin@adacore.com>
152
153 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
154 the tree structure (semantic decoration of references to record
155 discriminants).
156
c0b11850
AC
1572011-08-03 Gary Dismukes <dismukes@adacore.com>
158
159 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
160 choices of a named array aggregate, bail out when any choices are
161 marked as Errors_Posted.
162
1632011-08-03 Ed Schonberg <schonberg@adacore.com>
164
165 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
166 in which entity is frozen, to handle properly loop variables in
167 iterators.
168
1692011-08-03 Ed Schonberg <schonberg@adacore.com>
170
171 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
172 subtype is not static, compute the upper bound using attributes, to
173 handle properly index types that are not integer types.
174
1752011-08-03 Bob Duff <duff@adacore.com>
176
177 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
178 Update copyright notice.
179
1802011-08-03 Ed Schonberg <schonberg@adacore.com>
181
182 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
183 Original_Discriminant if within an instance.
184 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
185
1862011-08-03 Thomas Quinot <quinot@adacore.com>
187
188 * einfo.ads: Minor reformatting.
189
1902011-08-03 Ed Schonberg <schonberg@adacore.com>
191
192 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
193 composite type with an unfrozen subcomponent, in the profile of a
194 primitive operation.
195
5c34e9cd
AC
1962011-08-03 Robert Dewar <dewar@adacore.com>
197
198 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
199
2002011-08-03 Ed Schonberg <schonberg@adacore.com>
201
202 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
203 unconstrained type with discriminants is initialized with an aggregate,
204 use the constrained subtype of the aggregate as the type of the object,
205 because it is immutable, and this allows the back-end to generate no
206 code for the object declaration.
207
abcd9db2
AC
2082011-08-03 Robert Dewar <dewar@adacore.com>
209
210 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
211 comparison operand is variable, and turns out to be zero or negative.
212
2132011-08-03 Javier Miranda <miranda@adacore.com>
214
215 * exp_intr.adb
216 (Expand_Dispatching_Constructor_Call): Disable expansion of
217 code required for native targets. Done to avoid generating
218 references to unavailable runtime entities in VM targets.
219 * exp_ch3.adb
220 (Expand_N_Object_Declaration): Add missing support to handle
221 the explicit initialization of class-wide interface objects.
222 Fix documentation.
223
2242011-08-03 Matthew Heaney <heaney@adacore.com>
225
226 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
227
2282011-08-03 Matthew Heaney <heaney@adacore.com>
229
230 * a-cbdlli.adb (Splice): move source items from first to last
231
2322011-08-03 Yannick Moy <moy@adacore.com>
233
234 * sem_util.ads: comment added.
235
2362011-08-03 Javier Miranda <miranda@adacore.com>
237
238 * exp_aggr.adb
239 (Expand_Record_Aggregate): In VM targets disable the expansion into
240 assignments of aggregates whose type is not known at compile time.
241
b474d6c3
ES
2422011-08-03 Ed Schonberg <schonberg@adacore.com>
243
244 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
245 protected entries and task entries, to build the proper renaming
246 declaration for entry formals, used in debugging.
247 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
248 parameters in the same way.
249
0580d807
AC
2502011-08-02 Robert Dewar <dewar@adacore.com>
251
252 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
253 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
254 code reorganization.
255
2562011-08-02 Robert Dewar <dewar@adacore.com>
257
258 * debug.adb: Debug flag d.P to suppress length comparison optimization
259 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
260 comparison of Length by comparing First/Last instead.
261
2622011-08-02 Matthew Heaney <heaney@adacore.com>
263
264 * a-cobove.ads: Code clean up.
265
b191a125
AC
2662011-08-02 Vincent Celier <celier@adacore.com>
267
268 * adaint.c (file_names_case_sensitive_cache): New static int.
269 (__gnat_get_file_names_case_sensitive): Cache the return value in
270 file_names_case_sensitive_cache at the first invocation, to avoid
271 multiple calls to getenv.
272
2732011-08-02 Bob Duff <duff@adacore.com>
274
275 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
276
316a0661
AC
2772011-08-02 Yannick Moy <moy@adacore.com>
278
279 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
280 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
281 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
282 indicate that we are in a precondition or postcondition. This is used in
283 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
284 decide whether to flag the spec or body of the current subprogram as
285 not in ALFA.
286
2872011-08-02 Fabien Chouteau <chouteau@adacore.com>
288
289 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
290 list.
291 * a-extiin.ads: New file.
292
2932011-08-02 Bob Duff <duff@adacore.com>
294
295 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
296 now raises Name_Error instead of Use_Error in certain cases. The other
297 parts of this AI were already implemented properly.
298
f9adb9d4
AC
2992011-08-02 Vincent Celier <celier@adacore.com>
300
301 * link.c: Only import "auto-host.h" when building the gnattools.
302
3032011-08-02 Yannick Moy <moy@adacore.com>
304
305 * sem_util.adb: Inter-unit inlining does not work for a subprogram
306 which calls a local subprogram, so extract subprogram
307 from Mark_Non_ALFA_Subprogram_Body.
308
3092011-08-02 Javier Miranda <miranda@adacore.com>
310
311 * exp_ch9.adb
312 (Extract_Dispatching_Call): If the type of the dispatching object is an
313 access type then return an explicit dereference in the Object out-mode
314 parameter.
315
3162011-08-02 Gary Dismukes <dismukes@adacore.com>
317
318 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
319 compatibility checks for all indexes of an array subtype, not just the
320 first. Reset Has_Dynamic_Range_Check on the subtype before each
321 potential check to ensure that Insert_Range_Checks will not elide any
322 of the dynamic checks.
323
3242011-08-02 Yannick Moy <moy@adacore.com>
325
326 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
327 SPARK restriction at parsing time.
328 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
329 directive only if the SPARK restriction is set for this unit.
330
83f33150
YM
3312011-08-02 Yannick Moy <moy@adacore.com>
332
333 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
334 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
335 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
336 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
337 Mark_Non_ALFA_Subprogram_Body.
338 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
339 inlined.
340
7b98672f
YM
3412011-08-02 Yannick Moy <moy@adacore.com>
342
343 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
344 might be costly.
345
052e0603
AC
3462011-08-02 Robert Dewar <dewar@adacore.com>
347
348 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
349 exp_ch3.adb: Minor reformatting.
350
3512011-08-02 Emmanuel Briot <briot@adacore.com>
352
353 * adaint.c (__gnat_locate_exec_on_path): only returns executable
354 files, not any regular file.
355 (__gnat_locate_file_with_predicate): new subprogram.
356
3572011-08-02 Yannick Moy <moy@adacore.com>
358
359 * sinfo.adb, sinfo.ads: Restrict the use of flags
360 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
361 nodes, plus N_Subtype_Declaration for the 2nd one.
362
4fbad0ba
AC
3632011-08-02 Sergey Rybin <rybin@adacore.com>
364
365 * gnat_rm.texi: Ramification of pragma Eliminate documentation
366 - fix bugs in the description of Source_Trace;
367 - get rid of UNIT_NAME;
368
052e0603
AC
3692011-08-02 Javier Miranda <miranda@adacore.com>
370
371 * exp_ch9.adb
372 (Build_Dispatching_Requeue): Adding support for VM targets
373 since we cannot directly reference the Tag entity.
374 * exp_sel.adb (Build_K): Adding support for VM targets.
375 (Build_S_Assignment): Adding support for VM targets.
376 * exp_disp.adb
377 (Default_Prim_Op_Position): In VM targets do not restrict availability
378 of predefined interface primitives to compiling in Ada 2005 mode.
379 (Is_Predefined_Interface_Primitive): In VM targets this service is not
380 restricted to compiling in Ada 2005 mode.
381 (Make_VM_TSD): Generate code that declares and initializes the OSD
382 record. Needed to support dispatching calls through synchronized
383 interfaces.
384 * exp_ch3.adb
385 (Make_Predefined_Primitive_Specs): Enable generation of predefined
386 primitives associated with synchronized interfaces.
387 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
388 primitives associated with synchronized interfaces.
389
3902011-08-02 Yannick Moy <moy@adacore.com>
391
392 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
393 statements hidden in SPARK if preceded by the HIDE directive
394 (Parse_Exception_Handlers): mark each exception handler in a sequence of
395 exception handlers as hidden in SPARK if preceded by the HIDE directive
396 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
397 if starting with the HIDE directive
398 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
399 starting with the HIDE directive; mark the declarations in a private
400 part as hidden in SPARK if the private part starts with the HIDE
401 directive
402 * restrict.adb, restrict.ads
403 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
404 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
405 argument node belongs to a part which is hidden in SPARK
406 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
407 parts in SPARK; protect the possibly costly call to
408 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
409 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
410 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
411 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
412 Tok_SPARK_Hide.
413 (Scan): recognize special comment starting with '#' and followed by
414 SPARK keyword "hide" as a HIDE directive.
415
4162011-08-02 Yannick Moy <moy@adacore.com>
417
418 * types.ads, erroutc.ads: Minor reformatting.
419
4202011-08-02 Vincent Celier <celier@adacore.com>
421
422 * link.c: Add response file support for cross platforms.
423
4242011-08-02 Ed Schonberg <schonberg@adacore.com>
425
426 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
427 in an association, set parent field of copy before partial analysis.
428 * sem_res.adb (Resolve_Slice): create reference to itype only when
429 expansion is enabled.
430
4312011-08-02 Yannick Moy <moy@adacore.com>
432
433 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
434 for new flag denoting which subprogram bodies are in ALFA
435 * restrict.adb, sem_ch7.adb: Update comment
436 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
437 sem_ch9.adb, sem_res.adb: Add calls to
438 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
439 * sem_ch6.adb (Analyze_Function_Return): add calls to
440 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
441 middle of the body, and extended return.
442 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
443 False when missing return.
444 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
445 to True for subprograms whose spec is in ALFA. Remove later on the flag
446 on the entity used for a subprogram body when there exists a separate
447 declaration.
448 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
449 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
450 False, otherwise do nothing.
451
4522011-08-02 Robert Dewar <dewar@adacore.com>
453
454 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
455
4562011-08-02 Yannick Moy <moy@adacore.com>
457
458 * sem_ch4.ads: minor formatting.
459
4602011-08-02 Yannick Moy <moy@adacore.com>
461
462 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
463 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
464 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
465 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
466 opt.ads: cleanup of SPARK mode
467
4682011-08-02 Yannick Moy <moy@adacore.com>
469
470 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
471 types.
472 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
473 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
474 * sem_ch3.adb
475 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
476 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
477 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
478 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
479 types.
480 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
481 non-static range.
482 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
483 functions whose return type is not in ALFA.
484 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
485 specifications.
486 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
487 parameter's type is not in ALFA.
488 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
489 types are in ALFA.
490
4912011-08-02 Ed Schonberg <schonberg@adacore.com>
492
493 * sem_ch6 (Analyze_Expression_Function): treat the function as
494 Inline_Always, and introduce a subprogram declaration for it when it is
495 not a completion.
496 * inline.adb (Add_Inlined_Body): recognize bodies that come from
497 expression functions, so that the back-end can determine whether they
498 can in fact be inlined.
499 * sem_util.adb (Is_Expression_Function): predicate to determine whether
500 a function body comes from an expression function.
501
5022011-08-02 Gary Dismukes <dismukes@adacore.com>
503
504 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
505 null exclusions to test Can_Never_Be_Null on the anonymous access types
506 of the formals rather than testing the formals themselves. Exclude this
507 check in cases where the Old_Formal is marked as a controlling formal,
508 to avoid issuing spurious errors for bodies completing dispatching
509 operations (due to the flag not getting set on controlling access
510 formals in body specs).
511 (Find_Corresponding_Spec): When checking full and subtype conformance of
512 subprogram bodies in instances, pass Designated and E in that order, for
513 consistency with the expected order of the formals (New_Id followed by
514 Old_Id).
515
5162011-08-02 Robert Dewar <dewar@adacore.com>
517
518 * sem_ch8.adb: Minor reformatting.
519
5202011-08-02 Ed Schonberg <schonberg@adacore.com>
521
522 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
523 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
524 primitive operations of class-wide actuals.
525
5262011-08-02 Javier Miranda <miranda@adacore.com>
527
528 * exp_atag.ads, exp_atag.adb
529 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
530 since its value is implicitly passed in argument Typ.
531 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
532 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
533 Build_Common_Dispatching_Select_Statements.
534
5352011-08-02 Robert Dewar <dewar@adacore.com>
536
537 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
538 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
539 Minor reformatting.
540
5412011-08-02 Robert Dewar <dewar@adacore.com>
542
543 * sem_res.adb: Minor reformatting.
544 * sem_prag.adb: Minor reformatting.
545
5462011-08-02 Javier Miranda <miranda@adacore.com>
547
548 * exp_atag.adb, exp_atags.ads
549 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
550 by the tagged type Entity. Required to use this routine in the VM
551 targets since we do not have available the Tag entity in the VM
552 platforms.
553 * exp_ch6.adb
554 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
555 Ada.Tags has not been previously loaded.
556 * exp_ch7.adb
557 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
558 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
559 * sem_aux.adb
560 (Enclosing_Dynamic_Scope): Add missing support to handle the full
561 view of enclosing scopes. Required to handle enclosing scopes that
562 are synchronized types whose full view is a task type.
563 * exp_disp.adb
564 (Build_VM_TSDs): Minor code improvement to avoid generating and
565 analyzing lists with empty nodes.
566 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
567 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
568 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
569 (Make_Disp_Timed_Select_Body): Add support for VM targets.
570 (Make_Select_Specific_Data_Table): Add support for VM targets.
571 (Make_VM_TSD): Generate code to initialize the SSD structure of
572 the TSD.
573
5742011-08-02 Yannick Moy <moy@adacore.com>
575
576 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
577 cross-references section in ALI.
578 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
579 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
580 Sub).
581 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
582 subprogram or package entity of a node
583 (Is_Local_Reference_Type): new function returns True for references
584 selected in local cross-references.
585 (Lt): function extracted from Lt in Output_References
586 (Write_Entity_Name): function extracted from Output_References
587 (Generate_Definition): generate reference with type 'D' for definition
588 of objects (object declaration and parameter specification), with
589 appropriate locations and units, for use in local cross-references.
590 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
591 references of type 'I' for initialization in object definition.
592 (Output_References): move part of function Lt and procedure
593 Write_Entity_Name outside of the body. Ignore references of types 'D'
594 and 'I' introduced for local cross-references.
595 (Output_Local_References): new procedure to output the local
596 cross-references sections.
597 (Lref_Entity_Status): new array defining whether an entity is a local
598 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
599 with 'I' type when initialization expression is present.
600 * get_scos.adb, get_scos.ads: Correct comments and typos
601
6022011-08-02 Javier Miranda <miranda@adacore.com>
603
604 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
605 the JVM target.
606 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
607 the JVM target.
608 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
609 TSD support.
610
6112011-08-02 Vincent Celier <celier@adacore.com>
612
613 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
614 (No_Space_Img): New function
615 (Find_Excluded_Sources): When reading from a file, record the file name
616 and the line number for each excluded source.
617 (Mark_Excluded_Sources): When reporting an error, if the excluded
618 sources were read from a file, include file name and line number in
619 the error message.
620
6212011-08-02 Ed Schonberg <schonberg@adacore.com>
622
623 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
624
6252011-08-02 Robert Dewar <dewar@adacore.com>
626
627 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
628
6292011-08-02 Javier Miranda <miranda@adacore.com>
630
631 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
632 generation of TSDs to the DOTNET compiler.
633 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
634 generation of TSDs to the DOTNET compiler.
635
6362011-08-02 Javier Miranda <miranda@adacore.com>
637
638 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
639 record of all the tagged types declared inside library level package
640 declarations, library level package bodies or library level subprograms.
641 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
642 associated with a given tagged type.
643 (Build_VM_TSDs): New subprogram.
644 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
645 compilation units that are subprograms.
646 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
647 compilation units that are package bodies.
648 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
649 units that are a package declaration or a package instantiation.
650 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
651 reorganization to improve the error generated by the frontend when the
652 function Ada.Tags.Secondary_Tag is not available.
653 * rtsfind.ads (RE_Register_TSD): New runtime entity.
654 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
655
6562011-08-02 Javier Miranda <miranda@adacore.com>
657
658 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
659
6602011-08-02 Robert Dewar <dewar@adacore.com>
661
662 * s-imenne.ads: Minor reformatting.
663
6642011-08-02 Robert Dewar <dewar@adacore.com>
665
666 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
667 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
668 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
669
6702011-08-02 Robert Dewar <dewar@adacore.com>
671
672 * einfo.ads (Materialize_Entity): Document this is only for renamings
673 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
674 required debug information in the case where we transform the object
675 declaration into a renaming declaration.
676 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
677 object
678 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
679 Materialize_Entity.
680
6812011-08-02 Robert Dewar <dewar@adacore.com>
682
683 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
684 Suppress_Init_Procs.
685 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
686 Suppress_Initialization/Initialization_Suppressed.
687 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
688 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
689 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
690 * sem_prag.adb: New processing for pragma Suppress_Initialization.
691
6922011-08-02 Robert Dewar <dewar@adacore.com>
693
694 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
695 Minor reformatting.
696
6972011-08-02 Ed Schonberg <schonberg@adacore.com>
698
699 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
700 only have inheritable classwide pre/postconditions.
701
7022011-08-02 Javier Miranda <miranda@adacore.com>
703
704 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
705 * rtsfind.ads (RE_Check_TSD): New runtime entity.
706 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
707 checks if the external tag of a type is the same as the external tag
708 of some other declaration.
709
7102011-08-02 Thomas Quinot <quinot@adacore.com>
711
712 * s-taskin.ads: Minor reformatting.
713
7142011-08-02 Emmanuel Briot <briot@adacore.com>
715
716 * g-comlin.adb (Display_Help): swap the order in which it prints the
717 short help and the general usage.
718
7192011-08-02 Ed Schonberg <schonberg@adacore.com>
720
721 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
722 the aspect declarations and attach them to the generic copy for
723 subsequent analysis.
724 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
725 declarations of the generic tree to the new subprogram declarations.
726 * sem_attr.adb (Check_Precondition_Postcondition): recognize
727 conditions that apply to a subprogram instance.
728
7292011-08-02 Robert Dewar <dewar@adacore.com>
730
731 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
732
7332011-08-02 Ed Schonberg <schonberg@adacore.com>
734
735 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
736 private type with a tagged full view is not derived in the immediate
737 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
738
7392011-08-02 Robert Dewar <dewar@adacore.com>
740
741 * exp_ch4.adb: Minor reformatting.
742
7432011-08-02 Ed Schonberg <schonberg@adacore.com>
744
745 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
746 Ada2012 iterator, the loop will be rewritten during expansion into a
747 while loop with a cursor and an element declaration. Do not analyze the
748 body in this case, because if the container is for indefinite types the
749 actual subtype of the elements will only be determined when the cursor
750 declaration is analyzed.
751
7522011-08-02 Arnaud Charlet <charlet@adacore.com>
753
754 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
755 size/alignment related attributes in CodePeer_Mode.
756
7572011-08-02 Gary Dismukes <dismukes@adacore.com>
758
759 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
760 Prepend_Element, since this can result in the operation getting the
761 wrong slot in the full type's dispatch table if the full type has
762 inherited operations. The incomplete type's operation will get added
763 to the proper position in the full type's primitives
764 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
765 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
766 dispatching operations, since there are cases where nonprimitive
767 subprograms can get added to the list of incomplete dependents (such
768 as subprograms in nested packages).
769 * sem_ch6.adb (Process_Formals): First, remove test for being in a
770 private part when determining whether to add a primitive with a
771 parameter of a tagged incomplete type to the Private_Dependents list.
772 Such primitives can also occur in the visible part, and should not have
773 been excluded from being private dependents.
774 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
775 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
776 list of a Taft-amendment incomplete type is a primitive before issuing
777 an error that the full type must appear in the same unit. There are
778 cases where nonprimitives can be in the list (such as subprograms in
779 nested packages).
780 * sem_disp.adb (Derives_From): Use correct condition for checking that
781 a formal's type is derived from the type of the corresponding formal in
782 the parent subprogram (the condition was completely wrong). Add
783 checking that was missing for controlling result types being derived
784 from the result type of the parent operation.
785
7862011-08-02 Yannick Moy <moy@adacore.com>
787
788 * errout.adb (First_Node): minor renaming
789 * restrict.adb (Check_Formal_Restriction): put restriction warning on
790 first node.
791
7922011-08-02 Yannick Moy <moy@adacore.com>
793
794 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
795 before accessing operands.
796 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
797 decide whether an initialization expression respects SPARK rules, as
798 the plain node is the expanded one. This allows for more valid warnings
799 to be issued.
800 * gnat_rm.texi: Minor update.
801
8022011-08-02 Arnaud Charlet <charlet@adacore.com>
803
804 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
805 previous change.
806
8072011-08-02 Robert Dewar <dewar@adacore.com>
808
809 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
810
8112011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
812
813 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
814 loop statements and the element renaming declaration with a block when
815 the element type is controlled.
816
8172011-08-02 Yannick Moy <moy@adacore.com>
818
819 * sinfo.ads: Minor formatting.
820
8212011-08-02 Ed Schonberg <schonberg@adacore.com>
822
823 * sem_aggr.adb (Add_Association): if the association has a box and no
824 expression, use the Sloc of the aggregate itself for the new
825 association.
826 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
827 the Original_Node.
828
8292011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
830
831 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
832 When a container is provided via a function call, generate a renaming
833 of the function result. This avoids the creation of a transient scope
834 and the premature finalization of the container.
835 * exp_ch7.adb (Is_Container_Cursor): Removed.
836 (Wrap_Transient_Declaration): Remove the supression of the finalization
837 of the list controller when the declaration denotes a container cursor,
838 it is not needed.
839
8402011-08-02 Yannick Moy <moy@adacore.com>
841
842 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
843 node is from source, instead of the original node being from source.
844 * sem_aggr.adb
845 (Resolve_Array_Aggregate): refine the check for a static expression, to
846 recognize also static ranges
847 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
848 Array_Type_Declaration): postpone the test for the type being a subtype
849 mark after the type has been resolved, so that component-selection and
850 expanded-name are discriminated.
851 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
852 to distinguish the case of an iteration scheme, so that an error is
853 issed on a non-static range in SPARK except in an iteration scheme.
854 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
855 In_Iter_Schm = True.
856 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
857 user-defined operators so that they are allowed in renaming
858 * sem_ch8.adb
859 (Find_Selected_Component): refine the check for prefixing of operators
860 so that they are allowed in renaming. Move the checks for restrictions
861 on selector name after analysis discriminated between
862 component-selection and expanded-name.
863 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
864 concatenation argument of string type if it is static.
865 * sem_util.adb, sem_util.ads
866 (Check_Later_Vs_Basic_Declarations): add a new function
867 Is_Later_Declarative_Item to decice which declarations are allowed as
868 later items, in the two different modes Ada 83 and SPARK. In the SPARK
869 mode, add that renamings are considered as later items.
870 (Enclosing_Package): new function to return the enclosing package
871 (Enter_Name): correct the rule for homonyms in SPARK
872 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
873 from source (result of expansion) to avoid issuing wrong warnings.
874
8752011-08-02 Ed Schonberg <schonberg@adacore.com>
876
877 * errout.adb: On anything but an expression First_Node returns its
878 argument.
879
8802011-08-02 Pascal Obry <obry@adacore.com>
881
882 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
883
8842011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
885
886 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
887 Set the associated loop as the related expression of internally
888 generated cursors.
889 * exp_ch7.adb (Is_Container_Cursor): New routine.
890 (Wrap_Transient_Declaration): Supress the finalization of the list
891 controller when the declaration denotes a container cursor.
892
8932011-08-02 Yannick Moy <moy@adacore.com>
894
895 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
896 command line now.
897 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
898 expression is a simple expression. This check cannot be performed in
899 the semantics, so just drop it.
900 (P_Index_Or_Discriminant_Constraint): move check that the index or
901 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
902 semantics. Other cases were previously checked in the semantics.
903 * par-ch4.adb (P_Name): move checks that a selector name is not
904 character literal or an operator symbol to Find_Selected_Component in
905 the semantics
906 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
907 declarations are not placed after later declarations in a separate
908 procedure in Sem_Util (possibly not the best choice?), to be used both
909 during parsing, for Ada 83 mode, and during semantic analysis, for
910 SPARK mode.
911 * par-endh.adb (Check_End): move check that end label is not missing
912 to Process_End_Label in the semantics
913 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
914 the special case for SPARK restriction
915 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
916 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
917 parameter Force to issue the error message even on internal node (used
918 for generated end label). Call Check_Restriction to check when an error
919 must be issued. In SPARK mode, issue an error message even if the
920 restriction is not set.
921 (Check_Restriction): new procedure with an additional out parameter to
922 inform the caller that a message has been issued
923 * sem_aggr.adb: Minor modification of message
924 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
925 instead of issuing an error message directly
926 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
927 declarations are not placed after later declarations, by calling
928 Check_Later_Vs_Basic_Declarations
929 (Analyze_Subtype_Declaration): move here the check that an index or
930 discriminant constraint must be a subtype mark. Change the check that
931 a subtype of String must start at one so that it works on subtype marks.
932 * sem_ch4.adb (Analyze_Call): move here the check that a named
933 association cannot follow a positional one in a call
934 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
935 instead of issuing an error message directly
936 * sem_ch8.adb (Find_Selected_Component): move here the check that a
937 selector name is not a character literal or an operator symbol. Move
938 here the check that the prefix of an expanded name cannot be a
939 subprogram or a loop statement.
940 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
941 procedure called from parsing and semantics to check that basic
942 declarations are not placed after later declarations
943 (Process_End_Label): move here the check that end label is not missing
944
9452011-08-02 Arnaud Charlet <charlet@adacore.com>
946
947 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
948 representation clause in codepeer mode, since it confuses CodePeer and
949 does not bring useful info.
950
9512011-08-02 Ed Falis <falis@adacore.com>
952
953 * init.c: initialize fp hw on MILS.
954
9552011-08-02 Ed Schonberg <schonberg@adacore.com>
956
957 * errout.adb (First_Node): for bodies, return the node itself (small
958 optimization). For other nodes, do not check source_unit if the node
959 comes from Standard.
960
9612011-08-02 Robert Dewar <dewar@adacore.com>
962
963 * exp_ch3.adb: Minor comment additions.
964 * sem_ch13.adb: Minor reformatting.
965
9662011-08-02 Pascal Obry <obry@adacore.com>
967
968 * make.adb, makeutl.adb: Removes some superfluous directory separator.
969
9702011-08-02 Robert Dewar <dewar@adacore.com>
971
972 * sem_attr.adb: Minor reformatting.
973
9742011-08-02 Robert Dewar <dewar@adacore.com>
975
976 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
977 (Has_Default_Component_Value): Removed
978 * einfo.ads Comment updates
979 (Has_Default_Aspect): Replaces Has_Default_Value
980 (Has_Default_Component_Value): Removed
981 * exp_ch13.adb
982 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
983 * exp_ch3.adb
984 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
985 (Get_Simple_Init_Val): Handle Default_Value aspect
986 (Needs_Simple_Initialization): Handle Default_Value aspect
987 * exp_ch3.ads: Needs_Simple_Initialization
988 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
989 * par-prag.adb (Pragma_Default[_Component]Value) Removed
990 * sem_ch13.adb
991 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
992 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
993 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
994
9952011-08-02 Ed Schonberg <schonberg@adacore.com>
996
997 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
998 package containing iteration primitives.
999 exp_ch5.adb (Expand_Iterator_Loop): ditto.
1000
10012011-08-02 Ed Schonberg <schonberg@adacore.com>
1002
1003 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
1004 "of", pre-analyze expression in case it is a function call with
1005 finalization actions that must be placed ahead of the loop.
1006 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
1007 on an Ada2012 iterator, insert them ahead of the rewritten loop.
1008
10092011-08-02 Geert Bosch <bosch@adacore.com>
1010
1011 * cstand.adb (Create_Float_Types): Only consider C's long double for
1012 Long_Long_Float, in addition to double.
1013
10142011-08-02 Robert Dewar <dewar@adacore.com>
1015
1016 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
1017 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
1018 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
1019 Minor reformatting.
1020
10212011-08-02 Ed Schonberg <schonberg@adacore.com>
1022
1023 * sem_attr.adb: handle properly 'Result when it is a prefix of an
1024 indexed component.
1025
10262011-08-02 Javier Miranda <miranda@adacore.com>
1027
1028 * einfo.ads, einfo.adb
1029 (Original_Access_Type): Move this attribute to Node26 since there was
1030 an undocumented use of Node21 in E_Access_Subprogram_Type entities
1031 which causes conflicts and breaks the generation of the .NET compiler.
1032 (Interface_Name): Add missing documentation on JGNAT only uses of
1033 this attribute.
1034
10352011-08-02 Geert Bosch <bosch@adacore.com>
1036
1037 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
1038 (Find_Back_End_Float_Type): Likewise
1039 (Create_Back_End_Float_Types): Likewise
1040 (Create_Float_Types): Likewise
1041 (Register_Float_Type): Likewise
1042 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
1043 Nlist and split out type selection in new local Find_Base_Type function.
1044 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
1045 Nlist
1046 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
1047
10482011-08-02 Robert Dewar <dewar@adacore.com>
1049
1050 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
1051 alpha order).
1052 * opt.ads: Minor comment change.
1053 * sem_ch12.adb: Minor code reorganization.
1054
10552011-08-02 Gary Dismukes <dismukes@adacore.com>
1056
1057 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
1058 subtype's list of rep items to the list on the full subtype in the case
1059 where the lists are the same.
1060
10612011-08-02 Geert Bosch <bosch@adacore.com>
1062
1063 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
1064 using the one from System.Strings, which also deallocates all strings.
1065
10662011-08-02 Geert Bosch <bosch@adacore.com>
1067
1068 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
1069 function.
1070 * gcc-interface/Make-lang.in: Update dependencies.
1071
10722011-08-02 Olivier Hainque <hainque@adacore.com>
1073
1074 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
1075 end_locus.
1076
10772011-08-02 Javier Miranda <miranda@adacore.com>
1078
1079 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
1080 associated with anonymous access to subprograms.
1081
10822011-08-02 Geert Bosch <bosch@adacore.com>
1083
1084 * opt.ads
1085 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
1086 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
1087 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
1088 (Add_Symbol_Definition): Move to switch-c.adb
1089 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
1090 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
1091 (Add_Symbol_Definition): Move to switch-c.adb.
1092 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
1093 * sem_warn.adb
1094 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1095 Move to warnsw.adb.
1096 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
1097 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
1098 Move to warnsw.adb.
1099 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
1100 (Add_Symbol_Definition): Moved from Prepcomp.
1101 * switch-c.ads: Update copyright notice. Use String_List instead of
1102 Argument_List, removing dependency on System.OS_Lib.
1103
11042011-08-02 Yannick Moy <moy@adacore.com>
1105
1106 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
1107 mode on initialization expression which does not respect SPARK
1108 restrictions.
1109 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
1110 if the tree referenced by its argument represents an initialization
1111 expression in SPARK, suitable for initializing an object in an object
1112 declaration.
1113
11142011-08-02 Javier Miranda <miranda@adacore.com>
1115
1116 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
1117 internally generated access to subprogram with its associated protected
1118 subprogram type.
1119 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
1120
11212011-08-02 Geert Bosch <bosch@adacore.com>
1122
1123 * cstand.adb (Register_Float_Type): Print information about type to
1124 register, if the Debug_Flag_Dot_B is set.
1125 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
1126 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
1127 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
1128 with a requested precision of more than Max_Digits digits and no more
1129 than Max_Base_Digits digits, if a range specification is present and the
1130 Predefined_Float_Types list has a suitable type to derive from.
1131 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
1132 case of type completion with pragma Import
1133 * sem_prag.adb
1134 (Process_Import_Predefined_Type): Processing to complete a type
1135 with pragma Import. Currently supports floating point types only.
1136 (Set_Convention_From_Pragma): Do nothing without underlying type.
1137 (Process_Convention): Guard against absence of underlying type,
1138 which may happen when importing incomplete types.
1139 (Process_Import_Or_Interface): Handle case of importing predefined
1140 types. Tweak error message.
1141
11422011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1143
1144 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
1145 functions to previous change. Reorganize code slightly.
1146
11472011-08-02 Geert Bosch <bosch@adacore.com>
1148
1149 * back_end.ads (Register_Type_Proc): New call back procedure type for
1150 allowing the back end to provide information about available types.
1151 (Register_Back_End_Types): New procedure to register back end types.
1152 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
1153 available types.
1154 * cstand.adb (Back_End_Float_Types): New list for floating point types
1155 supported by the back end.
1156 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
1157 (Copy_Float_Type): New procedure to make new copies of predefined types.
1158 (Register_Float_Type): New call back procedure to populate the BEFT list
1159 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
1160 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
1161 (Create_Float_Types): New procedure to create entities for floating
1162 point types predefined in Standard, and put these and any remaining
1163 BEFTs on the Predefined_Float_Types list.
1164 * stand.ads (Predefined_Float_Types): New list for predefined floating
1165 point types that do not have declarations in package Standard.
1166
11672011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1168
1169 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
1170 entity node for the unit containing the parameter.
1171 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
1172 (Add_Inlined_Subprogram): Likewise.
1173 * gcc-interface/Make-lang.in: Update dependencies.
1174
11752011-08-02 Thomas Quinot <quinot@adacore.com>
1176
1177 * s-stusta.adb (Print): Make sure Pos is always initialized to a
1178 suitable value.
1179
11802011-08-02 Geert Bosch <bosch@adacore.com>
1181
1182 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
1183
11842011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1185
1186 * sem_type.adb (Covers): Move trivial case to the top and reuse the
1187 computed value of Base_Type.
1188
11892011-08-02 Yannick Moy <moy@adacore.com>
1190
1191 * restrict.adb (Check_Restriction): issue an error for any use of
1192 class-wide, even if the No_Dispatch restriction is not set.
1193 * sem_aggr.adb: Correct typos in comments and messages in formal mode
1194 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
1195 when completing a private extension, the type named in the private part
1196 is not the same as that named in the visible part.
1197 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
1198 of an inherited primitive operations of a tagged type or type extension
1199 that returns the tagged type.
1200 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
1201 function which returns True for an implicit operation inherited by the
1202 derived type declaration for the argument type.
1203 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
1204 order.
1205
12062011-08-02 Ed Schonberg <schonberg@adacore.com>
1207
1208 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
1209 Process_Bounds, to perform analysis with expansion of a range or an
1210 expression that is the iteration scheme for a loop.
1211 (Analyze_Iterator_Specification): If domain of iteration is given by a
1212 function call with a controlled result, as is the case if call returns
1213 a predefined container, ensure that finalization actions are properly
1214 generated.
1215 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
1216
12172011-08-02 Javier Miranda <miranda@adacore.com>
1218
1219 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
1220 * gcc-interface/Make-lang.in: Update dependencies.
1221
12222011-08-02 Javier Miranda <miranda@adacore.com>
1223
1224 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
1225 determine if the analysis is performed using N or Original_Node (N).
1226 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
1227 functionality of routine Is_Variable avoids code duplication.
1228 * checks.adb (Determine_Range): Handle temporaries generated by
1229 Remove_Side_Effects.
1230
12312011-08-02 Javier Miranda <miranda@adacore.com>
1232
1233 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
1234 expansion of the condition. Required since the previous analysis was
1235 done with expansion disabled (see Resolve_Quantified_Expression) and
1236 hence checks were not inserted and record comparisons have not been
1237 expanded.
1238
12392011-08-02 Ed Falis <falis@adacore.com>
1240
1241 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
1242 Update header.
1243
12442011-08-02 Bob Duff <duff@adacore.com>
1245
1246 * opt.ads: Minor comment fix.
1247
12482011-08-02 Bob Duff <duff@adacore.com>
1249
1250 * sem_ch12.adb (Analyze_Package_Instantiation,
1251 Analyze_Subprogram_Instantiation): Turn off style checking while
1252 analyzing an instance. Whatever style checks that apply to the generic
1253 unit should apply, so it makes no sense to apply them in an instance.
1254 This was causing trouble when compiling an instance of a runtime
1255 unit that violates the -gnatyO switch.
1256 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
1257 one of the two case statements, causing spurious errors.
1258
12592011-08-02 Robert Dewar <dewar@adacore.com>
1260
1261 * uname.adb: Minor reformatting.
1262 * gnatcmd.adb: Minor reformatting.
1263 * exp_attr.adb: Minor reformatting.
1264
12652011-08-02 Ed Schonberg <schonberg@adacore.com>
1266
1267 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
1268 No_Dispatching_Calls, do not look for the Assign primitive, because
1269 predefined primitives are not created in this case.
1270
12712011-08-02 Bob Duff <duff@adacore.com>
1272
1273 * stylesw.ads: Minor comment fixes.
1274
12752011-08-02 Robert Dewar <dewar@adacore.com>
1276
1277 * freeze.adb (Add_To_Result): New procedure.
1278
12792011-08-02 Jose Ruiz <ruiz@adacore.com>
1280
1281 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
1282 time, if the specific run-time routines for handling streams of strings
1283 are not available, use the default mechanism.
1284
12852011-08-02 Arnaud Charlet <charlet@adacore.com>
1286
1287 * s-regpat.ads: Fix typo.
1288
12892011-08-02 Vincent Celier <celier@adacore.com>
1290
1291 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
1292 not null, call it to create the in memory config project file without
1293 parsing an existing default config project file.
1294
12952011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1296
1297 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
1298
12992011-08-02 Ed Schonberg <schonberg@adacore.com>
1300
1301 * sem_elim.adb: an abstract subprogram does not need an eliminate
1302 pragma for its descendant to be eliminable.
1303
13042011-08-02 Ed Falis <falis@adacore.com>
1305
1306 * init.c: revert to handling before previous checkin for VxWorks
1307 * s-intman-vxworks.adb: delete unnecessary declarations related to
1308 using Ada interrupt facilities for handling signals.
1309 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
1310 * s-intman-vxworks.ads: Import __gnat_install_handler as
1311 Initialize_Interrupts.
1312 * s-taprop-vxworks.adb: Delete Signal_Mask.
1313 (Abort_Handler): change construction of mask to unblock exception
1314 signals.
1315
13162011-08-02 Jerome Guitton <guitton@adacore.com>
1317
1318 * a-except-2005.adb (Raise_From_Signal_Handler): Call
1319 Debug_Raise_Exception before propagation starts.
1320
13212011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1322
1323 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
1324 to Restriction_Check_Required.
1325 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
1326 * sem_res.adb (Resolve_Call): Likewise.
1327 * sem_attr.adb (Check_Stream_Attribute): Likewise.
1328
13292011-08-02 Bob Duff <duff@adacore.com>
1330
1331 * stylesw.ads: Update comment.
1332 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
1333 * errout.ads: Remove obsolete comment.
1334
13352011-08-02 Javier Miranda <miranda@adacore.com>
1336
1337 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
1338 (Set_Is_Safe_To_Reevaluate): new procedure.
1339 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
1340 assignment is allowed on safe-to-reevaluate variables.
1341 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
1342 temporary created to remove side effects in expressions that use
1343 the secondary stack as safe-to-reevaluate.
1344 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
1345 variables that are not true constants.
1346
13472011-08-02 Robert Dewar <dewar@adacore.com>
1348
1349 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
1350 sem_res.adb, sem_ch6.adb: Minor reformatting.
1351
13522011-08-02 Jerome Guitton <guitton@adacore.com>
1353
1354 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
1355
13562011-08-02 Ed Schonberg <schonberg@adacore.com>
1357
1358 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
1359 not set Overridden_Operation if subprogram is an initialization
1360 procedure.
1361
13622011-08-02 Yannick Moy <moy@adacore.com>
1363
1364 * par-ch6.adb: Correct obsolete name in comments
1365 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
1366 which takes two message arguments (existing function takes one), with
1367 second message used for continuation.
1368 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
1369 block statements that originate from a source block statement, not
1370 generated block statements
1371 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
1372 symmetry with procedure case
1373 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
1374 function to issue an error in formal mode if a package specification
1375 contains more than one tagged type or type extension.
1376 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
1377 parameters matching formals of tagged types are objects (or ancestor
1378 type conversions of objects), not general expressions. Issue an error
1379 on view conversions that are not involving ancestor conversion of an
1380 extended type.
1381 (Resolve_Type_Conversion): in formal mode, issue an error on the
1382 operand of an ancestor type conversion which is not an object
1383 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
1384 procedure so that it works also for actuals of function calls
1385 (Is_Actual_Tagged_Parameter): new function which determines if its
1386 argument is an actual parameter of a formal of tagged type in a
1387 subprogram call
1388 (Is_SPARK_Object_Reference): new function which determines if the tree
1389 referenced by its argument represents an object in SPARK
1390
13912011-08-02 Robert Dewar <dewar@adacore.com>
1392
1393 * sem_ch3.adb: Minor reformatting
1394 Minor comment addition
1395 Minor error msg text change
1396
13972011-08-02 Javier Miranda <miranda@adacore.com>
1398
1399 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
1400 function. Used to be more precise when we generate a variable plus one
1401 assignment to remove side effects in the evaluation of the Bound
1402 expressions.
1403 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
1404 of the bound expression to force its re-analysis and thus expand the
1405 associated transient scope (if required). Code cleanup replacing the
1406 previous code that declared the constant entity by an invocation to
1407 routine Force_Evaluation which centralizes this work in the frontend.
1408
14092011-08-02 Robert Dewar <dewar@adacore.com>
1410
1411 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
1412 (Base_Type): Now uses improved Is_Base_Type function
1413 * einfo.ads (Base_Type): Inline this function
1414
14152011-08-02 Robert Dewar <dewar@adacore.com>
1416
1417 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
1418 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
1419
14202011-08-02 Arnaud Charlet <charlet@adacore.com>
1421
1422 * gcc-interface/Make-lang.in: Update dependencies.
1423 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
1424 targets.
1425
14262011-08-02 Yannick Moy <moy@adacore.com>
1427
1428 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
1429 non-simple expression used in delta constraint
1430 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
1431 index constraint which is not a subtype mark
1432 * par.adb: With and use Restrict
1433 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
1434 mode on component type which is not a subtype mark and default
1435 expression on component
1436 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
1437 of string which does not have a lower index bound equal to 1
1438 (Array_Type_Declaration): issue an error in formal mode on index or
1439 component type which is not a subtype mark, and on aliased keyword on
1440 component
1441 (Derived_Type_Declaration): issue an error in formal mode on interface,
1442 limited or abstract type
1443 (Record_Type_Declaration): issue an error in formal mode on interface
1444 (Record_Type_Definition): issue an error in formal mode on tagged types
1445 and type extensions not declared in the specification of a library unit
1446 package; on null non-tagged record; on variant part
1447
14482011-08-02 Vincent Celier <celier@adacore.com>
1449
1450 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
1451 not declared for qualified library project when Library_Name is not
1452 declared, but Library_Dir is.
1453
14542011-08-02 Robert Dewar <dewar@adacore.com>
1455
1456 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
1457 pragmas (affects aspects [Component_]Default_Value
1458 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
1459 component type for the resolution
1460
14612011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1462
1463 * einfo.adb (Base_Type): Tune implementation for speed.
1464
14652011-08-02 Robert Dewar <dewar@adacore.com>
1466
1467 * freeze.adb: Minor reformatting.
1468
14692011-08-02 Thomas Quinot <quinot@adacore.com>
1470
1471 * scos.ads: Update comments.
1472
14732011-08-02 Ed Schonberg <schonberg@adacore.com>
1474
1475 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
1476 base type, because the parent may be a subtype of a private type whose
1477 convention is established in a private part.
1478
14792011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
1480
1481 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
1482 statement in a block when the expansion of the return expression has
1483 created a finalization chain.
1484 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
1485 with the parent node.
1486 Add N_Extended_Return_Statement to handle the case where a transient
1487 object declaration appears in the Return_Object_Declarations list of
1488 an extended return statement.
1489
14902011-08-02 Matthew Gingell <gingell@adacore.com>
1491
1492 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
1493 unused parameter 'name'.
1494
14952011-08-02 Ed Schonberg <schonberg@adacore.com>
1496
1497 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
1498 inherited operation, check whether its alias, which is the source
1499 operastion that it renames, has been marked eliminated.
1500
15012011-08-02 Javier Miranda <miranda@adacore.com>
1502
1503 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
1504 in-mode parameter whose type is an access type since it can be used to
1505 modify its designated object. Enforce code that handles as safe an
1506 access type that is not access-to-constant but it is the result of a
1507 previous removal of side-effects.
1508 (Remove_Side_Effects): Minor code reorganization of cases which require
1509 no action. Done to incorporate documentation on new cases uncovered
1510 working in this ticket: no action needed if this routine was invoked
1511 too early and the nodes are not yet decorated.
1512 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
1513 to routine Remove_Side_Effects by calls to Force_Evaluation since they
1514 were issued with actuals that are implicitly provided by
1515 Force_Evaluation.
1516
15172011-08-02 Robert Dewar <dewar@adacore.com>
1518
1519 * sem_ch3.adb, sem_res.adb: Minor reformatting.
1520
15212011-08-02 Yannick Moy <moy@adacore.com>
1522
1523 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
1524 to issue an error in formal mode on attribute not supported in this mode
1525 (Analyze_Attribute): issue errors on standard attributes not supported
1526 in formal mode.
1527 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
1528 comment, and issue error in formal mode on modulus which is not a power
1529 of 2.
1530 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
1531 range.
1532 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
1533 subtype mark.
1534 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
1535 operator on modular type (except 'not').
1536
15372011-08-02 Robert Dewar <dewar@adacore.com>
1538
1539 * gnat_rm.texi: Minor reformatting.
1540
15412011-08-02 Arnaud Charlet <charlet@adacore.com>
1542
1543 * s-osinte-linux.ads: Minor comment update and reformatting.
1544 * i-cexten.ads: Make this unit pure, as for its parent.
1545 Will allow its usage in more contexts if needed.
1546
15472011-08-02 Robert Dewar <dewar@adacore.com>
1548
1549 * s-utf_32.ads: Minor comment fix.
1550
15512011-08-02 Ed Schonberg <schonberg@adacore.com>
1552
1553 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
1554 operation of a tagged synchronized type, handle the case where the
1555 controlling argument is overloaded.
1556
15572011-08-02 Yannick Moy <moy@adacore.com>
1558
1559 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
1560 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
1561 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
1562 SPARK mode and formal verification mode on processing SPARK restriction
1563 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
1564 requiring consistency checking.
1565
15662011-08-02 Robert Dewar <dewar@adacore.com>
1567
1568 * sem_res.adb: Minor reformatting.
1569
15702011-08-02 Robert Dewar <dewar@adacore.com>
1571
1572 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1573 a-cforse.ads: Remove unneeded with of Ada.Containers
1574 Remove commented out pragma Inline's
1575 Move specifications of new subprograms to the actual specs
1576
15772011-08-02 Yannick Moy <moy@adacore.com>
1578
1579 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1580 a-cforse.ads: Update comments.
1581
15822011-08-02 Ed Schonberg <schonberg@adacore.com>
1583
1584 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
1585
15862011-08-02 Robert Dewar <dewar@adacore.com>
1587
1588 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1589 a-cforse.ads, a-cofove.ads: Minor reformatting.
1590
15912011-08-02 Claire Dross <dross@adacore.com>
1592
1593 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1594 a-cofove.ads: Add comments.
1595
15962011-08-02 Yannick Moy <moy@adacore.com>
1597
1598 * gnat_rm.texi: Document formal containers.
1599
16002011-08-02 Emmanuel Briot <briot@adacore.com>
1601
1602 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
1603 are empty sections.
1604
16052011-08-02 Robert Dewar <dewar@adacore.com>
1606
1607 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
1608 reformatting.
1609
16102011-08-02 Robert Dewar <dewar@adacore.com>
1611
1612 * aspects.adb: New aspects Default_Value and Default_Component_Value
1613 New format of Aspect_Names table checks for omitted entries
1614 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
1615 handling of boolean aspects for derived types.
1616 New aspects Default_Value and Default_Component_Value
1617 New format of Aspect_Names table checks for omitted entries
1618 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
1619 (Has_Default_Value): New flag
1620 (Has_Default_Component_Value): New flag
1621 (Has_Default_Value): New flag
1622 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
1623 table.
1624 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
1625 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
1626 Default_Value and Default_Component_Value
1627 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
1628 New aspects Default_Value and Default_Component_Value
1629 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
1630 * sprint.adb: Print N_Aspect_Specification node when called from gdb
1631
16322011-08-02 Vincent Celier <celier@adacore.com>
1633
1634 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
1635 inherit library kind.
1636
16372011-08-02 Ed Schonberg <schonberg@adacore.com>
1638
1639 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
1640 Minor reformatting.
1641
16422011-08-02 Robert Dewar <dewar@adacore.com>
1643
1644 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
1645
16462011-08-02 Yannick Moy <moy@adacore.com>
1647
1648 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
1649
16502011-08-02 Robert Dewar <dewar@adacore.com>
1651
1652 * impunit.adb: Add comment.
1653
16542011-08-02 Yannick Moy <moy@adacore.com>
1655
1656 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
1657 qualification of aggregates in formal mode
1658 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
1659 another aggregate
1660 (Resolve_Aggregate): complete the test that an aggregate is adequately
1661 qualified in formal mode
1662
16632011-08-02 Pascal Obry <obry@adacore.com>
1664
1665 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
1666 * mlib-prj.adb: Supress warning when compiling binder generated file.
1667 (Build_Library): Supress all warnings when compiling the binder
1668 generated file.
1669
16702011-08-02 Yannick Moy <moy@adacore.com>
1671
1672 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
1673 from here...
1674 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
1675 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
1676 Add with/use clauses to make Check_Formal_Restriction visible
1677
16782011-08-02 Ed Schonberg <schonberg@adacore.com>
1679
1680 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
1681 in-parameters when type of the generic formal is private in the generic
1682 spec and non-private in the body.
1683
16842011-08-02 Claire Dross <dross@adacore.com>
1685
1686 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
1687 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
1688 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
1689 * impunit.adb, Makefile.rtl: Take new files into account.
1690
16912011-08-02 Robert Dewar <dewar@adacore.com>
1692
1693 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
1694 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1695
16962011-08-02 Yannick Moy <moy@adacore.com>
1697
1698 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
1699 formal mode
1700 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
1701 matching static array bounds, taking into account the special case of
1702 string literals
1703 * sem_ch3.adb: Typo in comment.
1704
17052011-08-02 Yannick Moy <moy@adacore.com>
1706
1707 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
1708 which issues an error in formal mode if its argument node is originally
1709 from source
1710 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
1711 has a discriminant specification so that it does not include the case
1712 of derived types
1713 (Derived_Type_Declaration): move here the test that a derived type has a
1714 discriminant specification
1715 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
1716 first element of a component association before accessing its choices
1717 (presence of component association is not enough)
1718 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
1719 declaration is a library item before accessing the next element in a
1720 list, as library items are not member of lists
1721 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1722 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
1723 Check_Formal_Restriction whenever possible.
1724
17252011-08-02 Ed Schonberg <schonberg@adacore.com>
1726
1727 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
1728 reference when needed.
1729
17302011-08-02 Bob Duff <duff@adacore.com>
1731
1732 * gnat_ugn.texi: Fix typo.
1733
17342011-08-02 Vincent Celier <celier@adacore.com>
1735
1736 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
1737 archive file name. Do not use the full path name of archives for Open
1738 VMS.
1739
17402011-08-02 Robert Dewar <dewar@adacore.com>
1741
1742 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
1743 Analyze_Aspect_Specifications
1744 * sem_ch13.adb
1745 (Analyze_Aspect_Specifications): New handling for boolean aspects
1746 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
1747 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
1748 sequence for Analyze_Aspect_Specifications
1749 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
1750 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
1751
17522011-08-02 Robert Dewar <dewar@adacore.com>
1753
1754 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
1755 aspects, since these no longer exist.
1756
17572011-08-02 Robert Dewar <dewar@adacore.com>
1758
1759 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
1760 semicolon, do not try to see if there are aspects following it.
1761 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
1762 aspect spec.
1763
17642011-08-02 Robert Dewar <dewar@adacore.com>
1765
1766 * sem_ch8.adb, aspects.ads: Minor reformatting.
1767
17682011-08-02 Eric Botcazou <ebotcazou@adacore.com>
1769
1770 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
1771 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
1772 extracted from...
1773 (Analyze_Aspect_Specifications): ...here. Call above procedure.
1774
17752011-08-02 Yannick Moy <moy@adacore.com>
1776
1777 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
1778 mode on subprogram declaration outside of package specification, unless
1779 it is followed by a pragma Import
1780 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
1781 Access_Type_Declaration): issue error in formal mode on access type
1782 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
1783 incomplete type
1784 (Analyze_Object_Declaration): issue error in formal mode on object
1785 declaration which does not respect SPARK restrictions
1786 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
1787 declaration which does not respect SPARK restrictions
1788 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
1789 error in formal mode on digits or delta constraint
1790 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
1791 decimal fixed point type
1792 (Derived_Type_Declaration): issue error in formal mode on derived type
1793 other than type extensions of tagged record types
1794 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
1795 with check on access definition
1796 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
1797 mode on protected definition.
1798 (Analyze_Task_Definition): issue error in formal mode on task definition
1799
18002011-08-02 Robert Dewar <dewar@adacore.com>
1801
1802 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
1803
18042011-08-02 Javier Miranda <miranda@adacore.com>
1805
1806 * sem_ch6.adb (Can_Override_Operator): New function.
1807 (Verify_Overriding_Indicator): Add missing code to check overriding
1808 indicator in operators. Fixes regression.
1809 (Check_Overriding_Indicator): Minor reformating after replacing the
1810 code that evaluates if the subprogram can override an operator by
1811 invocations to the above new function.
1812 * einfo.adb
1813 (Write_Field26_Name): Add missing code to ensure that, following
1814 the documentation in einfo.ads, this field is not shown as attribute
1815 "Static_Initialization" on non-dispatching functions.
1816
18172011-08-02 Jose Ruiz <ruiz@adacore.com>
1818
1819 * sem_res.adb (Resolve_Call): A call to
1820 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
1821 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
1822 i.e., when the second parameter is of type Time_Span.
1823
18242011-08-02 Vincent Celier <celier@adacore.com>
1825
1826 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
1827 with an archive instead of -L<library dir> -l<library name>.
1828
18292011-08-02 Ed Schonberg <schonberg@adacore.com>
1830
1831 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
1832 mark the base types In_Use in addition to making the operations
1833 use_visible.
1834
18352011-08-02 Ed Falis <falis@adacore.com>
1836
1837 * init.c: add and setup __gnat_signal_mask for the exception signals
1838 * s-inmaop-vxworks.adb: new file.
1839 * s-intman-vxworks.adb: remove unnecessary initializations and
1840 simplify remaining
1841 * s-intman-vxworks.ads: remove unnecessary variable
1842 * s-taprop-vxworks.adb: simplify signal initialization
1843
18442011-08-02 Robert Dewar <dewar@adacore.com>
1845
1846 * sem_ch8.adb: Minor code reorganization, comment updates.
1847
18482011-08-02 Robert Dewar <dewar@adacore.com>
1849
1850 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
1851 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
1852 here from Sem_Res.
1853 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
1854 (Matching_Static_Array_Bounds): Moved here from Sem_Res
1855
18562011-08-02 Ed Schonberg <schonberg@adacore.com>
1857
1858 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
1859 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
1860 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
1861 use_type_clauses, to handle more efficiently use_type and use_all_type
1862 constructs.
1863 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
1864 Ada2012 Use_All_Type clause.
1865 (Use_Class_Wide_Operations): new procedure.
1866
18672011-08-02 Robert Dewar <dewar@adacore.com>
1868
1869 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
1870 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
1871 expression to expression function.
1872
18732011-08-02 Ed Schonberg <schonberg@adacore.com>
1874
1875 * sem_ch4.adb: transform simple Ada2012 membership into equality only
1876 if types are compatible.
1877
18782011-08-02 Yannick Moy <moy@adacore.com>
1879
1880 * sem_res.adb (Matching_Static_Array_Bounds): new function which
1881 returns True if its argument array types have same dimension and same
1882 static bounds at each index.
1883 (Resolve_Actuals): issue an error in formal mode on actuals passed as
1884 OUT or IN OUT paramaters which are not view conversions in SPARK.
1885 (Resolve_Arithmetic_Op): issue an error in formal mode on
1886 multiplication or division with operands of fixed point types which are
1887 not qualified or explicitly converted.
1888 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
1889 Boolean or array type (except String) operands.
1890 (Resolve_Equality_Op): issue an error in formal mode on equality
1891 operators for array types other than String with non-matching static
1892 bounds.
1893 (Resolve_Logical_Op): issue an error in formal mode on logical operators
1894 for array types with non-matching static bounds. Factorize the code in
1895 Matching_Static_Array_Bounds.
1896 (Resolve_Qualified_Expression): issue an error in formal mode on
1897 qualified expressions for array types with non-matching static bounds.
1898 (Resolve_Type_Conversion): issue an error in formal mode on type
1899 conversion for array types with non-matching static bounds
1900
19012011-08-02 Robert Dewar <dewar@adacore.com>
1902
1903 * par-ch10.adb: Minor code reorganization (use Nkind_In).
1904
19052011-08-02 Ed Schonberg <schonberg@adacore.com>
1906
1907 * par-ch9.adb: save location of entry for proper error message.
1908
19092011-08-02 Javier Miranda <miranda@adacore.com>
1910
1911 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
1912 (Use_Full_View) which permits this routine to climb through the
1913 ancestors using the full-view of private parents.
1914 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
1915 Use_Full_View to true in calls to Is_Ancestor.
1916 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
1917 true in call to Is_Ancestor.
1918 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
1919 Use_Full_View to true in call to Is_Ancestor.
1920 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
1921 call to Is_Ancestor.
1922 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
1923 Use_Full_View to true in calls to Is_Ancestor.
1924 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
1925 Make_Select_Specific_Data_Table, Register_Primitive,
1926 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
1927 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
1928 to true in call to Is_Ancestor.
1929 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
1930 Use_Full_View to true in calls to Is_Ancestor.
1931 * exp_cg.adb
1932 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
1933 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
1934
19352011-08-02 Robert Dewar <dewar@adacore.com>
1936
1937 * gnat_rm.texi: Minor reformatting.
1938 * sem_prag.adb: Minor reformatting.
1939
19402011-08-02 Tristan Gingold <gingold@adacore.com>
1941
1942 * vms_data.ads: Add VMS qualifier for -gnateP.
1943
19442011-08-02 Robert Dewar <dewar@adacore.com>
1945
1946 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
1947 * par-ch7.adb (P_Package): Proper placement of aspects for package
1948 decl/instantiation.
1949 * par-endh.adb (Check_End): Ad Is_Sloc parameter
1950 (End_Statements): Add Is_Sloc parameterr
1951 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
1952 (Check_End): Ad Is_Sloc parameter
1953 (End_Statements): Add Is_Sloc parameterr
1954
19552011-08-02 Vincent Celier <celier@adacore.com>
1956
1957 * ug_words: Add VMS qualifier equivalent to -gnateP:
1958 /SYMBOL_PREPROCESSING.
1959
19602011-08-02 Jose Ruiz <ruiz@adacore.com>
1961
1962 * gnat-style.texi: For hexadecimal numeric literals the typical
1963 grouping of digits is 4 to represent 2 bytes.
1964 A procedure spec which is split into several lines is indented two
1965 characters.
1966
19672011-08-02 Yannick Moy <moy@adacore.com>
1968
1969 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
1970 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
1971 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
1972 properly qualified
1973 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
1974 choice in array aggregate
1975 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
1976 mark as ancestor
1977 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
1978 positional and named aggregate for record, or others in record
1979 aggregate, or multiple choice in record aggregate
1980 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
1981 array operands to logical operations AND, OR and XOR do not have the
1982 same static lower and higher bounds
1983 * sem_ch5.adb, sinfo.ads: Correct typos in comments
1984
19852011-08-01 Robert Dewar <dewar@adacore.com>
1986
1987 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
1988 Replaces Last_Source_Node_In_Sequence.
1989 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
1990 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
1991 parens and blank in string (this was inconsistently implemented).
1992 * errout.ads
1993 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
1994 blank in string (this was inconsistently implemented).
1995 * gnat1drv.adb
1996 (Set_Global_Switches): Set formal mode switches appropriately
1997 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
1998 * par-prag.adb
1999 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
2000 call Set_Error_Msg_Lang to set "spark" as language name.
2001 * par.adb: Remove unnecessary call to set formal language for errout
2002 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
2003 appropriately and call Set_Error_Msg_Lang to set "spark" as language
2004 name.
2005 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
2006 calls to it, moved after resolution so that types are known
2007 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
2008 result of concatenation is not of type String
2009 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
2010 concatenation is not properly restricted
2011 * gnat_rm.texi: Add doc on pragma Spark_95.
2012 * gcc-interface/Makefile.in: Remove obsolete target pairs for
2013 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
2014 * gcc-interface/Make-lang.in: Update dependencies.
2015
20162011-08-01 Javier Miranda <miranda@adacore.com>
2017
2018 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
2019 condition that detects if the overridden operation must replace an
2020 existing entity.
2021
20222011-08-01 Javier Miranda <miranda@adacore.com>
2023
2024 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
2025 code declarations inserted by Insert_Actions in each alternative of the
2026 N_Case_Expression node.
2027
20282011-08-01 Robert Dewar <dewar@adacore.com>
2029
2030 * sem_ch6.adb: Minor code reorganization.
2031 * sem_util.adb: Minor reformatting.
2032
20332011-08-01 Pascal Obry <obry@adacore.com>
2034
2035 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
2036 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
2037
20382011-08-01 Yannick Moy <moy@adacore.com>
2039
2040 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
2041 literal or operator symbol which is prefixed
2042 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
2043 mode on access attributes.
2044 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
2045 that concatenation operands are properly restricted in formal mode
2046 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
2047 Analyze_Concatenation_Operand. Issue an error in formal mode if the
2048 result of the concatenation has a type different from String.
2049 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
2050 Analyze_Quantified_Expression, Analyze_Slice,
2051 Analyze_Null): issue an error in formal mode on unsupported constructs
2052 * sem_ch5.adb
2053 (Analyze_Block_Statement): only issue error on source block statement
2054 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
2055 function which returns the last node in a list of nodes for which
2056 Comes_From_Source returns True, if any
2057 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
2058 Last_Source_Node_In_Sequence
2059 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2060 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
2061 mode on unsupported constructs
2062 * sem_ch9.adb Do not return after issuing error in formal mode, as the
2063 rest of the actions may be needed later on since the error is marked as
2064 not serious.
2065 * sinfo.ads: Typos in comments.
2066
20672011-08-01 Pascal Obry <obry@adacore.com>
2068
2069 * projects.texi: Minor editing.
2070
20712011-08-01 Yannick Moy <moy@adacore.com>
2072
2073 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
2074 insertion character ~~
2075 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
2076 (Set_Error_Msg_Lang): new procedure which fixes the language for use
2077 with insertion character ~~
2078 (Set_Msg_Text): treat insertion character ~~
2079 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
2080 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
2081 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
2082 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
2083 errors related to the formal language restriction not serious
2084 (insertion character |).
2085 * par.adb (Par): set formal language for error messages if needed
2086 * sem_ch6.adb (Check_Missing_Return): take into account possible
2087 generated statements at the end of the function
2088 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
2089 enumeration value to define a new pragma SPARK_95
2090 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
2091 SPARK_Version): new type and variables to store the SPARK version
2092 (none by default).
2093 (SPARK_Mode): return True when SPARK_Version is set
2094 * par-prag.adb: Correct indentation
2095 (Prag): take Pragma_SPARK_95 into account
2096 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
2097 into account.
2098
20992011-08-01 Robert Dewar <dewar@adacore.com>
2100
2101 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
2102 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
2103 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
2104
21052011-08-01 Pascal Obry <obry@adacore.com>
2106
2107 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
2108 Target_Name to Get_Path call.
2109 (Parse_Single_Project): Likewise.
2110 (Post_Parse_Context_Clause): Likewise.
2111 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
2112 Call Initialise_Project_Path with the proper Target_Name.
2113 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
2114 search path.
2115 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
2116 with the proper Target_Name.
2117 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
2118 Part.Parse routine.
2119 (Parse_Project_And_Apply_Config): Likewise.
2120 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
2121 This is fine as this part of the code is supporting only native
2122 compilation.
2123 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
2124 is fine as this part of the code is supporting only native compilation.
2125
21262011-08-01 Yannick Moy <moy@adacore.com>
2127
2128 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
2129 of homonym, unless the homonym is one of the cases allowed in SPARK
2130 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
2131 package declaration occurring after a body.
2132
21332011-08-01 Robert Dewar <dewar@adacore.com>
2134
2135 * checks.adb, exp_ch4.adb: Minor reformatting.
2136
21372011-08-01 Javier Miranda <miranda@adacore.com>
2138
2139 * einfo.ads (Access_Disp_Table): Fix documentation.
2140 (Dispatch_Table_Wrappers): Fix documentation.
2141
21422011-08-01 Pascal Obry <obry@adacore.com>
2143
2144 * prj-env.adb, prj-env.ads: Minor reformatting.
2145
21462011-08-01 Yannick Moy <moy@adacore.com>
2147
2148 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
2149 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2150 procedures out of these packages.
2151 * errout.ads, errout.adb
2152 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
2153 procedures in of this package
2154 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
2155 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
2156 on misplaced later vs initial declarations, like in Ada 83
2157 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
2158 formal mode on attribute of private type whose full type declaration
2159 is not visible
2160 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
2161 package declaration inside a package specification
2162 (Analyze_Full_Type_Declaration): issue error in formal mode on
2163 controlled type or discriminant type
2164 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
2165 user-defined operator means that it should come from the source
2166 (New_Overloaded_Entity): issue error in formal mode on overloaded
2167 entity.
2168 * sem_ch6.ads, sem_ch13.ads: typos in comments.
2169
21702011-08-01 Thomas Quinot <quinot@adacore.com>
2171
2172 * atree.adb: Minor reformatting.
2173 * checks.adb: Minor reformatting.
2174
21752011-08-01 Vincent Celier <celier@adacore.com>
2176
2177 * s-parame-vms-ia64.ads: Fix typo in comment
2178 Minor reformatting
2179 * s-parame-vms-restrict.ads: Removed, unused.
2180
21812011-08-01 Javier Miranda <miranda@adacore.com>
2182
2183 * exp_ch3.adb
2184 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
2185 * sem_ch3.adb
2186 (Constrain_Index): Remove side effects in the evaluation of the bounds.
2187 * sem_ch3.ads, sem_ch3.adb
2188 (Is_Constant_Bound): New extended version of the subprogram that was
2189 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
2190 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
2191 * sem_aux.ads (Constant_Value): Fix typo in comment.
2192 * checks.adb (Generate_Index_Checks): New implementation which, for
2193 array objects with constant bounds, generates the runtime check
2194 referencing the bounds of the array type. For other cases this routine
2195 provides its previous behavior obtaining such values from the array
2196 object.
2197 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
2198 parent type.
2199 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
2200 we cannot have semantic interpretations of the new node.
2201
22022011-08-01 Ed Schonberg <schonberg@adacore.com>
2203
2204 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
2205 expressions.
2206
22072011-08-01 Arnaud Charlet <charlet@adacore.com>
2208
2209 * sem_ch8.adb: Minor code editing.
2210 * s-vxwext.adb: Remove trailing space.
2211 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
2212 consistency with other files.
2213
22142011-08-01 Thomas Quinot <quinot@adacore.com>
2215
2216 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
2217
22182011-08-01 Ed Schonberg <schonberg@adacore.com>
2219
2220 * par-ch10.adb: reject parameterized expressions as compilation unit.
2221 * sem_ch4.adb: handle properly conditional expression with overloaded
2222 then_clause and no else_clause.
2223
22242011-08-01 Tristan Gingold <gingold@adacore.com>
2225
2226 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
2227 like done by System.Aux_DEC.
2228 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
2229
22302011-08-01 Yannick Moy <moy@adacore.com>
2231
2232 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
2233 missing label at end of declaration (subprogram or package)
2234 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
2235 of positional and named parameter association
2236 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
2237 Error_Msg_SP which adds a prefix to the error message giving the name
2238 of the formal language analyzed
2239 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
2240 access result type in subprogram, unconstrained array as result type,.
2241 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
2242 procedure
2243 * sem_ch8.adb: Code clean up.
2244
22452011-08-01 Javier Miranda <miranda@adacore.com>
2246
2247 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
2248 * einfo.ads (Access_Disp_Table): Fix documentation.
2249 (Dispatch_Table_Wrappers): Fix documentation.
2250 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
2251 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
2252 to enforce the documentation of this attribute.
2253 (Set_Is_Interface): Cleanup the assertion.
2254 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
2255 the Underlying_Type entity before reading attribute Access_Disp_Table.
2256 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
2257 Locate the Underlying_Type before reading attribute Access_Disp_Table.
2258 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
2259 the Underlying_Type entity before reading attribute Access_Disp_Table.
2260 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
2261 Locate the Underlying_Type entity before reading attribute
2262 Access_Disp_Table.
2263
22642011-08-01 Ed Schonberg <schonberg@adacore.com>
2265
2266 * s-poosiz.ads: Additional overriding indicators.
2267
22682011-08-01 Yannick Moy <moy@adacore.com>
2269
2270 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
2271 formal mode.
2272 (Analyze_Iteration_Scheme): issue error in formal mode when loop
2273 parameter specification does not include a subtype mark.
2274 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
2275 formal mode on abstract subprogram.
2276 (Analyze_Subprogram_Specification): issue error in formal mode on
2277 user-defined operator.
2278 (Process_Formals): issue error in formal mode on access parameter and
2279 default expression.
2280 * sem_ch9.adb (Analyze_Abort_Statement,
2281 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
2282 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
2283 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
2284 Analyze_Requeue, Analyze_Selective_Accept,
2285 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
2286 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
2287 issue error in formal mode on user-defined raise statement.
2288
22892011-08-01 Thomas Quinot <quinot@adacore.com>
2290
2291 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
2292 declaration being hidden when overriding an implicit inherited
2293 subprogram.
2294 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
2295 (-gnats), do not complain about a source file that contains only a
2296 pragma No_Body.
2297
22982011-08-01 Ed Schonberg <schonberg@adacore.com>
2299
2300 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
2301 variable if already set.
2302
23032011-08-01 Arnaud Charlet <charlet@adacore.com>
2304
2305 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
2306 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
2307 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
2308 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
2309 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
2310 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
2311 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
2312 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
2313 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
2314 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
2315 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
2316 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
2317 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
2318 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
2319 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
2320 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
2321 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
2322 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
2323 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
2324 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
2325 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
2326 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
2327 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
2328 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
2329 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
2330 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
2331 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
2332 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
2333 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
2334 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
2335 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
2336 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
2337 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
2338 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
2339 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
2340 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
2341 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
2342 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
2343 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
2344 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
2345 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
2346 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
2347 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
2348 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
2349 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
2350 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
2351 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
2352 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
2353 s-osinte-mingw.ads: Update to GPLv3 run-time license.
2354 Use GNAT instead of GNARL.
2355
23562011-08-01 Bob Duff <duff@adacore.com>
2357
2358 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2359 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
2360 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
2361 reformatting.
2362
23632011-08-01 Yannick Moy <moy@adacore.com>
2364
2365 * debug.adb (d.D) reverve flag for the SPARK mode
2366 (d.E) reverve flag for SPARK generation mode
2367 (d.F) reverve flag for Why generation mode
2368 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
2369 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
2370 functions which return True when the corresponding modes are set
2371 (Formal_Language): return "spark" or "alfa" when in formal verification
2372 mode.
2373 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
2374 Error_Msg to prefix the error message with a tag giving the formal
2375 language
2376 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
2377 message with a tag giving the formal language
2378 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
2379 block statement
2380 (Analyze_Case_Statement): issue error in formal mode on case statement
2381 with a single "others" case alternative
2382 (Analyze_Exit_Statement): issue errors in formal mode on exit
2383 statements which do not respect SPARK restrictions
2384 (Analyze_Goto_Statement): issue error in formal mode on goto statement
2385 (Check_Unreachable_Code): always issue an error (not a warning) in
2386 formal mode on unreachable code (concerns both code after an infinite
2387 loop and after an unconditional jump, both not allowed in SPARK)
2388 * sem_ch6.adb (Analyze_Return_Statement): add call to
2389 Set_Return_Present for a procedure containing a return statement
2390 (already done for functions in Analyze_Function_Return)
2391 (Analyze_Function_Return): issue error in formal mode on extended
2392 return or if return is not last statement in function
2393 (Check_Missing_Return): issue error in formal mode if function does
2394 not end with return or if procedure contains a return
2395 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
2396 function to detect if there is an inner scope of its parameter S which
2397 is a loop.
2398
23992011-08-01 Thomas Quinot <quinot@adacore.com>
2400
2401 * sem_ch6.ads: Minor reformatting.
2402
24032011-08-01 Javier Miranda <miranda@adacore.com>
2404
2405 * sem_util.adb (Abstract_Interface_List): Complete condition when
2406 processing private type declarations to avoid reading unavailable
2407 attribute.
2408 (Is_Synchronized_Tagged_Type): Complete condition when processing
2409 private extension declaration nodes to avoid reading unavailable
2410 attribute.
2411
24122011-08-01 Thomas Quinot <quinot@adacore.com>
2413
2414 * sem_ch3.adb: Minor reformatting.
2415
24162011-08-01 Thomas Quinot <quinot@adacore.com>
2417
2418 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
2419 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
2420 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
2421 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
2422 for VMS, instead parametrize the common implementation with
2423 System.Parameters declarations.
2424
24252011-08-01 Eric Botcazou <ebotcazou@adacore.com>
2426
2427 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
2428
24292011-08-01 Tristan Gingold <gingold@adacore.com>
2430
2431 * seh_init.c: Fix SEH handler installation on win64.
2432
24332011-08-01 Ed Schonberg <schonberg@adacore.com>
2434
2435 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
2436 double analysis of an anonymous access to subprogram, because it can
2437 lead to improper sharing of profiles and a back-end crash.
2438
24392011-08-01 Robert Dewar <dewar@adacore.com>
2440
2441 * make.adb, sem_ch4.adb: Minor reformatting.
2442 * gcc-interface/Make-lang.in: Update dependencies.
2443 * sem_util.adb, exp_ch5.adb: Minor reformatting.
2444
24452011-08-01 Arnaud Charlet <charlet@adacore.com>
2446
2447 * gnat_rm.texi: Fix definition of Long_Integer.
2448
24492011-08-01 Ed Schonberg <schonberg@adacore.com>
2450
2451 * exp_aggr.adb: check limit size of static aggregate unconditionally,
2452 to prevent storage exhaustion.
2453 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
2454 finalized is a function body, insert the cleanup code before the final
2455 return statement, to prevent spurious warnings.
2456 * s-pooglo.ads: add overriding indicator.
2457
24582011-08-01 Ed Schonberg <schonberg@adacore.com>
2459
2460 * sem_ch4.adb (Operator_Check): improve error message when both a
2461 with_clause and a use_clause are needed to make operator usage legal.
2462 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
2463 determine whether a compilation unit is visible within an other,
2464 either through a with_clause in the current unit, or a with_clause in
2465 its library unit or one one of its parents.
2466
24672011-08-01 Ed Schonberg <schonberg@adacore.com>
2468
2469 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
2470 over an arbitrary expression of an array or container type.
2471 * lib-xref.adb: clarify comment.
2472
24732011-08-01 Bob Duff <duff@adacore.com>
2474
2475 * einfo.ads: Minor reformatting.
2476 * debug.adb: Minor comment improvement.
2477
24782011-08-01 Javier Miranda <miranda@adacore.com>
2479
2480 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
2481 consider hidden subprograms as valid candidates.
2482
24832011-08-01 Arnaud Charlet <charlet@adacore.com>
2484
2485 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
2486
24872011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
2488
2489 * gnat_ugn.texi: Fix typo.
2490
24912011-08-01 Robert Dewar <dewar@adacore.com>
2492
2493 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
2494 lib-xref.adb: Minor reformatting
2495
24962011-08-01 Gary Dismukes <dismukes@adacore.com>
2497
2498 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
2499 when to generate a call to Move_Final_List.
2500 (Has_Controlled_Parts): Remove this function.
2501
25022011-08-01 Geert Bosch <bosch@adacore.com>
2503
2504 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
2505 "," in choice list.
2506
25072011-08-01 Thomas Quinot <quinot@adacore.com>
2508
2509 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
2510 explicit raise of a predefined exception as Comes_From_Source if the
2511 original N_Raise_Statement comes from source.
2512
25132011-08-01 Robert Dewar <dewar@adacore.com>
2514
2515 * sinfo.ads: Add comment.
2516 * sem_ch6.adb: Minor reformatting.
2517
25182011-08-01 Robert Dewar <dewar@adacore.com>
2519
2520 * freeze.adb (Freeze_Entity): Refine check for bad component size
2521 clause to avoid rejecting confirming clause when atomic/aliased present.
2522
25232011-08-01 Ed Schonberg <schonberg@adacore.com>
2524
2525 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
2526 better determine whether an entity reference is a write.
2527 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
2528 subcomponent.
2529 * lib-xref.adb (Output_References): Do no suppress a read reference at
2530 the same location as an immediately preceeding modify-reference, to
2531 handle properly in-out actuals.
2532
25332011-08-01 Tristan Gingold <gingold@adacore.com>
2534
2535 * env.c (__gnat_setenv) [VMS]: Refine previous change.
2536
25372011-08-01 Quentin Ochem <ochem@adacore.com>
2538
2539 * i-cstrin.adb (New_String): Changed implementation, now uses only the
2540 heap to compute the result.
2541
25422011-08-01 Robert Dewar <dewar@adacore.com>
2543
2544 * atree.ads: Minor reformatting.
2545
25462011-08-01 Emmanuel Briot <briot@adacore.com>
2547
2548 * g-expect.adb (Get_Command_Output): Fix memory leak.
2549
25502011-08-01 Geert Bosch <bosch@adacore.com>
2551
2552 * cstand.adb (P_Float_Type): New procedure to print the definition of
2553 predefined fpt types.
2554 (P_Mixed_Name): New procedure to print a name using mixed case
2555 (Print_Standard): Use P_Float_Type for printing floating point types
2556 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
2557 precision IEEE float.
2558
25592011-08-01 Thomas Quinot <quinot@adacore.com>
2560
2561 * sem_ch3.adb: Minor reformatting.
2562
25632011-08-01 Ed Schonberg <schonberg@adacore.com>
2564
2565 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
2566 the completion of a generic function, insert the new body rather than
2567 rewriting the original.
2568
25692011-08-01 Yannick Moy <moy@adacore.com>
2570
2571 * sinfo.ads, errout.ads: Typos in comments.
2572
25732011-08-01 Robert Dewar <dewar@adacore.com>
2574
2575 * par-endh.adb: Minor reformatting.
2576
25772011-08-01 Robert Dewar <dewar@adacore.com>
2578
2579 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
2580 (Pre_Post_Aspects): New subtype.
2581 * par-ch12.adb (P_Generic): New syntax for aspects in packages
2582 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
2583 * par-ch7.adb (P_Package): Remove Decl parameter
2584 (P_Package): Handle new syntax for aspects (before IS)
2585 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
2586 new aspect syntax
2587 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
2588 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
2589 (P_Package): Remove Decl parameter
2590 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
2591 aspects
2592 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
2593 specs
2594 * sem_util.ads, sem_util.adb (Static_Boolean): New function
2595 * sinfo.ads: Document new syntax for aspects in packages etc.
2596 * sprint.adb: Handle new syntax of aspects before IS in package
2597
25982011-08-01 Thomas Quinot <quinot@adacore.com>
2599
2600 * atree.ads: Minor reformatting.
2601 * sem_prag.adb: Minor reformatting.
2602
26032011-08-01 Robert Dewar <dewar@adacore.com>
2604
2605 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
2606 case expr alternative.
2607
26082011-08-01 Ed Schonberg <schonberg@adacore.com>
2609
2610 * sem_ch12.adb: Fix typo.
2611
26122011-08-01 Geert Bosch <bosch@adacore.com>
2613
2614 * sem_prag.adb (Check_No_Link_Name): New procedure.
2615 (Process_Import_Or_Interface): Use Check_No_Link_Name.
2616 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
2617 instead of Standard_Long_Long_Float_Size global. Preparation for
2618 eventual removal of per type constants.
2619 * exp_util.ads (Get_Stream_Size): New function returning the stream
2620 size value of subtype E.
2621 * exp_util.adb (Get_Stream_Size): Implement new function.
2622 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
2623 function.
2624 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
2625 * einfo.adb:
2626 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
2627
26282011-08-01 Geert Bosch <bosch@adacore.com>
2629
2630 * cstand.adb: Fix comments.
2631 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
2632 count of arguments.
2633
26342011-08-01 Robert Dewar <dewar@adacore.com>
2635
2636 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
2637
26382011-08-01 Geert Bosch <bosch@adacore.com>
2639
2640 * atree.ads: Fix comment.
2641
26422011-08-01 Robert Dewar <dewar@adacore.com>
2643
2644 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
2645 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
2646 * par.adb: Add with for Namet.Sp.
2647 * par-tchk.adb: Minor reformatting.
2648
26492011-08-01 Vincent Celier <celier@adacore.com>
2650
2651 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
2652 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
2653 of the init procedure of a SAL.
2654 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
2655 New procedure.
2656
26572011-08-01 Thomas Quinot <quinot@adacore.com>
2658
2659 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
2660 reformatting.
2661
26622011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2663
2664 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
2665
26662011-08-01 Thomas Quinot <quinot@adacore.com>
2667
2668 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
2669 conformant with its spec (return True only for types that have
2670 an overriding Initialize primitive operation that prevents them from
2671 having preelaborable initialization).
2672 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
2673 initialization for controlled types in Ada 2005 or later mode.
2674
26752011-08-01 Robert Dewar <dewar@adacore.com>
2676
2677 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
2678 Postcondition.
2679 (Same_Aspect): New function.
2680 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
2681 Type_Invariant, Precondition, Postcondition.
2682 * snames.ads-tmpl: Add Name_Type_Invariant.
2683
26842011-08-01 Robert Dewar <dewar@adacore.com>
2685
2686 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
2687 here.
2688 (Freeze_All_Ent): Fix error in handling inherited aspects.
2689 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
2690 already analyzed, but don't skip entire processing of a declaration,
2691 that's wrong in some cases of declarations being rewritten.
2692 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
2693 Don't delay for integer, string literals
2694 Treat predicates in usual manner for delay, remove special case code,
2695 not needed.
2696 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
2697 (Build_Predicate_Function): Update saved expression in aspect
2698 (Build_Invariant_Procedure): Update saved expression in aspect
2699 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
2700 of replacement of discriminant references if the reference is simple.
2701
27022011-08-01 Robert Dewar <dewar@adacore.com>
2703
2704 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
2705 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
2706 Static_Predicate and Dynamic_Predicate.
2707 (Build_Predicate_Function): Add processing for Static_Predicate
2708 and Dynamic_Predicate.
2709 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
2710 (From_Static_Predicate): New flag
2711 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
2712
27132011-08-01 Robert Dewar <dewar@adacore.com>
2714
2715 * usage.adb: Documentation cleanup for Ada version modes in usage.
2716 * expander.adb: Minor reformatting.
2717
27182011-08-01 Robert Dewar <dewar@adacore.com>
2719
2720 * atree.ads: Minor comment fix.
2721 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
2722 a-witeio.ads, sem_prag.adb: Minor reformatting.
2723
27242011-08-01 Doug Rupp <rupp@adacore.com>
2725
2726 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
2727 pointers. Use descrip.h header file for convenience. Add some
2728 comments.
2729
27302011-08-01 Robert Dewar <dewar@adacore.com>
2731
2732 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
2733 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
2734 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
2735 New procedure.
2736 (Check_Aspect_At_End_Of_Declarations): New procedure
2737 (Analye_Aspect_Specification): Minor changes for above procedures
2738 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
2739 specification node as well.
2740
27412011-08-01 Pascal Obry <obry@adacore.com>
2742
2743 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
2744 Windows files. Use GetFilesAttributes() in this case to check for file
2745 existence instead of returning with an error code.
2746
27472011-08-01 Vincent Celier <celier@adacore.com>
2748
2749 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
2750 High is above Source length.
2751
27522011-08-01 Robert Dewar <dewar@adacore.com>
2753
2754 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
2755
27562011-08-01 Robert Dewar <dewar@adacore.com>
2757
2758 * aspects.ads (Boolean_Aspects): New subtype.
2759 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
2760 for derived types in cases where the parent type and derived type have
2761 aspects.
2762 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
2763 with aspects when parent type also has aspects.
2764 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
2765 boolean expression at this point).
2766 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
2767 accordance with final decision on the Ada 2012 feature.
2768 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
2769
27702011-08-01 Matthew Heaney <heaney@adacore.com>
2771
2772 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
2773
27742011-08-01 Pascal Obry <obry@adacore.com>
2775
2776 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
2777 Fix Replace_Slice when High is above current string size.
2778 (Replace_Slice): Fix DL computation when High is above current
2779 string length.
2780
27812011-08-01 Gary Dismukes <dismukes@adacore.com>
2782
2783 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
2784
27852011-08-01 Matthew Heaney <heaney@adacore.com>
2786
2787 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
2788 of node.
2789
27902011-08-01 Pascal Obry <obry@adacore.com>
2791
2792 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
2793 reformatting.
2794
27952011-08-01 Ed Schonberg <schonberg@adacore.com>
2796
2797 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
2798 access to protected subprograms in generic bodies.
2799 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
2800 protected type, indicate that the convention of the subprogram is
2801 Convention_Protected, because it may be used in subsequent declarations
2802 within the protected declaration.
2803
28042011-08-01 Vincent Celier <celier@adacore.com>
2805
2806 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
2807 and "final" procedures when the name of the library is "ada", to avoid
2808 duplicate symbols "adainit" and "adafinal" in executables.
2809
28102011-08-01 Ed Schonberg <schonberg@adacore.com>
2811
2812 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
2813 quantified expression that appears within a postcondition and uses the
2814 Ada2012 'Result attribute.
2815
28162011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2817
2818 * init.c (__gnat_error_handler): Cast reason to int.
2819 (__gnat_install_handler): Explain sa_sigaction use.
2820
28212011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2822
2823 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
2824 subprogram has copy-in copy-out parameters, try to promote the mode of
2825 the return type if it is passed in registers.
2826
28272011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2828
2829 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
2830 left operand as addressable.
2831
28322011-07-24 Eric Botcazou <ebotcazou@adacore.com>
2833
2834 * gcc-interface/gigi.h (build_function_stub): Remove.
2835 (build_return_expr): Likewise.
2836 (convert_vms_descriptor): Declare.
2837 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
2838 (build_function_stub): Move to...
2839 * gcc-interface/utils2.c (build_return_expr): Move to...
2840 * gcc-interface/trans.c (build_function_stub): ...here.
2841 (build_return_expr): ...here.
2842 (Subprogram_Body_to_gnu): Add local variable for language_function.
2843 Disconnect the parameter attributes cache, if any, once done with it.
2844 Call end_subprog_body only after setting the end_locus.
2845 Build the stub associated with the function, if any, at the very end.
2846 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
2847 variables and streamline control flow.
2848
28492011-07-23 Arnaud Charlet <charlet@adacore.com>
2850
2851 PR ada/49819
2852 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
2853 g-trasym-dwarf.adb.
2854
28552011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2856
2857 PR bootstrap/49794
2858 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
2859 Assign to act.sa_sigaction.
2860 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
2861 current->return_address to char * before arithmetic.
2862
28632011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2864
2865 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
2866 Correct argument types.
2867 Extract code from reason.
2868 (__gnat_install_handler): Assign to act.sa_sigaction.
2869
28702011-07-21 Eric Botcazou <ebotcazou@adacore.com>
2871
2872 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
2873 (GNAT1_OBJS): ...here.
2874
28752011-07-15 Eric Botcazou <ebotcazou@adacore.com>
2876
2877 PR ada/48711
2878 * g-socthi-mingw.adb (Fill): Fix formatting.
2879
2880 * gcc-interface/gigi.h: Move around comment.
2881
28822011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2883
2884 PR ada/46350
2885 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
2886
28872011-07-14 Florian Weimer <fw@deneb.enyo.de>
2888
2889 PR ada/48711
2890 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
2891
28922011-07-13 Eric Botcazou <ebotcazou@adacore.com>
2893
2894 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
2895 range comparison if Pmode is SImode.
2896
28972011-07-12 Laurent GUERBY <laurent@guerby.net>
2898 Eric Botcazou <ebotcazou@adacore.com>
2899
2900 * adadecode.c: Wrap up in extern "C" block.
2901 * adadecode.h: Likewise.
2902 * adaint.c: Likewise. Remove 'const' keyword.
2903 * adaint.h: Likewise.
2904 * argv.c: Likewise.
2905 * atree.h: Likewise.
2906 * cio.c: Likewise.
2907 * cstreams.c: Likewise.
2908 * env.c: Likewise.
2909 * exit.c: Likewise.
2910 * fe.h: Likewise.
2911 * final.c: Likewise.
2912 * init.c: Likewise.
2913 * initialize.c: Likewise.
2914 * link.c: Likewise.
2915 * namet.h: Likewise.
2916 * nlists.h: Likewise.
2917 * raise.c: Likewise.
2918 * raise.h: Likewise.
2919 * repinfo.h: Likewise.
2920 * seh_init.c: Likewise.
2921 * targext.c: Likewise.
2922 * tracebak.c: Likewise.
2923 * uintp.h: Likewise.
2924 * urealp.h: Likewise.
2925 * xeinfo.adb: Wrap up generated C code in extern "C" block.
2926 * xsinfo.adb: Likewise.
2927 * xsnamest.adb: Likewise.
2928 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
2929 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
2930 * gcc-interface/misc.c: Likewise.
2931 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
2932 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
2933 ada/targext.o here...
2934 (GNAT_ADA_OBJS): ...and not here.
2935 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
2936 (GNATBIND_OBJS): Reorder.
2937
29382011-07-07 Richard Henderson <rth@redhat.com>
2939
2940 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
2941 dwarf2out_frame_init.
2942
29432011-07-07 Eric Botcazou <ebotcazou@adacore.com>
2944
2945 * gcc-interface/misc.c (gnat_init): Tweak previous change.
2946
29472011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2948
2949 PR target/39150
2950 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
2951
29522011-07-06 Richard Guenther <rguenther@suse.de>
2953
2954 * gcc-interface/misc.c (gnat_init): Merge calls to
2955 build_common_tree_nodes and build_common_tree_nodes_2.
2956 Re-initialize boolean_false_node.
2957
29582011-07-02 Eric Botcazou <ebotcazou@adacore.com>
2959 Olivier Hainque <hainque@adacore.com>
2960 Nicolas Setton <setton@adacore.com>
2961
2962 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
2963 the type according to the ARTIFICIAL_P parameter.
2964 (create_type_decl): Likewise.
2965 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
2966
29672011-07-01 Eric Botcazou <ebotcazou@adacore.com>
2968
2969 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
2970 (gnatbind): Likewise.
2971
29722011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2973
2974 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
2975
29762011-06-18 Eric Botcazou <ebotcazou@adacore.com>
2977
2978 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
2979 local variable throughout. Remove useless call to Base_Type.
2980 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
2981 Take it also into account for the volatileness of the field. Set the
2982 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
2983
29842011-06-18 Eric Botcazou <ebotcazou@adacore.com>
2985
2986 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
2987 on a dereference built for a by-ref object if it has an address clause.
2988
29892011-06-18 Eric Botcazou <ebotcazou@adacore.com>
2990
2991 * einfo.ads (Address_Taken): Document use for the second argument of
2992 Asm_Input and Asm_Output attributes.
2993 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
2994 argument is an entity name, then set Address_Taken on it.
2995 <Attribute_Asm_Output>: Likewise.
2996 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
2997 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
2998 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
2999 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
3000
30012011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
3002
3003 PR middle-end/46500
3004 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
3005
30062011-06-14 Joseph Myers <joseph@codesourcery.com>
3007
3008 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
3009 (ada/utils.o): Update dependencies.
3010 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
3011 ../../../libcpp/libcpp.a.
3012 * gcc-interface/utils.c: Include common/common-target.h.
3013 (process_attributes): Use targetm_common.have_named_sections.
3014
30152011-06-07 Richard Guenther <rguenther@suse.de>
3016
3017 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
3018 set_sizetype.
3019
30202011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3021
3022 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3023 TREE_THIS_NOTRAP flag.
3024
30252011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3026
3027 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
3028 Fix thinko.
3029
30302011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3031
3032 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
3033 constants whose full view has discriminants specially.
3034
30352011-06-06 Eric Botcazou <ebotcazou@adacore.com>
3036
3037 * gcc-interface/utils.c: Include diagnostic.h.
3038 (gnat_write_global_declarations): Output debug information for all
3039 global type declarations before finalizing the compilation unit.
3040 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
3041
30422011-05-25 Jakub Jelinek <jakub@redhat.com>
3043
3044 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
3045
30462011-05-25 Kai Tietz <ktietz@redhat.com>
3047
3048 * adaint.c (__gnat_to_canonical_file_list_next): Use array
3049 initialization instead of const/none-const pointer assignment.
3050
30512011-05-24 Joseph Myers <joseph@codesourcery.com>
3052
3053 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
3054 $(EXTRA_GNAT1_OBJS).
3055 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
3056 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
3057 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
3058 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
3059 libcommon-target.a instead of prefix.o.
3060
30612011-05-21 Joseph Myers <joseph@codesourcery.com>
3062
3063 PR ada/49097
3064 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
3065
30662011-05-20 Joseph Myers <joseph@codesourcery.com>
3067
3068 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
3069 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
3070 instead of version.o.
3071
30722011-05-18 Kai Tietz <ktietz@redhat.com>
3073
3074 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
3075 boolean_false_node instead of integer_zero_node.
3076 (convert_with_check): Likewise.
3077 * gcc-interface/decl.c (choices_to_gnu): Likewise.
3078
30792011-05-12 Eric Botcazou <ebotcazou@adacore.com>
3080
3081 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
3082 type of the parameter is an unconstrained array, convert the actual to
3083 the type of the formal in the In Out and Out cases as well.
3084
30852011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3086
3087 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
3088 call build_function_type_array or build_varargs_function_type_array
3089 instead.
3090 (create_subprog_type): Don't call build_function_type; call
3091 build_function_type_vec instead.
3092
30932011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3094
3095 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
3096 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
3097 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
3098
30992011-05-07 Eric Botcazou <ebotcazou@adacore.com>
3100
3101 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
3102
3103 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
3104 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
3105
31062011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3107
3108 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3109
31102011-05-05 Nathan Froyd <froydnj@codesourcery.com>
3111
3112 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
3113 instead of accessing TYPE_ARG_TYPES directly.
3114 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
3115
31162011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3117
3118 PR ada/48844
3119 * gcc-interface/gigi.h (get_variant_part): Declare.
3120 * gcc-interface/decl.c (get_variant_part): Make global.
3121 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
3122 types have the same constant size, are record types and T1 has a
3123 variant part while T2 doesn't.
3124
31252011-05-05 Eric Botcazou <ebotcazou@adacore.com>
3126
3127 * gcc-interface/utils.c (begin_subprog_body): Do not call
3128 get_pending_sizes.
3129 (end_subprog_body): Likewise.
3130
31312011-05-04 Richard Guenther <rguenther@suse.de>
3132
3133 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
3134 int_const_binop.
3135 (pos_to_constructor): Likewise.
3136
31372011-05-03 Nathan Froyd <froydnj@codesourcery.com>
3138 Eric Botcazou <ebotcazou@adacore.com>
3139
3140 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
3141 of build_function_type. Adjust calls to...
3142 (build_raise_check): ...this. Do not take a void_tree parameter.
3143 Call build_function_type_list instead of build_function_type.
3144 Fix head comment and swap couple of conditional blocks.
3145
31462011-04-30 Eric Botcazou <ebotcazou@adacore.com>
3147
3148 * gnatvsn.ads (Library_Version): Bump to 4.7.
3149 (Current_Year): Bump to 2011.
3150
31512011-04-29 Michael Matz <matz@suse.de>
3152
3153 * gcc-interface/misc.c (gnat_handle_option): Set
3154 warn_maybe_uninitialized.
3155
31562011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
3157
3158 * gnat_ugn.texi (Complexity Metrics Control): Update link to
3159 the Watson/McCabe paper.
3160
31612011-04-23 Jim Meyering <meyering@redhat.com>
3162
3163 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
3164
31652011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3166
3167 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
3168 onto the new type.
3169
31702011-04-22 Eric Botcazou <ebotcazou@adacore.com>
3171
3172 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
3173 parameter.
3174 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
3175 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
3176 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
3177 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
3178 <all>: Do not set flags on the reused DECL node coming from an alias.
3179 Set DECL_IGNORED_P on the DECL node built for subprograms if they
3180 don't need debug info here...
3181 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
3182 (gigi): Adjust calls to create_subprog_decl.
3183 (build_raise_check): Likewise.
3184 (establish_gnat_vms_condition_handler): Likewise.
3185 (Compilation_Unit_to_gnu): Likewise.
3186 (gnat_to_gnu): Likewise.
3187
31882011-04-21 Eric Botcazou <ebotcazou@adacore.com>
3189
3190 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
3191 (NO_REORDER_ADAFLAGS): New variable.
3192 (EXTRA_GNATTOOLS): Always define.
3193 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
3194 Clean up and adjust list of files compiled with special options.
3195 * gcc-interface/Make-lang.in: Likewise.
3196 (ada/decl.o): Cosmetical change.
3197 (ada/misc.o): Remove dependency on $(PLUGIN_H).
3198
31992011-04-20 Jim Meyering <meyering@redhat.com>
3200
3201 * initialize.c (__gnat_initialize): Remove useless if-before-free.
3202
32032011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3204
3205 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
3206 $(CFLAGS) on the link line.
3207
32082011-04-17 Eric Botcazou <ebotcazou@adacore.com>
3209
3210 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
3211 padded type built for the return type if it is unconstrained.
3212
32132011-04-14 Nathan Froyd <froydnj@codesourcery.com>
3214
3215 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
3216
32172011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3218
3219 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
3220 before calling TREE_CHAIN.
3221 * gcc-interface/misc.c (gnat_init_ts): New function.
3222 (LANG_HOOKS_INIT_TS): Define.
3223
32242011-04-12 Martin Jambor <mjambor@suse.cz>
3225
3226 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
3227 instead of cgraph_node.
3228
32292011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3230
3231 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
3232 alignment on fields of the RETURN type built for the Copy-In Copy-Out
3233 mechanism.
3234
32352011-04-08 Eric Botcazou <ebotcazou@adacore.com>
3236
3237 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
3238 of aggregate types that contain a placeholder.
3239
32402011-04-08 Nathan Froyd <froydnj@codesourcery.com>
3241
3242 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
3243 TYPE_ARG_TYPES.
3244 (handle_type_generic_attribute): Likewise.
3245
32462011-04-04 Eric Botcazou <ebotcazou@adacore.com>
3247
3248 PR ada/47163
3249 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
3250
32512011-04-04 Kai Tietz <ktietz@redhat.com>
3252
3253 PR ada/47163
3254 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
3255 to flag value.
3256
32572011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3258
3259 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
3260 type case, do not strip a padding type around the array type.
3261
32622011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3263
3264 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
3265 types.
3266
32672011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3268
3269 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
3270 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
3271 code for -feliminate-unused-debug-types.
3272 (gnat_post_options): Likewise.
3273
32742011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3275
3276 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3277 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
3278 distinct copy.
3279
32802011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3281
3282 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
3283 DECL_ARTIFICIAL flag on enumeration types.
3284
32852011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3286
3287 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
3288 fat pointer types artificial unconditionally.
3289 <E_Array_Subtype>: Attach the base array type as a parallel type if it
3290 isn't artificial.
3291
32922011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3293
3294 * gcc-interface/gigi.h (get_dummy_type): Declare.
3295 (build_dummy_unc_pointer_types): Likewise.
3296 (finish_fat_pointer_type): Likewise.
3297 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
3298 fat pointer type has been built, complete it in place.
3299 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
3300 and thin pointers. Remove useless variable.
3301 (finish_fat_pointer_type): Make global and move to...
3302 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
3303 (get_dummy_type): New function.
3304 (build_dummy_unc_pointer_types): Likewise.
3305 (gnat_pushdecl): Propage the name to the anonymous variants only.
3306 (update_pointer_to): Only adjust the pointer types in the unconstrained
3307 array case.
3308
33092011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3310
3311 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
3312 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
3313 if this is a Taft amendment type and the full declaration is available.
3314 * gcc-interface/trans.c (process_type): Likewise.
3315 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
3316 (process_freeze_entity): Likewise.
3317 * gcc-interface/utils.c (dummy_global): New static variable.
3318 (gnat_write_global_declarations): If there are types declared as used
3319 at the global level, insert them in the global hash table.
3320
33212011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3322
3323 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
3324 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
3325 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
3326 copy.
3327 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
3328 flag of the type accordingly.
3329 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
3330
33312011-04-02 Eric Botcazou <ebotcazou@adacore.com>
3332
3333 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3334 finalizing types when updating the pointers to the designated type.
3335 <all>: Finalize the deferred types even if we didn't defer processing
3336 of incomplete types in this invocation.
3337
33382011-04-01 Olivier Hainque <hainque@adacore.com>
3339 Nicolas Setton <setton@adacore.com>
3340 Eric Botcazou <ebotcazou@adacore.com>
3341
3342 * gcc-interface/misc.c (gnat_descriptive_type): New function.
3343 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
3344
33452011-03-28 Kai Tietz <ktietz@redhat.com>
3346
3347 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
3348 Windows targets.
3349 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
3350 * system-mingw.ads (System): Change ZCX_By_Default default to True.
3351
3352 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
3353
33542011-03-28 Tristan Gingold <gingold@adacore.com>
3355
3356 PR ada/44431
3357 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
3358 Use ada output of gnatbind.
3359 (ada/b_gnatb.adb): Ditto.
3360 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
3361 (ada.mostlyclean, ada.stage1)
3362 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
3363 (ada.stagefeedback): Adjust.
3364 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
3365 Use ada output of gnatbind.
3366 (b_gnatm.adb): Ditto.
3367 (b_gnatl.o, b_gnatm.o): New rules.
3368
33692011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3370
3371 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3372 for the padded type built to support a specified size or alignment.
3373
33742011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3375
3376 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
3377 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
3378 unconditionally to the end of the unit when the designated type is
3379 limited_with'ed.
3380 <all>: Rename local variable. Attempt to un-defer types only and do it
3381 for limited_with'ed types as well.
3382 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
3383 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
3384 consistently and remove redundant call to finalize_from_with_types.
3385
33862011-03-26 Eric Botcazou <ebotcazou@adacore.com>
3387
3388 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
3389 subprograms without a previous spec declared in the same unit.
3390 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
3391 subprograms at the end of the unit instead of at the beginning.
3392 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
3393 isn't public for the special handling of non-inline functions nested
3394 inside inline external functions.
3395
33962011-03-25 Jeff Law <law@redhat.com>
3397
3398 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
3399
34002011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3401
3402 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
3403 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
3404 to compute Set_Size_Depends_On_Discriminant.
3405 (Layout_Type): Call it on array types in back-end layout mode.
3406 * sem_util.adb (Requires_Transient_Scope): Return true for array
3407 types only if the size depends on the value of discriminants.
3408 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
3409 type if the RHS is a call to a function that returns an unconstrained
3410 type with default discriminant.
3411
34122011-03-24 Eric Botcazou <ebotcazou@adacore.com>
3413
3414 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
3415 non-conversion to the nominal result type at the end.
3416
34172011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3418
3419 * gcc-interface/trans.c (create_temporary): New function taken from...
3420 (create_init_temporary): ...here. Call it.
3421 (call_to_gnu): Create the temporary for the return value early, if any.
3422 Create it for a function with copy-in/copy-out parameters if there is
3423 no target; in other cases of copy-in/copy-out, use another temporary.
3424 Push the new binding level lazily. Add and rename local variables.
3425
34262011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3427
3428 * gcc-interface/decl.c (validate_size): Improve comments and tweak
3429 error message.
3430 (set_rm_size): Likewise.
3431
34322011-03-23 Eric Botcazou <ebotcazou@adacore.com>
3433
3434 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
3435 for the padded type built in order to support a specified alignment.
3436 Fix incorrect formatting.
3437
34382011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3439
3440 PR bootstrap/48216
3441 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
3442
34432011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3444
3445 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
3446 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
3447 to the end of the list. Adjust recursive call. Rename local variable.
3448 If REORDER is true, reorder components of the record type.
3449 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
3450 components_to_record and adjust the parameter list.
3451
34522011-03-21 Eric Botcazou <ebotcazou@adacore.com>
3453
3454 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
3455 disabled, use the variable for bounds of loop iteration scheme.
3456
34572011-03-21 Kai Tietz <ktietz@redhat.com>
3458
3459 PR target/12171
3460 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
3461
34622011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3463
3464 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
3465 out whether the expression is read-only. Short-circuit placeholder
3466 case and rename a couple of local variables.
3467
34682011-03-17 Eric Botcazou <ebotcazou@adacore.com>
3469
3470 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
3471 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
3472 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
3473 (convert): Deal with conversions from a smaller form type specially.
3474
34752011-02-14 Eric Botcazou <ebotcazou@adacore.com>
3476
3477 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
3478 its argument, except for the special -I- switch.
3479
34802011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
3481
3482 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
3483 "Ada Issues".
3484
34852011-02-08 Eric Botcazou <ebotcazou@adacore.com>
3486
3487 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
3488
34892011-02-03 Eric Botcazou <ebotcazou@adacore.com>
3490
3491 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
3492 GNAT_FORMAL.
3493 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
3494 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
3495 instead of GNAT_FORMAL. Protect the expression against multiple uses.
3496 Do not generate the check directly, instead instantiate the template
3497 check present in the descriptor.
3498 (make_descriptor_field): Move around.
3499 (build_vms_descriptor32): Build a template check in the POINTER field.
3500 (build_vms_descriptor): Remove useless suffixes.
3501 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
3502
35032011-01-26 Eric Botcazou <ebotcazou@adacore.com>
3504
3505 PR bootstrap/47467
3506 * targext.c: Include target files if IN_RTS is defined.
3507
35082011-01-26 Richard Guenther <rguenther@suse.de>
3509
3510 PR bootstrap/47467
3511 * targext.c: Include config.h.
3512 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
3513 dependency.
3514
35152011-01-04 Pascal Obry <obry@adacore.com>
3516 Eric Botcazou <ebotcazou@adacore.com>
3517
3518 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
3519
35202011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3521
3522 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
3523 end-of-case on the end label and its associated gotos, if any.
3524
35252011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3526
3527 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
3528 expressions of the parameter cache within the statement group of
3529 the CICO mechanism.
3530
35312011-01-04 Olivier Hainque <hainque@adacore.com>
3532 Eric Botcazou <ebotcazou@adacore.com>
3533
3534 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
3535 (set_end_locus_from_node): New function.
3536 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
3537 make and the function end_locus.
3538 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
3539 for the elaboration subprogram.
3540 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
3541 set the end_locus of the expression as well.
3542
35432011-01-04 Eric Botcazou <ebotcazou@adacore.com>
3544
3545 PR ada/47131
3546 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
3547 variables that are referenced in exception handlers volatile.
3548
3549
3550\f
3551Copyright (C) 2011 Free Software Foundation, Inc.
3552
3553Copying and distribution of this file, with or without modification,
3554are permitted in any medium without royalty provided the copyright
3555notice and this notice are preserved.
3556
3557 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3558 - fix bugs in the description of Source_Trace;
3559 - get rid of UNIT_NAME;
3560
4fbad0ba
AC
35612011-08-02 Javier Miranda <miranda@adacore.com>
3562
3563 * exp_ch9.adb
3564 (Build_Dispatching_Requeue): Adding support for VM targets
3565 since we cannot directly reference the Tag entity.
3566 * exp_sel.adb (Build_K): Adding support for VM targets.
3567 (Build_S_Assignment): Adding support for VM targets.
3568 * exp_disp.adb
3569 (Default_Prim_Op_Position): In VM targets do not restrict availability
3570 of predefined interface primitives to compiling in Ada 2005 mode.
3571 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3572 restricted to compiling in Ada 2005 mode.
3573 (Make_VM_TSD): Generate code that declares and initializes the OSD
3574 record. Needed to support dispatching calls through synchronized
3575 interfaces.
3576 * exp_ch3.adb
3577 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3578 primitives associated with synchronized interfaces.
3579 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3580 primitives associated with synchronized interfaces.
3581
35822011-08-02 Yannick Moy <moy@adacore.com>
3583
3584 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3585 statements hidden in SPARK if preceded by the HIDE directive
3586 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3587 exception handlers as hidden in SPARK if preceded by the HIDE directive
3588 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3589 if starting with the HIDE directive
3590 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3591 starting with the HIDE directive; mark the declarations in a private
3592 part as hidden in SPARK if the private part starts with the HIDE
3593 directive
3594 * restrict.adb, restrict.ads
3595 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3596 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3597 argument node belongs to a part which is hidden in SPARK
3598 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3599 parts in SPARK; protect the possibly costly call to
3600 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3601 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3602 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3603 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3604 Tok_SPARK_Hide.
3605 (Scan): recognize special comment starting with '#' and followed by
3606 SPARK keyword "hide" as a HIDE directive.
3607
36082011-08-02 Yannick Moy <moy@adacore.com>
3609
3610 * types.ads, erroutc.ads: Minor reformatting.
3611
36122011-08-02 Vincent Celier <celier@adacore.com>
3613
3614 * link.c: Add response file support for cross platforms.
3615
6ff6152d
ES
36162011-08-02 Ed Schonberg <schonberg@adacore.com>
3617
3618 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3619 in an association, set parent field of copy before partial analysis.
3620 * sem_res.adb (Resolve_Slice): create reference to itype only when
3621 expansion is enabled.
3622
975c6896
YM
36232011-08-02 Yannick Moy <moy@adacore.com>
3624
3625 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3626 for new flag denoting which subprogram bodies are in ALFA
3627 * restrict.adb, sem_ch7.adb: Update comment
3628 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3629 sem_ch9.adb, sem_res.adb: Add calls to
3630 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3631 * sem_ch6.adb (Analyze_Function_Return): add calls to
3632 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3633 middle of the body, and extended return.
3634 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3635 False when missing return.
3636 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3637 to True for subprograms whose spec is in ALFA. Remove later on the flag
3638 on the entity used for a subprogram body when there exists a separate
3639 declaration.
3640 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3641 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3642 False, otherwise do nothing.
3643
afc8324d
AC
36442011-08-02 Robert Dewar <dewar@adacore.com>
3645
3646 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3647
36482011-08-02 Yannick Moy <moy@adacore.com>
3649
3650 * sem_ch4.ads: minor formatting.
3651
2ba431e5
YM
36522011-08-02 Yannick Moy <moy@adacore.com>
3653
3654 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3655 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3656 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3657 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3658 opt.ads: cleanup of SPARK mode
3659
0f853035
YM
36602011-08-02 Yannick Moy <moy@adacore.com>
3661
3662 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3663 types.
3664 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3665 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3666 * sem_ch3.adb
3667 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3668 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3669 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3670 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3671 types.
3672 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3673 non-static range.
3674 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3675 functions whose return type is not in ALFA.
3676 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3677 specifications.
3678 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3679 parameter's type is not in ALFA.
3680 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3681 types are in ALFA.
3682
d2b10647
ES
36832011-08-02 Ed Schonberg <schonberg@adacore.com>
3684
3685 * sem_ch6 (Analyze_Expression_Function): treat the function as
3686 Inline_Always, and introduce a subprogram declaration for it when it is
3687 not a completion.
3688 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3689 expression functions, so that the back-end can determine whether they
3690 can in fact be inlined.
3691 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3692 a function body comes from an expression function.
3693
c7b9d548
AC
36942011-08-02 Gary Dismukes <dismukes@adacore.com>
3695
3696 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3697 null exclusions to test Can_Never_Be_Null on the anonymous access types
3698 of the formals rather than testing the formals themselves. Exclude this
3699 check in cases where the Old_Formal is marked as a controlling formal,
3700 to avoid issuing spurious errors for bodies completing dispatching
3701 operations (due to the flag not getting set on controlling access
3702 formals in body specs).
3703 (Find_Corresponding_Spec): When checking full and subtype conformance of
3704 subprogram bodies in instances, pass Designated and E in that order, for
3705 consistency with the expected order of the formals (New_Id followed by
3706 Old_Id).
3707
37082011-08-02 Robert Dewar <dewar@adacore.com>
3709
3710 * sem_ch8.adb: Minor reformatting.
3711
1138cf59
AC
37122011-08-02 Ed Schonberg <schonberg@adacore.com>
3713
3714 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3715 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3716 primitive operations of class-wide actuals.
3717
37182011-08-02 Javier Miranda <miranda@adacore.com>
3719
3720 * exp_atag.ads, exp_atag.adb
3721 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3722 since its value is implicitly passed in argument Typ.
3723 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3724 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3725 Build_Common_Dispatching_Select_Statements.
3726
7b9db926
RD
37272011-08-02 Robert Dewar <dewar@adacore.com>
3728
3729 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3730 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3731 Minor reformatting.
3732
e8374e7a
AC
37332011-08-02 Robert Dewar <dewar@adacore.com>
3734
3735 * sem_res.adb: Minor reformatting.
3736 * sem_prag.adb: Minor reformatting.
3737
37382011-08-02 Javier Miranda <miranda@adacore.com>
3739
3740 * exp_atag.adb, exp_atags.ads
3741 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3742 by the tagged type Entity. Required to use this routine in the VM
3743 targets since we do not have available the Tag entity in the VM
3744 platforms.
3745 * exp_ch6.adb
3746 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3747 Ada.Tags has not been previously loaded.
3748 * exp_ch7.adb
3749 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3750 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3751 * sem_aux.adb
3752 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3753 view of enclosing scopes. Required to handle enclosing scopes that
3754 are synchronized types whose full view is a task type.
3755 * exp_disp.adb
3756 (Build_VM_TSDs): Minor code improvement to avoid generating and
3757 analyzing lists with empty nodes.
3758 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3759 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3760 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3761 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3762 (Make_Select_Specific_Data_Table): Add support for VM targets.
3763 (Make_VM_TSD): Generate code to initialize the SSD structure of
3764 the TSD.
3765
37662011-08-02 Yannick Moy <moy@adacore.com>
3767
3768 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3769 cross-references section in ALI.
3770 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3771 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3772 Sub).
3773 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3774 subprogram or package entity of a node
3775 (Is_Local_Reference_Type): new function returns True for references
3776 selected in local cross-references.
3777 (Lt): function extracted from Lt in Output_References
3778 (Write_Entity_Name): function extracted from Output_References
3779 (Generate_Definition): generate reference with type 'D' for definition
3780 of objects (object declaration and parameter specification), with
3781 appropriate locations and units, for use in local cross-references.
3782 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3783 references of type 'I' for initialization in object definition.
3784 (Output_References): move part of function Lt and procedure
3785 Write_Entity_Name outside of the body. Ignore references of types 'D'
3786 and 'I' introduced for local cross-references.
3787 (Output_Local_References): new procedure to output the local
3788 cross-references sections.
3789 (Lref_Entity_Status): new array defining whether an entity is a local
3790 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
3791 with 'I' type when initialization expression is present.
3792 * get_scos.adb, get_scos.ads: Correct comments and typos
3793
1f6439e3
AC
37942011-08-02 Javier Miranda <miranda@adacore.com>
3795
3796 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
3797 the JVM target.
3798 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
3799 the JVM target.
3800 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
3801 TSD support.
3802
38032011-08-02 Vincent Celier <celier@adacore.com>
3804
3805 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
3806 (No_Space_Img): New function
3807 (Find_Excluded_Sources): When reading from a file, record the file name
3808 and the line number for each excluded source.
3809 (Mark_Excluded_Sources): When reporting an error, if the excluded
3810 sources were read from a file, include file name and line number in
3811 the error message.
3812
38132011-08-02 Ed Schonberg <schonberg@adacore.com>
3814
3815 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
3816
ab027d28
RD
38172011-08-02 Robert Dewar <dewar@adacore.com>
3818
3819 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
3820
b3b28b0c
JM
38212011-08-02 Javier Miranda <miranda@adacore.com>
3822
3823 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
3824 generation of TSDs to the DOTNET compiler.
3825 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
3826 generation of TSDs to the DOTNET compiler.
3827
9732e886
JM
38282011-08-02 Javier Miranda <miranda@adacore.com>
3829
3830 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
3831 record of all the tagged types declared inside library level package
3832 declarations, library level package bodies or library level subprograms.
3833 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
3834 associated with a given tagged type.
3835 (Build_VM_TSDs): New subprogram.
3836 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
3837 compilation units that are subprograms.
3838 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
3839 compilation units that are package bodies.
3840 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
3841 units that are a package declaration or a package instantiation.
3842 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
3843 reorganization to improve the error generated by the frontend when the
3844 function Ada.Tags.Secondary_Tag is not available.
3845 * rtsfind.ads (RE_Register_TSD): New runtime entity.
3846 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
3847
e526d0c7
AC
38482011-08-02 Javier Miranda <miranda@adacore.com>
3849
3850 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
3851
38522011-08-02 Robert Dewar <dewar@adacore.com>
3853
3854 * s-imenne.ads: Minor reformatting.
3855
38562011-08-02 Robert Dewar <dewar@adacore.com>
3857
3858 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
3859 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
3860 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
3861
38622011-08-02 Robert Dewar <dewar@adacore.com>
3863
3864 * einfo.ads (Materialize_Entity): Document this is only for renamings
3865 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
3866 required debug information in the case where we transform the object
3867 declaration into a renaming declaration.
3868 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
3869 object
3870 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
3871 Materialize_Entity.
3872
5b1e6aca
RD
38732011-08-02 Robert Dewar <dewar@adacore.com>
3874
3875 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
3876 Suppress_Init_Procs.
3877 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
3878 Suppress_Initialization/Initialization_Suppressed.
3879 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
3880 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
3881 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
3882 * sem_prag.adb: New processing for pragma Suppress_Initialization.
3883
5ad4969d
RD
38842011-08-02 Robert Dewar <dewar@adacore.com>
3885
3886 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
3887 Minor reformatting.
3888
8c4ee6f5
AC
38892011-08-02 Ed Schonberg <schonberg@adacore.com>
3890
3891 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
3892 only have inheritable classwide pre/postconditions.
3893
38942011-08-02 Javier Miranda <miranda@adacore.com>
3895
3896 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
3897 * rtsfind.ads (RE_Check_TSD): New runtime entity.
3898 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
3899 checks if the external tag of a type is the same as the external tag
3900 of some other declaration.
3901
0b3d16c0
AC
39022011-08-02 Thomas Quinot <quinot@adacore.com>
3903
3904 * s-taskin.ads: Minor reformatting.
3905
39062011-08-02 Emmanuel Briot <briot@adacore.com>
3907
3908 * g-comlin.adb (Display_Help): swap the order in which it prints the
3909 short help and the general usage.
3910
39112011-08-02 Ed Schonberg <schonberg@adacore.com>
3912
3913 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
3914 the aspect declarations and attach them to the generic copy for
3915 subsequent analysis.
3916 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
3917 declarations of the generic tree to the new subprogram declarations.
3918 * sem_attr.adb (Check_Precondition_Postcondition): recognize
3919 conditions that apply to a subprogram instance.
3920
39212011-08-02 Robert Dewar <dewar@adacore.com>
3922
3923 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
3924
39252011-08-02 Ed Schonberg <schonberg@adacore.com>
3926
3927 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
3928 private type with a tagged full view is not derived in the immediate
3929 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
3930
4637729f
AC
39312011-08-02 Robert Dewar <dewar@adacore.com>
3932
3933 * exp_ch4.adb: Minor reformatting.
3934
39352011-08-02 Ed Schonberg <schonberg@adacore.com>
3936
3937 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
3938 Ada2012 iterator, the loop will be rewritten during expansion into a
3939 while loop with a cursor and an element declaration. Do not analyze the
3940 body in this case, because if the container is for indefinite types the
3941 actual subtype of the elements will only be determined when the cursor
3942 declaration is analyzed.
3943
39442011-08-02 Arnaud Charlet <charlet@adacore.com>
3945
3946 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
3947 size/alignment related attributes in CodePeer_Mode.
3948
39492011-08-02 Gary Dismukes <dismukes@adacore.com>
3950
3951 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
3952 Prepend_Element, since this can result in the operation getting the
3953 wrong slot in the full type's dispatch table if the full type has
3954 inherited operations. The incomplete type's operation will get added
3955 to the proper position in the full type's primitives
3956 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
3957 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
3958 dispatching operations, since there are cases where nonprimitive
3959 subprograms can get added to the list of incomplete dependents (such
3960 as subprograms in nested packages).
3961 * sem_ch6.adb (Process_Formals): First, remove test for being in a
3962 private part when determining whether to add a primitive with a
3963 parameter of a tagged incomplete type to the Private_Dependents list.
3964 Such primitives can also occur in the visible part, and should not have
3965 been excluded from being private dependents.
3966 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
3967 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
3968 list of a Taft-amendment incomplete type is a primitive before issuing
3969 an error that the full type must appear in the same unit. There are
3970 cases where nonprimitives can be in the list (such as subprograms in
3971 nested packages).
3972 * sem_disp.adb (Derives_From): Use correct condition for checking that
3973 a formal's type is derived from the type of the corresponding formal in
3974 the parent subprogram (the condition was completely wrong). Add
3975 checking that was missing for controlling result types being derived
3976 from the result type of the parent operation.
3977
4c60de0c
YM
39782011-08-02 Yannick Moy <moy@adacore.com>
3979
3980 * errout.adb (First_Node): minor renaming
3981 * restrict.adb (Check_Formal_Restriction): put restriction warning on
3982 first node.
3983
f5afb270
AC
39842011-08-02 Yannick Moy <moy@adacore.com>
3985
3986 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
3987 before accessing operands.
3988 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
3989 decide whether an initialization expression respects SPARK rules, as
3990 the plain node is the expanded one. This allows for more valid warnings
3991 to be issued.
3992 * gnat_rm.texi: Minor update.
3993
39942011-08-02 Arnaud Charlet <charlet@adacore.com>
3995
3996 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
3997 previous change.
3998
39992011-08-02 Robert Dewar <dewar@adacore.com>
4000
4001 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4002
40032011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4004
4005 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4006 loop statements and the element renaming declaration with a block when
4007 the element type is controlled.
4008
40092011-08-02 Yannick Moy <moy@adacore.com>
4010
4011 * sinfo.ads: Minor formatting.
4012
40132011-08-02 Ed Schonberg <schonberg@adacore.com>
4014
4015 * sem_aggr.adb (Add_Association): if the association has a box and no
4016 expression, use the Sloc of the aggregate itself for the new
4017 association.
4018 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4019 the Original_Node.
4020
db72f10a
AC
40212011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4022
4023 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4024 When a container is provided via a function call, generate a renaming
4025 of the function result. This avoids the creation of a transient scope
4026 and the premature finalization of the container.
4027 * exp_ch7.adb (Is_Container_Cursor): Removed.
4028 (Wrap_Transient_Declaration): Remove the supression of the finalization
4029 of the list controller when the declaration denotes a container cursor,
4030 it is not needed.
4031
40322011-08-02 Yannick Moy <moy@adacore.com>
4033
4034 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4035 node is from source, instead of the original node being from source.
4036 * sem_aggr.adb
4037 (Resolve_Array_Aggregate): refine the check for a static expression, to
4038 recognize also static ranges
4039 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4040 Array_Type_Declaration): postpone the test for the type being a subtype
4041 mark after the type has been resolved, so that component-selection and
4042 expanded-name are discriminated.
4043 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4044 to distinguish the case of an iteration scheme, so that an error is
4045 issed on a non-static range in SPARK except in an iteration scheme.
4046 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4047 In_Iter_Schm = True.
4048 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4049 user-defined operators so that they are allowed in renaming
4050 * sem_ch8.adb
4051 (Find_Selected_Component): refine the check for prefixing of operators
4052 so that they are allowed in renaming. Move the checks for restrictions
4053 on selector name after analysis discriminated between
4054 component-selection and expanded-name.
4055 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4056 concatenation argument of string type if it is static.
4057 * sem_util.adb, sem_util.ads
4058 (Check_Later_Vs_Basic_Declarations): add a new function
4059 Is_Later_Declarative_Item to decice which declarations are allowed as
4060 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4061 mode, add that renamings are considered as later items.
4062 (Enclosing_Package): new function to return the enclosing package
4063 (Enter_Name): correct the rule for homonyms in SPARK
4064 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4065 from source (result of expansion) to avoid issuing wrong warnings.
4066
40672011-08-02 Ed Schonberg <schonberg@adacore.com>
4068
4069 * errout.adb: On anything but an expression First_Node returns its
4070 argument.
4071
23685ae6
AC
40722011-08-02 Pascal Obry <obry@adacore.com>
4073
4074 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4075
40762011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4077
4078 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4079 Set the associated loop as the related expression of internally
4080 generated cursors.
4081 * exp_ch7.adb (Is_Container_Cursor): New routine.
4082 (Wrap_Transient_Declaration): Supress the finalization of the list
4083 controller when the declaration denotes a container cursor.
4084
40852011-08-02 Yannick Moy <moy@adacore.com>
4086
4087 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4088 command line now.
4089 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4090 expression is a simple expression. This check cannot be performed in
4091 the semantics, so just drop it.
4092 (P_Index_Or_Discriminant_Constraint): move check that the index or
4093 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4094 semantics. Other cases were previously checked in the semantics.
4095 * par-ch4.adb (P_Name): move checks that a selector name is not
4096 character literal or an operator symbol to Find_Selected_Component in
4097 the semantics
4098 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4099 declarations are not placed after later declarations in a separate
4100 procedure in Sem_Util (possibly not the best choice?), to be used both
4101 during parsing, for Ada 83 mode, and during semantic analysis, for
4102 SPARK mode.
4103 * par-endh.adb (Check_End): move check that end label is not missing
4104 to Process_End_Label in the semantics
4105 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4106 the special case for SPARK restriction
4107 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4108 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4109 parameter Force to issue the error message even on internal node (used
4110 for generated end label). Call Check_Restriction to check when an error
4111 must be issued. In SPARK mode, issue an error message even if the
4112 restriction is not set.
4113 (Check_Restriction): new procedure with an additional out parameter to
4114 inform the caller that a message has been issued
4115 * sem_aggr.adb: Minor modification of message
4116 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4117 instead of issuing an error message directly
4118 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4119 declarations are not placed after later declarations, by calling
4120 Check_Later_Vs_Basic_Declarations
4121 (Analyze_Subtype_Declaration): move here the check that an index or
4122 discriminant constraint must be a subtype mark. Change the check that
4123 a subtype of String must start at one so that it works on subtype marks.
4124 * sem_ch4.adb (Analyze_Call): move here the check that a named
4125 association cannot follow a positional one in a call
4126 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4127 instead of issuing an error message directly
4128 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4129 selector name is not a character literal or an operator symbol. Move
4130 here the check that the prefix of an expanded name cannot be a
4131 subprogram or a loop statement.
4132 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4133 procedure called from parsing and semantics to check that basic
4134 declarations are not placed after later declarations
4135 (Process_End_Label): move here the check that end label is not missing
4136
41372011-08-02 Arnaud Charlet <charlet@adacore.com>
4138
4139 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4140 representation clause in codepeer mode, since it confuses CodePeer and
4141 does not bring useful info.
4142
41432011-08-02 Ed Falis <falis@adacore.com>
4144
4145 * init.c: initialize fp hw on MILS.
4146
41472011-08-02 Ed Schonberg <schonberg@adacore.com>
4148
4149 * errout.adb (First_Node): for bodies, return the node itself (small
4150 optimization). For other nodes, do not check source_unit if the node
4151 comes from Standard.
4152
d2d9cc22
AC
41532011-08-02 Robert Dewar <dewar@adacore.com>
4154
4155 * exp_ch3.adb: Minor comment additions.
4156 * sem_ch13.adb: Minor reformatting.
4157
41582011-08-02 Pascal Obry <obry@adacore.com>
4159
4160 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4161
a01b9df6
AC
41622011-08-02 Robert Dewar <dewar@adacore.com>
4163
4164 * sem_attr.adb: Minor reformatting.
4165
41662011-08-02 Robert Dewar <dewar@adacore.com>
4167
4168 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4169 (Has_Default_Component_Value): Removed
4170 * einfo.ads Comment updates
4171 (Has_Default_Aspect): Replaces Has_Default_Value
4172 (Has_Default_Component_Value): Removed
4173 * exp_ch13.adb
4174 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4175 * exp_ch3.adb
4176 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4177 (Get_Simple_Init_Val): Handle Default_Value aspect
4178 (Needs_Simple_Initialization): Handle Default_Value aspect
4179 * exp_ch3.ads: Needs_Simple_Initialization
4180 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4181 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4182 * sem_ch13.adb
4183 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4184 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4185 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4186
41872011-08-02 Ed Schonberg <schonberg@adacore.com>
4188
4189 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4190 package containing iteration primitives.
4191 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4192
75c90775
AC
41932011-08-02 Ed Schonberg <schonberg@adacore.com>
4194
4195 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4196 "of", pre-analyze expression in case it is a function call with
4197 finalization actions that must be placed ahead of the loop.
4198 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4199 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4200
42012011-08-02 Geert Bosch <bosch@adacore.com>
4202
4203 * cstand.adb (Create_Float_Types): Only consider C's long double for
4204 Long_Long_Float, in addition to double.
4205
ded8909b
AC
42062011-08-02 Robert Dewar <dewar@adacore.com>
4207
4208 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4209 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4210 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4211 Minor reformatting.
4212
42132011-08-02 Ed Schonberg <schonberg@adacore.com>
4214
4215 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4216 indexed component.
4217
42182011-08-02 Javier Miranda <miranda@adacore.com>
4219
4220 * einfo.ads, einfo.adb
4221 (Original_Access_Type): Move this attribute to Node26 since there was
4222 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4223 which causes conflicts and breaks the generation of the .NET compiler.
4224 (Interface_Name): Add missing documentation on JGNAT only uses of
4225 this attribute.
4226
70c34e1c
AC
42272011-08-02 Geert Bosch <bosch@adacore.com>
4228
4229 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4230 (Find_Back_End_Float_Type): Likewise
4231 (Create_Back_End_Float_Types): Likewise
4232 (Create_Float_Types): Likewise
4233 (Register_Float_Type): Likewise
4234 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4235 Nlist and split out type selection in new local Find_Base_Type function.
4236 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4237 Nlist
4238 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4239
42402011-08-02 Robert Dewar <dewar@adacore.com>
4241
4242 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4243 alpha order).
4244 * opt.ads: Minor comment change.
4245 * sem_ch12.adb: Minor code reorganization.
4246
b715bc59
AC
42472011-08-02 Gary Dismukes <dismukes@adacore.com>
4248
4249 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4250 subtype's list of rep items to the list on the full subtype in the case
4251 where the lists are the same.
4252
42532011-08-02 Geert Bosch <bosch@adacore.com>
4254
4255 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4256 using the one from System.Strings, which also deallocates all strings.
4257
002bdd68
AC
42582011-08-02 Geert Bosch <bosch@adacore.com>
4259
4260 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4261 function.
4262 * gcc-interface/Make-lang.in: Update dependencies.
4263
42642011-08-02 Olivier Hainque <hainque@adacore.com>
4265
4266 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4267 end_locus.
4268
499769ec
AC
42692011-08-02 Javier Miranda <miranda@adacore.com>
4270
4271 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4272 associated with anonymous access to subprograms.
4273
42742011-08-02 Geert Bosch <bosch@adacore.com>
4275
4276 * opt.ads
4277 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4278 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4279 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4280 (Add_Symbol_Definition): Move to switch-c.adb
4281 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4282 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4283 (Add_Symbol_Definition): Move to switch-c.adb.
4284 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4285 * sem_warn.adb
4286 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4287 Move to warnsw.adb.
4288 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4289 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4290 Move to warnsw.adb.
4291 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4292 (Add_Symbol_Definition): Moved from Prepcomp.
4293 * switch-c.ads: Update copyright notice. Use String_List instead of
4294 Argument_List, removing dependency on System.OS_Lib.
4295
aa1e353a
AC
42962011-08-02 Yannick Moy <moy@adacore.com>
4297
4298 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4299 mode on initialization expression which does not respect SPARK
4300 restrictions.
4301 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4302 if the tree referenced by its argument represents an initialization
4303 expression in SPARK, suitable for initializing an object in an object
4304 declaration.
4305
43062011-08-02 Javier Miranda <miranda@adacore.com>
4307
4308 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4309 internally generated access to subprogram with its associated protected
4310 subprogram type.
4311 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4312
15b682ca
GB
43132011-08-02 Geert Bosch <bosch@adacore.com>
4314
4315 * cstand.adb (Register_Float_Type): Print information about type to
4316 register, if the Debug_Flag_Dot_B is set.
4317 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4318 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4319 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4320 with a requested precision of more than Max_Digits digits and no more
4321 than Max_Base_Digits digits, if a range specification is present and the
4322 Predefined_Float_Types list has a suitable type to derive from.
4323 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4324 case of type completion with pragma Import
4325 * sem_prag.adb
4326 (Process_Import_Predefined_Type): Processing to complete a type
4327 with pragma Import. Currently supports floating point types only.
4328 (Set_Convention_From_Pragma): Do nothing without underlying type.
4329 (Process_Convention): Guard against absence of underlying type,
4330 which may happen when importing incomplete types.
4331 (Process_Import_Or_Interface): Handle case of importing predefined
4332 types. Tweak error message.
4333
f8726f2b
AC
43342011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4335
4336 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4337 functions to previous change. Reorganize code slightly.
4338
43392011-08-02 Geert Bosch <bosch@adacore.com>
4340
4341 * back_end.ads (Register_Type_Proc): New call back procedure type for
4342 allowing the back end to provide information about available types.
4343 (Register_Back_End_Types): New procedure to register back end types.
4344 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4345 available types.
4346 * cstand.adb (Back_End_Float_Types): New list for floating point types
4347 supported by the back end.
4348 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4349 (Copy_Float_Type): New procedure to make new copies of predefined types.
4350 (Register_Float_Type): New call back procedure to populate the BEFT list
4351 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4352 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4353 (Create_Float_Types): New procedure to create entities for floating
4354 point types predefined in Standard, and put these and any remaining
4355 BEFTs on the Predefined_Float_Types list.
4356 * stand.ads (Predefined_Float_Types): New list for predefined floating
4357 point types that do not have declarations in package Standard.
4358
feecad68
AC
43592011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4360
4361 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4362 entity node for the unit containing the parameter.
4363 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4364 (Add_Inlined_Subprogram): Likewise.
4365 * gcc-interface/Make-lang.in: Update dependencies.
4366
43672011-08-02 Thomas Quinot <quinot@adacore.com>
4368
4369 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4370 suitable value.
4371
12f0c50c
AC
43722011-08-02 Geert Bosch <bosch@adacore.com>
4373
4374 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4375
43762011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4377
4378 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4379 computed value of Base_Type.
4380
43812011-08-02 Yannick Moy <moy@adacore.com>
4382
4383 * restrict.adb (Check_Restriction): issue an error for any use of
4384 class-wide, even if the No_Dispatch restriction is not set.
4385 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4386 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4387 when completing a private extension, the type named in the private part
4388 is not the same as that named in the visible part.
4389 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4390 of an inherited primitive operations of a tagged type or type extension
4391 that returns the tagged type.
4392 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4393 function which returns True for an implicit operation inherited by the
4394 derived type declaration for the argument type.
4395 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4396 order.
4397
fb86fe11
ES
43982011-08-02 Ed Schonberg <schonberg@adacore.com>
4399
4400 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4401 Process_Bounds, to perform analysis with expansion of a range or an
4402 expression that is the iteration scheme for a loop.
4403 (Analyze_Iterator_Specification): If domain of iteration is given by a
4404 function call with a controlled result, as is the case if call returns
4405 a predefined container, ensure that finalization actions are properly
4406 generated.
4407 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4408
62be5d0a
JM
44092011-08-02 Javier Miranda <miranda@adacore.com>
4410
4411 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4412 * gcc-interface/Make-lang.in: Update dependencies.
4413
44142011-08-02 Javier Miranda <miranda@adacore.com>
4415
4416 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4417 determine if the analysis is performed using N or Original_Node (N).
4418 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4419 functionality of routine Is_Variable avoids code duplication.
4420 * checks.adb (Determine_Range): Handle temporaries generated by
4421 Remove_Side_Effects.
4422
44232011-08-02 Javier Miranda <miranda@adacore.com>
4424
4425 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4426 expansion of the condition. Required since the previous analysis was
4427 done with expansion disabled (see Resolve_Quantified_Expression) and
4428 hence checks were not inserted and record comparisons have not been
4429 expanded.
4430
a20f4389
AC
44312011-08-02 Ed Falis <falis@adacore.com>
4432
4433 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4434 Update header.
4435
44362011-08-02 Bob Duff <duff@adacore.com>
4437
4438 * opt.ads: Minor comment fix.
4439
44402011-08-02 Bob Duff <duff@adacore.com>
4441
4442 * sem_ch12.adb (Analyze_Package_Instantiation,
4443 Analyze_Subprogram_Instantiation): Turn off style checking while
4444 analyzing an instance. Whatever style checks that apply to the generic
4445 unit should apply, so it makes no sense to apply them in an instance.
4446 This was causing trouble when compiling an instance of a runtime
4447 unit that violates the -gnatyO switch.
4448 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4449 one of the two case statements, causing spurious errors.
4450
44512011-08-02 Robert Dewar <dewar@adacore.com>
4452
4453 * uname.adb: Minor reformatting.
4454 * gnatcmd.adb: Minor reformatting.
4455 * exp_attr.adb: Minor reformatting.
4456
90878b12
AC
44572011-08-02 Ed Schonberg <schonberg@adacore.com>
4458
4459 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4460 No_Dispatching_Calls, do not look for the Assign primitive, because
4461 predefined primitives are not created in this case.
4462
44632011-08-02 Bob Duff <duff@adacore.com>
4464
4465 * stylesw.ads: Minor comment fixes.
4466
44672011-08-02 Robert Dewar <dewar@adacore.com>
4468
4469 * freeze.adb (Add_To_Result): New procedure.
4470
44712011-08-02 Jose Ruiz <ruiz@adacore.com>
4472
4473 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4474 time, if the specific run-time routines for handling streams of strings
4475 are not available, use the default mechanism.
4476
44772011-08-02 Arnaud Charlet <charlet@adacore.com>
4478
4479 * s-regpat.ads: Fix typo.
4480
44812011-08-02 Vincent Celier <celier@adacore.com>
4482
4483 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4484 not null, call it to create the in memory config project file without
4485 parsing an existing default config project file.
4486
44872011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4488
4489 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4490
44912011-08-02 Ed Schonberg <schonberg@adacore.com>
4492
4493 * sem_elim.adb: an abstract subprogram does not need an eliminate
4494 pragma for its descendant to be eliminable.
4495
44962011-08-02 Ed Falis <falis@adacore.com>
4497
4498 * init.c: revert to handling before previous checkin for VxWorks
4499 * s-intman-vxworks.adb: delete unnecessary declarations related to
4500 using Ada interrupt facilities for handling signals.
4501 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4502 * s-intman-vxworks.ads: Import __gnat_install_handler as
4503 Initialize_Interrupts.
4504 * s-taprop-vxworks.adb: Delete Signal_Mask.
4505 (Abort_Handler): change construction of mask to unblock exception
4506 signals.
4507
273adcdf
AC
45082011-08-02 Jerome Guitton <guitton@adacore.com>
4509
4510 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4511 Debug_Raise_Exception before propagation starts.
4512
45132011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4514
4515 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4516 to Restriction_Check_Required.
4517 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4518 * sem_res.adb (Resolve_Call): Likewise.
4519 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4520
45212011-08-02 Bob Duff <duff@adacore.com>
4522
4523 * stylesw.ads: Update comment.
4524 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4525 * errout.ads: Remove obsolete comment.
4526
45272011-08-02 Javier Miranda <miranda@adacore.com>
4528
4529 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4530 (Set_Is_Safe_To_Reevaluate): new procedure.
4531 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4532 assignment is allowed on safe-to-reevaluate variables.
4533 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4534 temporary created to remove side effects in expressions that use
4535 the secondary stack as safe-to-reevaluate.
4536 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4537 variables that are not true constants.
4538
6320f5e1
AC
45392011-08-02 Robert Dewar <dewar@adacore.com>
4540
4541 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4542 sem_res.adb, sem_ch6.adb: Minor reformatting.
4543
45442011-08-02 Jerome Guitton <guitton@adacore.com>
4545
4546 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4547
2fe829ae
ES
45482011-08-02 Ed Schonberg <schonberg@adacore.com>
4549
4550 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4551 not set Overridden_Operation if subprogram is an initialization
4552 procedure.
4553
e24329cd
YM
45542011-08-02 Yannick Moy <moy@adacore.com>
4555
4556 * par-ch6.adb: Correct obsolete name in comments
4557 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4558 which takes two message arguments (existing function takes one), with
4559 second message used for continuation.
4560 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4561 block statements that originate from a source block statement, not
4562 generated block statements
4563 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4564 symmetry with procedure case
4565 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4566 function to issue an error in formal mode if a package specification
4567 contains more than one tagged type or type extension.
4568 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4569 parameters matching formals of tagged types are objects (or ancestor
4570 type conversions of objects), not general expressions. Issue an error
4571 on view conversions that are not involving ancestor conversion of an
4572 extended type.
4573 (Resolve_Type_Conversion): in formal mode, issue an error on the
4574 operand of an ancestor type conversion which is not an object
4575 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4576 procedure so that it works also for actuals of function calls
4577 (Is_Actual_Tagged_Parameter): new function which determines if its
4578 argument is an actual parameter of a formal of tagged type in a
4579 subprogram call
4580 (Is_SPARK_Object_Reference): new function which determines if the tree
4581 referenced by its argument represents an object in SPARK
4582
176dadf6
AC
45832011-08-02 Robert Dewar <dewar@adacore.com>
4584
4585 * sem_ch3.adb: Minor reformatting
4586 Minor comment addition
4587 Minor error msg text change
4588
45892011-08-02 Javier Miranda <miranda@adacore.com>
4590
4591 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4592 function. Used to be more precise when we generate a variable plus one
4593 assignment to remove side effects in the evaluation of the Bound
4594 expressions.
4595 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4596 of the bound expression to force its re-analysis and thus expand the
4597 associated transient scope (if required). Code cleanup replacing the
4598 previous code that declared the constant entity by an invocation to
4599 routine Force_Evaluation which centralizes this work in the frontend.
4600
d8b962d8
AC
46012011-08-02 Robert Dewar <dewar@adacore.com>
4602
4603 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4604 (Base_Type): Now uses improved Is_Base_Type function
4605 * einfo.ads (Base_Type): Inline this function
4606
46072011-08-02 Robert Dewar <dewar@adacore.com>
4608
4609 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4610 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4611
46122011-08-02 Arnaud Charlet <charlet@adacore.com>
4613
4614 * gcc-interface/Make-lang.in: Update dependencies.
4615 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4616 targets.
4617
46182011-08-02 Yannick Moy <moy@adacore.com>
4619
4620 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4621 non-simple expression used in delta constraint
4622 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4623 index constraint which is not a subtype mark
4624 * par.adb: With and use Restrict
4625 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4626 mode on component type which is not a subtype mark and default
4627 expression on component
4628 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4629 of string which does not have a lower index bound equal to 1
4630 (Array_Type_Declaration): issue an error in formal mode on index or
4631 component type which is not a subtype mark, and on aliased keyword on
4632 component
4633 (Derived_Type_Declaration): issue an error in formal mode on interface,
4634 limited or abstract type
4635 (Record_Type_Declaration): issue an error in formal mode on interface
4636 (Record_Type_Definition): issue an error in formal mode on tagged types
4637 and type extensions not declared in the specification of a library unit
4638 package; on null non-tagged record; on variant part
4639
46402011-08-02 Vincent Celier <celier@adacore.com>
4641
4642 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4643 not declared for qualified library project when Library_Name is not
4644 declared, but Library_Dir is.
4645
46462011-08-02 Robert Dewar <dewar@adacore.com>
4647
4648 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4649 pragmas (affects aspects [Component_]Default_Value
4650 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4651 component type for the resolution
4652
f96b2d85
AC
46532011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4654
4655 * einfo.adb (Base_Type): Tune implementation for speed.
4656
46572011-08-02 Robert Dewar <dewar@adacore.com>
4658
4659 * freeze.adb: Minor reformatting.
4660
8b3c6430
AC
46612011-08-02 Thomas Quinot <quinot@adacore.com>
4662
4663 * scos.ads: Update comments.
4664
46652011-08-02 Ed Schonberg <schonberg@adacore.com>
4666
4667 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4668 base type, because the parent may be a subtype of a private type whose
4669 convention is established in a private part.
4670
46712011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4672
4673 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4674 statement in a block when the expansion of the return expression has
4675 created a finalization chain.
4676 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4677 with the parent node.
4678 Add N_Extended_Return_Statement to handle the case where a transient
4679 object declaration appears in the Return_Object_Declarations list of
4680 an extended return statement.
4681
46822011-08-02 Matthew Gingell <gingell@adacore.com>
4683
4684 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4685 unused parameter 'name'.
4686
46872011-08-02 Ed Schonberg <schonberg@adacore.com>
4688
4689 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4690 inherited operation, check whether its alias, which is the source
4691 operastion that it renames, has been marked eliminated.
4692
cae81f17
JM
46932011-08-02 Javier Miranda <miranda@adacore.com>
4694
4695 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4696 in-mode parameter whose type is an access type since it can be used to
4697 modify its designated object. Enforce code that handles as safe an
4698 access type that is not access-to-constant but it is the result of a
4699 previous removal of side-effects.
4700 (Remove_Side_Effects): Minor code reorganization of cases which require
4701 no action. Done to incorporate documentation on new cases uncovered
4702 working in this ticket: no action needed if this routine was invoked
4703 too early and the nodes are not yet decorated.
4704 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4705 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4706 were issued with actuals that are implicitly provided by
4707 Force_Evaluation.
4708
218e6dee
RD
47092011-08-02 Robert Dewar <dewar@adacore.com>
4710
4711 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4712
7a489a2b
AC
47132011-08-02 Yannick Moy <moy@adacore.com>
4714
4715 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4716 to issue an error in formal mode on attribute not supported in this mode
4717 (Analyze_Attribute): issue errors on standard attributes not supported
4718 in formal mode.
4719 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4720 comment, and issue error in formal mode on modulus which is not a power
4721 of 2.
4722 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4723 range.
4724 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4725 subtype mark.
4726 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4727 operator on modular type (except 'not').
4728
47292011-08-02 Robert Dewar <dewar@adacore.com>
4730
4731 * gnat_rm.texi: Minor reformatting.
4732
cb7fa356
AC
47332011-08-02 Arnaud Charlet <charlet@adacore.com>
4734
4735 * s-osinte-linux.ads: Minor comment update and reformatting.
4736 * i-cexten.ads: Make this unit pure, as for its parent.
4737 Will allow its usage in more contexts if needed.
4738
47392011-08-02 Robert Dewar <dewar@adacore.com>
4740
4741 * s-utf_32.ads: Minor comment fix.
4742
47432011-08-02 Ed Schonberg <schonberg@adacore.com>
4744
4745 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4746 operation of a tagged synchronized type, handle the case where the
4747 controlling argument is overloaded.
4748
47492011-08-02 Yannick Moy <moy@adacore.com>
4750
4751 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4752 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4753 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4754 SPARK mode and formal verification mode on processing SPARK restriction
4755 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4756 requiring consistency checking.
4757
5cc9353d
RD
47582011-08-02 Robert Dewar <dewar@adacore.com>
4759
4760 * sem_res.adb: Minor reformatting.
4761
e51537ff
RD
47622011-08-02 Robert Dewar <dewar@adacore.com>
4763
4764 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4765 a-cforse.ads: Remove unneeded with of Ada.Containers
4766 Remove commented out pragma Inline's
4767 Move specifications of new subprograms to the actual specs
4768
83fa09c5
AC
47692011-08-02 Yannick Moy <moy@adacore.com>
4770
4771 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4772 a-cforse.ads: Update comments.
4773
47742011-08-02 Ed Schonberg <schonberg@adacore.com>
4775
4776 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4777
d11cfaf8
RD
47782011-08-02 Robert Dewar <dewar@adacore.com>
4779
4780 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4781 a-cforse.ads, a-cofove.ads: Minor reformatting.
4782
300b98bb
AC
47832011-08-02 Claire Dross <dross@adacore.com>
4784
4785 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4786 a-cofove.ads: Add comments.
4787
47882011-08-02 Yannick Moy <moy@adacore.com>
4789
4790 * gnat_rm.texi: Document formal containers.
4791
47922011-08-02 Emmanuel Briot <briot@adacore.com>
4793
4794 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
4795 are empty sections.
4796
19fb051c
AC
47972011-08-02 Robert Dewar <dewar@adacore.com>
4798
4799 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
4800 reformatting.
4801
48022011-08-02 Robert Dewar <dewar@adacore.com>
4803
4804 * aspects.adb: New aspects Default_Value and Default_Component_Value
4805 New format of Aspect_Names table checks for omitted entries
4806 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
4807 handling of boolean aspects for derived types.
4808 New aspects Default_Value and Default_Component_Value
4809 New format of Aspect_Names table checks for omitted entries
4810 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
4811 (Has_Default_Value): New flag
4812 (Has_Default_Component_Value): New flag
4813 (Has_Default_Value): New flag
4814 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
4815 table.
4816 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
4817 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
4818 Default_Value and Default_Component_Value
4819 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
4820 New aspects Default_Value and Default_Component_Value
4821 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
4822 * sprint.adb: Print N_Aspect_Specification node when called from gdb
4823
48242011-08-02 Vincent Celier <celier@adacore.com>
4825
4826 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
4827 inherit library kind.
4828
48292011-08-02 Ed Schonberg <schonberg@adacore.com>
4830
4831 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
4832 Minor reformatting.
4833
48342011-08-02 Robert Dewar <dewar@adacore.com>
4835
4836 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
4837
5f7747af
AC
48382011-08-02 Yannick Moy <moy@adacore.com>
4839
4840 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
4841
48422011-08-02 Robert Dewar <dewar@adacore.com>
4843
4844 * impunit.adb: Add comment.
4845
a5fe697b
AC
48462011-08-02 Yannick Moy <moy@adacore.com>
4847
4848 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
4849 qualification of aggregates in formal mode
4850 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
4851 another aggregate
4852 (Resolve_Aggregate): complete the test that an aggregate is adequately
4853 qualified in formal mode
4854
48552011-08-02 Pascal Obry <obry@adacore.com>
4856
4857 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
4858 * mlib-prj.adb: Supress warning when compiling binder generated file.
4859 (Build_Library): Supress all warnings when compiling the binder
4860 generated file.
4861
bd65a2d7 48622011-08-02 Yannick Moy <moy@adacore.com>
d4487611 4863
bd65a2d7
AC
4864 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
4865 from here...
4866 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
4867 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
4868 Add with/use clauses to make Check_Formal_Restriction visible
4869
48702011-08-02 Ed Schonberg <schonberg@adacore.com>
4871
4872 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
4873 in-parameters when type of the generic formal is private in the generic
4874 spec and non-private in the body.
4875
48762011-08-02 Claire Dross <dross@adacore.com>
4877
4878 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
4879 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
4880 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
4881 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
4882
48832011-08-02 Robert Dewar <dewar@adacore.com>
4884
4885 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
4886 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4887
bd434b3f
YM
48882011-08-02 Yannick Moy <moy@adacore.com>
4889
4890 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
4891 formal mode
4892 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
4893 matching static array bounds, taking into account the special case of
4894 string literals
4895 * sem_ch3.adb: Typo in comment.
4896
fe5d3068
YM
48972011-08-02 Yannick Moy <moy@adacore.com>
4898
4899 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
4900 which issues an error in formal mode if its argument node is originally
4901 from source
4902 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
4903 has a discriminant specification so that it does not include the case
4904 of derived types
4905 (Derived_Type_Declaration): move here the test that a derived type has a
4906 discriminant specification
4907 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
4908 first element of a component association before accessing its choices
4909 (presence of component association is not enough)
4910 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
4911 declaration is a library item before accessing the next element in a
4912 list, as library items are not member of lists
4913 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4914 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
4915 Check_Formal_Restriction whenever possible.
4916
b60a3f26
AC
49172011-08-02 Ed Schonberg <schonberg@adacore.com>
4918
4919 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
4920 reference when needed.
4921
49222011-08-02 Bob Duff <duff@adacore.com>
4923
4924 * gnat_ugn.texi: Fix typo.
4925
49262011-08-02 Vincent Celier <celier@adacore.com>
4927
4928 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
4929 archive file name. Do not use the full path name of archives for Open
4930 VMS.
4931
eaba57fb
RD
49322011-08-02 Robert Dewar <dewar@adacore.com>
4933
4934 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
4935 Analyze_Aspect_Specifications
4936 * sem_ch13.adb
4937 (Analyze_Aspect_Specifications): New handling for boolean aspects
4938 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
4939 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
4940 sequence for Analyze_Aspect_Specifications
4941 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
4942 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
4943
49442011-08-02 Robert Dewar <dewar@adacore.com>
4945
4946 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
4947 aspects, since these no longer exist.
4948
49492011-08-02 Robert Dewar <dewar@adacore.com>
4950
4951 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
4952 semicolon, do not try to see if there are aspects following it.
4953 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
4954 aspect spec.
4955
8830d1d2
AC
49562011-08-02 Robert Dewar <dewar@adacore.com>
4957
4958 * sem_ch8.adb, aspects.ads: Minor reformatting.
4959
49602011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4961
4962 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
4963 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
4964 extracted from...
4965 (Analyze_Aspect_Specifications): ...here. Call above procedure.
4966
7ff2d234
AC
49672011-08-02 Yannick Moy <moy@adacore.com>
4968
4969 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
4970 mode on subprogram declaration outside of package specification, unless
4971 it is followed by a pragma Import
4972 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
4973 Access_Type_Declaration): issue error in formal mode on access type
4974 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
4975 incomplete type
4976 (Analyze_Object_Declaration): issue error in formal mode on object
4977 declaration which does not respect SPARK restrictions
4978 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
4979 declaration which does not respect SPARK restrictions
4980 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
4981 error in formal mode on digits or delta constraint
4982 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
4983 decimal fixed point type
4984 (Derived_Type_Declaration): issue error in formal mode on derived type
4985 other than type extensions of tagged record types
4986 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
4987 with check on access definition
4988 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
4989 mode on protected definition.
4990 (Analyze_Task_Definition): issue error in formal mode on task definition
4991
49922011-08-02 Robert Dewar <dewar@adacore.com>
4993
4994 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
4995
806f6d37
AC
49962011-08-02 Javier Miranda <miranda@adacore.com>
4997
4998 * sem_ch6.adb (Can_Override_Operator): New function.
4999 (Verify_Overriding_Indicator): Add missing code to check overriding
5000 indicator in operators. Fixes regression.
5001 (Check_Overriding_Indicator): Minor reformating after replacing the
5002 code that evaluates if the subprogram can override an operator by
5003 invocations to the above new function.
5004 * einfo.adb
5005 (Write_Field26_Name): Add missing code to ensure that, following
5006 the documentation in einfo.ads, this field is not shown as attribute
5007 "Static_Initialization" on non-dispatching functions.
5008
50092011-08-02 Jose Ruiz <ruiz@adacore.com>
5010
5011 * sem_res.adb (Resolve_Call): A call to
5012 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5013 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5014 i.e., when the second parameter is of type Time_Span.
5015
50162011-08-02 Vincent Celier <celier@adacore.com>
5017
5018 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5019 with an archive instead of -L<library dir> -l<library name>.
5020
50212011-08-02 Ed Schonberg <schonberg@adacore.com>
5022
5023 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5024 mark the base types In_Use in addition to making the operations
5025 use_visible.
5026
50272011-08-02 Ed Falis <falis@adacore.com>
5028
5029 * init.c: add and setup __gnat_signal_mask for the exception signals
5030 * s-inmaop-vxworks.adb: new file.
5031 * s-intman-vxworks.adb: remove unnecessary initializations and
5032 simplify remaining
5033 * s-intman-vxworks.ads: remove unnecessary variable
5034 * s-taprop-vxworks.adb: simplify signal initialization
5035
780d052e
RD
50362011-08-02 Robert Dewar <dewar@adacore.com>
5037
5038 * sem_ch8.adb: Minor code reorganization, comment updates.
5039
50402011-08-02 Robert Dewar <dewar@adacore.com>
5041
5042 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5043 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5044 here from Sem_Res.
5045 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5046 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5047
29efbb8c
ES
50482011-08-02 Ed Schonberg <schonberg@adacore.com>
5049
5050 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5051 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5052 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5053 use_type_clauses, to handle more efficiently use_type and use_all_type
5054 constructs.
5055 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5056 Ada2012 Use_All_Type clause.
5057 (Use_Class_Wide_Operations): new procedure.
5058
b0186f71
AC
50592011-08-02 Robert Dewar <dewar@adacore.com>
5060
5061 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5062 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5063 expression to expression function.
5064
50652011-08-02 Ed Schonberg <schonberg@adacore.com>
5066
5067 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5068 if types are compatible.
5069
50702011-08-02 Yannick Moy <moy@adacore.com>
5071
5072 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5073 returns True if its argument array types have same dimension and same
5074 static bounds at each index.
5075 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5076 OUT or IN OUT paramaters which are not view conversions in SPARK.
5077 (Resolve_Arithmetic_Op): issue an error in formal mode on
5078 multiplication or division with operands of fixed point types which are
5079 not qualified or explicitly converted.
5080 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5081 Boolean or array type (except String) operands.
5082 (Resolve_Equality_Op): issue an error in formal mode on equality
5083 operators for array types other than String with non-matching static
5084 bounds.
5085 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5086 for array types with non-matching static bounds. Factorize the code in
5087 Matching_Static_Array_Bounds.
5088 (Resolve_Qualified_Expression): issue an error in formal mode on
5089 qualified expressions for array types with non-matching static bounds.
5090 (Resolve_Type_Conversion): issue an error in formal mode on type
5091 conversion for array types with non-matching static bounds
5092
767bb4e8
AC
50932011-08-02 Robert Dewar <dewar@adacore.com>
5094
5095 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5096
50972011-08-02 Ed Schonberg <schonberg@adacore.com>
5098
5099 * par-ch9.adb: save location of entry for proper error message.
5100
4ac2477e
JM
51012011-08-02 Javier Miranda <miranda@adacore.com>
5102
5103 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5104 (Use_Full_View) which permits this routine to climb through the
5105 ancestors using the full-view of private parents.
5106 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5107 Use_Full_View to true in calls to Is_Ancestor.
5108 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5109 true in call to Is_Ancestor.
5110 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5111 Use_Full_View to true in call to Is_Ancestor.
5112 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5113 call to Is_Ancestor.
5114 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5115 Use_Full_View to true in calls to Is_Ancestor.
5116 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5117 Make_Select_Specific_Data_Table, Register_Primitive,
5118 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5119 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5120 to true in call to Is_Ancestor.
5121 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5122 Use_Full_View to true in calls to Is_Ancestor.
5123 * exp_cg.adb
5124 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5125 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5126
9f90d123
AC
51272011-08-02 Robert Dewar <dewar@adacore.com>
5128
5129 * gnat_rm.texi: Minor reformatting.
5130 * sem_prag.adb: Minor reformatting.
5131
51322011-08-02 Tristan Gingold <gingold@adacore.com>
5133
5134 * vms_data.ads: Add VMS qualifier for -gnateP.
5135
51362011-08-02 Robert Dewar <dewar@adacore.com>
5137
5138 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5139 * par-ch7.adb (P_Package): Proper placement of aspects for package
5140 decl/instantiation.
5141 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5142 (End_Statements): Add Is_Sloc parameterr
5143 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5144 (Check_End): Ad Is_Sloc parameter
5145 (End_Statements): Add Is_Sloc parameterr
5146
51472011-08-02 Vincent Celier <celier@adacore.com>
5148
5149 * ug_words: Add VMS qualifier equivalent to -gnateP:
5150 /SYMBOL_PREPROCESSING.
5151
51522011-08-02 Jose Ruiz <ruiz@adacore.com>
5153
5154 * gnat-style.texi: For hexadecimal numeric literals the typical
5155 grouping of digits is 4 to represent 2 bytes.
5156 A procedure spec which is split into several lines is indented two
5157 characters.
5158
51592011-08-02 Yannick Moy <moy@adacore.com>
5160
5161 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5162 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5163 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5164 properly qualified
5165 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5166 choice in array aggregate
5167 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5168 mark as ancestor
5169 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5170 positional and named aggregate for record, or others in record
5171 aggregate, or multiple choice in record aggregate
5172 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5173 array operands to logical operations AND, OR and XOR do not have the
5174 same static lower and higher bounds
5175 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5176
2933b16c
RD
51772011-08-01 Robert Dewar <dewar@adacore.com>
5178
5179 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5180 Replaces Last_Source_Node_In_Sequence.
5181 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5182 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5183 parens and blank in string (this was inconsistently implemented).
5184 * errout.ads
5185 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5186 blank in string (this was inconsistently implemented).
5187 * gnat1drv.adb
5188 (Set_Global_Switches): Set formal mode switches appropriately
5189 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5190 * par-prag.adb
5191 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5192 call Set_Error_Msg_Lang to set "spark" as language name.
5193 * par.adb: Remove unnecessary call to set formal language for errout
5194 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5195 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5196 name.
5197 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5198 calls to it, moved after resolution so that types are known
5199 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5200 result of concatenation is not of type String
5201 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5202 concatenation is not properly restricted
5203 * gnat_rm.texi: Add doc on pragma Spark_95.
5204 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5205 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5206 * gcc-interface/Make-lang.in: Update dependencies.
5207
05dbd302
AC
52082011-08-01 Javier Miranda <miranda@adacore.com>
5209
5210 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5211 condition that detects if the overridden operation must replace an
5212 existing entity.
5213
52142011-08-01 Javier Miranda <miranda@adacore.com>
5215
5216 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5217 code declarations inserted by Insert_Actions in each alternative of the
5218 N_Case_Expression node.
5219
52202011-08-01 Robert Dewar <dewar@adacore.com>
5221
5222 * sem_ch6.adb: Minor code reorganization.
5223 * sem_util.adb: Minor reformatting.
5224
af9e051f
PO
52252011-08-01 Pascal Obry <obry@adacore.com>
5226
5227 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5228 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5229
1d801f21
AC
52302011-08-01 Yannick Moy <moy@adacore.com>
5231
5232 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5233 literal or operator symbol which is prefixed
5234 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5235 mode on access attributes.
5236 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5237 that concatenation operands are properly restricted in formal mode
5238 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5239 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5240 result of the concatenation has a type different from String.
5241 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5242 Analyze_Quantified_Expression, Analyze_Slice,
5243 Analyze_Null): issue an error in formal mode on unsupported constructs
5244 * sem_ch5.adb
5245 (Analyze_Block_Statement): only issue error on source block statement
5246 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5247 function which returns the last node in a list of nodes for which
5248 Comes_From_Source returns True, if any
5249 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5250 Last_Source_Node_In_Sequence
5251 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5252 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5253 mode on unsupported constructs
5254 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5255 rest of the actions may be needed later on since the error is marked as
5256 not serious.
5257 * sinfo.ads: Typos in comments.
5258
52592011-08-01 Pascal Obry <obry@adacore.com>
5260
5261 * projects.texi: Minor editing.
5262
53beff22
YM
52632011-08-01 Yannick Moy <moy@adacore.com>
5264
5265 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5266 insertion character ~~
5267 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5268 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5269 with insertion character ~~
5270 (Set_Msg_Text): treat insertion character ~~
5271 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5272 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5273 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5274 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5275 errors related to the formal language restriction not serious
5276 (insertion character |).
5277 * par.adb (Par): set formal language for error messages if needed
5278 * sem_ch6.adb (Check_Missing_Return): take into account possible
5279 generated statements at the end of the function
5280 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5281 enumeration value to define a new pragma SPARK_95
5282 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5283 SPARK_Version): new type and variables to store the SPARK version
5284 (none by default).
5285 (SPARK_Mode): return True when SPARK_Version is set
5286 * par-prag.adb: Correct indentation
5287 (Prag): take Pragma_SPARK_95 into account
5288 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5289 into account.
5290
8d606a78
RD
52912011-08-01 Robert Dewar <dewar@adacore.com>
5292
5293 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5294 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5295 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5296
1982d5a8
PO
52972011-08-01 Pascal Obry <obry@adacore.com>
5298
5299 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5300 Target_Name to Get_Path call.
5301 (Parse_Single_Project): Likewise.
5302 (Post_Parse_Context_Clause): Likewise.
5303 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5304 Call Initialise_Project_Path with the proper Target_Name.
5305 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5306 search path.
5307 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5308 with the proper Target_Name.
5309 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5310 Part.Parse routine.
5311 (Parse_Project_And_Apply_Config): Likewise.
5312 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5313 This is fine as this part of the code is supporting only native
5314 compilation.
5315 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5316 is fine as this part of the code is supporting only native compilation.
5317
0d53d36b
AC
53182011-08-01 Yannick Moy <moy@adacore.com>
5319
5320 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5321 of homonym, unless the homonym is one of the cases allowed in SPARK
5322 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5323 package declaration occurring after a body.
5324
53252011-08-01 Robert Dewar <dewar@adacore.com>
5326
5327 * checks.adb, exp_ch4.adb: Minor reformatting.
5328
53292011-08-01 Javier Miranda <miranda@adacore.com>
5330
5331 * einfo.ads (Access_Disp_Table): Fix documentation.
5332 (Dispatch_Table_Wrappers): Fix documentation.
5333
53342011-08-01 Pascal Obry <obry@adacore.com>
5335
5336 * prj-env.adb, prj-env.ads: Minor reformatting.
5337
8ed68165
AC
53382011-08-01 Yannick Moy <moy@adacore.com>
5339
5340 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5341 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5342 procedures out of these packages.
5343 * errout.ads, errout.adb
5344 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5345 procedures in of this package
5346 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5347 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5348 on misplaced later vs initial declarations, like in Ada 83
5349 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5350 formal mode on attribute of private type whose full type declaration
5351 is not visible
5352 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5353 package declaration inside a package specification
5354 (Analyze_Full_Type_Declaration): issue error in formal mode on
5355 controlled type or discriminant type
5356 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5357 user-defined operator means that it should come from the source
5358 (New_Overloaded_Entity): issue error in formal mode on overloaded
5359 entity.
5360 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5361
53622011-08-01 Thomas Quinot <quinot@adacore.com>
5363
5364 * atree.adb: Minor reformatting.
5365 * checks.adb: Minor reformatting.
5366
4230bdb7
AC
53672011-08-01 Vincent Celier <celier@adacore.com>
5368
5369 * s-parame-vms-ia64.ads: Fix typo in comment
5370 Minor reformatting
5371 * s-parame-vms-restrict.ads: Removed, unused.
5372
53732011-08-01 Javier Miranda <miranda@adacore.com>
5374
5375 * exp_ch3.adb
5376 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5377 * sem_ch3.adb
5378 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5379 * sem_ch3.ads, sem_ch3.adb
5380 (Is_Constant_Bound): New extended version of the subprogram that was
5381 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5382 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5383 * sem_aux.ads (Constant_Value): Fix typo in comment.
5384 * checks.adb (Generate_Index_Checks): New implementation which, for
5385 array objects with constant bounds, generates the runtime check
5386 referencing the bounds of the array type. For other cases this routine
5387 provides its previous behavior obtaining such values from the array
5388 object.
5389 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5390 parent type.
5391 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5392 we cannot have semantic interpretations of the new node.
5393
2010d078
AC
53942011-08-01 Ed Schonberg <schonberg@adacore.com>
5395
5396 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5397 expressions.
5398
53992011-08-01 Arnaud Charlet <charlet@adacore.com>
5400
5401 * sem_ch8.adb: Minor code editing.
5402 * s-vxwext.adb: Remove trailing space.
5403 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5404 consistency with other files.
5405
54062011-08-01 Thomas Quinot <quinot@adacore.com>
5407
5408 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5409
54102011-08-01 Ed Schonberg <schonberg@adacore.com>
5411
5412 * par-ch10.adb: reject parameterized expressions as compilation unit.
5413 * sem_ch4.adb: handle properly conditional expression with overloaded
5414 then_clause and no else_clause.
5415
54162011-08-01 Tristan Gingold <gingold@adacore.com>
5417
5418 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5419 like done by System.Aux_DEC.
5420 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5421
daec8eeb
YM
54222011-08-01 Yannick Moy <moy@adacore.com>
5423
5424 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5425 missing label at end of declaration (subprogram or package)
5426 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5427 of positional and named parameter association
5428 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5429 Error_Msg_SP which adds a prefix to the error message giving the name
5430 of the formal language analyzed
5431 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5432 access result type in subprogram, unconstrained array as result type,.
5433 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5434 procedure
5435 * sem_ch8.adb: Code clean up.
5436
38171f43
AC
54372011-08-01 Javier Miranda <miranda@adacore.com>
5438
5439 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5440 * einfo.ads (Access_Disp_Table): Fix documentation.
5441 (Dispatch_Table_Wrappers): Fix documentation.
5442 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5443 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5444 to enforce the documentation of this attribute.
5445 (Set_Is_Interface): Cleanup the assertion.
5446 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5447 the Underlying_Type entity before reading attribute Access_Disp_Table.
5448 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5449 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5450 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5451 the Underlying_Type entity before reading attribute Access_Disp_Table.
5452 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5453 Locate the Underlying_Type entity before reading attribute
5454 Access_Disp_Table.
5455
54562011-08-01 Ed Schonberg <schonberg@adacore.com>
5457
5458 * s-poosiz.ads: Additional overriding indicators.
5459
54602011-08-01 Yannick Moy <moy@adacore.com>
5461
5462 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5463 formal mode.
5464 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5465 parameter specification does not include a subtype mark.
5466 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5467 formal mode on abstract subprogram.
5468 (Analyze_Subprogram_Specification): issue error in formal mode on
5469 user-defined operator.
5470 (Process_Formals): issue error in formal mode on access parameter and
5471 default expression.
5472 * sem_ch9.adb (Analyze_Abort_Statement,
5473 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5474 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5475 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5476 Analyze_Requeue, Analyze_Selective_Accept,
5477 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5478 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5479 issue error in formal mode on user-defined raise statement.
5480
1f250383
AC
54812011-08-01 Thomas Quinot <quinot@adacore.com>
5482
5483 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5484 declaration being hidden when overriding an implicit inherited
5485 subprogram.
5486 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5487 (-gnats), do not complain about a source file that contains only a
5488 pragma No_Body.
5489
54902011-08-01 Ed Schonberg <schonberg@adacore.com>
5491
5492 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5493 variable if already set.
5494
607d0635
AC
54952011-08-01 Arnaud Charlet <charlet@adacore.com>
5496
5497 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5498 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5499 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5500 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5501 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5502 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5503 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5504 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5505 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5506 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5507 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5508 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5509 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5510 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5511 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5512 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5513 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5514 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5515 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5516 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5517 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5518 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5519 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5520 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5521 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5522 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5523 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5524 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5525 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5526 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5527 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5528 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5529 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5530 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5531 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5532 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5533 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5534 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5535 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5536 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5537 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5538 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5539 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5540 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5541 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5542 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5543 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5544 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5545 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5546 Use GNAT instead of GNARL.
5547
55482011-08-01 Bob Duff <duff@adacore.com>
5549
5550 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5551 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5552 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5553 reformatting.
5554
55552011-08-01 Yannick Moy <moy@adacore.com>
5556
5557 * debug.adb (d.D) reverve flag for the SPARK mode
5558 (d.E) reverve flag for SPARK generation mode
5559 (d.F) reverve flag for Why generation mode
5560 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5561 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5562 functions which return True when the corresponding modes are set
5563 (Formal_Language): return "spark" or "alfa" when in formal verification
5564 mode.
5565 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5566 Error_Msg to prefix the error message with a tag giving the formal
5567 language
5568 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5569 message with a tag giving the formal language
5570 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5571 block statement
5572 (Analyze_Case_Statement): issue error in formal mode on case statement
5573 with a single "others" case alternative
5574 (Analyze_Exit_Statement): issue errors in formal mode on exit
5575 statements which do not respect SPARK restrictions
5576 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5577 (Check_Unreachable_Code): always issue an error (not a warning) in
5578 formal mode on unreachable code (concerns both code after an infinite
5579 loop and after an unconditional jump, both not allowed in SPARK)
5580 * sem_ch6.adb (Analyze_Return_Statement): add call to
5581 Set_Return_Present for a procedure containing a return statement
5582 (already done for functions in Analyze_Function_Return)
5583 (Analyze_Function_Return): issue error in formal mode on extended
5584 return or if return is not last statement in function
5585 (Check_Missing_Return): issue error in formal mode if function does
5586 not end with return or if procedure contains a return
5587 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5588 function to detect if there is an inner scope of its parameter S which
5589 is a loop.
5590
55912011-08-01 Thomas Quinot <quinot@adacore.com>
5592
5593 * sem_ch6.ads: Minor reformatting.
5594
d8b3ccb9
AC
55952011-08-01 Javier Miranda <miranda@adacore.com>
5596
5597 * sem_util.adb (Abstract_Interface_List): Complete condition when
5598 processing private type declarations to avoid reading unavailable
5599 attribute.
5600 (Is_Synchronized_Tagged_Type): Complete condition when processing
5601 private extension declaration nodes to avoid reading unavailable
5602 attribute.
5603
56042011-08-01 Thomas Quinot <quinot@adacore.com>
5605
5606 * sem_ch3.adb: Minor reformatting.
5607
56082011-08-01 Thomas Quinot <quinot@adacore.com>
5609
5610 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5611 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5612 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5613 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5614 for VMS, instead parametrize the common implementation with
5615 System.Parameters declarations.
5616
0bb9276c
AC
56172011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5618
5619 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5620
56212011-08-01 Tristan Gingold <gingold@adacore.com>
5622
5623 * seh_init.c: Fix SEH handler installation on win64.
5624
56252011-08-01 Ed Schonberg <schonberg@adacore.com>
5626
5627 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5628 double analysis of an anonymous access to subprogram, because it can
5629 lead to improper sharing of profiles and a back-end crash.
5630
6a2e4f0b
AC
56312011-08-01 Robert Dewar <dewar@adacore.com>
5632
5633 * make.adb, sem_ch4.adb: Minor reformatting.
5634 * gcc-interface/Make-lang.in: Update dependencies.
5635 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5636
56372011-08-01 Arnaud Charlet <charlet@adacore.com>
5638
5639 * gnat_rm.texi: Fix definition of Long_Integer.
5640
56412011-08-01 Ed Schonberg <schonberg@adacore.com>
5642
5643 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5644 to prevent storage exhaustion.
5645 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5646 finalized is a function body, insert the cleanup code before the final
5647 return statement, to prevent spurious warnings.
5648 * s-pooglo.ads: add overriding indicator.
5649
4561baf7
ES
56502011-08-01 Ed Schonberg <schonberg@adacore.com>
5651
5652 * sem_ch4.adb (Operator_Check): improve error message when both a
5653 with_clause and a use_clause are needed to make operator usage legal.
5654 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5655 determine whether a compilation unit is visible within an other,
5656 either through a with_clause in the current unit, or a with_clause in
5657 its library unit or one one of its parents.
5658
383e179e
AC
56592011-08-01 Ed Schonberg <schonberg@adacore.com>
5660
5661 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5662 over an arbitrary expression of an array or container type.
5663 * lib-xref.adb: clarify comment.
5664
56652011-08-01 Bob Duff <duff@adacore.com>
5666
5667 * einfo.ads: Minor reformatting.
5668 * debug.adb: Minor comment improvement.
5669
56702011-08-01 Javier Miranda <miranda@adacore.com>
5671
5672 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5673 consider hidden subprograms as valid candidates.
5674
56752011-08-01 Arnaud Charlet <charlet@adacore.com>
5676
5677 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5678
56792011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5680
5681 * gnat_ugn.texi: Fix typo.
5682
61c161b2
AC
56832011-08-01 Robert Dewar <dewar@adacore.com>
5684
5685 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5686 lib-xref.adb: Minor reformatting
5687
56882011-08-01 Gary Dismukes <dismukes@adacore.com>
5689
5690 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5691 when to generate a call to Move_Final_List.
5692 (Has_Controlled_Parts): Remove this function.
5693
84df40f7
AC
56942011-08-01 Geert Bosch <bosch@adacore.com>
5695
5696 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5697 "," in choice list.
5698
56992011-08-01 Thomas Quinot <quinot@adacore.com>
5700
5701 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5702 explicit raise of a predefined exception as Comes_From_Source if the
5703 original N_Raise_Statement comes from source.
5704
57052011-08-01 Robert Dewar <dewar@adacore.com>
5706
5707 * sinfo.ads: Add comment.
5708 * sem_ch6.adb: Minor reformatting.
5709
57102011-08-01 Robert Dewar <dewar@adacore.com>
5711
5712 * freeze.adb (Freeze_Entity): Refine check for bad component size
5713 clause to avoid rejecting confirming clause when atomic/aliased present.
5714
57152011-08-01 Ed Schonberg <schonberg@adacore.com>
5716
5717 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5718 better determine whether an entity reference is a write.
5719 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5720 subcomponent.
5721 * lib-xref.adb (Output_References): Do no suppress a read reference at
5722 the same location as an immediately preceeding modify-reference, to
5723 handle properly in-out actuals.
5724
57252011-08-01 Tristan Gingold <gingold@adacore.com>
5726
5727 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5728
57292011-08-01 Quentin Ochem <ochem@adacore.com>
5730
5731 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5732 heap to compute the result.
5733
c7f0d2c0
AC
57342011-08-01 Robert Dewar <dewar@adacore.com>
5735
5736 * atree.ads: Minor reformatting.
5737
57382011-08-01 Emmanuel Briot <briot@adacore.com>
5739
5740 * g-expect.adb (Get_Command_Output): Fix memory leak.
5741
57422011-08-01 Geert Bosch <bosch@adacore.com>
5743
5744 * cstand.adb (P_Float_Type): New procedure to print the definition of
5745 predefined fpt types.
5746 (P_Mixed_Name): New procedure to print a name using mixed case
5747 (Print_Standard): Use P_Float_Type for printing floating point types
5748 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5749 precision IEEE float.
5750
57512011-08-01 Thomas Quinot <quinot@adacore.com>
5752
5753 * sem_ch3.adb: Minor reformatting.
5754
57552011-08-01 Ed Schonberg <schonberg@adacore.com>
5756
5757 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5758 the completion of a generic function, insert the new body rather than
5759 rewriting the original.
5760
57612011-08-01 Yannick Moy <moy@adacore.com>
5762
5763 * sinfo.ads, errout.ads: Typos in comments.
5764
1c54829e
AC
57652011-08-01 Robert Dewar <dewar@adacore.com>
5766
5767 * par-endh.adb: Minor reformatting.
5768
57692011-08-01 Robert Dewar <dewar@adacore.com>
5770
5771 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5772 (Pre_Post_Aspects): New subtype.
5773 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5774 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5775 * par-ch7.adb (P_Package): Remove Decl parameter
5776 (P_Package): Handle new syntax for aspects (before IS)
5777 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5778 new aspect syntax
5779 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5780 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5781 (P_Package): Remove Decl parameter
5782 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5783 aspects
5784 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5785 specs
5786 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5787 * sinfo.ads: Document new syntax for aspects in packages etc.
5788 * sprint.adb: Handle new syntax of aspects before IS in package
5789
57902011-08-01 Thomas Quinot <quinot@adacore.com>
5791
5792 * atree.ads: Minor reformatting.
5793 * sem_prag.adb: Minor reformatting.
5794
57952011-08-01 Robert Dewar <dewar@adacore.com>
5796
5797 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
5798 case expr alternative.
5799
58002011-08-01 Ed Schonberg <schonberg@adacore.com>
5801
5802 * sem_ch12.adb: Fix typo.
5803
9eea4346
GB
58042011-08-01 Geert Bosch <bosch@adacore.com>
5805
5806 * sem_prag.adb (Check_No_Link_Name): New procedure.
5807 (Process_Import_Or_Interface): Use Check_No_Link_Name.
5808 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
5809 instead of Standard_Long_Long_Float_Size global. Preparation for
5810 eventual removal of per type constants.
5811 * exp_util.ads (Get_Stream_Size): New function returning the stream
5812 size value of subtype E.
5813 * exp_util.adb (Get_Stream_Size): Implement new function.
5814 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
5815 function.
5816 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
5817 * einfo.adb:
5818 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
5819
3d6c3bd7
GB
58202011-08-01 Geert Bosch <bosch@adacore.com>
5821
5822 * cstand.adb: Fix comments.
5823 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
5824 count of arguments.
5825
e7d897b8
AC
58262011-08-01 Robert Dewar <dewar@adacore.com>
5827
5828 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
5829
58302011-08-01 Geert Bosch <bosch@adacore.com>
5831
5832 * atree.ads: Fix comment.
5833
c228a069
AC
58342011-08-01 Robert Dewar <dewar@adacore.com>
5835
5836 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
5837 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
5838 * par.adb: Add with for Namet.Sp.
5839 * par-tchk.adb: Minor reformatting.
5840
58412011-08-01 Vincent Celier <celier@adacore.com>
5842
5843 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
5844 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
5845 of the init procedure of a SAL.
5846 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
5847 New procedure.
5848
58492011-08-01 Thomas Quinot <quinot@adacore.com>
5850
5851 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
5852 reformatting.
5853
58542011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5855
5856 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
5857
58582011-08-01 Thomas Quinot <quinot@adacore.com>
5859
5860 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
5861 conformant with its spec (return True only for types that have
5862 an overriding Initialize primitive operation that prevents them from
5863 having preelaborable initialization).
5864 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
5865 initialization for controlled types in Ada 2005 or later mode.
5866
857ade1b
RD
58672011-08-01 Robert Dewar <dewar@adacore.com>
5868
5869 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
5870 Postcondition.
5871 (Same_Aspect): New function.
5872 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
5873 Type_Invariant, Precondition, Postcondition.
5874 * snames.ads-tmpl: Add Name_Type_Invariant.
5875
bd949ee2
RD
58762011-08-01 Robert Dewar <dewar@adacore.com>
5877
5878 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
5879 here.
5880 (Freeze_All_Ent): Fix error in handling inherited aspects.
5881 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
5882 already analyzed, but don't skip entire processing of a declaration,
5883 that's wrong in some cases of declarations being rewritten.
5884 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
5885 Don't delay for integer, string literals
5886 Treat predicates in usual manner for delay, remove special case code,
5887 not needed.
5888 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
5889 (Build_Predicate_Function): Update saved expression in aspect
5890 (Build_Invariant_Procedure): Update saved expression in aspect
5891 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
5892 of replacement of discriminant references if the reference is simple.
5893
f1c952af
RD
58942011-08-01 Robert Dewar <dewar@adacore.com>
5895
5896 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
5897 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
5898 Static_Predicate and Dynamic_Predicate.
5899 (Build_Predicate_Function): Add processing for Static_Predicate
5900 and Dynamic_Predicate.
5901 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
5902 (From_Static_Predicate): New flag
5903 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
5904
59052011-08-01 Robert Dewar <dewar@adacore.com>
5906
5907 * usage.adb: Documentation cleanup for Ada version modes in usage.
5908 * expander.adb: Minor reformatting.
5909
47e11d08
AC
59102011-08-01 Robert Dewar <dewar@adacore.com>
5911
5912 * atree.ads: Minor comment fix.
5913 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
5914 a-witeio.ads, sem_prag.adb: Minor reformatting.
5915
59162011-08-01 Doug Rupp <rupp@adacore.com>
5917
5918 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
5919 pointers. Use descrip.h header file for convenience. Add some
5920 comments.
5921
59222011-08-01 Robert Dewar <dewar@adacore.com>
5923
5924 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
5925 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
5926 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
5927 New procedure.
5928 (Check_Aspect_At_End_Of_Declarations): New procedure
5929 (Analye_Aspect_Specification): Minor changes for above procedures
5930 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
5931 specification node as well.
5932
59332011-08-01 Pascal Obry <obry@adacore.com>
5934
5935 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
5936 Windows files. Use GetFilesAttributes() in this case to check for file
5937 existence instead of returning with an error code.
5938
a3a16b21
VC
59392011-08-01 Vincent Celier <celier@adacore.com>
5940
5941 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
5942 High is above Source length.
5943
ff58cc69
RD
59442011-08-01 Robert Dewar <dewar@adacore.com>
5945
5946 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
5947
6bb88533
AC
59482011-08-01 Robert Dewar <dewar@adacore.com>
5949
5950 * aspects.ads (Boolean_Aspects): New subtype.
5951 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
5952 for derived types in cases where the parent type and derived type have
5953 aspects.
5954 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
5955 with aspects when parent type also has aspects.
5956 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
5957 boolean expression at this point).
5958 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
5959 accordance with final decision on the Ada 2012 feature.
5960 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
5961
59622011-08-01 Matthew Heaney <heaney@adacore.com>
5963
5964 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
5965
060a3f28
AC
59662011-08-01 Pascal Obry <obry@adacore.com>
5967
5968 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
5969 Fix Replace_Slice when High is above current string size.
5970 (Replace_Slice): Fix DL computation when High is above current
5971 string length.
5972
59732011-08-01 Gary Dismukes <dismukes@adacore.com>
5974
5975 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
5976
e7f567a3
AC
59772011-08-01 Matthew Heaney <heaney@adacore.com>
5978
5979 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
5980 of node.
5981
59822011-08-01 Pascal Obry <obry@adacore.com>
5983
5984 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
5985 reformatting.
5986
1a265e78
AC
59872011-08-01 Ed Schonberg <schonberg@adacore.com>
5988
5989 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
5990 access to protected subprograms in generic bodies.
5991 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
5992 protected type, indicate that the convention of the subprogram is
5993 Convention_Protected, because it may be used in subsequent declarations
5994 within the protected declaration.
5995
59962011-08-01 Vincent Celier <celier@adacore.com>
5997
5998 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
5999 and "final" procedures when the name of the library is "ada", to avoid
6000 duplicate symbols "adainit" and "adafinal" in executables.
6001
67e28ef8
ES
60022011-08-01 Ed Schonberg <schonberg@adacore.com>
6003
6004 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6005 quantified expression that appears within a postcondition and uses the
6006 Ada2012 'Result attribute.
6007
6da2ca7d
RO
60082011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6009
6010 * init.c (__gnat_error_handler): Cast reason to int.
6011 (__gnat_install_handler): Explain sa_sigaction use.
6012
7d5997c6
EB
60132011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6014
6015 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6016 subprogram has copy-in copy-out parameters, try to promote the mode of
6017 the return type if it is passed in registers.
6018
4b4cfdd5
EB
60192011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6020
6021 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6022 left operand as addressable.
6023
f3d34576
EB
60242011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6025
6026 * gcc-interface/gigi.h (build_function_stub): Remove.
6027 (build_return_expr): Likewise.
6028 (convert_vms_descriptor): Declare.
6029 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6030 (build_function_stub): Move to...
6031 * gcc-interface/utils2.c (build_return_expr): Move to...
6032 * gcc-interface/trans.c (build_function_stub): ...here.
6033 (build_return_expr): ...here.
6034 (Subprogram_Body_to_gnu): Add local variable for language_function.
6035 Disconnect the parameter attributes cache, if any, once done with it.
6036 Call end_subprog_body only after setting the end_locus.
6037 Build the stub associated with the function, if any, at the very end.
6038 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6039 variables and streamline control flow.
6040
0a6ecc08
AC
60412011-07-23 Arnaud Charlet <charlet@adacore.com>
6042
6043 PR ada/49819
6044 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6045 g-trasym-dwarf.adb.
6046
5b6d595b
RO
60472011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6048
6049 PR bootstrap/49794
6050 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6051 Assign to act.sa_sigaction.
6052 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6053 current->return_address to char * before arithmetic.
6054
94017021
RO
60552011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6056
6057 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6058 Correct argument types.
6059 Extract code from reason.
6060 (__gnat_install_handler): Assign to act.sa_sigaction.
6061
52fd02bb
EB
60622011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6063
6064 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6065 (GNAT1_OBJS): ...here.
6066
f39a9ca2
EB
60672011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6068
6069 PR ada/48711
6070 * g-socthi-mingw.adb (Fill): Fix formatting.
6071
9e36aa23
EB
6072 * gcc-interface/gigi.h: Move around comment.
6073
e3aca522
JDA
60742011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6075
6076 PR ada/46350
6077 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6078
696b1960
FW
60792011-07-14 Florian Weimer <fw@deneb.enyo.de>
6080
6081 PR ada/48711
6082 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6083
f542c405
EB
60842011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6085
6086 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6087 range comparison if Pmode is SImode.
6088
9e9bd455
LG
60892011-07-12 Laurent GUERBY <laurent@guerby.net>
6090 Eric Botcazou <ebotcazou@adacore.com>
6091
6092 * adadecode.c: Wrap up in extern "C" block.
6093 * adadecode.h: Likewise.
6094 * adaint.c: Likewise. Remove 'const' keyword.
6095 * adaint.h: Likewise.
6096 * argv.c: Likewise.
6097 * atree.h: Likewise.
6098 * cio.c: Likewise.
6099 * cstreams.c: Likewise.
6100 * env.c: Likewise.
6101 * exit.c: Likewise.
6102 * fe.h: Likewise.
6103 * final.c: Likewise.
6104 * init.c: Likewise.
6105 * initialize.c: Likewise.
6106 * link.c: Likewise.
6107 * namet.h: Likewise.
6108 * nlists.h: Likewise.
6109 * raise.c: Likewise.
6110 * raise.h: Likewise.
6111 * repinfo.h: Likewise.
6112 * seh_init.c: Likewise.
6113 * targext.c: Likewise.
6114 * tracebak.c: Likewise.
6115 * uintp.h: Likewise.
6116 * urealp.h: Likewise.
6117 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6118 * xsinfo.adb: Likewise.
6119 * xsnamest.adb: Likewise.
6120 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6121 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6122 * gcc-interface/misc.c: Likewise.
6123 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6124 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6125 ada/targext.o here...
6126 (GNAT_ADA_OBJS): ...and not here.
6127 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6128 (GNATBIND_OBJS): Reorder.
6129
7644b3c7
RH
61302011-07-07 Richard Henderson <rth@redhat.com>
6131
6132 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6133 dwarf2out_frame_init.
6134
8384ac41
EB
61352011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6136
6137 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6138
fbdd5d87
RO
61392011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6140
6141 PR target/39150
6142 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6143
1a072294
RG
61442011-07-06 Richard Guenther <rguenther@suse.de>
6145
8384ac41
EB
6146 * gcc-interface/misc.c (gnat_init): Merge calls to
6147 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
6148 Re-initialize boolean_false_node.
6149
bc712852
EB
61502011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6151 Olivier Hainque <hainque@adacore.com>
6152 Nicolas Setton <setton@adacore.com>
6153
6154 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6155 the type according to the ARTIFICIAL_P parameter.
6156 (create_type_decl): Likewise.
6157 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6158
2eb22389
EB
61592011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6160
6161 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6162 (gnatbind): Likewise.
6163
4bdaaf2f
RO
61642011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6165
6166 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6167
c020c92b
EB
61682011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6169
6170 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6171 local variable throughout. Remove useless call to Base_Type.
6172 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6173 Take it also into account for the volatileness of the field. Set the
6174 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6175
96769d32
EB
61762011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6177
6178 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6179 on a dereference built for a by-ref object if it has an address clause.
6180
7e4680c1
EB
61812011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6182
6183 * einfo.ads (Address_Taken): Document use for the second argument of
6184 Asm_Input and Asm_Output attributes.
6185 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6186 argument is an entity name, then set Address_Taken on it.
6187 <Attribute_Asm_Output>: Likewise.
6188 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6189 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6190 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6191 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6192
61932011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
6194
6195 PR middle-end/46500
6196 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6197
677f3fa8
JM
61982011-06-14 Joseph Myers <joseph@codesourcery.com>
6199
6200 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6201 (ada/utils.o): Update dependencies.
6202 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6203 ../../../libcpp/libcpp.a.
6204 * gcc-interface/utils.c: Include common/common-target.h.
6205 (process_attributes): Use targetm_common.have_named_sections.
6206
009db074
RG
62072011-06-07 Richard Guenther <rguenther@suse.de>
6208
0bad0e23
EB
6209 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6210 set_sizetype.
009db074 6211
3bfc61cf
EB
62122011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6213
0bad0e23 6214 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
6215 TREE_THIS_NOTRAP flag.
6216
5c4a1c7b
EB
62172011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6218
6219 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6220 Fix thinko.
6221
e9f57686
EB
62222011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6223
6224 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6225 constants whose full view has discriminants specially.
6226
10e4d056
EB
62272011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6228
6229 * gcc-interface/utils.c: Include diagnostic.h.
6230 (gnat_write_global_declarations): Output debug information for all
6231 global type declarations before finalizing the compilation unit.
6232 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6233
0957c029
JJ
62342011-05-25 Jakub Jelinek <jakub@redhat.com>
6235
6236 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6237
52d0a7ac
KT
62382011-05-25 Kai Tietz <ktietz@redhat.com>
6239
6240 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6241 initialization instead of const/none-const pointer assignment.
6242
1ed1641d
JM
62432011-05-24 Joseph Myers <joseph@codesourcery.com>
6244
6245 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6246 $(EXTRA_GNAT1_OBJS).
6247 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6248 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6249 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6250 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6251 libcommon-target.a instead of prefix.o.
6252
9fe72ebd
JM
62532011-05-21 Joseph Myers <joseph@codesourcery.com>
6254
6255 PR ada/49097
0bad0e23 6256 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 6257
2691e6d7
JM
62582011-05-20 Joseph Myers <joseph@codesourcery.com>
6259
0bad0e23
EB
6260 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6261 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6262 instead of version.o.
2691e6d7 6263
bf6490b5
KT
62642011-05-18 Kai Tietz <ktietz@redhat.com>
6265
6266 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6267 boolean_false_node instead of integer_zero_node.
6268 (convert_with_check): Likewise.
6269 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6270
7bf9a5ac
EB
62712011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6272
6273 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6274 type of the parameter is an unconstrained array, convert the actual to
6275 the type of the formal in the In Out and Out cases as well.
6276
e5b00edf
NF
62772011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6278
6279 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6280 call build_function_type_array or build_varargs_function_type_array
6281 instead.
6282 (create_subprog_type): Don't call build_function_type; call
6283 build_function_type_vec instead.
6284
51545682
NF
62852011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6286
6287 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6288 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6289 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6290
c99c0026
EB
62912011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6292
f620bd21
EB
6293 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6294
c99c0026
EB
6295 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6296 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6297
3d528853
NF
62982011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6299
c99c0026 6300 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 6301
d7d058c5
NF
63022011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6303
6304 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6305 instead of accessing TYPE_ARG_TYPES directly.
6306 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6307
805e60a0
EB
63082011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6309
6310 PR ada/48844
6311 * gcc-interface/gigi.h (get_variant_part): Declare.
6312 * gcc-interface/decl.c (get_variant_part): Make global.
6313 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6314 types have the same constant size, are record types and T1 has a
6315 variant part while T2 doesn't.
6316
907a08d9
EB
63172011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6318
6319 * gcc-interface/utils.c (begin_subprog_body): Do not call
6320 get_pending_sizes.
6321 (end_subprog_body): Likewise.
6322
d35936ab
RG
63232011-05-04 Richard Guenther <rguenther@suse.de>
6324
6325 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6326 int_const_binop.
6327 (pos_to_constructor): Likewise.
6328
c1fd8753
NF
63292011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6330 Eric Botcazou <ebotcazou@adacore.com>
6331
6332 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6333 of build_function_type. Adjust calls to...
6334 (build_raise_check): ...this. Do not take a void_tree parameter.
6335 Call build_function_type_list instead of build_function_type.
6336 Fix head comment and swap couple of conditional blocks.
6337
4fb87d2b
EB
63382011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6339
6340 * gnatvsn.ads (Library_Version): Bump to 4.7.
6341 (Current_Year): Bump to 2011.
6342
fa5e5a76
MM
63432011-04-29 Michael Matz <matz@suse.de>
6344
6345 * gcc-interface/misc.c (gnat_handle_option): Set
6346 warn_maybe_uninitialized.
6347
8d6a2f69
GP
63482011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6349
6350 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6351 the Watson/McCabe paper.
6352
770937fd
JM
63532011-04-23 Jim Meyering <meyering@redhat.com>
6354
6355 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6356
eb601ae1
EB
63572011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6358
6359 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6360 onto the new type.
6361
7d7fcb08
EB
63622011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6363
6364 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6365 parameter.
6366 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6367 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6368 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6369 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6370 <all>: Do not set flags on the reused DECL node coming from an alias.
6371 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6372 don't need debug info here...
6373 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6374 (gigi): Adjust calls to create_subprog_decl.
6375 (build_raise_check): Likewise.
6376 (establish_gnat_vms_condition_handler): Likewise.
6377 (Compilation_Unit_to_gnu): Likewise.
6378 (gnat_to_gnu): Likewise.
6379
e1876cac
EB
63802011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6381
6382 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6383 (NO_REORDER_ADAFLAGS): New variable.
6384 (EXTRA_GNATTOOLS): Always define.
6385 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6386 Clean up and adjust list of files compiled with special options.
6387 * gcc-interface/Make-lang.in: Likewise.
6388 (ada/decl.o): Cosmetical change.
6389 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6390
04695783
JM
63912011-04-20 Jim Meyering <meyering@redhat.com>
6392
6393 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6394
23399579
EB
63952011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6396
6397 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6398 $(CFLAGS) on the link line.
6399
51c5169c
EB
64002011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6401
6402 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6403 padded type built for the return type if it is unconstrained.
6404
61e46a7d
NF
64052011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6406
6407 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6408
81f653d6
NF
64092011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6410
b4867846
EB
6411 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6412 before calling TREE_CHAIN.
81f653d6
NF
6413 * gcc-interface/misc.c (gnat_init_ts): New function.
6414 (LANG_HOOKS_INIT_TS): Define.
6415
a358e188
MJ
64162011-04-12 Martin Jambor <mjambor@suse.cz>
6417
b4867846
EB
6418 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6419 instead of cgraph_node.
a358e188 6420
29b1c5a4
EB
64212011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6422
6423 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6424 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6425 mechanism.
6426
88872b00
EB
64272011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6428
6429 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6430 of aggregate types that contain a placeholder.
6431
dcf0c47e
NF
64322011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6433
6434 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 6435 TYPE_ARG_TYPES.
dcf0c47e
NF
6436 (handle_type_generic_attribute): Likewise.
6437
53e3000c
EB
64382011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6439
6440 PR ada/47163
6441 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6442
ab380bb4
KT
64432011-04-04 Kai Tietz <ktietz@redhat.com>
6444
6445 PR ada/47163
0bad0e23
EB
6446 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6447 to flag value.
ab380bb4 6448
8ffac116
EB
64492011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6450
6451 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6452 type case, do not strip a padding type around the array type.
6453
de9528f0
EB
64542011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6455
6456 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6457 types.
6458
d9d7a26c
EB
64592011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6460
6461 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6462 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 6463 code for -feliminate-unused-debug-types.
d9d7a26c
EB
6464 (gnat_post_options): Likewise.
6465
4cb12a90
EB
64662011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6467
6468 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6469 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6470 distinct copy.
6471
acccc61c
EB
64722011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6473
6474 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6475 DECL_ARTIFICIAL flag on enumeration types.
6476
583eb0c9
EB
64772011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6478
6479 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6480 fat pointer types artificial unconditionally.
6481 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6482 isn't artificial.
6483
e3edbd56
EB
64842011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6485
6486 * gcc-interface/gigi.h (get_dummy_type): Declare.
6487 (build_dummy_unc_pointer_types): Likewise.
6488 (finish_fat_pointer_type): Likewise.
6489 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6490 fat pointer type has been built, complete it in place.
6491 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6492 and thin pointers. Remove useless variable.
6493 (finish_fat_pointer_type): Make global and move to...
6494 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6495 (get_dummy_type): New function.
6496 (build_dummy_unc_pointer_types): Likewise.
6497 (gnat_pushdecl): Propage the name to the anonymous variants only.
6498 (update_pointer_to): Only adjust the pointer types in the unconstrained
6499 array case.
6500
65444786
EB
65012011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6502
6503 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6504 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6505 if this is a Taft amendment type and the full declaration is available.
6506 * gcc-interface/trans.c (process_type): Likewise.
6507 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6508 (process_freeze_entity): Likewise.
6509 * gcc-interface/utils.c (dummy_global): New static variable.
6510 (gnat_write_global_declarations): If there are types declared as used
6511 at the global level, insert them in the global hash table.
6512
1aeb40dd
EB
65132011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6514
6515 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6516 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6517 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6518 copy.
6519 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6520 flag of the type accordingly.
6521 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6522
80ec8b4c
EB
65232011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6524
6525 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6526 finalizing types when updating the pointers to the designated type.
6527 <all>: Finalize the deferred types even if we didn't defer processing
6528 of incomplete types in this invocation.
6529
2a9d769a
OH
65302011-04-01 Olivier Hainque <hainque@adacore.com>
6531 Nicolas Setton <setton@adacore.com>
6532 Eric Botcazou <ebotcazou@adacore.com>
6533
6534 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6535 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6536
2438d7a6
KT
65372011-03-28 Kai Tietz <ktietz@redhat.com>
6538
333d8aff 6539 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
6540 Windows targets.
6541 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6542 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 6543
80ec8b4c 6544 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 6545
8ad150f6
TG
65462011-03-28 Tristan Gingold <gingold@adacore.com>
6547
6548 PR ada/44431
80ec8b4c
EB
6549 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6550 Use ada output of gnatbind.
8ad150f6
TG
6551 (ada/b_gnatb.adb): Ditto.
6552 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6553 (ada.mostlyclean, ada.stage1)
6554 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6555 (ada.stagefeedback): Adjust.
80ec8b4c 6556 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
6557 Use ada output of gnatbind.
6558 (b_gnatm.adb): Ditto.
6559 (b_gnatl.o, b_gnatm.o): New rules.
6560
51c7954d
EB
65612011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6562
6563 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6564 for the padded type built to support a specified size or alignment.
6565
6ddf9843
EB
65662011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6567
6568 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6569 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6570 unconditionally to the end of the unit when the designated type is
6571 limited_with'ed.
6572 <all>: Rename local variable. Attempt to un-defer types only and do it
6573 for limited_with'ed types as well.
6574 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6575 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6576 consistently and remove redundant call to finalize_from_with_types.
6577
5daed84a
EB
65782011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6579
6580 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6581 subprograms without a previous spec declared in the same unit.
6582 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6583 subprograms at the end of the unit instead of at the beginning.
6584 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6585 isn't public for the special handling of non-inline functions nested
6586 inside inline external functions.
6587
0edf1bb2
JL
65882011-03-25 Jeff Law <law@redhat.com>
6589
5daed84a 6590 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 6591
e3c4580e
EB
65922011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6593
6594 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6595 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6596 to compute Set_Size_Depends_On_Discriminant.
6597 (Layout_Type): Call it on array types in back-end layout mode.
6598 * sem_util.adb (Requires_Transient_Scope): Return true for array
6599 types only if the size depends on the value of discriminants.
6600 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6601 type if the RHS is a call to a function that returns an unconstrained
6602 type with default discriminant.
6603
abbc8c7b
EB
66042011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6605
6606 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6607 non-conversion to the nominal result type at the end.
6608
ddb5a105
EB
66092011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6610
6611 * gcc-interface/trans.c (create_temporary): New function taken from...
6612 (create_init_temporary): ...here. Call it.
6613 (call_to_gnu): Create the temporary for the return value early, if any.
6614 Create it for a function with copy-in/copy-out parameters if there is
6615 no target; in other cases of copy-in/copy-out, use another temporary.
6616 Push the new binding level lazily. Add and rename local variables.
6617
0d853156
EB
66182011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6619
6620 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6621 error message.
6622 (set_rm_size): Likewise.
6623
4184ef1b
EB
66242011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6625
6626 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6627 for the padded type built in order to support a specified alignment.
6628 Fix incorrect formatting.
6629
bf7eefab
EB
66302011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6631
6632 PR bootstrap/48216
6633 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6634
ef0feeb2
EB
66352011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6636
6637 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6638 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6639 to the end of the list. Adjust recursive call. Rename local variable.
6640 If REORDER is true, reorder components of the record type.
6641 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6642 components_to_record and adjust the parameter list.
6643
646f9414
EB
66442011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6645
6646 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6647 disabled, use the variable for bounds of loop iteration scheme.
6648
62d784f7
KT
66492011-03-21 Kai Tietz <ktietz@redhat.com>
6650
6651 PR target/12171
0bad0e23 6652 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 6653
f230d759
EB
66542011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6655
6656 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6657 out whether the expression is read-only. Short-circuit placeholder
6658 case and rename a couple of local variables.
6659
bb1f7929
EB
66602011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6661
6662 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6663 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6664 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6665 (convert): Deal with conversions from a smaller form type specially.
6666
400a2d24
EB
66672011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6668
6669 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6670 its argument, except for the special -I- switch.
6671
c26bc3ad
GP
66722011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6673
0bad0e23
EB
6674 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6675 "Ada Issues".
c26bc3ad 6676
07b8e910
EB
66772011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6678
6679 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6680
31a5a547
EB
66812011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6682
6683 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6684 GNAT_FORMAL.
6685 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6686 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6687 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6688 Do not generate the check directly, instead instantiate the template
6689 check present in the descriptor.
6690 (make_descriptor_field): Move around.
6691 (build_vms_descriptor32): Build a template check in the POINTER field.
6692 (build_vms_descriptor): Remove useless suffixes.
6693 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6694
dcf25f59
EB
66952011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6696
6697 PR bootstrap/47467
6698 * targext.c: Include target files if IN_RTS is defined.
6699
0418e131
RG
67002011-01-26 Richard Guenther <rguenther@suse.de>
6701
6702 PR bootstrap/47467
6703 * targext.c: Include config.h.
6704 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6705 dependency.
6706
c6eecbd8
PO
67072011-01-04 Pascal Obry <obry@adacore.com>
6708 Eric Botcazou <ebotcazou@adacore.com>
6709
6710 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6711
2d3c7e4f
EB
67122011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6713
6714 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6715 end-of-case on the end label and its associated gotos, if any.
6716
0394741f
EB
67172011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6718
6719 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6720 expressions of the parameter cache within the statement group of
6721 the CICO mechanism.
6722
2a02d090
OH
67232011-01-04 Olivier Hainque <hainque@adacore.com>
6724 Eric Botcazou <ebotcazou@adacore.com>
6725
6726 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6727 (set_end_locus_from_node): New function.
6728 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6729 make and the function end_locus.
6730 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6731 for the elaboration subprogram.
6732 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6733 set the end_locus of the expression as well.
6734
89f5e978
EB
67352011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6736
6737 PR ada/47131
6738 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6739 variables that are referenced in exception handlers volatile.
6740
6741
ad41bd84 6742\f
797103eb 6743Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
6744
6745Copying and distribution of this file, with or without modification,
6746are permitted in any medium without royalty provided the copyright
6747notice and this notice are preserved.