433fff461d8c01e9edff48c181625559ad56f9c2
[gcc.git] / gcc / ada / ChangeLog
1 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
2
3 * gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
4 * gcc-interface/decl.c (is_variable_size): Rename to...
5 (type_has_variable_size): ...this.
6 (adjust_packed): Adjust to above renaming.
7 (gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
8 (field_is_artificial): New predicate.
9 (field_is_aliased): Likewise.
10 (field_has_self_size): Likewise.
11 (field_has_variable_size): Likewise.
12 (components_to_record): Record information for the final layout during
13 the first pass on fields.
14 If there is an aliased field placed after a field whose length depends
15 on discriminants, put all the fields of the latter sort, last.
16
17 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
18
19 * gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
20 * gcc-interface/decl.c (get_minimal_subprog_decl): New function.
21 * gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
22 Access-like attribute in a dispatch table if the subprogram is public.
23
24 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
25
26 * gcc-interface/gigi.h (create_label_decl): Adjust.
27 * gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
28 and invoke gnat_pushdecl on it. Remove obsolete settings.
29 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
30 create_label_decl.
31 * gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise. Ignore the
32 label for debugging purposes.
33
34 2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
35
36 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
37 object with an unconstrained nominal subtype and if optimization isn't
38 enabled, create a special VAR_DECL for debugging purposes.
39
40 2012-01-23 Robert Dewar <dewar@adacore.com>
41
42 * sem_prag.ads, sem_prag.adb: Minor reformatting.
43
44 2012-01-23 Robert Dewar <dewar@adacore.com>
45
46 * sem_ch13.adb (Analyze_Aspect_Specifications): Check for
47 language defined aspect applied to renaming or formal type
48 declaration (not permitted)
49
50 2012-01-23 Matthew Heaney <heaney@adacore.com>
51
52 * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Vet): Replaced
53 comment with pragma Assert.
54
55 2012-01-23 Vincent Pucci <pucci@adacore.com>
56
57 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Call
58 to Make_Aspect_For_PPC_In_Gen_Sub_Decl added in ASIS mode.
59 * sem_prag.adb, sem_prag.ads (Make_Aspect_For_PPC_In_Gen_Sub_Decl): New
60 routine. In ASIS mode, convert any PPC pragmas into aspects in generic
61 subprogram declaration in order to enable the analysis of PPC boolean
62 expressions.
63
64 2012-01-23 Robert Dewar <dewar@adacore.com>
65
66 * sem_ch3.adb (Analyze_Object_Declaration): Properly
67 handle Current_Value for volatile variables (also propagate
68 Treat_As_Volatile from type to object).
69
70 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
71
72 * sem_ch12.adb (Install_Body): Detect the case
73 where the enclosing context is a package with a stub body that
74 has already been replaced by the actual body. In such cases,
75 the freeze node for the enclosing context must be inserted after
76 the real body.
77
78 2012-01-23 Ed Schonberg <schonberg@adacore.com>
79
80 * sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
81 subprogram before expanding the pragma into an if-statement with
82 a block, to ensure that when the subprogram is null its body is
83 properly generated before expansion.
84
85 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
86
87 * sem_ch12.adb (Analyze_Associations): Alphabetize local variables and
88 constants. Rename Actual_Types to Actuals_To_Freeze. Rename Next_Formal
89 to Saved_Formal.
90 Freeze all eligible subprograms which appear as actuals in
91 the instantiation.
92 (Has_Fully_Defined_Profile): New routine.
93 (Renames_Standard_Subprogram): New routine.
94 (Earlier): Add local variable N. Comment update. Do not use source
95 locations when trying to determine whether one node precedes another.
96
97 2012-01-23 Gary Dismukes <dismukes@adacore.com>
98
99 * exp_ch4.adb (Expand_Concatenate): In the case
100 where the result of a concatentation can be null, set the to
101 result have both the low and high bounds of the right operand (not
102 just the high bound, as was the case prior to this fix). Also,
103 fix the saved high bound setting (Last_Opnd_High_Bound) in the
104 empty string literal case (should have been low bound minus one,
105 rather than plus one).
106
107 2012-01-23 Thomas Quinot <quinot@adacore.com>
108
109 * scos.ads, put_scos.adb, get_scos.adb (Get_SCOs, Put_SCOs): Do not
110 omit statement SCOs for disabled pragmas.
111
112 2012-01-23 Matthew Heaney <heaney@adacore.com>
113
114 * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads,
115 a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads,
116 a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads,
117 a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read,
118 Cursor'Write): Declare in private part.
119 (Reference_Type'Read, Reference_Type'Write): Ditto.
120 (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto.
121
122 2012-01-23 Robert Dewar <dewar@adacore.com>
123
124 * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor
125 reformatting.
126
127 2012-01-23 Ed Schonberg <schonberg@adacore.com>
128
129 * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
130 Corresponding_Body on a defaulted null formal subprogram.
131 * sem_ch12.adb (Check_Formal_Package_Instance): No check needed
132 on a defaulted formal subprogram that is a null procedure.
133
134 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
135
136 * exp_ch9.adb: Update the comments involving pragma Implemented.
137 * sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
138 constant Subp_Alias and local variable Impl_Subp. Properly
139 handle aliases of synchronized wrappers. Code cleanup.
140 (Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
141 Name_Optional as part of the condition.
142 * sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
143 valid choices of implementation kind.
144 (Check_Arg_Is_One_Of): New routine.
145 * snames.ads-tmlp: Add Name_Optional.
146
147 2012-01-23 Ed Schonberg <schonberg@adacore.com>
148
149 * par-ch13.adb: Better error recovery in illegal aspect
150 specification.
151
152 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
153
154 * a-calend.adb: Add with clause for Interfaces.C. Add constant
155 Unix_Max.
156 (Day_Of_Week): Call the internal UTC_Time_Offset.
157 (Split): Call the internal UTC_Time_Offset.
158 (Time_Of): Call the internal UTC_Time_Offset.
159 (Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
160 (UTC_Time_Offset): New library-level routine.
161 * a-calend.ads (UTC_Time_Offset): Remove parameter
162 Is_Historic. Update related comment on usage.
163 * a-catizo.adb (UTC_Time_Offset): Removed.
164 (UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
165 * a-caltizo.ads (UTC_Time_Offset): Removed.
166 (UTC_Time_Offset (Time)): Add back the default expression of parameter
167 Date.
168
169 2012-01-23 Robert Dewar <dewar@adacore.com>
170
171 * sprint.ads, sprint.adb (Sprint_Node_List): Add New_Lines parameter
172 (pg,po,ps): Make sure each entry starts on new line.
173
174 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
175
176 * a-calend.ads, a-calend.adb: Define types int and int_Pointer. Update
177 the parameter profile of procedure localtime_tzoff and its associated
178 comment.
179 (Day_Of_Week): Do not treat the input date as historical
180 with respect to time zones.
181 (Split): Do not treat the input
182 date as historical with respect to time zones. (Time_Of): Do
183 not treat the input constituents as forming a historical date
184 with respect to time zones.
185 (UTC_Time_Offset): Add new formal
186 parameter Is_Historic. Add local variable Flag. Update the call
187 to localtime_tzoff.
188 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): New routine.
189 (UTC_Time_Offset (Time)): Update the call to
190 Time_Zone_Operations.UTC_Time_Offset.
191 * sysdep.c (__gnat_localtime_tzoff): Update parameter
192 profile. Split the processing of offsets on Windows into two - one
193 part of historic time stamps and the other for the current time.
194
195 2012-01-23 Robert Dewar <dewar@adacore.com>
196
197 * a-calend.adb: Minor reformatting.
198
199 2012-01-23 Ed Schonberg <schonberg@adacore.com>
200
201 * exp_ch9.adb, sem_ch9.adb: Handle array of access to synchronized
202 interface in requeue statement.
203
204 2012-01-23 Cyrille Comar <comar@adacore.com>
205
206 * projects.texi: Remove references to main units and replace
207 with references to main programs to be coherent with the
208 documentation.
209
210 2012-01-23 Robert Dewar <dewar@adacore.com>
211
212 * s-utf_32.adb: Minor reformatting.
213
214 2012-01-23 Vincent Celier <celier@adacore.com>
215
216 * snames.ads-tmpl: Minor comment addition Indicate that
217 Name_Library_Encapsulated_Options is only used in gprbuild.
218
219 2012-01-23 Robert Dewar <dewar@adacore.com>
220
221 * sem_ch10.adb (Analyze_Subunit): Properly save/restore cunit
222 restrictions.
223
224 2012-01-23 Ed Schonberg <schonberg@adacore.com>
225
226 * snames.ads-tmpl: Add Name_Synchronization.
227 * aspects.ads, aspects.adb: Add Aspect_Synchronization to
228 enumeration type and related maps.
229 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Aspect
230 Synchronization, build corresponding pragma Implemented.
231 * sem_util.adb (Implementation_Kind): Handle both explicit and
232 implicit pragma_argument association to retrieve the given
233 synchronization mode.
234
235 2012-01-23 Robert Dewar <dewar@adacore.com>
236
237 * sem_ch10.adb, errout.adb: Minor reformatting.
238
239 2012-01-23 Ed Schonberg <schonberg@adacore.com>
240
241 * sem_res.adb (Resolve_Actuals): An actual in a call to an
242 Ada 2012 Reference function does not lead to a dangerous order
243 dependence.
244
245 2012-01-23 Gary Dismukes <dismukes@adacore.com>
246
247 * exp_util.adb (Is_Iterated_Container): Test
248 Is_Entity_Name when searching for calls to the default iterator,
249 to avoid blowing up on indirect calls which have an explicit
250 dereference as the call name.
251
252 2012-01-23 Thomas Quinot <quinot@adacore.com>
253
254 * errout.adb (Set_Msg_Node): For an N_Expanded_Name, output
255 the complete expanded name, rather than just its Selector_Name.
256
257 2012-01-23 Thomas Quinot <quinot@adacore.com>
258
259 * a-textio.adb (Put): Rewrite one-parameter Character version to
260 just call the two-parameter one with Current_Out.
261
262 2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
263
264 * freeze.adb (Check_Current_Instance): Issue an
265 error when the prefix of 'Unchecked_Access or 'Access does not
266 denote a legal aliased view of a type.
267 (Freeze_Record_Type): Do not halt the processing of record components
268 once the Has_Controlled_Component is set as this bypasses the remaining
269 checks.
270 (Is_Aliased_View_Of_Type): New routine.
271
272 2012-01-23 Thomas Quinot <quinot@adacore.com>
273
274 * errout.ads, freeze.adb: Minor reformatting.
275
276 2012-01-23 Thomas Quinot <quinot@adacore.com>
277
278 * sem_ch10.adb, sem_prag.adb: Remove redundant apostrophes in error
279 messages.
280
281 2012-01-23 Olivier Hainque <hainque@adacore.com>
282
283 * adadecode.c (__gnat_decode): Deal with empty input early,
284 preventing potential erroneous memory access later on.
285
286 2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
287
288 PR ada/46192
289 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: In the case of a
290 renaming, preserve the volatileness through the indirection, if any.
291
292 2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
293
294 * gcc-interface/Makefile.in (OSCONS_EXTRACT): Add
295 $(GNATLIBCFLAGS).
296
297 2012-01-10 Pascal Obry <obry@adacore.com>
298
299 * prj-nmsc.adb (Check_Library_Attributes):
300 Kill check for object/source directories for aggregate libraries.
301
302 2012-01-10 Matthew Heaney <heaney@adacore.com>
303
304 * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
305 a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
306 a-cborma.adb, a-cborma.ads, a-cidlli.adb, a-cidlli.ads, a-cimutr.adb,
307 a-cimutr.ads, a-cihase.adb, a-cihase.ads, a-cohama.adb, a-cohama.ads,
308 a-coorse.adb, a-coorse.ads, a-cbhama.adb, a-cbhama.ads, a-cborse.adb,
309 a-cborse.ads, a-comutr.adb, a-comutr.ads, a-ciorma.adb, a-cobove.adb,
310 a-ciorma.ads, a-cobove.ads, a-convec.adb, a-convec.ads, a-cohase.adb,
311 a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbmutr.adb, a-cbmutr.ads,
312 a-cbhase.adb, a-cbhase.ads (Reference, Constant_Reference): Declare
313 container parameter as aliased in/in out.
314 Code clean ups.
315
316 2012-01-10 Bob Duff <duff@adacore.com>
317
318 * s-os_lib.ads: Improve comment.
319
320 2012-01-10 Geert Bosch <bosch@adacore.com>
321
322 * s-gearop.adb (Forward_Eliminate): Avoid improper aliasing
323 for complex Scalar.
324
325 2012-01-10 Bob Duff <duff@adacore.com>
326
327 * sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when
328 checking that the 'Size is correct. If the type is "mod 2**12",
329 for example, it's illegal, but Esize is the 'Object_Size, which
330 will be something like 16 or 32, so the error ('Size = 12) was
331 not detected.
332 * gnat_rm.texi: Improve documentation of shift
333 and rotate intrinsics.
334
335 2012-01-10 Pascal Obry <obry@adacore.com>
336
337 * prj.adb (For_Every_Project_Imported): Fix
338 implementation to make sure we return each project only once
339 for aggragte libraries. It is fine to return a project twice for
340 aggregate projects, this was the case as a Project_Id is different
341 in each project tree. The new implementation use a table based on
342 the project name to ensure proper detection of duplicate project
343 in aggregate library. A new context is then created to continue
344 retrurning duplicate project for aggregate libraries.
345
346 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
347
348 * gcc-interface/trans.c (call_to_gnu): Create the temporary for the
349 return value in the variable-sized return type case if the target is
350 an array with fixed size. However, do not create it if this is the
351 expression of an object declaration.
352
353 2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
354
355 * gcc-interface/trans.c (addressable_p) <COMPONENT_REF>: Fix thinko.
356
357 2012-01-06 Robert Dewar <dewar@adacore.com>
358
359 * a-wichha.ads, a-wichun.ads, a-zchhan.ads, a-zchuni.ads,
360 s-utf_32.ads: Add pragma Pure
361 * s-utf_32.adb: Suppress warnings on non-static constants (now
362 that this is Pure).
363
364 2012-01-06 Bob Duff <duff@adacore.com>
365
366 * s-rpc.ads (Read, Write): Add overriding indicators.
367
368 2012-01-06 Robert Dewar <dewar@adacore.com>
369
370 * gnat_rm.texi: Add documentation for conventions
371 Ada_Pass_By_Copy and Ada_Pass_By_Reference.
372
373 2012-01-06 Gary Dismukes <dismukes@adacore.com>
374
375 * a-tienio.adb (Put): Add exception message on
376 raise statements. Remove unneeded blocks and object declarations.
377
378 2012-01-06 Robert Dewar <dewar@adacore.com>
379
380 * sem_prag.adb: Minor reformatting.
381
382 2012-01-06 Ed Schonberg <schonberg@adacore.com>
383
384 * sinfo.ads, sinfo.adb (Has_Prefixed_Call): New flag to indicate
385 that a selected component within a generic unit has been resolved
386 as a prefixed call with local references.
387 * sem_ch3.adb (Is_Visible_Component): In an instance body a selected
388 component is always visible.
389 * sem_ch4.adb (Analyze_Selected_Component): If the node is a
390 prefixed call in an instance, do not look for visible components
391 of the type.
392 * sem_ch12.adb (Reset_Entity): If a selected component has resolved
393 to a prefixed call, mark the node accordingly when prefix and
394 selector are local references.
395
396 2012-01-02 Eric Botcazou <ebotcazou@adacore.com>
397
398 * gnatvsn.ads (Current_Year): Bump to 2012.
399 \f
400 Copyright (C) 2012 Free Software Foundation, Inc.
401
402 Copying and distribution of this file, with or without modification,
403 are permitted in any medium without royalty provided the copyright
404 notice and this notice are preserved.