]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
b7b92f15
AC
12014-05-21 Robert Dewar <dewar@adacore.com>
2
3 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
4 sem_elab.ads: Minor reformatting.
5 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
6 parameter optional.
7
82014-05-21 Pascal Obry <obry@adacore.com>
9
10 * prj-dect.adb: Allow package Install in aggregate project.
11
0df5ae93
AC
122014-05-21 Robert Dewar <dewar@adacore.com>
13
14 * sem_ch13.adb (Analyze_Aspect_Specifications):
15 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
16 * sem_prag.adb: Minor comment improvements.
17
182014-05-21 Ed Schonberg <schonberg@adacore.com>
19
20 * sem_ch12.adb (Install_Body): When checking whether freezing of
21 instantiation must be delayed, verify that the common enclosing
22 subprogram to generic and instance is in fact an overloadable
23 entity.
24
252014-05-21 Vincent Celier <celier@adacore.com>
26
27 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
28 mains with the same name and fail if there is more than one.
29 * prj.ads, prj.adb (Find_All_Sources): New function
30
9db78a42
RD
312014-05-21 Robert Dewar <dewar@adacore.com>
32
33 * sem_ch13.adb: Minor reformatting.
34 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
35 * sem_prag.adb: Minor error message improvement.
36
63b5225b
YM
372014-05-21 Yannick Moy <moy@adacore.com>
38
39 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
40 (Enclosing_Subprogram_Or_Package): Only return a library-level
41 package.
42
a8a89b74
JM
432014-05-21 Javier Miranda <miranda@adacore.com>
44
45 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
46 to the full view of the parent type when processing a derived type
47 which is the full view of a private type not defined in a generic
48 unit which is derived from a private type with discriminants
49 whose full view is a non-tagged record type.
50
601bb6b3
AC
512014-05-21 Javier Miranda <miranda@adacore.com>
52
53 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
54 Complete previous patch.
55
562014-05-21 Thomas Quinot <quinot@adacore.com>
57
95bc61b2 58 PR ada/9535
601bb6b3
AC
59 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
60 Provide a behaviour more consistent with underlying datagram
61 socket: do not attempt to loop over Send_Socket/Receive_Socket
62 iterating along the buffer.
63
642014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
65
66 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
67 or a tagged type is not labelled as volatile. Ensure that a
68 non-volatile type has no volatile components.
69 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
70 Obj_Typ. Code reformatting. Ensure that a discriminated or
71 tagged object is not labelled as volatile.
72 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
73 pragma Volatile applies to a full type declaration or an object
74 declaration when SPARK mode is on.
75
762014-05-21 Sergey Rybin <rybin@adacore.com frybin>
77
78 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
79 providing options needed for compiling the argument source for
80 the situation when a project file can be used as a tool parameter.
81
822014-05-21 Gary Dismukes <dismukes@adacore.com>
83
84 * gnat_rm.texi: Minor typo fix.
85
da574a86
AC
862014-05-21 Robert Dewar <dewar@adacore.com>
87
88 * stand.adb (Tree_Read): Read missing entities.
89 (Tree_Write): Write missing entities.
90
912014-05-21 Ben Brosgol <brosgol@adacore.com>
92
93 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
94 section in gnatmetric chapter.
95
962014-05-21 Robert Dewar <dewar@adacore.com>
97
98 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
99 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
100 post-call copy write back (see detailed comment in code).
101 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
102 Exp_Ch6.
103 * tbuild.ads: Minor reformatting.
104
1052014-05-21 Robert Dewar <dewar@adacore.com>
106
107 * stand.ads: Add warning about adding new entities and
108 Tree_Read/Tree_Write.
109
1102014-05-21 Robert Dewar <dewar@adacore.com>
111
112 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
113 references to restricted entities within the units in which they
114 are declared.
115
1162014-05-21 Robert Dewar <dewar@adacore.com>
117
118 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
119 simplify the needed test, and also deal with failure to catch
120 situations with non-standard names.
121 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
122 (Source_File_Is_Subunit): Removed, no longer used.
123
1242014-05-21 Javier Miranda <miranda@adacore.com>
125
126 * exp_ch4.adb
127 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
128 renaming of an access to interface object there is no need to
129 generate extra code to reference the tag.
130
77a40ec1
AC
1312014-05-21 Robert Dewar <dewar@adacore.com>
132
133 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
134 Warnings (Off, string).
135
1362014-05-21 Robert Dewar <dewar@adacore.com>
137
138 * osint.adb: Fix three error messages to say invalid instead
139 of erroneous.
140 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
141 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
142 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
143
1442014-05-21 Ed Schonberg <schonberg@adacore.com>
145
146 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
147 sem_ch9.ads: Move discriminant manipulation routines for analysis of
148 aspect specifications from sem_ch9 to sem_ch13, where they belong.
149
17cf9038
AC
1502014-05-21 Robert Dewar <dewar@adacore.com>
151
152 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
153 Clearly document -gnatyg (GNAT style switches).
154 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
155 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
156 available for VMS after all.
157 * warnsw.adb: Reorganize to eliminate duplicated code
158 (Restore_Warnings): Add a couple of missing entries
159 (Save_Warnings): Add a couple of missing entries.
160 * warnsw.ads: Add missing entries to Warning_Record (not clear
161 what the impact is).
162
1632014-05-21 Robert Dewar <dewar@adacore.com>
164
165 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
166 warning) case.
167 * errout.ads: Document ?*? (restriction warning) insertion.
168 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
169 warning) case.
170 * erroutc.ads: Document use of * for restriction warning tag.
171 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
172
1732014-05-21 Ed Schonberg <schonberg@adacore.com>
174
175 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
176 make discriminants immediately visible when analyzing an aspect
177 of a subtype declaration.
178 (Uninstall_Discriminants): Do not apply to the entity in a
179 subtype declaration.
180
31382249
AC
1812014-05-21 Ed Schonberg <schonberg@adacore.com>
182
183 * sem_util.adb: Code clean up.
184
1852014-05-21 Eric Botcazou <ebotcazou@adacore.com>
186
187 * gnat_ugn.texi: Document -Werror.
188
6413dd81
AC
1892014-05-21 Bob Duff <duff@adacore.com>
190
191 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
192 This was returning False if the Object is a constant view. Fix
193 it to return True in that case, because it might be a view of
194 a variable.
195 (Has_Discriminant_Dependent_Constraint): Fix latent
196 bug; this function was crashing when passed a discriminant.
197
1982014-05-21 Robert Dewar <dewar@adacore.com>
199
200 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
201 * s-arit64.adb: Minor code reorganization.
202 * sem_prag.adb: Minor comment fix (remove erroneous use of the
203 term erroneous).
204
2052014-05-21 Robert Dewar <dewar@adacore.com>
206
207 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
208 computing new table size.
209
2735b82d
AC
2102014-05-21 Robert Dewar <dewar@adacore.com>
211
212 * einfo.ads: Minor reformatting.
213 * ceinfo.adb: Deal with slight format change of einfo.ads.
214
2152014-05-21 Ed Schonberg <schonberg@adacore.com>
216
217 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
218 implementation of the SPARK 2014 rule concerning private child
219 units (LRM 7.2.6).
220
2212014-05-21 Vincent Celier <celier@adacore.com>
222
223 * makeusg.adb: Add switch -d to usage.
224
2252014-05-21 Ed Schonberg <schonberg@adacore.com>
226
227 * sem_util.adb (Find_Actual): If an actual that is the prefix
228 of an enclosing prefixed call has been rewritten, use Nkind
229 and Sloc to identify the corresponding formal, when handling
230 deferred references.
231
2322014-05-21 Robert Dewar <dewar@adacore.com>
233
234 * debug.adb: Document -gnatd.z switch.
235 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
236
149604e4
RD
2372014-05-21 Robert Dewar <dewar@adacore.com>
238
239 * einfo.ads (Can_Never_Be_Null): Minor comment update.
240 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
241 error message change.
242 * s-arit64.adb ("abs"): New function. Use expression functions
243 for the simple conversions and arithmetic.
244
40e63ada
EB
2452014-05-18 Eric Botcazou <ebotcazou@adacore.com>
246
247 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
248 set function_start_locus.
249
dd25fe0a
EB
2502014-05-18 Eric Botcazou <ebotcazou@adacore.com>
251
252 * utils.c (gnat_write_global_declarations): Adjust the flags put on
253 dummy_global.
254
4aecc2f8
EB
2552014-05-18 Eric Botcazou <ebotcazou@adacore.com>
256
257 * gcc-interface/decl.c (change_qualified_type): New static function.
258 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
259 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
260 <E_Array_Subtype>: Likewise.
261 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
262 (gnat_to_gnu_component_type): Likewise.
263 (gnat_to_gnu_param): Likewise.
264
08b8b90c
EB
2652014-05-18 Eric Botcazou <ebotcazou@adacore.com>
266
267 * fe.h (Set_Present_Expr): Move around.
268 (End_Location): New macro.
269 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
270
43a4dd82
EB
2712014-05-18 Eric Botcazou <ebotcazou@adacore.com>
272
273 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
274 lieu of more verbose construct.
275 * gcc-interface/trans.c (Call_to_gnu): Likewise.
276 (gnat_to_gnu): Likewise. Remove obsolete code.
277
f9d7d7c1
EB
2782014-05-18 Eric Botcazou <ebotcazou@adacore.com>
279
280 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
281 consider that regular packed arrays can never be superflat.
282
766090c2
TS
2832014-05-17 Trevor Saunders <tsaunders@mozilla.com>
284
285 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
286 annotation.
287 * gcc-interface/decl.c (annotate_value): Adjust.
288 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
289 (push_range_check_info): Likewise.
290 (Loop_Statement_to_gnu): Likewise.
291 (Subprogram_Body_to_gnu): Likewise.
292 (Compilation_Unit_to_gnu): Likewise.
293 (start_stmt_group): Likewise.
294 * gcc-interface/utils.c (init_gnat_utils): Likewise.
295 (gnat_pushlevel): Likewise.
296 (maybe_pad_type): Likewise.
297
0263d678
EB
2982014-05-14 Eric Botcazou <ebotcazou@adacore.com>
299
300 * seh_init.c: Fix copyright year.
301
d40aeed8
BE
3022014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
303
d40aeed8
BE
304 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
305 are defined. Move include windows.h before system.h.
306 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
307 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
308
8b9aec86
RS
3092014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
310
0263d678
EB
311 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
312 to the appropriate type.
8b9aec86
RS
313 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
314 (pos_to_constructor): Likewise.
315
f0035dca
EB
3162014-05-13 Eric Botcazou <ebotcazou@adacore.com>
317
318 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
319
1d60af08
KZ
3202014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
321 Mike Stump <mikestump@comcast.net>
322 Richard Sandiford <rdsandiford@googlemail.com>
323
324 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
325 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
326 (annotate_value): Use wide-int interfaces.
327 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
328
bc76a4d5
RH
3292014-04-28 Richard Henderson <rth@redhat.com>
330
331 * gcc-interface/Makefile.in: Support aarch64-linux.
332
93582885
EB
3332014-04-28 Eric Botcazou <ebotcazou@adacore.com>
334
335 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
336 add 'Suffix' parameter and adjust comment.
337 (Get_External_Name_With_Suffix): Delete.
338 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
339 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
340 'Suffix' parameter.
341 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
342 Call Get_External_Name instead of Get_External_Name_With_Suffix.
343 (Get_Secondary_DT_External_Name): Likewise.
344 * exp_cg.adb (Write_Call_Info): Likewise.
345 * exp_disp.adb (Export_DT): Likewise.
346 (Import_DT): Likewise.
347 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
348 parameter with False default.
349 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
350 * types.h (Fat_Pointer): Rename into...
351 (String_Pointer): ...this. Add comment on interfacing rules.
352 * fe.h (Compiler_Abort): Adjust for above renaming.
353 (Error_Msg_N): Likewise.
354 (Error_Msg_NE): Likewise.
355 (Get_External_Name): Likewise. Add third parameter.
356 (Get_External_Name_With_Suffix): Delete.
357 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
358 (create_concat_name): Adjust call to Get_External_Name, remove call to
359 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
360 * gcc-interface/trans.c (post_error): Likewise.
361 (post_error_ne): Likewise.
362 * gcc-interface/misc.c (internal_error_function): Likewise.
363
22869a37
RB
3642014-04-28 Richard Biener <rguenther@suse.de>
365
366 PR middle-end/60092
367 * gcc-interface/utils.c: Define flag_isoc11.
368
9e3f7c4b
EB
3692014-04-26 Eric Botcazou <ebotcazou@adacore.com>
370
371 * gnatvsn.ads (Library_Version): Bump to 4.10.
372
8f78ecdb
EB
3732014-04-23 Eric Botcazou <ebotcazou@adacore.com>
374
375 Revert
376 2014-04-22 Richard Henderson <rth@redhat.com>
377
378 * gcc-interface/Makefile.in: Support aarch64-linux.
379
380 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
381
382 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
383 (Error_Msg_N): Likewise.
384 (Error_Msg_NE): Likewise.
385 (Get_External_Name_With_Suffix): Likewise.
386 * types.h (Fat_Pointer): Delete.
387 (String_Pointer): New type.
388 (DECLARE_STRING_POINTER): New macro.
389 * gcc-interface/decl.c (create_concat_name): Adjust.
390 * gcc-interface/trans.c (post_error): Likewise.
391 (post_error_ne): Likewise.
392 * gcc-interface/misc.c (internal_error_function): Likewise.
393
19a0be3d
RH
3942014-04-22 Richard Henderson <rth@redhat.com>
395
4a980bdc
RH
396 * gcc-interface/Makefile.in: Support aarch64-linux.
397
19a0be3d
RH
398 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
399 (__gnat_alternate_stack): Enable for all linux except ia64.
400
b6918051
EB
4012014-04-22 Eric Botcazou <ebotcazou@adacore.com>
402
403 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
404 (Error_Msg_N): Likewise.
405 (Error_Msg_NE): Likewise.
406 (Get_External_Name_With_Suffix): Likewise.
407 * types.h (Fat_Pointer): Delete.
408 (String_Pointer): New type.
409 (DECLARE_STRING_POINTER): New macro.
410 * gcc-interface/decl.c (create_concat_name): Adjust.
411 * gcc-interface/trans.c (post_error): Likewise.
412 (post_error_ne): Likewise.
413 * gcc-interface/misc.c (internal_error_function): Likewise.
414
e297e2ea
EB
4152014-04-15 Eric Botcazou <ebotcazou@adacore.com>
416 Pierre-Marie de Rodat <derodat@adacore.com>
417
418 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
419 scalar constant instead of a reference for renaming of scalar literal.
420 Do not create a new object for constant renaming except for a function
421 call. Make sure a VAR_DECL is created for the renaming pointer.
422 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
423 (fold_constant_decl_in_expr): New function.
424 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
425 For a constant renaming, try to fold a constant DECL in the result.
426 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
427 (Identifier_to_gnu): Reference the renamed object of constant renaming
428 pointers directly.
e297e2ea
EB
429 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
430 invalidate constant renaming pointers.
431
e63b36bd
EB
4322014-04-15 Eric Botcazou <ebotcazou@adacore.com>
433
434 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
435 (build_vector_type_for_size): New function.
436 (build_vector_type_for_array): Likewise.
437 (unchecked_convert): Build an intermediate vector type to convert
438 from a generic array type to a vector type.
439 (handle_vector_size_attribute): Reimplement.
440 (handle_vector_type_attribute): Likewise.
441
bd6a077a
EB
4422014-04-15 Eric Botcazou <ebotcazou@adacore.com>
443
444 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
445 Is_OK_Static_Expression in lieu of Is_Static_Expression to
446 detect valid arguments.
447
718c4601
EB
4482014-04-15 Eric Botcazou <ebotcazou@adacore.com>
449
450 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
451
9dba4b55
PC
4522014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
453
d6d215ac
EB
454 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
455 (components_to_record): Likewise.
456 * gcc-interface/utils.c (make_aligning_type): Likewise.
457 (maybe_pad_type): Likewise.
458 (finish_record_type): Likewise.
459 (rest_of_record_type_compilation): Likewise.
9dba4b55 460
3418f5e9
EB
4612014-04-14 Eric Botcazou <ebotcazou@adacore.com>
462
463 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
464 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
465 for Ivdep hint.
466 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
467 hint for Loop_Optimize.
468 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
469 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
470 with new Ivdep hint.
471 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
472 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
473 with new Ivdep hint.
d6d215ac 474 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
3418f5e9 475
4116e7d0
EB
4762014-04-14 Eric Botcazou <ebotcazou@adacore.com>
477 Robert Dewar <dewar@adacore.com>
478
479 * opt.ads (Suppress_Back_Annotation): Remove as unused.
480 * fe.h (Back_Annotate_Rep_Info): Likewise.
481 (Global_Discard_Names): Likewise.
482 (List_Representation_Info): Declare.
483 * types.h (Uint_Minus_1): Likewise.
484 * repinfo.ads: Document back-annotation change.
485 * gcc-interface/gigi.h (init_gnat_decl): Declare.
486 (destroy_gnat_decl): Likewise.
487 * gcc-interface/decl.c (annotate_value): Do not create the cache of
488 annotated values here but...
489 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
490 in ASIS mode.
491 (init_gnat_decl): ...here instead. New function.
492 (destroy_gnat_decl): Likewise.
493 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
494 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
495
cb27986c
EB
4962014-04-14 Eric Botcazou <ebotcazou@adacore.com>
497
498 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
499 offset for the field, if any.
500
ebe0249e 5012014-04-09 Eric Botcazou <ebotcazou@adacore.com>
d6d215ac 502 Svante Signell <svante.signell@gmail.com>
ebe0249e
EB
503
504 PR ada/54040
505 PR ada/59346
506 * s-osinte-x32.adb: New file.
507 * s-linux.ads (Time): New section.
508 * s-linux-alpha.ads (Time): Likewise.
509 * s-linux-android.ads (Time: Likewise.
510 * s-linux-hppa.ads (Time): Likewise.
511 * s-linux-mipsel.ads (Time): Likewise.
512 * s-linux-sparc.ads (Time): Likewise.
513 * s-linux-x32.ads (Time): Likewise.
514 * s-osprim-x32.ads (timespec): Adjust.
7056f58f
EB
515 (Clock): Likewise.
516 (To_Timespec): Likewise.
ebe0249e
EB
517 * s-osinte-linux.ads (Time): Define local subtypes for those defined
518 in System.Linux.
519 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
520 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
521 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
522 * s-osinte-solaris-posix.ads (timespec): Likewise.
523 * s-osinte-posix.adb (To_Timespec): Likewise.
524 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
525
f3d6c7cb
EB
5262014-04-08 Eric Botcazou <ebotcazou@adacore.com>
527
528 PR ada/60411
529 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
530 * s-linux-android.ads: New file.
531 * s-intman-android.adb: Likewise.
303a0cea 532 * s-osinte-android.ads: Adjust.
55f31857 533 * sigtramp-armdroid.c: Likewise.
edb2b1b1 534 * sigtramp.h: Add Android support.
f3d6c7cb 535
aabc3aff
EB
5362014-04-07 Eric Botcazou <ebotcazou@adacore.com>
537
538 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
539
368348ab
EB
5402014-03-30 Eric Botcazou <ebotcazou@adacore.com>
541
542 PR ada/60703
543 * system-linux-alpha.ads: Adjust for Ada 2005.
544 * system-linux-mips.ads: Likewise.
545 * system-linux-mips64el.ads: Likewise.
546 * system-linux-mipsel.ads: Likewise.
547 * system-linux-s390.ads: Likewise.
548 * system-linux-s390x.ads: Likewise.
549 * system-linux-sparc.ads: Likewise.
550 * system-linux-sparcv9.ads: Likewise.
551 * system-rtems.ads: Likewise.
552 * system-vxworks-arm.ads: Likewise.
553
ab684dae
AS
5542014-03-16 Andreas Schwab <schwab@linux-m68k.org>
555
556 PR ada/39172
557 * gcc-interface/Makefile.in (target_cpu_default): Revert
558 2013-10-11 change.
559
00c5acd3
EB
5602014-03-13 Eric Botcazou <ebotcazou@adacore.com>
561
562 PR ada/51483
563 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
564 it to set the RM size. Use directly 'size' for the Esize.
565 (Create_Back_End_Float_Types): Adjust call to above.
566 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
567 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
568 (Write_Target_Dependent_Values): Adjust comment.
569 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
570 deal with it.
571 (Write_Target_Dependent_Values): Write the precision in lieu of size.
572 (Initialization): Read the precision in lieu of size and compute the
573 size from the precision and the alignment.
574 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
575 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
576 types for vector modes, pass the size in addition to the precision.
577
8f241ff5
EB
5782014-03-10 Eric Botcazou <ebotcazou@adacore.com>
579
580 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
581
a92a6b88
DR
5822014-03-07 Doug Rupp <rupp@adacore.com>
583
584 PR ada/60411
585 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
586 (Support_64_Bit_Divides): Removed, no longer used.
587 (ZCX_By_Default): Enabled.
588
3af78158
DR
5892014-02-25 Doug Rupp <rupp@adacore.com>
590
591 * gcc-interface/Makefile.in (arm-linux):
592 (EH_MECHANISM): Use ARM unwinder (-arm)
593 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
594 s-excmac-arm.ads.
595 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
596 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
597 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
598 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
599 Add dependencies for sigtramp-armvxw.o.
600
2749b01b
EB
6012014-02-25 Eric Botcazou <ebotcazou@adacore.com>
602
603 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
604
e7ba564f
RD
6052014-02-25 Robert Dewar <dewar@adacore.com>
606
607 * rtsfind.adb (Is_RTE): Protect against entity with no scope
608 field (previously this call blew up on the Standard entity).
609 * sem_attr.adb (Analyze_Attribute, case Access): Remove
610 test for No_Abort_Statements, this is now handled in
611 Set_Entity_With_Checks.
612 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
613 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
614 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
615 Set_Entity_With_Checks.
616 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
617 Add checks for No_Abort_Statements.
618
6192014-02-25 Robert Dewar <dewar@adacore.com>
620
621 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
622 Check_Restriction is OK.
623
2886a495
ES
6242014-02-25 Ed Schonberg <schonberg@adacore.com>
625
626 * sem_ch3.adb (Process_Full_View): Better error message when
627 the full view of a private type without discriminants is an
628 unconstrained type.
629 * sem_ch7.adb (Uninstall_Declarations): Ditto.
630
fb12497d
AC
6312014-02-25 Eric Botcazou <ebotcazou@adacore.com>
632
633 * sigtramp-armvxw.c: Also restore r0.
634
6352014-02-25 Robert Dewar <dewar@adacore.com>
636
637 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
638 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
639 set unconditionally.
640 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
641 any more (Output_Msg_Text): Rewritten with new convention on
642 output of warnings that are treated as errors.
643 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
644 if Warn is False.
645 * gnat_rm.texi: Updates to documentation on pragma
646 Warning_As_Error.
647 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
648 set Warning_Doc_Switch.
649 * lib-writ.ads: Add documentation note on ALI file generation
650 for C.
651 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
652 (belongs in Sem).
653 * sem_attr.adb (Resolve_Attribute, case Access):
654 Abort_Task'Access violates the No_Abort_Statements restriction.
655 * sem_res.adb (Resolve_Call): Check restriction
656 No_Abort_Statements for call to Abort_Task or a renaming of it.
657
0c3985a9
AC
6582014-02-25 Robert Dewar <dewar@adacore.com>
659
660 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
661 type name as index.
662 * lib.ads: Minor reformatting.
663 * einfo.ads: Minor reformatting.
664
6652014-02-25 Doug Rupp <rupp@adacore.com>
666
667 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
668 use Short_Descriptor(S) as the argument passing mechanism.
669
6702014-02-25 Eric Botcazou <ebotcazou@adacore.com>
671
672 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
673
6742014-02-25 Robert Dewar <dewar@adacore.com>
675
676 * atree.ads (Warnings_Treated_As_Errors): New variable.
677 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
678 error object (Initialize): Initialize Warnings_As_Errors_Count
679 (Write_Error_Summary): Include count of warnings treated as errors.
680 * erroutc.adb (Warning_Treated_As_Error): New function.
681 (Matches): Function moved to outer level of package.
682 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
683 (Warning_Treated_As_Error): New function.
684 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
685 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
686 * opt.ads (Config_Switches_Type): Add entry for
687 Warnings_As_Errors_Count.
688 (Warnings_As_Errors_Count): New variable.
689 (Warnings_As_Errors): New array.
690 * par-prag.adb: Add dummy entry for Warning_As_Error.
691 * sem_prag.adb (Analyze_Pragma): Implement new pragma
692 Warning_As_Error.
693 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
694
5acb4d29
AC
6952014-02-25 Eric Botcazou <ebotcazou@adacore.com>
696
697 * sigtramp.h: Fix minor inaccuracy.
698
6992014-02-25 Ben Brosgol <brosgol@adacore.com>
700
701 * gnat_ugn.texi: Added description of kill command.
702
7032014-02-25 Robert Dewar <dewar@adacore.com>
704
705 * gnat_rm.texi (Address_Clauses): Add a section discussing the
706 problem of address clauses causing unexpected initialization,
707 including the effect of Initialize_Scalars.
708
80c2c202
AC
7092014-02-25 Robert Dewar <dewar@adacore.com>
710
711 * errout.adb: Various changes for better msgs for anonmous access
712 subprogram types.
713 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
714 argument.
715 (Buffer_Remove): Version with character argument.
716 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
717 of mismatching conventions for access-to-subprogram case.
718 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
719 access types in record.
720 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
721 types, including in records.
722
7232014-02-25 Doug Rupp <rupp@adacore.com>
724
725 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
726 enhancements and corrections.
727
7282014-02-25 Robert Dewar <dewar@adacore.com>
729
730 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
731
9972d439
RD
7322014-02-25 Robert Dewar <dewar@adacore.com>
733
734 * gnat_rm.texi: First set of documentation additions for
735 predefined RM units.
736 * checks.adb: Minor reformatting.
737 * sem_elab.adb (Check_Task_Activation): Minor fix to error
738 message.
739 * sem_util.adb: Minor reformatting.
740
592574f5
AC
7412014-02-25 Arnaud Charlet <charlet@adacore.com>
742
743 * usage.adb (Usage): Add help on -gnateC.
744 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
745 * opt.ads (Generate_CodePeer_Messages): New flag.
746 * gnat_ugn.texi: Document new switch -gnateC.
747
7482014-02-25 Ben Brosgol <brosgol@adacore.com>
749
750 * gnat_rm.texi: Corrected minor typos in Implementation Defined
751 Aspects.
752 * opt.ads: Minor reformatting.
753
fe2194df
RD
7542014-02-25 Robert Dewar <dewar@adacore.com>
755
756 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
757 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
758 of -gnatel/-gnateL.
759 * opt.ads (Warn_Info_Messages): New flag.
760 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
761 messages.
762 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
763 messages.
764 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
765 * usage.adb: Add documentation of -gnatel/-gnateL Update
766 documentation of -gnatwl/-gnatwL.
767 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
768 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
769
4c51ff88
AC
7702014-02-25 Robert Dewar <dewar@adacore.com>
771
772 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
773 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
774 * interfac.ads: Minor code reorganization (add pragma
775 Compiler_Unit_Warning).
776 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
777 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
778 Has_Shift_Operator flag.
779 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
780 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
781 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
782 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
783 Add entry for Name_Amount.
784 * checks.adb (Selected_Range_Checks): When checking for a null
785 range, make sure we use the base type, and not the subtype for
786 deciding a range is null.
787 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
788 for suspicious loop bound which is outside the range of the
789 loop subtype.
790 * gnat_ugn.texi: Add documentation section "Determining the
791 Chosen Elaboration Order"
792 * sem_ch13.adb (UC_Entry): Add field Act_Unit
793 (Validate_Unchecked_Conversion): Store Act_Unit
794 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
795 * treepr.adb: Minor reformatting.
796
7972014-02-25 Arnaud Charlet <charlet@adacore.com>
798
799 * usage.adb: Minor: fix typo.
800
0355e3eb
AC
8012014-02-25 Robert Dewar <dewar@adacore.com>
802
803 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
804 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
805 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
806 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
807 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
808 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
809 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
810 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
811 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
812 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
813 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
814 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
815 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
816 Compiler_Unit_Warning, change Compiler_Unit everywhere to
817 Compiler_Unit_Warning.
818
8192014-02-25 Sergey Rybin <rybin@adacore.com frybin>
820
821 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
822 in ASIS mode aggregates that are used as aspect definitions.
823
e917e3b8
AC
8242014-02-25 Robert Dewar <dewar@adacore.com>
825
826 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
827 reformatting.
828
8292014-02-25 Ed Schonberg <schonberg@adacore.com>
830
831 * freeze.adb (Freeze_Entity): If the return type of a function
832 is a limited view, and the non-limited view has not been seen yet,
833 defer freezing to some later point.
834
8352014-02-25 Robert Dewar <dewar@adacore.com>
836
837 * sem_ch3.adb: Minor reformatting.
838
8392014-02-25 Robert Dewar <dewar@adacore.com>
840
841 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
842 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
843 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
844 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
845 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
846 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
847 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
848 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
849 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
850 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
851 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
852 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
853 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
854 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
855 snames.ads-tmpl: Change Compiler_Unit everywhere to
856 Compiler_Unit_Warning.
857
5f24a82a
HK
8582014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
859
860 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
861 (Collect_Body_Postconditions_In_Decls): New routine.
862 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
863 postcondition aspects or pragmas that appear on a subprogram
864 body stub.
865 (Collect_Spec_Preconditions): Factor out code. Handle
866 precondition aspects or pragmas that appear on a subprogram
867 body stub.
868 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
869 aspects that apply to a subprogram body stub is no longer delayed,
870 the aspects are analyzed on the spot.
871 (SPARK_Aspect_Error):
872 Aspects that apply to a subprogram declaration cannot appear in
873 a subunit.
874 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
875 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
876 is now a local variable. Code cleanup. Analysis related to
877 the aspects of a subprogram body stub is now carried out by
878 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
879 and/or pragmas of a subprogram body stub to the proper body
880 as this is no longer needed. Do not analyze the aspects of a
881 subprogram stub when the corresponding source unit is missing.
882 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
883 on a stub.
884 (Analyze_Task_Body_Stub): Flag the illegal use of
885 aspects on a stub.
886 (Optional_Subunit): Add local variable Unum.
887 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
888 pragma when it applies to a subprogram body stub.
889 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
890 Depends and Global can now apply to a subprogram body stub as
891 long as it acts as its own spec.
892 (Analyze_Refined_Pragma):
893 Code reformatting. Refinement pragmas cannot apply to a subunit.
894
7edfb4c6
HK
8952014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
896
897 * einfo.ads Update the usage of flag
898 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
899 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
900 now starts with the letter 'C'. This makes reading expanded
901 code easier.
902 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
903 Iter_Loop. Signal that an Ada 2012 iterator loop requires
904 secondary stack management when creating a transient scope for
905 an element reference.
906 * exp_util.adb (Process_Statements_For_Controlled_Objects):
907 When wrapping the statements of a loop, pass the E_Loop entity
908 to the wrapping machinery.
909 (Wrap_Statements_In_Block): Add
910 formal parameter Scop along with comment on usage. Add local
911 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
912 block as requiring secondary stack management when the block is
913 created inside an Ada 2012 iterator loop. This ensures that any
914 reference objects are reclaimed on each iteration of the loop.
915 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
916 tasked with the handling of container iterators as requiring
917 secondary stack management. This ensures that iterators are
918 reclaimed when the loop terminates or is exited in any fashion.
919 * sem_util.adb (Add_Block_Identifier): New routine.
920 (Find_Enclosing_Iterator_Loop): New routine.
921 * sem_util.ads (Add_Block_Identifier): New routine.
922 (Find_Enclosing_Iterator_Loop): New routine.
923
bbe9779c
AC
9242014-02-25 Robert Dewar <dewar@adacore.com>
925
926 * sinfo.ads: Minor reformatting.
927
9282014-02-25 Tristan Gingold <gingold@adacore.com>
929
930 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
931
9322014-02-25 Pascal Obry <obry@adacore.com>
933
934 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
935
1ae8beef
AC
9362014-02-25 Tristan Gingold <gingold@adacore.com>
937
938 * sem_ch10.adb: Minor comment fix.
939
9402014-02-25 Bob Duff <duff@adacore.com>
941
942 * s-tasdeb.adb: Misc cleanup of this package,
943 including printing addresses in hexadecimal.
944 (Write): Fix minor bug when taking 'Address of an empty string.
945
9462014-02-25 Ed Schonberg <schonberg@adacore.com>
947
948 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
949 public child unit when it does not refer to the abstract state
950 of a public ancestor.
951
ca11219d
AC
9522014-02-25 Yannick Moy <moy@adacore.com>
953
954 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
955 Validity_Checks in GNATprove and CodePeer modes.
956
9572014-02-25 Pascal Obry <obry@adacore.com>
958
959 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
960 Artifacts attribute.
961
6e32b1ab
AC
9622014-02-25 Yannick Moy <moy@adacore.com>
963
964 * sem_prag.adb: Minor reformatting to get consistent messages.
965
9662014-02-25 Robert Dewar <dewar@adacore.com>
967
968 * checks.adb: Minor reformatting.
969 * sinfo.ads (Do_Range_Check): Document that this flag is never
970 passed to the back end.
971
f9966234
AC
9722014-02-25 Yannick Moy <moy@adacore.com>
973
974 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
975 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
976
9772014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
978
979 * sem_res.adb (Appears_In_Check): New routine.
980 (Resolve_Entity_Name): Remove local variables Prev and
981 Usage_OK. Par is now a constant. Remove the parent chain traversal
982 as the placement of a volatile object with enabled property
983 Async_Writers and/or Effective_Reads must appear immediately
984 within a legal construct.
985
9862014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
987
988 * checks.adb (Apply_Selected_Range_Checks):
989 Alphabetize local constants and variables. Add comments.
990 Always insert a range check that requires runtime evaluation into
991 the tree.
992
a6abfd78
AC
9932014-02-25 Robert Dewar <dewar@adacore.com>
994
995 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
996
9972014-02-25 Bob Duff <duff@adacore.com>
998
999 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
1000 iterations while waiting for independent tasks to terminate;
1001 if an independent task does not terminate, we do not want to
1002 hang here. In that case, the thread will be terminated when the
1003 process exits.
1004 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
1005
10062014-02-25 Ed Schonberg <schonberg@adacore.com>
1007
1008 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
1009 used to perform pre-analysis of the expression for SPARK
1010 aspects that have a non-standard syntax, such as GLobal and
1011 Initializes. The procedure applies to the original expression
1012 in an aspect specification, prior to the analysis of the
1013 corresponding pragma, in order to provide semantic information
1014 for ASIS navigation purposes.
1015 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
1016 Call new subprogram.
1017
64e86d00
AC
10182014-02-25 Yannick Moy <moy@adacore.com>
1019
1020 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
1021
10222014-02-25 Doug Rupp <rupp@adacore.com>
1023
1024 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
1025 (__gnat_adjust_context_for_raise): Bump the PC by 2.
1026
10272014-02-25 Ed Schonberg <schonberg@adacore.com>
1028
1029 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
1030 misplaced IS, add a statement sequence to improper body only if
1031 one has not been parsed already.
1032
10332014-02-25 Ed Schonberg <schonberg@adacore.com>
1034
1035 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
1036 mismatch when multidimensional array is updated with a single
1037 index.
1038
3684d1fc
YM
10392014-02-25 Yannick Moy <moy@adacore.com>
1040
1041 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
1042 sem_ch6.adb: Mark most references to SPARK RM in error messages
1043 for removal.
1044
b2afe274
AC
10452014-02-24 Ed Schonberg <schonberg@adacore.com>
1046
1047 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
1048 appears in a list of basic declarations, complete the tree with
1049 an empty statement list, to prevent cascaded errors and crashes
1050 if semantic analysis is attempted.
1051
b5eccd0c
AC
10522014-02-24 Thomas Quinot <quinot@adacore.com>
1053
1054 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
1055 value.
1056 * erroutc.adb: Minor reformatting.
1057
10582014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1059
1060 * sem_prag.adb (Check_Clause_Syntax): Account
1061 for a solitary input item in a dependency list.
1062
10632014-02-24 Yannick Moy <moy@adacore.com>
1064
1065 * gnat1drv.adb (Adjust_Global_Switches): Do not
1066 use validity checks at all in GNATprove_Mode.
1067
f34b5d88
RD
10682014-02-24 Robert Dewar <dewar@adacore.com>
1069
1070 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
1071 atree.adb, atree.ads: Minor reformatting.
1072
2dade097
HK
10732014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1074
1075 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
1076 global and dependence refinement when SPARK_Mode is off.
1077 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
1078 state refinement when SPARK_Mode is off.
1079 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
1080 variable Decl. Insert the generated pragma for Refined_State
1081 after a potential pragma SPARK_Mode.
1082 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
1083 constant Deps. Remove local variable Expr. Check the syntax
1084 of pragma Depends when SPARK_Mode is off. Factor out the
1085 processing for extra parenthesis around individual clauses.
1086 (Analyze_Global_In_Decl_List): Items is now a constant. Check
1087 the syntax of pragma Global when SPARK_Mode is off.
1088 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
1089 Initializes when SPARK_Mode is off.
1090 (Analyze_Part_Of): Check
1091 the syntax of the encapsulating state when SPARK_Mode is off.
1092 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
1093 SPARK_Mode is off. Move the declaration order check with respect
1094 to pragma Initializes to the end of the processing. Do not verify
1095 the declaration order for pragma Initial_Condition when SPARK_Mode
1096 is off. Do not complain about a useless package refinement when
1097 SPARK_Mode is off.
1098 (Analyze_Refined_Depends_In_Decl_Part): Refs
1099 is now a constant. Check the syntax of pragma Refined_Depends
1100 when SPARK_Mode is off.
1101 (Analyze_Refined_Global_In_Decl_Part):
1102 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
1103 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
1104 Refined_State when SPARK_Mode is off.
1105 (Check_Dependence_List_Syntax): New routine.
1106 (Check_Global_List_Syntax): New routine.
1107 (Check_Initialization_List_Syntax): New routine.
1108 (Check_Item_Syntax): New routine.
1109 (Check_State_Declaration_Syntax): New routine.
1110 (Check_Refinement_List_Syntax): New routine.
1111 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
1112
158d55fa
AC
11132014-02-24 Robert Dewar <dewar@adacore.com>
1114
1115 * a-tags.adb, s-os_lib.adb: Minor reformatting.
1116
11172014-02-24 Thomas Quinot <quinot@adacore.com>
1118
1119 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
1120 strerror message, not just numeric errno value.
1121
11222014-02-24 Doug Rupp <rupp@adacore.com>
1123
1124 * raise-gcc.c (exception_class_eq): Make endian neutral.
1125
11262014-02-24 Ed Schonberg <schonberg@adacore.com>
1127
1128 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
1129 flag, and reset Etype and Analyzed attributes unconditionally
1130 when copying a tree that may be partly analyzed.
1131 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
1132 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
1133 within a subprogram body and applies to it, remove it from the
1134 body before making a copy of it, to prevent spurious errors when
1135 analyzing the copied body.
1136
f1a3590e
AC
11372014-02-24 Thomas Quinot <quinot@adacore.com>
1138
1139 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
1140 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
1141 vxWorks.h has been included. Also ensure that file attributes
1142 related definitions are output even in cases where socket support
1143 is not enabled.
1144 * a-tags.adb: Code clean up.
1145 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
1146 instead of -I to add the main ada source directory to the header
1147 search path, in order to avoid conflict between our own "types.h"
1148 and VxWork's <types.h>.
1149
11502014-02-24 Robert Dewar <dewar@adacore.com>
1151
1152 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
1153 * debug.adb: Remove documentation of -gnatd.X, no longer used.
1154 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
1155
11562014-02-24 Bob Duff <duff@adacore.com>
1157
1158 * gnat_ugn.texi: Improve documentation of gnatpp.
1159
47752af2
TQ
11602014-02-24 Thomas Quinot <quinot@adacore.com>
1161
1162 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
1163 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
1164 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
1165 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
1166 a chars_ptr, because on Windows this is a renaming of
1167 Socket_Error_Message.
1168
1b31321b
AC
11692014-02-24 Robert Dewar <dewar@adacore.com>
1170
1171 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
1172 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
1173 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
1174 reorganization.
1175
11762014-02-24 Thomas Quinot <quinot@adacore.com>
1177
1178 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
1179 that the source directory containing s-oscons-tmplt.c is on the
1180 include path, so that all internal header files are available.
1181
28108618
ES
11822014-02-24 Ed Schonberg <schonberg@adacore.com>
1183
1184 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
1185 domain of iteration is an attribute reference 'Old, this is an
1186 Ada 2012 iterator and the loop must be rewritten as such.
1187
3e5b1f32
TQ
11882014-02-24 Thomas Quinot <quinot@adacore.com>
1189
1190 * s-fileio.adb (Errno_Message): Remove, use shared version from
1191 s-os_lib instead.
1192 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
1193 * g-stseme (Socket_Error_Message): Reimplement in terms of new
1194 s-os_lib function.
1195 * g-socthi.ads, g-socthi.adb: Change profile of
1196 Socket_Error_Message to return String to allow the above.
1197 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
1198 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
1199 * g-socthi-vxworks.ads: Update to account for the above profile
1200 change.
1201 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
1202 * s-crtl.ads (strncpy): New procedure.
1203 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
1204 Use import from s-crtl.
1205 * a-envvar.adb, osint.adb: Use imports of C runtime functions
1206 from s-crtl instead of re-importing locally.
1207
c6d2191a
AC
12082014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1209
1210 * sem_prag.adb (Analyze_Global_Item): Emit the
1211 variable related checks concerning volatile objects only when
1212 SPARK_Mode is on.
1213
12142014-02-24 Robert Dewar <dewar@adacore.com>
1215
1216 * sem_ch5.adb (Analyze_Iterator_Specification): use
1217 Error_Msg_Ada_2012_Feature.
1218
12192014-02-24 Jose Ruiz <ruiz@adacore.com>
1220
1221 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
1222 No_Local_Timing_Events and No_Specific_Termination_Handlers
1223 must be set, according to the Ravenscar profile definition
1224 in D.13(6/3).
1225
12262014-02-24 Ed Schonberg <schonberg@adacore.com>
1227
1228 * sem_ch6.adb (Analyze_Expression_Function): If this is a
1229 completion, freeze return type and its designated type if needed.
1230
12312014-02-24 Thomas Quinot <quinot@adacore.com>
1232
1233 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1234 'Address): When moving initialization statements to a freeze
1235 entity, keep them under a single node (i.e. do not unwrap
1236 expressions with actions), and set the Initialization_Statements
1237 attribute again so that processing of a later pragma Import can
1238 still remove them.
1239
12402014-02-24 Claire Dross <dross@adacore.com>
1241
1242 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
1243 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
1244 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
1245 Left/Right to First_To_Previous/Current_To_Last.
1246
12472014-02-24 Thomas Quinot <quinot@adacore.com>
1248
1249 * adaint.h (struct file_attributes): New component "error"
1250 (__gnat_error_attributes): Accessor for the above.
1251 * adaint.c (__gnat_error_attributes): New subprogram
1252 (__gnat_stat): Fix returned value (expect errno value)
1253 (__gnat_stat_to_attr): Add management of error component (set to
1254 stat errno value, except for missing files where it is set to 0,
1255 and exists is set to 0).
1256 * osint.ads (File_Attributes_Size): Update per change above,
1257 also clarify documentation.
1258 * s-filatt.ads: New file, binding to file attributes related
1259 functions.
1260 * Makefile.rtl (s-filatt): New runtime unit.
1261 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
1262 to library function if not available on target).
1263 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
1264 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
1265 SIZEOF_struct_dirent_alloc): New constants.
1266 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
1267 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
1268 Perform appropriate error checking if stat fails (do not just
1269 ignore existing files if stat fails)
1270 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
1271 dependencies.
1272
ec77b144
HK
12732014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1274
1275 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
1276 the use of volatile objects as global items in a function to
1277 the variable related checks section.
1278 * sem_util.adb (Async_Readers_Enabled): Directly call
1279 Has_Enabled_Property.
1280 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
1281 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
1282 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
1283 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
1284 Update the comment on usage. State_Has_Enabled_Property how handles
1285 the original logic of the routine. Add processing for variables.
1286 (State_Has_Enabled_Property): New routine.
1287 (Variable_Has_Enabled_Property): New routine.
1288
32bba3c9
AC
12892014-02-24 Robert Dewar <dewar@adacore.com>
1290
1291 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
1292 Minor reformatting.
1293 * atree.ads, atree.adb (Node35): New function.
1294 (Set_Node35): New procedure.
1295 * debug.adb: Define new debug flag -gnatd.X.
1296 * einfo.ads, einfo.adb (Import_Pragma): New field.
1297 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
1298 really active yet, has to be activated with -gnatd.X.
1299 * sem_prag.adb (Set_Imported): Set new Import_Pragma
1300 field (Set_Imported): Don't set Is_Public (see
1301 Freeze.Wrap_Imported_Subprogram)
1302 * par-ch3.adb (P_Component_List): Handle unexpected null component.
1303
13042014-02-24 Yannick Moy <moy@adacore.com>
1305
1306 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
1307 * gnat_rm.texi: Correct documentation of attribute Update.
1308
13092014-02-24 Ed Schonberg <schonberg@adacore.com>
1310
1311 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
1312 iterator in older versions of Ada.
1313
97027f64
GD
13142014-02-24 Gary Dismukes <dismukes@adacore.com>
1315
1316 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
1317 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
1318
5f50020a
ES
13192014-02-24 Ed Schonberg <schonberg@adacore.com>
1320
1321 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
1322 indexed_components that are instances of Ada 2012 container
1323 indexing operations. Analysis and resolution of such nodes
1324 is performed on the attribute, and the original source is
1325 preserved for ASIS operations. If expansion is enabled, the
1326 indexed component is replaced by the value of this attribute,
1327 which is in a call to an Indexing aspect, in most case wrapped
1328 in a dereference operation.
1329 * sem_ch4.adb (Analyze_Indexed_Component): Create
1330 Generalized_Indexing attribute when appropriate.
1331 (Analyze_Call): If prefix is not overloadable and has an indexing
1332 aspect, transform into an indexed component so it can be analyzed
1333 as a potential container indexing.
1334 (Analyze_Expression): If node is an indexed component with a
1335 Generalized_ Indexing, do not re-analyze.
1336 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
1337 of an indexed_component that has been transformed into a container
1338 indexing operation.
1339 (Resolve_Indexed_Component): Call the above when required.
1340 (Resolve): Do not insert an explicit dereference operation on
1341 an indexed_component whose type has an implicit dereference:
1342 the operation is inserted when resolving the related
1343 Generalized_Indexing.
1344
ec4e8e9a
AC
13452014-02-24 Olivier Ramonat <ramonat@adacore.com>
1346
1347 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
1348 Environment.
1349
13502014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1351
1352 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
1353 error messages.
1354 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
1355 Merge the expected and available mode errors.
1356 (Report_Unused_Constituents): Remove leading spaces in error messages.
1357 (Report_Unused_States): Remove leading spaces in error messages.
1358
e19137bc
AC
13592014-02-24 Thomas Quinot <quinot@adacore.com>
1360
1361 * par_sco.adb (Traverse_One): Refine categorization of statement
1362 SCOs.
1363
13642014-02-24 Robert Dewar <dewar@adacore.com>
1365
1366 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
1367 Pure_05, Pure_12 and Preelaborate_05.
1368 * gnat_rm.texi: Update accordingly.
1369 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
1370 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
1371 Recognize one argument form of these pragmas only in GNAT mode
1372 (-gnatg).
1373
1037b0f4
AC
13742014-02-24 Ed Schonberg <schonberg@adacore.com>
1375
1376 * s-dimmks.ads: Replace symbol for temperature, previously the
1377 Greek letter Theta, by the ASCII @ sign.
1378 * s-diflio.ads: ditto.
1379
13802014-02-24 Robert Dewar <dewar@adacore.com>
1381
1382 * exp_ch4.adb: Minor code reorganization (use OR for boolean
1383 variables).
1384 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
1385
13862014-02-24 Ben Brosgol <brosgol@adacore.com>
1387
1388 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
1389 so that references to gnatmem and ASIS tools do not appear in the FSF
1390 edition of the GNAT User's Guide.
1391
ebb6b0bd
AC
13922014-02-24 Yannick Moy <moy@adacore.com>
1393
1394 * freeze.adb (Freeze_Entity): Do not issue warning
1395 for pre/post being ignored on imported subprogram in GNATprove
1396 mode.
1397
13982014-02-24 Robert Dewar <dewar@adacore.com>
1399
1400 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
1401 stand.ads, sem_eval.adb: Minor reformatting.
1402
14032014-02-24 Yannick Moy <moy@adacore.com>
1404
1405 * sem_prag.adb: Minor rewording in error message.
1406
14072014-02-24 Johannes Kanig <kanig@adacore.com>
1408
1409 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
1410 GNATprove_mode, gnat2why doesn't need nor use these types.
1411
14122014-02-24 Gary Dismukes <dismukes@adacore.com>
1413
1414 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
1415 target, in the case of signed integer exponentiation that uses a
1416 run-time routine, always select the Exp_* versions, since overflow
1417 checking is automatically done by AAMP arithmetic instructions.
1418
14192014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1420
1421 * sem_ch13.adb (Analyze_Aspect_Specifications):
1422 When the related context is a package instace, insert pragma
1423 Abstract_State after all internally-generated renamings related
1424 to the instance "header".
1425
14262014-02-24 Ed Schonberg <schonberg@adacore.com>
1427
1428 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
1429 subprograms.
1430 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
1431 call to an abstract subprogram is legal if it appears in a
1432 pre/postcondition of another abstract operation.
1433
c97d7285
AC
14342014-02-24 Sergey Rybin <rybin@adacore.com frybin>
1435
1436 * gnat_ugn.texi: Misc updates.
1437
14382014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1439
1440 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
1441
14422014-02-24 Gary Dismukes <dismukes@adacore.com>
1443
1444 * layout.adb (Layout_Variant_Record): Instantiate
1445 Generic_Check_Choices and call Check_Choices before calling
1446 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
1447 set to prevent generating incorrect discriminant-checking
1448 functions for 'others' variants (functions that unconditionally
1449 return True rather than accounting for the values covered by the
1450 'others' choice).
1451 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
1452 Formal_Derived_Matching.
1453 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
1454 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
1455 Formal_Derived_Matching formal to Subtypes_Statically_Match.
1456 (Subtypes_Statically_Match): Suppress the Object_Size matching
1457 test in the case where Formal_Derived_Matching is True.
1458 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
1459 True for Formal_Derived_Matching_Formal on the call to
1460 Subtypes_Statically_Compatible.
1461
9fbb94f2
EB
14622014-02-23 Eric Botcazou <ebotcazou@adacore.com>
1463
1464 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
1465
086de490
EB
14662014-02-23 Eric Botcazou <ebotcazou@adacore.com>
1467
1468 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
1469 Look through a conversion between original and packable version to get
1470 the base object.
1471 (build_component_ref): Rework comment and fix formatting.
1472
350b83cc
AC
14732014-02-20 Sergey Rybin <rybin@adacore.com frybin>
1474
1475 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
1476 project-specific options.
1477
14782014-02-20 Ed Schonberg <schonberg@adacore.com>
1479
1480 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
1481 not Constraint_Error.
1482 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
1483 * sem_ch5.adb: Code clean up.
1484
8880426d
AC
14852014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
1486
1487 * sem_prag.adb (Usage_Error): Remove local
1488 constant Typ. Remove the specialized diagnostics for unconstrained
1489 or tagged items as those are not part of the explicit input set
1490 of the related subprogram and should not be flagged.
1491
14922014-02-20 Ed Schonberg <schonberg@adacore.com>
1493
1494 * sem_attr.adb: Add guard to preserve all errors.
1495
14962014-02-20 Vincent Celier <celier@adacore.com>
1497
1498 * switch-m.adb (Normalize_Compiler_Switches): Take into account
1499 switches that are recorded in ALI files: -gnateA, -gnateE,
1500 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
1501
15022014-02-20 Ed Schonberg <schonberg@adacore.com>
1503
1504 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
1505 of an element iterator form over a formal container with an
1506 Iterable aspect.
1507 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
1508 to create declaration and loop statements for both forms of
1509 container iterators.
1510 (Expand_Formal_Container_Element_Iterator): New procedure
1511 to handle loops of the form "for E of C" when C is a formal
1512 container.
1513 (Expand_Formal_Container_Iterator): Code cleanup.
1514
46de64ca
AC
15152014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
1516
1517 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
1518 (Analyze_Contract_Case): Remove the use of
1519 "may". Replace "aspect Contract_Cases" to avoid categorization
1520 of aspect vs pragma.
1521 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
1522 (Analyze_Global_Item): Remove
1523 the use of "formal", specify the subprogram. Split the
1524 error message about a state with visible refinement into
1525 two. Remove the use of "global" from "volatile global item".
1526 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
1527 is on one line.
1528 (Analyze_Input_Output): Update the call to
1529 Check_Mode. Specify the duplicated item. Reword the error
1530 message concerning an input of a null output list. Use "\"
1531 for error message continuation.
1532 (Analyze_Part_Of): Remove
1533 the use of "may". Use "\" for error message continuation.
1534 (Analyze_Refined_Depends_In_Decl_Part): Update the error
1535 message concerning a useless refinement to match the format
1536 of Refined_Global.
1537 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
1538 concerning a useless refinement.
1539 (Analyze_Refinement_Clause): Use "\" for error message continuation.
1540 (Check_Constituent_Usage): Use "\" for error message continuation.
1541 (Check_Dependency_Clause): Use "\" for error message continuation.
1542 (Check_Matching_Constituent): Use "\" for error message continuation.
1543 (Check_Missing_Part_Of): Use "\" for error message continuation.
1544 (Check_Mode): Renamed to
1545 Check_Role. Update the comment on usage. Redo the error reporting
1546 to use Role_Error.
1547 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
1548 message continuation.
1549 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
1550 with comment on usage. Update all occurrences of Is_Input and Is_Output.
1551 (Inconsistent_Mode_Error): Use "\" for error message continuation.
1552 (Input_Match): Use "\" for error message continuation.
1553 (Role_Error): New routine.
1554 (Set_Convention_From_Pragma): Use "\" for error message continuation.
1555 (Usage_Error): Add local variable Error_Msg. Build specialized error
1556 message showcasing the offending item kind. Redo the diagnostics for
1557 unconstrained types.
1558
15592014-02-20 Ed Schonberg <schonberg@adacore.com>
1560
1561 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
1562 to determine whether a type is a container type, rather than
1563 examining only its type declaration, so that subtypes and derived
1564 types are handled properly.
1565
15662014-02-20 Sergey Rybin <rybin@adacore.com frybin>
1567
1568 * gnat_ugn.texi: gnatmetric: add description of project-specific
1569 options.
1570
15712014-02-20 Ed Schonberg <schonberg@adacore.com>
1572
1573 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
1574 all choices in an association for a record type have the same
1575 type, as is done for record aggregates.
1576
3e586e10
AC
15772014-02-20 Robert Dewar <dewar@adacore.com>
1578
1579 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
1580 Unmodified rather than Warnings (Off). Make comments
1581 uniform in the four affected units.
1582
15832014-02-20 Robert Dewar <dewar@adacore.com>
1584
1585 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1586 Object_Size): For non-scalar types allow any value that is a
1587 multiple of 8.
1588 * gnat_rm.texi: Document Object_Size for composites more clearly.
1589
15902014-02-20 Yannick Moy <moy@adacore.com>
1591
1592 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
1593
15942014-02-20 Ed Schonberg <schonberg@adacore.com>
1595
1596 * stand.ads: Raise_Type: new predefined entity, used as the type
1597 of a Raise_Expression prior to resolution.
1598 * cstand.adb: Build entity for Raise_Type.
1599 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
1600 initial type of the node.
1601 * sem_type.adb (Covers): Raise_Type is compatible with all
1602 other types.
1603 * sem_res.adb (Resolve): Remove special handling of Any_Type on
1604 Raise_Expression nodes.
1605 (Resolve_Raise_Expression): Signal ambiguity if the type of the
1606 context is still Raise_Type.
1607
7f568bfa
AC
16082014-02-20 Robert Dewar <dewar@adacore.com>
1609
1610 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
1611 mismatching predicates.
1612 * sem_ch6.adb (Check_Conformance): Give better messages on
1613 predicate mismatch.
1614 * sem_eval.adb (Predicates_Match): Move to spec.
1615 * sem_eval.ads (Predicates_Match): Moved here from body.
1616
16172014-02-20 Ed Schonberg <schonberg@adacore.com>
1618
1619 * a-cbmutr.adb: Use default value in Insert_Child.
1620
308aab0b
AC
16212014-02-20 Vincent Celier <celier@adacore.com>
1622
1623 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
1624 Stringt.Initialize in all project aware tools.
1625
16262014-02-20 Doug Rupp <rupp@adacore.com>
1627
1628 * gnat_ugn.texi: Document gnatbind -X option.
1629 * vms_data.ads: Minor warnings documentation reformatting.
1630
16312014-02-20 Ed Schonberg <schonberg@adacore.com>
1632
1633 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
1634 procedure for a base type.
1635
16362014-02-20 Robert Dewar <dewar@adacore.com>
1637
1638 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
1639 expression with type info.
1640 * sem_ch13.adb: Minor reformatting.
1641 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
1642 False if predicates do not match on the two types.
1643
16442014-02-20 Arnaud Charlet <charlet@adacore.com>
1645
1646 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
1647 In Relaxed_RM_Semantics mode, allow any static integer value,
1648 for compatibility with other compilers.
1649
0f361206
AC
16502014-02-20 Vincent Celier <celier@adacore.com>
1651
1652 * errutil.adb (Initialize): Properly initialize entry in table
1653 Warnings when warnings are suppressed.
1654
16552014-02-20 Robert Dewar <dewar@adacore.com>
1656
1657 * s-os_lib.ads: Add warning about non-portability of Rename_File.
1658 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
1659 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
1660 * gnat_ugn.texi: Document no warnings on junk variable names.
1661 * layout.adb: Minor code reorganization (use Ekind_In).
1662 * stringt.adb: Move initialization of Null_String_Id to Initialize
1663 routine.
1664
16652014-02-20 Ed Schonberg <schonberg@adacore.com>
1666
1667 * sem_ch13.adb: Initialize optional Element_Id.
1668
c0cdbd39
AC
16692014-02-20 Robert Dewar <dewar@adacore.com>
1670
1671 * s-os_lib.ads (Rename_File): Minor commment addition.
1672
16732014-02-20 Thomas Quinot <quinot@adacore.com>
1674
1675 * einfo.ads: Minor reformatting.
1676
16772014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
1678
1679 * aspects.adb (Exchange_Aspects): New routine.
1680 * aspects.ads (Exchange_Aspects): New routine.
1681 * atree.adb (Rewrite): Do not check whether the save node has
1682 aspects as it never will, instead check the node about to be clobbered.
1683 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
1684 entities of generic packages.
1685 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
1686 pointer of an aspect specification list after rewriting takes place.
1687 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
1688 specifications of the generic template and the copy used for analysis.
1689 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
1690 the aspect specifications of the generic template and the
1691 copy used for analysis.
1692 (Analyze_Package_Instantiation): Propagate the aspect specifications
1693 from the generic template to the instantiation.
1694 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
1695 specifications from the generic template to the instantiation.
1696 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
1697 Abstract_State, Initializes and Initial_Condition when they
1698 apply to a package instantiation.
1699
17002014-02-20 Robert Dewar <dewar@adacore.com>
1701
1702 * stringt.adb: Add call to Initialize in package initialization.
1703
fe4552f4
AC
17042014-02-20 Robert Dewar <dewar@adacore.com>
1705
1706 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
1707 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
1708 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
1709 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
1710 reformatting.
1711
17122014-02-20 Bob Duff <duff@adacore.com>
1713
1714 * s-os_lib.ads: Minor: Remove incorrect comment.
1715
17162014-02-20 Robert Dewar <dewar@adacore.com>
1717
1718 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
1719
17202014-02-20 Ed Schonberg <schonberg@adacore.com>
1721
1722 * a-cborma.adb (Assign): When creating a node without a specified
1723 element, insert an uninitialized element in the map, because
1724 the instance may provide an element type with a default
1725 initialization, e.g a scalar with a Default_Value aspect.
1726 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
1727 (Insert): In the version without explicit element, provide an
1728 uninitialized element, as above.
1729 * a-cbdlli.adb (Append): In the version without explicit element,
1730 provide an uninitalized element, as above.
1731 (Allocate): Remove unused version.
1732
3730c4a0
AC
17332014-02-20 Robert Dewar <dewar@adacore.com>
1734
1735 * sem_elab.adb: Minor code reorganization (use Nkind_In).
1736 * stringt.adb: Remove temporary pragma Warnings (Off).
1737 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
1738 of Null_String_Id.
1739
17402014-02-20 Matthew Heaney <heaney@adacore.com>
1741
1742 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
1743 index.
1744
0c7e0c32
AC
17452014-02-20 Ed Schonberg <schonberg@adacore.com>
1746
1747 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
1748 properly the cursor type for subsequent volatile testing in SPARK
1749 mode, when domain is a formal container with an Iterabe aspect.
1750
17512014-02-20 Robert Dewar <dewar@adacore.com>
1752
1753 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
1754 (Set_Specific_Warning_Off): Add Reason argument.
1755 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
1756 (Set_Specific_Warning_Off): Add Reason argument.
1757 * erroutc.adb (Warnings_Entry): Add Reason field
1758 (Specific_Warning_Entry): Add Reason field.
1759 (Warnings_Suppressed): return String_Id for Reason.
1760 (Warning_Specifically_Suppressed): return String_Id for Reason.
1761 * erroutc.ads (Warnings_Entry): Add Reason field.
1762 (Specific_Warning_Entry): Add Reason field.
1763 (Set_Specific_Warning_Off): Add Reason argument.
1764 (Set_Warnings_Mode_Off): Add Reason argument.
1765 (Warnings_Suppressed): return String_Id for Reason.
1766 (Warning_Specifically_Suppressed): return String_Id for Reason.
1767 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
1768 (Warning_Specifically_Suppressed): returns String_Id for Reason
1769 * gnat_rm.texi: Document that Warning parameter is string literal
1770 or a concatenation of string literals.
1771 * par-prag.adb: New handling for Reason argument.
1772 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
1773 for Reason argument.
1774 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
1775 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
1776 * stringt.adb: Set Null_String_Id.
1777 * stringt.ads (Null_String_Id): New constant.
1778
e4494292
RD
17792014-02-20 Robert Dewar <dewar@adacore.com>
1780
1781 * einfo.ads: Minor comment addition: Etype of package is
1782 Standard_Void_Type.
1783 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
1784 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
1785 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
1786 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
1787 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
1788 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1789 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
1790 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
1791 Replace all calls with calls to New_Occurrence_Of.
1792
17932014-02-20 Robert Dewar <dewar@adacore.com>
1794
1795 * par-util.adb (Ignore, case of right paren): Make this a
1796 serious error.
1797
d7cb47b4
AC
17982014-02-19 Robert Dewar <dewar@adacore.com>
1799
1800 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
1801 * debug.adb: Remove -gnatd.X switch, no longer used.
1802 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
1803 now always made.
1804
18052014-02-19 Bob Duff <duff@adacore.com>
1806
1807 * g-socket.ads: Minor: Correct some comments.
1808
53f697ee
AC
18092014-02-19 Ed Schonberg <schonberg@adacore.com>
1810
1811 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
1812
18132014-02-19 Arnaud Charlet <charlet@adacore.com>
1814
1815 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
1816 an error on out of range priorities if Relaxed_RM_Semantics.
1817 * sem_prag.adb (Analyze_Pragma): Ditto.
1818
18192014-02-19 Bob Duff <duff@adacore.com>
1820
1821 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
1822 where F denotes the renaming of an enumeration literal, and
1823 issue a specialized error message.
1824
47fb6ca8
AC
18252014-02-19 Matthew Heaney <heaney@adacore.com>
1826
1827 * a-chtgop.ads (Checked_Index): New operation.
1828 (Next): Changed mode of hash table.
1829 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
1830 (Generic_Read, Reserve_Capacity): Ditto.
1831 (Generic_Equal): Detect tampering.
1832 (Next): Changed mode of hash table, detect tampering.
1833 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
1834 operation.
1835 (Find): Changed mode of hash table.
1836 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
1837 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
1838 tampering.
1839 (Find): Changed mode of hash table, check for tampering.
1840 (Generic_Replace_Element): Check for tampering.
1841 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
1842 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
1843 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
1844 Detect tampering.
1845 (Find, Generic_Replace_Element): Check for tampering.
1846 * a-chtgbo.ads (Checked_Index): New operation.
1847 * a-chtgbo.adb (Checked_Index): New operation
1848 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
1849 (Generic_Read, Next): Ditto.
1850 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
1851 table (Difference, Intersection): Use variable view of
1852 source, detect tampering (Find, Is_Subset, Overlap): Use
1853 variable view of container (Symmetric_Difference, Union):
1854 Detect tampering (Vet): Use Checked_Index to detect tampering
1855 (Constant_Reference, Element, Find): Use variable view of
1856 container.
1857 (Update_Element_Preserving_Key): Detect tampering.
1858 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
1859 of container.
1860 (Is_Subset): Ditto.
1861 (Equivalent_Sets, Overlap): Use Node's Next component.
1862 (Vet): Use Checked_Index to detect tampering.
1863 (Constant_Reference, Element, Find): Use variable view of container.
1864 (Update_Element_Preserving_Key): Detect tampering.
1865 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
1866 Element, Find): Use variable view of container.
1867 (Reference): Rename hash table component.
1868 (Vet): Use Checked_Index to detect tampering.
1869
18702014-02-19 Arnaud Charlet <charlet@adacore.com>
1871
1872 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
1873 of -nostdinc.
1874
18752014-02-19 Thomas Quinot <quinot@adacore.com>
1876
1877 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
1878 against calls without Def_Id.
1879
18802014-02-19 Claire Dross <dross@adacore.com>
1881
1882 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
1883 a-cofove.ads: Add global annotations to subprograms.
1884
18852014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1886
1887 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
1888 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
1889 Initial_Condition no longer requires the presence of pragma
1890 Initialized. Do not try to diagnose whether all variables mentioned in
1891 pragma Initializes also appear in Initial_Condition.
1892 (Collect_Variables): Removed.
1893 (Match_Variable): Removed.
1894 (Match_Variables): Removed.
1895 (Report_Unused_Variables): Removed.
1896
18972014-02-19 Thomas Quinot <quinot@adacore.com>
1898
1899 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
1900
13f39091
AC
19012014-02-19 Robert Dewar <dewar@adacore.com>
1902
1903 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
1904 reformatting.
1905
19062014-02-19 Vincent Celier <celier@adacore.com>
1907
1908 * prj-part.adb (Parse_Single_Project): Use the fully resolved
1909 project path, with all symbolic links resolved, to check if the
1910 same project is imported with a different unresolved path.
1911 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
1912 changed to Resolved_Path to reflect that all symbolic links
1913 are resolved.
1914
110e2969
AC
19152014-02-19 Ed Schonberg <schonberg@adacore.com>
1916
1917 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
1918 from sem_ch13, for use elsewhere.
1919 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
1920 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
1921 cursor type on the loop variable when the iteration is over o
1922 formal container.
1923
19242014-02-19 Vincent Celier <celier@adacore.com>
1925
1926 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
1927 for an empty Target (Check_Target): Never fail when an empty
1928 target is declared in the configuration project.
1929
19302014-02-19 Ed Schonberg <schonberg@adacore.com>
1931
1932 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
1933 the pragma comes fron a predicate aspect and the context is a
1934 record declaration within the scope that declares the type.
1935
19362014-02-19 Robert Dewar <dewar@adacore.com>
1937
1938 * gnat_rm.texi: Minor clarifications.
1939 * expander.adb, sem_aggr.adb: Add comments.
1940
ffdeb702
AC
19412014-02-19 Ed Schonberg <schonberg@adacore.com>
1942
1943 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
1944 applies to a subprogram body, the name is the current scope,
1945 rather than being declared in the current scope.
1946 (Analyze_Pragma, case No_Return): Handle properly a No_Return
1947 aspect applied to a subprogram body.
1948
19492014-02-19 Ed Schonberg <schonberg@adacore.com>
1950
1951 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
1952 of overloaded subprograms, and fix bug in handling of primitive
1953 operation Element.
1954
19552014-02-19 Pascal Obry <obry@adacore.com>
1956
1957 * s-os_lib.adb: Minor reformatting.
1958
19592014-02-19 Yannick Moy <moy@adacore.com>
1960
1961 * expander.adb (Expand): Do nothing inside generics.
1962 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
1963 generics.
1964
19652014-02-19 Yannick Moy <moy@adacore.com>
1966
1967 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
1968
edbd98c4
AC
19692014-02-19 Robert Dewar <dewar@adacore.com>
1970
1971 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
1972 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
1973 longer needed).
1974
19752014-02-19 Claire Dross <dross@adacore.com>
1976
1977 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1978 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
1979
476b301a
AC
19802014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
1981
1982 * sem_ch3.adb (Analyze_Declarations): Analyze
1983 a package contract at the end of the private declarations (if
1984 applicable), otherwise analyze it and the end of the visible
1985 declarations.
1986
19872014-02-19 Ed Schonberg <schonberg@adacore.com>
1988
1989 * style.adb (Missing_Overriding): If subprogram is an
1990 instantiation, place warning on the instance node itself,
1991 without mention of the original generic. Do not emit message
1992 if explicit Ada version is older than the introduction of the
1993 overriding indicator.
1994
a6ce7e76
AC
19952014-02-19 Yannick Moy <moy@adacore.com>
1996
1997 * gnat_rm.texi: Doc clarifications.
1998
19992014-02-19 Yannick Moy <moy@adacore.com>
2000
2001 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
2002 inside a generic.
2003
20042014-02-19 Ed Schonberg <schonberg@adacore.com>
2005
2006 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
2007 specified First primitive, rather than by name.
2008 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
2009 and extend error checking for missing primitives and incorrect
2010 signatures.
2011
20122014-02-19 Ed Schonberg <schonberg@adacore.com>
2013
2014 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
2015 errors when a Synchronization aspect on an overriding protected
2016 operation does not match the given aspect on the overridden
2017 operation of an ancestor interface.
2018
20192014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2020
2021 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
2022 (Check_Loop_Pragma_Placement): Update
2023 comment on usage. Remove local variables Orig_Stmt and
2024 Within_Same_Sequence. Check that the current Loop_Invariant or
2025 Loop_Variant pragma is grouped together with other such pragmas.
2026 (Is_Loop_Pragma): New routine.
2027 (Prev_In_Loop): Removed.
2028
0b7f0f0e
AC
20292014-02-19 Robert Dewar <dewar@adacore.com>
2030
2031 * par-ch6.adb (P_Return): For extended return, end column lines
2032 up with RETURN.
2033 * par.adb: Minor documentation clarification.
2034
20352014-02-19 Yannick Moy <moy@adacore.com>
2036
2037 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
2038 that Loop_Invariant and Loop_Variant appear consecutively.
2039 * gnat_rm.texi Update documentation of Loop_Invariant and
2040 Loop_Variant pragmas.
2041
20422014-02-19 Robert Dewar <dewar@adacore.com>
2043
2044 * debug.adb: Document -gnatd.X.
2045 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
2046 first token
2047 (Check_Then_Column): Ditto.
2048 * styleg.adb (Check_Then): Allow THEN on line after IF.
2049 (Check_Then): Check THEN placement under control of -gnatd.X
2050 * styleg.ads (Check_Then): Now called even if THEN is not first
2051 token on line.
2052 * stylesw.ads (Style_Check_If_Then_Layout): Document new
2053 relaxed rules.
2054 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
2055
20562014-02-19 Robert Dewar <dewar@adacore.com>
2057
2058 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
2059 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
2060 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
2061 vms_conv.adb: Fix bad layout of IF statements
2062
e7cff5af
RD
20632014-02-19 Robert Dewar <dewar@adacore.com>
2064
2065 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
2066
a767d69b
AC
20672014-02-19 Robert Dewar <dewar@adacore.com>
2068
2069 * exp_util.adb: Update comments.
2070
20712014-02-19 Doug Rupp <rupp@adacore.com>
2072
2073 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
2074 * init.c (__gl_float_format): [VMS] New global.
2075 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
2076 representation in effect.
2077
20782014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2079
2080 * exp_ch6.adb Add with and use clause for Exp_Prag.
2081 (Expand_Contract_Cases): Relocated to Exp_Prag.
2082 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
2083 * exp_prag.adb Add with and use clauses for Checks and Validsw.
2084 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
2085 structure of the expanded code to showcase the evaluation of
2086 attribute 'Old prefixes. Add local variable Old_Evals. Expand
2087 any attribute 'Old references found within a consequence. Add
2088 circuitry to evaluate the prefixes of attribute 'Old that
2089 belong to a selected consequence.
2090 (Expand_Old_In_Consequence): New routine.
2091 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
2092 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
2093 potentially unevaluated prefix is always evaluated.
2094
adb252d8
AC
20952014-02-19 Robert Dewar <dewar@adacore.com>
2096
2097 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
2098 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
2099 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
2100 handling for the case of Modify_Tree_For_C, this approach did
2101 not work.
2102 * exp_util.adb (Matching_Standard_Type): New function
2103 (Side_Effect_Free): New top level functions (from
2104 Remove_Side_Effects).
2105 * exp_util.ads (Side_Effect_Free): New top level functions
2106 (moved from body).
2107 * sinfo.ads: Minor comment updates.
2108
21092014-02-19 Ed Schonberg <schonberg@adacore.com>
2110
2111 * exp_ch6.adb (Expand_Simple_Function_Return): If return
2112 type is unconstrained and uses the secondary stack, mark the
2113 enclosing function accordingly, to ensure that the value is not
2114 prematurely removed.
2115
21162014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2117
2118 * par.adb Alphabetize the routines in Par.Sync.
2119 (Resync_Past_Malformed_Aspect): New routine.
2120 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
2121 variables. Code and comment reformatting. Detect missing
2122 parentheses on aspects [Refined_]Global and [Refined_]Depends
2123 with a non-null definition.
2124 * par-sync.adb: Alphabetize all routines in this separate unit.
2125 (Resync_Past_Malformed_Aspect): New routine.
2126
a0367005
RD
21272014-02-19 Robert Dewar <dewar@adacore.com>
2128
2129 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
2130 if Esize values do not match.
2131
e03f7ccf
AC
21322014-02-19 Yannick Moy <moy@adacore.com>
2133
2134 * sinfo.ads: Minor comment update.
2135
21362014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2137
2138 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
2139
21402014-02-19 Thomas Quinot <quinot@adacore.com>
2141
2142 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
2143 that has the No_Ctrl_Actions flag is a suitable node to be
2144 wrapped if the assigned expression has no finalization actions.
2145 * sem_eval.adb (Eval_Entity_Name): For a compile time known
2146 boolean value, mark the corresponding condition SCO as constant.
2147
21482014-02-19 Robert Dewar <dewar@adacore.com>
2149
2150 * exp_util.adb: Minor reformatting.
2151 * exp_util.ads (Matching_Standard_Type): New function.
2152 * exp_ch7.adb: Minor reformatting.
2153
21542014-02-19 Ed Schonberg <schonberg@adacore.com>
2155
2156 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
2157 to find declaration for Cursor, to handle properly the case of
2158 a discriminated iterable type.
2159
21602014-02-19 Vincent Celier <celier@adacore.com>
2161
2162 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
2163 imported library projects with the library ALI dirs, when setting
2164 the object paths.
2165 * prj-env.ads (Ada_Objects_Path): Correct comments about
2166 argument Including_Libraries.
2167
4877d85f
AC
21682014-02-19 Gary Dismukes <dismukes@adacore.com>
2169
2170 * gnat_rm.texi: Minor spelling fixes.
2171
21722014-02-19 Doug Rupp <rupp@adacore.com>
2173
2174 * init.c: Remove unneeded code.
2175 * fe.h (Float_Format): New macro
2176 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
2177
f660fba6
AC
21782014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2179
2180 * sem_prag.adb (Check_Refined_Global_Item):
2181 A state or variable acts as a constituent only it is part of an
2182 encapsulating state and the state has visible refinement.
2183
21842014-02-19 Ed Schonberg <schonberg@adacore.com>
2185
2186 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
2187 postcondition for a function when the expression does not mention
2188 'Result but the function has in-out parameters.
2189
21902014-02-19 Robert Dewar <dewar@adacore.com>
2191
2192 * gnat_rm.texi: Add documentation on Value_Size forcing biased
2193 representation.
2194
b4f149c2
AC
21952014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2196
2197 * lib-xref.ads Remove the small table of letter and symbol usage as we
2198 already have one.
2199
22002014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2201
2202 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
2203 messages depending on the offending misplaced aspect specifications.
2204 (Diagnose_Misplaced_Aspect_Specifications): New routine.
2205
22062014-02-19 Ed Schonberg <schonberg@adacore.com>
2207
2208 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
2209 for iterable aspect primitives.
2210 (Resolve_Iterable_Operation): Use expected signature of iterable
2211 aspect to resolve primitive when overloading is present.
2212 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
2213 (Check_Signature): Removed.
2214
ddd2bec5
AC
22152014-02-19 Yannick Moy <moy@adacore.com>
2216
2217 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
2218 subunit in GNATprove_Mode.
2219 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
2220
22212014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2222
2223 * lib-xref.ads Alphabetize the contents of table
2224 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
2225 for E_Abstract_State. List all letters and symbols in use.
2226 * sem_prag.adb (Analyze_Abstract_State): Update all calls
2227 to Create_Abstract_State to reflect the new signature.
2228 (Create_Abstract_State): Change subprogram profile and update
2229 the comment on usage. Use the proper location of the state
2230 declaration when creating a new abstract state entity. Do not
2231 generate an external name, but simply reuse the name coming from
2232 the state declaration.
2233
3a845e07
RD
22342014-02-19 Robert Dewar <dewar@adacore.com>
2235
2236 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
2237 declarations get properly inserted in Modify_Tree_For_C mode.
2238 * sinfo.ads: Minor comment addition.
2239
82d4f390
RD
22402014-02-19 Robert Dewar <dewar@adacore.com>
2241
2242 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
2243 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
2244
dd2bf554
ES
22452014-02-19 Ed Schonberg <schonberg@adacore.com>
2246
2247 * style.adb (Missing_Overriding): Warning does not apply in
2248 language versions prior to Ada 2005.
2249 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
2250 * sem_attr.adb: Add Attribute_Iterable where needed.
2251 * exp_attr.adb: ditto.
2252 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
2253 handle loops and quantified expressions over types that have an
2254 iterable aspect. Called from Expand_Iterator_Loop.
2255 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
2256 with Iterable aspect.
2257 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
2258 subprograms specified in the Iterable aspect have the proper
2259 signature involving container and cursor.
2260 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
2261 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
2262 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
2263 New procedure to retrieve one of the primitives First, Last,
2264 or Has_Element, from the value of the iterable aspect of a
2265 formal container.
2266 (Is_Container_Element): Predicate to recognize expressions
2267 that denote an element of one of the predefined containers,
2268 for possible optimization. This subprogram is not currently
2269 used, pending ARG discussions on the legality of the proposed
2270 optimization. Worth preserving for eventual use.
2271 (Is_Iterator): Recognize formal container types.
2272 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
2273
e0f63680
AC
22742014-02-19 Robert Dewar <dewar@adacore.com>
2275
2276 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
2277 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
2278 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
2279 declarations from list of actions.
2280 * output.ads, output.adb (Delete_Last_Char): New procedure.
2281 * sinfo.ads: Document handling of Mod and expression with actions
2282 in Modify_Tree_For_C mode.
2283
22842014-02-19 Ed Schonberg <schonberg@adacore.com>
2285
2286 * par-ch9.adb (P_Task): Add a null statement to produce a
2287 well-formed task body when due to a previous syntax error the
2288 statement list is empty.
2289
22902014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2291
2292 * sem_prag.adb (Check_Dependency_Clause): Account
2293 for the case where a state with a non-null refinement matches a
2294 null output list. Comment reformatting.
2295 (Inputs_Match): Copy a solitary input to avoid an assertion failure
2296 when trying to match the same input in multiple clauses.
2297
22982014-02-19 Gary Dismukes <dismukes@adacore.com>
2299
2300 * sem_attr.adb: Minor typo fix.
2301
2c9f8c0a
AC
23022014-02-18 Robert Dewar <dewar@adacore.com>
2303
2304 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
2305 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
2306 (Create_Standard): Create new unsigned types.
2307 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
2308 mode (Expand_N_Reference): Removed, problematic and not needed
2309 for now.
2310 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
2311 not needed for now.
2312 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
2313 * expander.adb: Remove call to Expand_N_Reference (problematic,
2314 and not needed now).
2315 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
2316 * stand.adb: Read and write unsigned type entities.
2317 * stand.ads: Add new unsigned types.
2318
23192014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
2320
2321 * sem_ch4.adb (Analyze_Call): Do not mark a function call
2322 as being inside an assertion expression as the flag is now removed.
2323 (Check_Ghost_Subprogram_Call): Do not query the
2324 In_Assertion_Expression flag as it is now removed, instead use
2325 a predicate function.
2326 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
2327 In_Assertion_Expression flag as it is now removed, instead use
2328 a predicate function.
2329 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
2330 * sem_util.adb Add with and use clause for Sem_Prag.
2331 (In_Assertion_Expression_Pragma): New routine.
2332 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
2333 * sinfo.adb (In_Assertion_Expression): Removed.
2334 (Set_In_Assertion_Expression): Removed.
2335 * sinfo.ads Remove flag In_Assertion_Expression along with its
2336 use in nodes.
2337 (In_Assertion_Expression): Removed along with
2338 pragma Inline. (Set_In_Assertion_Expression): Removed along
2339 with pragma Inline.
2340
23412014-02-18 Sergey Rybin <rybin@adacore.com frybin>
2342
2343 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
2344 used together with '-r', '-rf' or '-rnb' options.
2345
23462014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
2347
2348 * sem_attr.adb (Analyze_Attribute): Comment
2349 and code reformatting. Use separate routines to check the
2350 legality of attribute 'Old in certain pragmas. Verify
2351 the use of 'Old, 'Result and locally declared entities
2352 within the prefix of 'Old.
2353 (Check_References_In_Prefix): New routine.
2354 (Check_Use_In_Contract_Cases): New routine.
2355 (Check_Use_In_Test_Case): New routine.
2356
3b821fe9
VC
23572014-02-18 Vincent Celier <celier@adacore.com>
2358
2359 * sem_aux.adb (Is_By_Reference_Type): For each components of
2360 a record type, check also if the component is volatile as it
2361 may have an aspect that makes it volatile. If it is, then the
2362 record type is a by reference type.
2363
365c8496
RD
23642014-02-18 Robert Dewar <dewar@adacore.com>
2365
2366 * exp_attr.adb: Minor reformatting.
2367 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
2368 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
2369 as another case where we don't generate N_Reference nodes for
2370 primitive types.
2371 * expander.adb (Expand): Add call to Expand_N_Reference.
2372
aa9b151a
AC
23732014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2374
2375 * sem_prag.adb (Analyze_Refined_Pragma): Remove
2376 local variable Pack_Spec. Refinement pragmas may now apply to
2377 bodies of both visible and private subprograms.
2378
23792014-02-06 Robert Dewar <dewar@adacore.com>
2380
2381 * exp_attr.adb (Expand_Loop_Entry_Attribute):
2382 Minor change (Attr => N) (Expand_Pred_Succ): New name
2383 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
2384 Max): Expand into if expression if Modify_Tree_For_C mode.
2385 (Expand_N_Attribute_Reference, case Min): ditto
2386 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
2387 Max attributes.
2388
23892014-02-06 Ed Schonberg <schonberg@adacore.com>
2390
2391 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
2392 predicate check if this is an internal declaration with
2393 No_Initialization set, as for an expanded aggregate component.
2394
23952014-02-06 Doug Rupp <rupp@adacore.com>
2396
2397 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
2398 conditions with severity of "SUCCESS" or "INFORMATIONAL".
2399
85d6bf87
AC
24002014-02-06 Yannick Moy <moy@adacore.com>
2401
2402 * sem_prag.adb (Analyze_Pragma): Analyze pragma
2403 Debug rewritten node before rewriting it as a null statement in
2404 GNATprove mode.
2405
24062014-02-06 Robert Dewar <dewar@adacore.com>
2407
2408 * sem_attr.adb (Min_Max): New procedure.
2409 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
2410 procedure.
2411
c3b266d6
AC
24122014-02-06 Sergey Rybin <rybin@adacore.com frybin>
2413
2414 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
2415 gnatmetric/gnatpp.
2416
24172014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2418
2419 * sem_prag.adb (Analyze_Abstract_State): Update
2420 all calls to Create_Abstract_State to pass the proper state
2421 "declaration".
2422 (Create_Abstract_State): Add new formal parameter
2423 State_Decl along with comment on usage. Establish a link between
2424 the abstract state entity and the state declaration.
2425
428684fd
RD
24262014-02-06 Robert Dewar <dewar@adacore.com>
2427
2428 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
2429 comparison of unordered enumeration type.
2430 (Analyze_Attribute, case Max): Check for improper comparison of
2431 unordered enumeration type.
2432 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
2433 sem_util.adb.
2434 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
2435 Moved here from Sem_Res.
2436
8c35b40a
AC
24372014-02-06 Robert Dewar <dewar@adacore.com>
2438
2439 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
2440 reformatting.
2441
24422014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2443
2444 * sem_ch6.adb (Process_Formals): Error message reformatting.
2445
79b49b87
HK
24462014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2447
2448 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
2449 variable Spec. Do not inherit the null indicator from the
2450 subprogram body when generating the spec.
2451
4446a13f
AC
24522014-02-06 Robert Dewar <dewar@adacore.com>
2453
2454 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
2455 mixed case.
2456
24572014-02-06 Ed Schonberg <schonberg@adacore.com>
2458
2459 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
2460 when the function has a foreign convention, but not if only the
2461 limited return type has such a convention.
2462
24632014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2464
2465 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
2466 variable Spec. Comment reformatting. Use Copy_Separate_Tree
2467 rather than New_Copy_Tree when building the corresponding
2468 subprogram declaration.
2469
24702014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2471
2472 * sem_prag.adb (Analyze_Global_Item): Remove
2473 the mode-related checks on abstract states with enabled external
2474 properties.
2475 (Property_Error): Removed.
2476
24772014-02-06 Javier Miranda <miranda@adacore.com>
2478
2479 * lib-xref.adb (Generate_Reference): When
2480 generating the reference to the first private entity take care
2481 of handling swapped entities.
2482
e09a5598
AC
24832014-02-06 Sergey Rybin <rybin@adacore.com frybin>
2484
2485 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2486 gnatmetric.
2487
24882014-02-06 Robert Dewar <dewar@adacore.com>
2489
2490 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
2491 than the word size when operating in Modify_Tree_For_C mode.
2492 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
2493
24942014-02-06 Robert Dewar <dewar@adacore.com>
2495
2496 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
2497 compare is case insensitive.
2498 * gnat_rm.texi: Document that string compare for Warnings Off
2499 is now case insensitive.
2500
5216b599
AC
25012014-02-06 Eric Botcazou <ebotcazou@adacore.com>
2502
2503 * gnat_rm.texi: Small wording tweak.
2504
25052014-02-06 Pascal Obry <obry@adacore.com>
2506
2507 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
2508 and Included_Artifact_Patterns attribute definitions.
2509
25102014-02-06 Yannick Moy <moy@adacore.com>
2511
2512 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
2513 SPARK_Mode pragma component for all subprograms, including stubs.
2514
25152014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2516
2517 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
2518 the configuration options of the enclosing context in a
2519 stack-like fasion.
2520 (Analyze_Subprogram_Body_Stub): Maintain the
2521 configuration options of the enclosing context in a stack-like
2522 fashion.
2523
25242014-02-06 Robert Dewar <dewar@adacore.com>
2525
2526 * debug.adb: -gnatd.u sets Modify_Tree_For C
2527 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
2528 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
2529 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
2530 * exp_intr.adb (Expand_Shift): Call expander so we do
2531 Modify_Tree_For_C expansions.
2532 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2533 if -gnatd.u set.
2534
25352014-02-06 Fedor Rybin <frybin@adacore.com>
2536
2537 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
2538 after the phase 1 of the processing of each aggregated project
2539 to get access to project trees of aggregated projects.
2540 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
2541 If specified, On_New_Tree_Loaded is called after each aggregated
2542 project has been processed succesfully.
2543 (Process): new parameter On_New_Tree_Loaded.
2544 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
2545 callback added after processing of each aggregated project.
2546 (Recursive_Process): new parameter On_New_Tree_Loaded.
2547 (Process): new parameter On_New_Tree_Loaded.
2548 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
2549 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
2550 On_New_Tree_Loaded.
2551 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
2552 On_New_Tree_Loaded.
2553
25542014-02-06 Bob Duff <duff@adacore.com>
2555
2556 * gnat_ugn.texi: Implement --insert-blank-lines and
2557 --preserve-blank-lines switches.
2558
8c7ff9a0
AC
25592014-02-06 Sergey Rybin <rybin@adacore.com frybin>
2560
2561 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
2562 gnatelim.
2563
25642014-02-06 Eric Botcazou <ebotcazou@adacore.com>
2565
2566 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
2567 of the pragma on individual objects.
2568
25692014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2570
2571 * einfo.adb Node29 is now used as BIP_Initialization_Call.
2572 (BIP_Initialization_Call): New routine.
2573 (Set_BIP_Initialization_Call): New routine.
2574 (Write_Field29_Name): Add an entry for constants and variables.
2575 * einfo.ads Add new attribute BIP_Initialization_Call and update
2576 its usage in nodes.
2577 (BIP_Initialization_Call): New routine along with pragma Inline.
2578 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
2579 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2580 Add local declaration Res_Decl. Capture the build-in-place
2581 initialization call when the related object declaration has
2582 created a transient block.
2583 * exp_ch7.adb (Process_Transient_Objects): Add local variable
2584 Fin_Insrt. Recognize a scenario where an object declaration acts
2585 as a transient context and is initialized by a build-in-place
2586 function call.
2587
a0367a97
AC
25882014-02-06 Pascal Obry <obry@adacore.com>
2589
2590 * prj-util.adb (For_Interface_Sources): Fix handling of required
2591 bodies for aggregate libs.
2592
25932014-02-06 Robert Dewar <dewar@adacore.com>
2594
2595 * nlists.ads: Minor comment clarifications.
2596
25972014-02-06 Robert Dewar <dewar@adacore.com>
2598
2599 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
2600 if gnatd.V set.
2601 * opt.ads (Modify_Tree_For_C): New flag.
2602 * output.ads, output.adb (Last_Char): New function.
2603
26042014-02-06 Pascal Obry <obry@adacore.com>
2605
2606 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
2607 share/gpr for cross-builds.
2608
155b4fcc
RD
26092014-02-06 Robert Dewar <dewar@adacore.com>
2610
2611 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
2612 Minor reformatting and code clean ups.
2613
49d8d177
PO
26142014-02-06 Pascal Obry <obry@adacore.com>
2615
2616 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
2617 * prj.ads: Minor typo fix in comment.
2618
8e1e62e3
AC
26192014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2620
2621 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
2622 local variable Expr. Flag clauses with extra parenthesis as this
2623 is not allowed by the syntax of the pragma. Code reformatting.
2624
26252014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2626
2627 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
2628 variables. Rename variabme Tnn to Temp. Do not create a temporary
2629 if assertions are disabled. Find enclosing routine _Postconditions
2630 and insert the temporary that captures the value of the prefix
2631 before the routine.
2632 * exp_ch6.adb (Build_Postconditions_Procedure):
2633 Insert the generated _Postconditions routine
2634 before the first source declaration of the related
2635 subprogram.
2636 (Insert_After_Last_Declaration): Removed.
2637 (Insert_Before_First_Source_Declaration): New routine.
2638
26392014-02-06 Ed Schonberg <schonberg@adacore.com>
2640
2641 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
2642 Utility to determine whether current expansion is for the body
2643 of a predefined primitive operation.
2644 (Make_Predicate_Check): Use Within_Internal_Subpgram
2645 * checks.adb (Apply_Predicate_Check): Use
2646 Within_Internal_Subprogram
2647 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
2648
26492014-02-06 Pascal Obry <obry@adacore.com>
2650
2651 * prj.ads, prj-util.adb: Minor reformatting.
2652
cbee4f74
AC
26532014-02-06 Ed Schonberg <schonberg@adacore.com>
2654
2655 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
2656 Take into account the Split_PPC flag to ensure that conjuncts
2657 in a composite postcondition aspect are tested in source order.
2658
26592014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2660
2661 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
2662 use of SPARK_Mode.
2663 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
2664 illegal use of SPARK_Mode.
2665 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
2666 * sem_prag.adb (Analyze_Pragma): Code reformatting.
2667 * sem_util.adb Add with and use clause for Aspects.
2668 (Check_SPARK_Mode_In_Generic): New routine.
2669 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
2670
26712014-02-06 Thomas Quinot <quinot@adacore.com>
2672
2673 * a-calend.adb (Formatting_Operations.Split): Ensure that
2674 Time_Error is raised for invalid time values.
2675
e2ef0ff6
AC
26762014-02-06 Arnaud Charlet <charlet@adacore.com>
2677
2678 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
2679 in GNATprove_Mode.
2680
26812014-02-06 Robert Dewar <dewar@adacore.com>
2682
2683 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
2684 * exp_ch3.adb (Build_Dcheck_Function): Set
2685 Is_Discriminant_Check_Function.
2686
26872014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2688
2689 * exp_ch7.adb (Is_Subprogram_Call): Inspect
2690 the original tree in certain cases where a construct has been
2691 factored out and replaced by a reference to a temporary.
2692
26932014-02-06 Ed Schonberg <schonberg@adacore.com>
2694
2695 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
2696 parameters when propagating predicate function to full view.
2697 (Find_Type_Of_Object): Freeze base type of object type to catch
2698 premature use of discriminated private type without a full view.
2699
97779c34
AC
27002014-02-06 Robert Dewar <dewar@adacore.com>
2701
2702 * sprint.adb: Minor reformatting.
2703
27042014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2705
2706 * exp_ch4.adb (Process_Transient_Object): Add local variable
2707 Temp_Ins. When the transient object is initialized by an
2708 aggregate, the hook must capture the object after the last
2709 component assignment takes place.
2710 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
2711 routine Is_Subprogram_Call.
2712 (Is_Subprogram_Call): Inspect an
2713 aggregate that has been heavily expanded for subprogram calls.
2714 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
2715 and Temp_Ins. Remove the nested declare block and adjust the
2716 indentation. When the transient object is initialized by an
2717 aggregate, the hook must capture the object after the last
2718 component assignment takes place.
2719
27202014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2721
2722 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
2723 external states with enabled properties that do not match the
2724 global mode.
2725 (Property_Error): New routine.
2726 * sem_res.adb (Property_Error): New routine.
2727 (Resolve_Actuals): Detect illegal uses of external variables with
2728 enabled properties in procedure calls that do not match the mode of
2729 the corresponding formal parameter.
2730
27312014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2732
2733 * sem_util.adb (Has_Enabled_Property): Rename
2734 formal parameter Prop_Nam to Property. Update the comment on usage
2735 and all occurrences in the body. Add local variable Prop_Nam. When
2736 inspecting a property with an expression, the property name
2737 appears as the first choice of the component association.
2738
3e247e58
RD
27392014-02-04 Robert Dewar <dewar@adacore.com>
2740
2741 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
2742
2db5b47e
AC
27432014-02-04 Gary Dismukes <dismukes@adacore.com>
2744
2745 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
2746 for consistency with other messages.
2747
27482014-02-04 Ed Schonberg <schonberg@adacore.com>
2749
2750 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
2751 iterator, indicate that the element is a constant if the container
2752 type does not have a variable indexing aspect.
2753 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
2754 marked as constant, do not reset its Ekind, to ensure that
2755 container elements in an element loop are not modified if the
2756 container (e.g. a hashed set) only has a constant indexing aspect.
2757
27582014-02-04 Arnaud Charlet <charlet@adacore.com>
2759
2760 * g-souinf.ads: Subprograms in this unit are actually not pure.
2761 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
2762 * einfo.ads (Is_Pure): Update doc to match implementation.
2763
5a521b8a
AC
27642014-02-04 Gary Dismukes <dismukes@adacore.com>
2765
2766 * exp_ch13.adb: Minor spelling fix.
2767
27682014-02-04 Robert Dewar <dewar@adacore.com>
2769
2770 * opt.ads: Minor comment update.
2771
27722014-02-04 Robert Dewar <dewar@adacore.com>
2773
2774 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
2775 instead of Replace.
2776
27772014-02-04 Ed Schonberg <schonberg@adacore.com>
2778
2779 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
2780 on null expressions if component type is non-null, when the
2781 corresponding association covers an empty range of index values.
2782
81bd8c90
AC
27832014-02-04 Robert Dewar <dewar@adacore.com>
2784
2785 * sinfo.ads: Further comments on N_Expression_With_Actions node.
2786
27872014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
2788
2789 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2790 variables Out_Items and Ref_Global. Remove local constant
2791 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
2792 and D8. Remove the useless collection of global items as this
2793 was a leftover from an earlier version of the routine. Move
2794 several routines out to avoid deep nesting and indentation.
2795 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
2796 parameter Do_Checks to Post_Errors. Update the comment on usage.
2797 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
2798 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
2799 to Post_Errors. Update the comment on usage. Account for the
2800 case where a self referential state may have a null input_list.
2801 (Is_Self_Referential): New routine.
2802
28032014-02-04 Ed Schonberg <schonberg@adacore.com>
2804
2805 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
2806 entity renames an expression, as in the case of an object of
2807 an unconstrained type initialized by a function call, defer the
2808 rewriting of the expression to the expander.
2809 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2810 'Alignment): If the entity renames an expression, introduce
2811 temporary to capture value, and rewrite original declaration to
2812 use temporary.
2813
ebdaa81b
AC
28142014-02-04 Gary Dismukes <dismukes@adacore.com>
2815
2816 * g-comlin.adb: Minor typo fix.
2817
28182014-02-04 Ed Schonberg <schonberg@adacore.com>
2819
2820 * freeze.adb (Freeze_All): Types derived from a formal
2821 access_to_classwide type do not have a finalization master.
2822
28232014-02-04 Robert Dewar <dewar@adacore.com>
2824
2825 * sprint.adb: Minor reformatting.
2826
28272014-02-04 Robert Dewar <dewar@adacore.com>
2828
2829 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
2830 cases where Actions is a null list.
2831 * sinfo.ads (N_Expression_With_Actions): Actions can be
2832 temporarily empty during semantic analysis, but must be non-empty
2833 in the final expanded tree.
2834
d66f9f0b
AC
28352014-01-31 Robert Dewar <dewar@adacore.com>
2836
2837 * exp_ch9.adb: Minor reformatting.
2838
28392014-01-31 Emmanuel Briot <briot@adacore.com>
2840
2841 * g-comlin.adb (Set_Command_Line): Take the switches
2842 configuration from the Command_Line_Config.
2843
28442014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
2845
2846 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
2847 refinement clause.
2848
28492014-01-31 Vincent Celier <celier@adacore.com>
2850
2851 * projects.texi: Add more documentation about others used as an
2852 index in indexed attributes.
2853
f3920a13
AC
28542014-01-31 Robert Dewar <dewar@adacore.com>
2855
2856 * gnat_ugn.texi: Minor update.
2857 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
2858 * exp_util.adb: Minor reformatting.
2859
28602014-01-31 Ed Schonberg <schonberg@adacore.com>
2861
2862 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
2863 depends on data that is not private to the protected object,
2864 and potentially modifiable in unsynchronized fashion.
2865
31d922e3
AC
28662014-01-31 Yannick Moy <moy@adacore.com>
2867
2868 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
2869 GNATprove_Mode.
2870
28712014-01-31 Robert Dewar <dewar@adacore.com>
2872
2873 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
2874 for Unknown_Package.
2875 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
2876
28772014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
2878
2879 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
2880 the logic that generates a runtime check to determine the
2881 controlled status of the object about to be allocated or
2882 deallocated. Class-wide types now always use a runtime check
2883 even if they appear as generic actuals.
2884 (Find_Object): Detect
2885 a special case that involves interface class-wide types because
2886 the object appears as a complex expression.
2887
5b6f12c7
AC
28882014-01-31 Ed Schonberg <schonberg@adacore.com>
2889
2890 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
2891 subprogram with an incomplete untagged formals on the list of
2892 private dependents, to verify that the type is properly completed
2893 in the private part.
2894 * sem_attr.adb: Code clean up.
2895
28962014-01-31 Robert Dewar <dewar@adacore.com>
2897
2898 * exp_ch6.adb: Minor reformatting.
2899
29002014-01-31 Vincent Celier <celier@adacore.com>
2901
2902 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
2903 when Pkg is unknown.
2904
d950f051
AC
29052014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
2906
2907 * sem_res.adb (Resolve_Entity_Name): Comment
2908 reformatting. Allow volatile objects in various generated checks.
2909
29102014-01-31 Ed Schonberg <schonberg@adacore.com>
2911
2912 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
2913 component association, set the etype of the identifier, for
2914 SPARK use.
2915
29162014-01-31 Ed Schonberg <schonberg@adacore.com>
2917
2918 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
2919 declared in a package, not checks can apply to the subprogram.
2920
74c10109
AC
29212014-01-31 Robert Dewar <dewar@adacore.com>
2922
2923 * erroutc.adb (Validate_Specific_Warnings): Warnings are
2924 controlled -gnatw.W.
2925 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
2926 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
2927
29282014-01-31 Arnaud Charlet <charlet@adacore.com>
2929
2930 * exp_disp.adb: Update comments.
2931
29322014-01-31 Yannick Moy <moy@adacore.com>
2933
2934 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
2935 Save_Global_References): Guard access to expression in aspect.
2936
29372014-01-31 Yannick Moy <moy@adacore.com>
2938
2939 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
2940 Issue an error when the pragma is applied to a generic unit,
2941 a generic declaration, or inside a generic.
2942
29432014-01-31 Yannick Moy <moy@adacore.com>
2944
2945 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
2946 entity.
2947
bdfb8ec4
AC
29482014-01-31 Robert Dewar <dewar@adacore.com>
2949
2950 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
2951 reformatting.
2952
29532014-01-31 Tristan Gingold <gingold@adacore.com>
2954
2955 * exp_disp.adb: Add a historic note.
2956
29572014-01-31 Robert Dewar <dewar@adacore.com>
2958
2959 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
2960 Process_Deferred_References.
2961
29622014-01-31 Yannick Moy <moy@adacore.com>
2963
2964 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
2965 ineffective pragma Warnings(Off) in GNATprove_Mode.
2966
5b0e6852
BD
29672014-01-31 Bob Duff <duff@adacore.com>
2968
2969 * s-taskin.ads: Minor comment fix.
2970 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
2971 just direct dependents. If this is actually an abort, each task
2972 will take care of aborting its dependents, so all dependents will
2973 get aborted, as before. However, when this is called the second
2974 time from Vulnerable_Complete_Master "for convenience" (i.e. to
2975 kill off tasks waiting at terminate alternatives), aborting
2976 indirect dependents is wrong, because it causes some unrelated
2977 tasks to get aborted.
2978
a54ffd6c
AC
29792014-01-31 Robert Dewar <dewar@adacore.com>
2980
2981 * sem_ch4.adb: Minor reformatting.
2982
29832014-01-31 Robert Dewar <dewar@adacore.com>
2984
2985 * exp_ch2.adb: New calling sequence for Is_LHS.
2986 * frontend.adb: Add call to Process_Deferred_References.
2987 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
2988 (Deferred_References): New table.
2989 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
2990 entries.
2991 (Find_Expanded_Name): Ditto.
2992 * sem_res.adb: New calling sequence for Is_LHS.
2993 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
2994 * sem_warn.adb: Call Process_Deferred_References before issuing
2995 warnings.
2996
29972014-01-31 Tristan Gingold <gingold@adacore.com>
2998
2999 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
3000 use of System_Tasking_Protected_Objects_Single_Entry.
3001 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
3002 of Protected_Single_Entry_Call.
3003 (Expand_N_Timed_Entry_Call): Remove single_entry case.
3004 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
3005 single_entry case.
3006 (Make_Disp_Timed_Select_Body): Likewise.
3007 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
3008 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
3009 Self_Id parameter.
3010 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
3011 (Wait_For_Completion_With_Timeout): Remove.
3012 (Protected_Single_Entry_Call): Remove Mode parameter
3013 (always Simple_Call).
3014 (Service_Entry): Remove Self_Id constant (not used anymore).
3015 (Timed_Protected_Single_Entry_Call): Remove.
3016 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
3017 (Protected_Single_Entry_Call): Remove Mode parameter.
3018
4f7c83ca
AC
30192014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3020
3021 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
3022 * einfo.ads (Get_Pragma): Update the comment on special pragmas
3023 handled by this routine.
3024 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
3025 to the contract of the related subprogram body.
3026 * sem_util.adb (Add_Contract_Item): Handle the insertion of
3027 pragma Refined_Post into the contract of a subprogram body.
3028 * sinfo.ads Update the documentation of node N_Contract.
3029 * sem_res.adb (Resolve_Entity_Name): Add a guard
3030 to detect abstract states and variables only when checking the
3031 SPARK 2014 rules concerning volatile object placement.
3032
30332014-01-29 Ed Schonberg <schonberg@adacore.com>
3034
3035 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
3036 null is compatible with any access type.
3037
385e1a99
HK
30382014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3039
3040 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
3041 placement is not in a package.
3042
159a5104
AC
30432014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3044
3045 * sem_util.adb (Has_Enabled_Property): Compare the character field of
3046 the sole property.
3047
30482014-01-29 Robert Dewar <dewar@adacore.com>
3049
3050 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
3051 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
3052 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
3053
87e9b935
RD
30542014-01-29 Robert Dewar <dewar@adacore.com>
3055
3056 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
3057 * sem_warn.adb (Check_References): Suppress warnings if inside
3058 Initial_Condition pragma.
3059
98b5d298
HK
30602014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3061
3062 * sem_prag.adb (Check_Missing_Part_Of): List all values of
3063 State_Space_Kind for readability reasons. Do not emit an error on
3064 a private item when the enclosing package lacks aspect/pragma
3065 Abstract_State. Do not emit an error on a private package
3066 instantiation when the corresponding generic template lacks
3067 visible state.
3068 (Has_Visible_State): New routine.
3069 * sem_util.adb (Find_Placement_In_State_Space): The visible
3070 declarations of any kind of child units in general act as proper
3071 placement location.
3072
a90bd866
RD
30732014-01-29 Robert Dewar <dewar@adacore.com>
3074
3075 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
3076 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
3077 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
3078 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
3079 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
3080 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
3081 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
3082 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
3083 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
3084 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
3085 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
3086 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
3087 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
3088 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
3089 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
3090 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
3091 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
3092 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
3093 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
3094 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
3095 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
3096 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
3097 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
3098 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
3099 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
3100 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
3101 s-regpat.adb, s-secsta.adb, s-stalib.ads,
3102 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
3103 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
3104 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
3105 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
3106 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
3107
0d66cee5
AC
31082014-01-29 Robert Dewar <dewar@adacore.com>
3109
3110 * expander.adb: Minor reformatting.
3111
31122014-01-29 Javier Miranda <miranda@adacore.com>
3113
3114 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
3115 previous patch.
3116
b7cb4a61
AC
31172014-01-29 Javier Miranda <miranda@adacore.com>
3118
3119 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
3120 that checks if an interface types defines the predefined "="
3121 function because the compiler was erroneously not generating the
3122 predefined "=" primitive as soon as the name of some interface
3123 primitive is "=" (formals were not checked).
3124
31252014-01-29 Ed Schonberg <schonberg@adacore.com>
3126
3127 * expander.adb (Expander): In GNATprove mode, do not process
3128 transient scopes: they are in general not created in this mode,
3129 and an attempt to examine them will lead to constraint errors when
3130 processing configuration pragmas that have analyzable expressions.
3131
35d4d899
VC
31322014-01-29 Vincent Celier <celier@adacore.com>
3133
3134 * clean.adb (Gnatclean): Fail if main project is an aggregate
3135 project or if there is an aggregate library project in the
3136 project tree.
3137 * gnatcmd.adb: Fail if the main project is an aggregate project
3138 or if there is an aggegate library project in the project tree.
3139 * make.adb (Initialize): : Fail if main project is an aggregate
3140 project or if there is an aggregate library project in the
3141 project tree.
3142 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
3143 * prj-makr.adb (Initialize): Fail if the main project is an
3144 aggregate project or an aggregate library project.
3145
88de755d
VC
31462014-01-29 Vincent Celier <celier@adacore.com>
3147
3148 * prj-part.adb (Check_Import_Aggregate): New procedure
3149 to check if an imported project is an aggregate project.
3150 (Parse_Single_Project): Call Check_Import_Aggregate
3151 * projects.texi: Document that aggregate projects cannot be
3152 extended or imported.
3153
d0e69402
RD
31542014-01-29 Robert Dewar <dewar@adacore.com>
3155
3156 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
3157 reformatting and code clean up.
3158 * gnat_ugn.texi: Add documentation section on Atomic Variables
3159 and Optimization.
3160
5627964c
AC
31612014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3162
3163 * einfo.adb Flag264 is now unused.
3164 (Has_Body_References): Removed.
3165 (Set_Has_Body_References): Removed.
3166 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
3167 * einfo.ads Update the comment on usage of attribute
3168 Body_References. Remove attribute Has_Body_References and its
3169 usage in nodes.
3170 (Has_Body_References): Removed along with pragma Inline.
3171 (Set_Has_Body_References): Removed along with pragma Inline.
3172 * sem_prag.adb (Analyze_Global_Item): Move the call to
3173 Record_Possible_Body_Reference in the state related checks
3174 section. Add a comment intended function.
3175 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
3176 in the state related checks section. Add a comment intended function.
3177 (Analyze_Refinement_Clause): Cleanup the illegal body reference
3178 reporting. Add a comment on timing of error reporting.
3179 (Record_Possible_Body_Reference): Reimplement the routine.
3180
31812014-01-29 Vincent Celier <celier@adacore.com>
3182
3183 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
3184 unit-based languages.
3185 (Mains.Complete_Mains.Do_Complete): Use the source file project
3186 tree when calling Find_File_Add_Extension. Use the correct
3187 project name when reporting an error.
3188
d7af5ea5
HK
31892014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3190
3191 * aspects.adb Add an entry for aspect Part_Of in table
3192 Canonical_Aspect.
3193 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
3194 Aspect_Argument, Aspect_Names and Aspect_Delay.
3195 * atree.h Define Elist9.
3196 * atree.adb (Elist9): New routine.
3197 (Set_Elist9): New routine.
3198 * atree.ads (Elist9): New routine.
3199 (Set_Elist9): New routine.
3200 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
3201 the list of node usage. Remove Refined_State from the list of
3202 node usage.
3203 (Encapsulating_State): New routine.
3204 (Get_Pragma):
3205 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
3206 (Refined_State): Removed.
3207 (Set_Encapsulating_State): New routine.
3208 (Set_Part_Of_Constituents): New routine.
3209 (Set_Refined_State): Removed.
3210 (Write_Field9_Name): Add an entry
3211 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
3212 Encapsulating_State. Remove the entry for Refined_State.
3213 * einfo.ads Add new attributes Encapsulating_State
3214 and Part_Of_Constituents alond with their usage in
3215 entities. Remove attribute Refined_State along with its
3216 usage in entities.
3217 (Encapsulating_State): New routine and
3218 pragma Inline. (Get_Pragma): Update the comment on usage.
3219 (Part_Of_Constituents): New routine and pragma Inline.
3220 (Refined_State): Removed along with pragma Inline.
3221 (Set_Encapsulating_State): New routine and pragma Inline.
3222 (Set_Part_Of_Constituents): New routine and pragma Inline.
3223 (Set_Refined_State): Removed along with pragma Inline.
3224 * par-prag.adb Pragma Part_Of does not need any special processing
3225 by the parser.
3226 * sem_ch3.adb (Analyze_Declarations): Remove local variables
3227 Body_Id and Prag. Call separate routines to analyze the
3228 contract of a package [body].
3229 (Analyze_Object_Contract):
3230 Update the comment on usage. Remove local variables
3231 Items and Nam. Use Get_Pragma rather than traversing the
3232 classification list. Verify whether the lack of indicator
3233 Part_Of agrees with the placement of the variable in state space.
3234 (Analyze_Object_Declaration): Initialize the encapsulating state
3235 of a variable. (Requires_State_Refinement): Moved to sem_util.
3236 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
3237 (Analyze_Package_Contract): New routine.
3238 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
3239 (Analyze_Package_Contract): New routine.
3240 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
3241 state and Part_Of constituents.
3242 * sem_ch13.adb (Analyze_Aspect_Specifications):
3243 Add processing for aspect Part_Of. Update all
3244 calls to Decorate_Delayed_Aspect_And_Pragma.
3245 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
3246 not need any special processing at freeze time.
3247 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
3248 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
3249 update the associated comment.
3250 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
3251 (Analyze_Abstract_State): Add new global variable State_Id. Remove
3252 local constants Errors and Loc. Remove local variables Is_Null
3253 and State_Nam. Create the entity of the abstract state on the
3254 spot, before all remaining checks are performed. Verify that a
3255 missing Part_Of option agrees with the placement of the abstract
3256 state within the state space.
3257 (Analyze_Depends_In_Decl_Part):
3258 Add new global variables Constits_Seen and States_Seen. Check
3259 that a state and a corresponding constituent do not appear
3260 in pragma [Refined_]Depends.
3261 (Analyze_Global_In_Decl_Part):
3262 Add new global variables Constits_Seen and States_Seen. Check
3263 that a state and a corresponding constituent do not appear
3264 in pragma [Refined_]Global.
3265 (Analyze_Global_Item):
3266 Remove the now obsolete code that deals with Part_Of.
3267 Add the entity of the global item to the list of processed
3268 items. (Analyze_Initializes_In_Decl_Part): Add new global
3269 variables Constits_Seen and States_Seen. Check that a state
3270 and a corresponding constituent do not appear in pragma
3271 Initializes.
3272 (Analyze_Initialization_Item): Add the entity
3273 of the initialization item to the list of processed items.
3274 (Analyze_Input_Item): Add the entity of the initialization
3275 item to the list of processed items.
3276 (Analyze_Input_Output):
3277 Remove the now obsolete code that deals with Part_Of. Add the
3278 entity of the input/output to the list of processed items.
3279 (Analyze_Part_Of): New routine.
3280 (Analyze_Part_Of_Option): Remove
3281 local constant Par_State. Add local constant Encaps and local
3282 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
3283 the option. Turn the related state into a Part_Of constituent
3284 if the option is legal.
3285 (Analyze_Pragma): Add processing
3286 for pragma Part_Of.
3287 (Analyze_Refined_State_In_Decl_Part):
3288 Remove global constants Pack_Body and Spec_Id. Remove
3289 global variables Abstr_States and Hidden_States. Add new
3290 global variables Available_States, Body_Id, Body_States and
3291 Spec_Id. Add new local constant Body_Decl. Reimplement the
3292 logic that extracts the states available for refinement from
3293 the related package and the body hidden states of the said
3294 package.
3295 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
3296 (Check_Applicable_Policy): Alphabetize body.
3297 (Check_Dependency_Clause): Replace Refined_State
3298 with Encapsulating_State.
3299 (Check_Matching_Constituent):
3300 Reimplement the logic that determines whether an item is a valid
3301 / invalid constituent of the current refined state. Return when
3302 a construct does not denote a valid abstract state. Extract the
3303 list of Part_Of constituents for further analysis. Check that all
3304 Part_Of constituents of a state have been used in its refinement.
3305 (Check_Matching_State): Update the comment on usage. Operate
3306 on the list of available states.
3307 (Check_Missing_Part_Of): New routine.
3308 (Check_Refined_Global_Item): Replace Refined_State
3309 with Encapsulating_State.
3310 (Check_State_And_Constituent_Use): New routine.
3311 (Create_Abstract_State): New routine.
3312 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
3313 (Is_Part_Of): Removed.
3314 (Collect_Body_States): New routine.
3315 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
3316 (Collect_Hidden_States): Removed.
3317 (Report_Unrefined_States): Change the profile of the procedure along
3318 with the comment on usage.
3319 (Report_Unused_Constituents): New routine.
3320 (Report_Unused_Hidden_States): Removed.
3321 (Report_Unused_States): New routine.
3322 * sem_prag.ads (Check_Missing_Part_Of): New routine.
3323 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
3324 appear in the classification pragmas of a package instantiation
3325 or a variable.
3326 (Find_Placement_In_State_Space): New routine.
3327 (Is_Child): Removed.
3328 (Is_Child_Or_Sibling): Remove formal
3329 parameter Private_Child. Remove the private child checks.
3330 (Requires_State_Refinement): Moved from sem_ch3.
3331 * sem_util.ads Add new type State_Space_Kind along with
3332 comment on its usage and values.
3333 (Add_Contract_Item): Update the comment on usage.
3334 (Find_Body_Discriminal): Alphabetize spec.
3335 (Find_Placement_In_State_Space): New routine.
3336 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
3337 and update the comment on usage.
3338 (Requires_State_Refinement): Moved from sem_ch3.
3339 * sinfo.ads: Update the documentation of N_Contract.
3340 * snames.ads-tmpl The predefined name for Part_Of is now used
3341 to denote a pragma. Add Pragma_Id for Part_Of.
3342
0830210c
AC
33432014-01-29 Emmanuel Briot <briot@adacore.com>
3344
3345 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
3346 machine as needed.
3347 (Dump): New subprogram.
3348
33492014-01-29 Tristan Gingold <gingold@adacore.com>
3350
3351 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
3352 Expand_Entry_Declaration to factorize code.
3353
1ae70618
ES
33542014-01-29 Ed Schonberg <schonberg@adacore.com>
3355
3356 * checks.adb: minor clarification.
3357 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
3358 search for primitive operations to the entities that immediately
3359 follow the type declaration.
3360
cca7f107
AC
33612014-01-29 Tristan Gingold <gingold@adacore.com>
3362
3363 * exp_ch9.adb (Build_Protected_Entry): Do not call
3364 Complete_Entry_Body anymore.
3365 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
3366 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
3367
33682014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
3369
3370 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
3371 string when the Name input bigger than allowed. Adapt the function
3372 specification.
3373
33742014-01-29 Ed Schonberg <schonberg@adacore.com>
3375
3376 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
3377 if expression is within a case_expression of if_expression.
3378
443dd772
RD
33792014-01-29 Robert Dewar <dewar@adacore.com>
3380
3381 * exp_ch9.adb, inline.ads: Minor reformatting.
3382
4043fd0b
AC
33832014-01-29 Tristan Gingold <gingold@adacore.com>
3384
3385 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
3386
33872014-01-29 Yannick Moy <moy@adacore.com>
3388
3389 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
3390 SPARK_Mode_Pragma components to be able to analyze generic
3391 instance.
3392 * sem_ch12.adb (Analyze_Package_Instantiation,
3393 Inline_Instance_Body, Need_Subprogram_Instance_Body,
3394 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
3395 for future analysis of the instance.
3396 (Instantiate_Package_Body,
3397 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
3398 from instantiation to analyze the instance.
3399
cf3e6845
AC
34002014-01-29 Robert Dewar <dewar@adacore.com>
3401
3402 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
3403 reorganization.
3404
34052014-01-29 Yannick Moy <moy@adacore.com>
3406
3407 * gnat_rm.texi: Update description of SPARK_Mode pragma.
3408
34092014-01-29 Tristan Gingold <gingold@adacore.com>
3410
3411 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
3412
f90d14ac
AC
34132014-01-29 Thomas Quinot <quinot@adacore.com>
3414
3415 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
3416
34172014-01-29 Ed Schonberg <schonberg@adacore.com>
3418
3419 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
3420 resulting string is an internal entity. and thus requires no
3421 initialization. This is relevant when Initialize_ Scalars is
3422 enabled, because the resultant spurious initialization may lead to
3423 secondary stack anomalies that produce a mangled name for a task.
3424
34252014-01-29 Yannick Moy <moy@adacore.com>
3426
3427 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
3428 not inherited from spec anymore. Check consistency
3429 rules after processing of declarations.
3430 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
3431 from spec anymore. Check consistency rules after processing of
3432 declarations.
3433 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
3434 packages.
3435 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
3436 consistency rules.
3437
b1d12996
AC
34382014-01-27 Robert Dewar <dewar@adacore.com>
3439
3440 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
3441 to unordered msg.
3442 (Resolve_Range): Add type name/location to unordered msg.
3443
34442014-01-27 Claire Dross <dross@adacore.com>
3445
3446 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
3447 Capacity) is only called with Capacity >= Length (Source) and
3448 Capacity in Capacity_Range.
3449 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
3450 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
3451 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
3452 in the code is this is not the case.
3453
34542014-01-27 Thomas Quinot <quinot@adacore.com>
3455
3456 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
3457 selected component in an instance where the component of the
3458 actual is not visibile at instantiation.
3459
fcadacf7
ES
34602014-01-27 Ed Schonberg <schonberg@adacore.com>
3461
3462 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
3463 has a dynamic predicate, generate freeze node for Actual_Subtype
3464 at once, because the declaration of the corresponding predicate
3465 function will make reference to it.
3466
8b4230c8
AC
34672014-01-27 Tristan Gingold <gingold@adacore.com>
3468
3469 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
3470
34712014-01-27 Robert Dewar <dewar@adacore.com>
3472
3473 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
3474 for 2**X optimization.
3475
34762014-01-27 Ed Schonberg <schonberg@adacore.com>
3477
3478 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
3479 explicitly whether value is in range of Character, because the
3480 library is typically compiled with range checks disabled, and
3481 we cannot rely on the implicit check on the argument of 'Val.
3482
34832014-01-27 Vincent Celier <celier@adacore.com>
3484
3485 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
3486 not the Target to itself.
3487
34882014-01-27 Robert Dewar <dewar@adacore.com>
3489
3490 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
3491 changes to avoid incorrect use of unordered enum types.
3492
34932014-01-27 Thomas Quinot <quinot@adacore.com>
3494
3495 * sem_ch4.adb: Minor reformatting.
3496
29077c18
AC
34972014-01-27 Robert Dewar <dewar@adacore.com>
3498
3499 * scn.adb (Check_End_Of_Line): Removed.
3500 (Error_Long_Line): Removed.
3501 (Determine_License): Use versions of above routines from Scanner.
3502 * scng.adb (Check_End_Of_Line): Moved to spec.
3503 (Error_Long_Line): Removed, no longer used.
3504 * scng.ads (Check_End_Of_Line): Moved here from body.
3505
35062014-01-27 Tristan Gingold <gingold@adacore.com>
3507
3508 * exp_ch7.adb (Build_Cleanup_Statements): Call
3509 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
3510 for protected body.
3511 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
3512 Remove Service_Name variable.
3513 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
3514 factorize code from the above subprograms.
3515 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
3516
2757c5bf
AC
35172014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
3518
3519 * einfo.adb (Has_Option): Reimplemented.
3520 * sem_prag.adb (Analyze_Refinement_Clause): Add global
3521 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
3522 External_Constit_Seen and State. Add local variables Body_Ref,
3523 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
3524 avoid a cumbersome while pool. Verify the legality of an external
3525 state and relevant properties.
3526 (Check_External_Property): New routine.
3527 (Check_Matching_State): Remove parameter profile
3528 and update comment on usage.
3529 (Collect_Constituent): Store the
3530 relevant external property of a constituent.
3531 * sem_util.adb (Async_Readers_Enabled): Update the call to
3532 Has_Enabled_Property.
3533 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
3534 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
3535 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
3536 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
3537 Update comment on usage. Reimplement the logic to recognize the various
3538 formats of properties.
3539
35402014-01-27 Ed Schonberg <schonberg@adacore.com>
3541
3542 * par-ch5.adb: Minor reformatting.
3543
35442014-01-27 Tristan Gingold <gingold@adacore.com>
3545
3546 * s-tposen.ads: Harmonize style and comments.
3547
35482014-01-27 Vincent Celier <celier@adacore.com>
3549
3550 * projects.texi: Document that shared library projects, by
3551 default, cannot import projects that are not shared library
3552 projects.
3553
35542014-01-27 Robert Dewar <dewar@adacore.com>
3555
3556 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
3557 of Rewrite.
3558
35592014-01-27 Ed Schonberg <schonberg@adacore.com>
3560
3561 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
3562 any other exception is raised.
3563 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
3564 still necessary to perform a conversion in order to remove overlong
3565 encodings.
3566
00ba7be8
AC
35672014-01-27 Robert Dewar <dewar@adacore.com>
3568
3569 * exp_smem.adb: Minor reformatting.
3570
35712014-01-27 Thomas Quinot <quinot@adacore.com>
3572
3573 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
3574
35752014-01-27 Ed Schonberg <schonberg@adacore.com>
3576
3577 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
3578 nodes for operands to the original node for the call, to preserve
3579 Original_Node pointers within the resolved operands, given that
3580 they may have been rewritten as well. Previous approach copied
3581 the operands into a new tree and lost those pointers.
3582
35832014-01-27 Claire Dross <dross@adacore.com>
3584
3585
3586 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
3587
35882014-01-27 Ed Schonberg <schonberg@adacore.com>
3589
3590 * sem_util.adb (Check_Internal_Protected_Use): A call through
3591 an anonymous access parameter of the current protected function
3592 is not a potential modification of the current object.
3593
35942014-01-27 Ed Schonberg <schonberg@adacore.com>
3595
3596 * a-cobove.adb (Reserve_Capacity): Procedure raises
3597 Capacity_Error, not Constraint_Error, when request cannot be
3598 satisfied.
3599
36002014-01-27 Vincent Celier <celier@adacore.com>
3601
3602 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
3603 not the Target to itself.
3604
36052014-01-27 Ed Schonberg <schonberg@adacore.com>
3606
3607 * exp_ch4.adb (Expand_Concatenate): If the target of the
3608 concatenation is a library-level entity, always use the off-line
3609 version of concatenation, regardless of optimization level. This
3610 is space-efficient, and prevents linking problems when some
3611 units are compiled with different optimization levels.
3612
36132014-01-27 Ed Schonberg <schonberg@adacore.com>
3614
3615 * sem_ch5.adb: Code clean up.
3616
36172014-01-27 Ed Schonberg <schonberg@adacore.com>
3618
3619 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
3620 when an array or container iterator includes a subtype indication,
3621 which is only legal in an element iterator.
3622
8fdafe44
AC
36232014-01-27 Thomas Quinot <quinot@adacore.com>
3624
3625 * exp_ch7.adb: Minor reformatting.
3626
36272014-01-27 Robert Dewar <dewar@adacore.com>
3628
3629 * opt.adb (SPARK_Mode): Default for library units is None rather
3630 than Off.
3631 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
3632 no longer ordered.
3633 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
3634 possibility.
3635 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
3636
36372014-01-27 Robert Dewar <dewar@adacore.com>
3638
3639 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
3640 Suspicious_Labels table if we have identifier; followed by loop
3641 or block.
3642 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
3643 * par.adb (Suspicious_Labels): New table.
3644
36452014-01-27 Robert Dewar <dewar@adacore.com>
3646
3647 * exp_aggr.adb (Check_Bounds): Reason is range check, not
3648 length check.
3649
36502014-01-27 Yannick Moy <moy@adacore.com>
3651
3652 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
3653 reference.
3654 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
3655 function now.
3656 (Add_SPARK_Xrefs): Include references to constants.
3657 * spark_xrefs.ads Document new character 'c' for references to
3658 constants.
3659
36602014-01-27 Thomas Quinot <quinot@adacore.com>
3661
3662 * exp_smem.adb (Add_Write_After): For a function call, insert write as
3663 an after action in a transient scope.
3664
b3a69993
AC
36652014-01-27 Thomas Quinot <quinot@adacore.com>
3666
3667 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
3668 to a shared variable as an OUT formal in a call to an init proc,
3669 the 'Read call must be emitted after, not before, the call.
3670
36712014-01-27 Robert Dewar <dewar@adacore.com>
3672
3673 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
3674
f1bd0415
AC
36752014-01-27 Robert Dewar <dewar@adacore.com>
3676
3677 * a-wichha.adb (Character_Set_Version): Change to output proper
3678 value.
3679
36802014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
3681
3682 * einfo.adb (Is_Input_Only_State): Removed.
3683 (Is_Non_Volatile_State): Removed.
3684 (Is_Output_State): Removed.
3685 * einfo.ads (Is_Input_Only_State): Remove attribute and
3686 subprogram. Update related entity.
3687 (Is_Non_Volatile_State):
3688 Remove attribute and subprogram. Update related entity.
3689 (Is_Output_State): Removed attribute and subprogram. Update
3690 related entity.
3691 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
3692 generated code.
3693 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3694 an object, not just variables.
3695 (Analyze_Object_Contract): New routine.
3696 (Analyze_Variable_Contract): Removed.
3697 (Process_Discriminants): Detect an illegal use of volatile
3698 discriminant in SPARK mode.
3699 * sem_ch5.adb (Analyze_Iterator_Specification):
3700 Detect an illegal use of volatile loop variable.
3701 (Analyze_Loop_Parameter_Specification): Detect an illegal use
3702 of volatile loop variable.
3703 * sem_ch6.adb (Process_Formals): Update the volatile object
3704 detection. Detect an illegal formal of mode IN OUT or OUT in
3705 SPARK mode. Enhance the error messages with references.
3706 * sem_ch12.adb (Instantiate_Object): Update the volatile object
3707 detection. Enhance the error messages with references.
3708 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
3709 messages with references.
3710 (Analyze_Contract_Case): Enhance the error messages with references.
3711 (Analyze_External_Property): Call Check_Duplicate_Property to process
3712 an external property.
3713 (Analyze_External_Property_In_Decl_Part): New routine.
3714 (Analyze_External_State_In_Decl_Part): Removed.
3715 (Analyze_Global_Item): Detect an illegal
3716 use of a volatile constant. Detect an illegal use
3717 of a variable with enabled Effective_Reads. Enhance
3718 the error messages with references. Remove obsolete
3719 checks concerning Input_Only and Output_Only states.
3720 (Analyze_Initialization_Item): Enhance the error messages
3721 with references.
3722 (Analyze_Initializes_In_Decl_Part): Do not
3723 collect the states and variables when the initialization list
3724 is null.
3725 (Analyze_Input_Item): Enhance the error messages with references.
3726 (Analyze_Input_Output): Enhance the error messages with references.
3727 (Analyze_Pragma): Enhance the error messages with references.
3728 (Analyze_Refinement_Clause): Code reformatting.
3729 (Analyze_Refined_Depends_In_Decl_Part):
3730 Rename global variable Global to Reg_Global and update all
3731 occurrences. Add local variables D7 and D8. Update the error
3732 messages with references. Update the call to Collect_Global_Items.
3733 (Analyze_Refined_Global_In_Decl_Part): Add local variables
3734 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
3735 the call to Collect_Global_Items. Account for a Proof_In state
3736 in null / useless refinement checks. Verify the coverage of
3737 Proof_In states.
3738 (Check_Dependency_Clause): Remove local variable
3739 Out_Constits. Remove the retrieval and removal of constituents
3740 for an Output_Only state. Remove the reporting of unused
3741 Output_Only state constituents.
3742 (Check_Duplicate_Mode): Enhance
3743 the error message with a reference.
3744 (Check_Duplicate_Property): New routine.
3745 (Check_Duplicate_Option): Enhance the error message with a reference.
3746 (Check_External_Properties): Enhance the error message with a reference.
3747 (Check_Function_Return): Enhance the error message with a reference.
3748 (Check_In_Out_States): Update
3749 comment on usage. Add a specialized error message for Proof_In
3750 constituents. Enhance the error message with a reference.
3751 (Check_Input_States): Update comment on usage. Account for
3752 possible Proof_In constituents. Enhance the error message
3753 with a areference.
3754 (Check_Matching_Constituent): Enhance the error message with a
3755 reference.
3756 (Check_Matching_State): Enchance the error message with a reference.
3757 (Check_Mode): Add local variable From_Global. Update the call to
3758 Find_Mode. Emit more precise error messages concerning extra items
3759 (Check_Mode_Restriction_In_Enclosing_Context): Consider
3760 pragma Refined_Global. Enhance the error message with a
3761 reference.
3762 (Check_Mode_Restriction_In_Function): Enhance the error message with
3763 a reference.
3764 (Check_Output_States): Update comment on usage. Add local variable
3765 Posted. Account for possible Proof_In constituents. Produce a detailed
3766 list of missing constituents.
3767 (Check_Proof_In_States): New routine.
3768 (Check_Refined_Global_Item): Handle Proof_In
3769 constituents. Enchance the error message with a reference.
3770 (Collect_Global_Items): Add formal parameters Proof_In_Items
3771 and Has_Proof_In_State. Update the comment on usage. Account
3772 for Proof_In items.
3773 (Create_Or_Modify_Clause): Enchance
3774 the error message with a reference.
3775 (Find_Mode): Add
3776 formal parameter From_Global. Update the comment on usage.
3777 Detect when the mode is governed by pragma [Refined_]Global.
3778 (Output_Constituents): Removed.
3779 (Report_Extra_Constituents):
3780 Report extra Proof_In constituents.
3781 (Report_Unused_Constituents): Removed.
3782 (Usage_Error): Code reformatting. Enhance the error
3783 messages with reference.
3784 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
3785 (Analyze_External_State_In_Decl_Part): Removed.
3786 * sem_res.adb (Resolve_Actuals): Update the volatile object
3787 detection. Enhance the error message with a reference.
3788 (Resolve_Entity_Name): Update the volatile object
3789 detection. Enhance the error message with a reference.
3790 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
3791 (Is_SPARK_Volatile_Object): New routine.
3792 (Has_Volatile_Component): New routine.
3793 * sem_util.ads (Is_Delegate): Alphabetized.
3794 (Is_SPARK_Volatile_Object): New routine.
3795 (Has_Volatile_Component): New routine.
3796 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
3797
37982014-01-27 Ed Schonberg <schonberg@adacore.com>
3799
3800 * sem_attr.adb: Resolve fully prefix of 'Update.
3801
48b08b18
AC
38022014-01-27 Ben Brosgol <brosgol@adacore.com>
3803
3804 * gnat_rm.texi: Minor clarifications.
3805
38062014-01-27 Robert Dewar <dewar@adacore.com>
3807
3808 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
3809 about call that is generated as part of an Initial_Condition
3810 check.
3811 * sem_prag.adb: Minor spelling correction.
3812
1b8b4638
RD
38132014-01-27 Robert Dewar <dewar@adacore.com>
3814
3815 * sem_prag.adb (Set_Convention_From_Pragma): Check that
3816 convention Ghost can only apply to functions.
3817 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
3818
42959b0c
RD
38192014-01-27 Robert Dewar <dewar@adacore.com>
3820
3821 * gnat_ugn.texi: Add Short_Enums to documentation of
3822 -gnatet/-gnateT.
3823
38242014-01-27 Robert Dewar <dewar@adacore.com>
3825
3826 * sem_prag.adb (Analyze_Input_Item): Correct check for input
3827 item in same package.
3828 * sem_util.ads, sem_util.adb (Within_Scope): New function.
3829
87e9c2a2
AC
38302014-01-26 Arnaud Charlet <charlet@adacore.com>
3831
3832 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
3833 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
3834 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
3835 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
3836 maintained.
3837
54dce195
EB
38382014-01-25 Eric Botcazou <ebotcazou@adacore.com>
3839
3840 * gcc-interface/Makefile.in: Fix oversight.
3841
88293f03
EB
38422014-01-25 Eric Botcazou <ebotcazou@adacore.com>
3843
3844 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
3845 conversion from a thin pointer with a shifted value.
3846 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
3847 read-only flag from the values onto the result.
3848 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
3849
ae56e442
TG
38502014-01-25 Tristan Gingold <gingold@adacore.com>
3851
3852 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
3853 for E_Variable with a pragma Linker_Section.
3854
3a70ba74
RD
38552014-01-25 Robert Dewar <dewar@adacore.com>
3856
3857 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
3858 with Default_Value aspect is passed in by copy.
3859
c51f5910
AC
38602014-01-24 Eric Botcazou <ebotcazou@adacore.com>
3861
3862 * set_targ.adb: Set Short_Enums.
3863 * gcc-interface/lang.opt (fshort-enums): New option.
3864 * gcc-interface/misc.c (gnat_handle_option): Handle it.
3865 (gnat_post_options): Do not modify the global settings.
3866
38672014-01-24 Robert Dewar <dewar@adacore.com>
3868
3869 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
3870 function.
3871 (Random_Decimal_Fixed): New generic function.
3872 * s-rannum.ads: Minor comment clarifications.
3873
f27ad2b2
RD
38742014-01-24 Robert Dewar <dewar@adacore.com>
3875
3876 * back_end.adb: Remove Short_Enums handling (handled in
3877 Ttypes/Get_Targ now) Minor added comments.
3878 * freeze.adb: Change name Short_Enums_On_Target to
3879 Target_Short_Enums.
3880 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
3881 * opt.ads: Minor comment updates.
3882 * sem_ch13.adb: Change name Short_Enums_On_Target to
3883 Target_Short_Enums.
3884 * set_targ.adb: Set Short_Enums from gcc back end.
3885 * set_targ.ads (Short_Enums): New variable.
3886 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
3887 Ttypes/Get_Targ now).
3888 * ttypes.ads (Target_Short_Enums): New constant boolean switch
3889
dd6ab508
PO
38902014-01-24 Pascal Obry <obry@adacore.com>
3891
3892 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
3893
e6d5d940
GD
38942014-01-24 Gary Dismukes <dismukes@adacore.com>
3895
3896 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
3897 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
3898 stripped off.
3899
ab986406
AC
39002014-01-24 Robert Dewar <dewar@adacore.com>
3901
3902 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
3903
39042014-01-24 Vincent Celier <celier@adacore.com>
3905
3906 * prj.adb (Add_Aggregated_Project): Do not add a project in
3907 the list if it is already there.
3908
39092014-01-24 Yannick Moy <moy@adacore.com>
3910
3911 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
3912 Correct the search for a subrogram declaration to which a pragma is
3913 attached.
3914
39152014-01-24 Bob Duff <duff@adacore.com>
3916
3917 * gnat_ugn.texi: Document --decimal-grouping and
3918 --based-grouping switches in gnatpp.
3919
979b94ea
AC
39202014-01-24 Ed Schonberg <schonberg@adacore.com>
3921
3922 * sinfo.ads: Documentation update.
3923
39242014-01-24 Ed Schonberg <schonberg@adacore.com>
3925
3926 * sem_ch3.adb (Constant_Redeclaration): New declaration is
3927 illegal if previous one has an initial expression that is an
3928 aggregate expanded into assignments.
3929
39302014-01-24 Ed Schonberg <schonberg@adacore.com>
3931
3932 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
3933 code reorganization to remove spurious warning on a loop with
3934 an array element iterator that has a null range.
3935
39362014-01-24 Vincent Celier <celier@adacore.com>
3937
3938 * make.adb (Binding_Phase): When setting the Ada paths, use
3939 the library ALI dir, not the object dir in libraries.
3940
39412014-01-24 Yannick Moy <moy@adacore.com>
3942
3943 * sinfo.ads: Add documentation of check flag fields.
3944
39452014-01-24 Ed Schonberg <schonberg@adacore.com>
3946
3947 * sem_res.adb (Resolve_Actuals): If an actual is a view
3948 conversion of a discriminated object, and the formal type is
3949 discriminated and constrained, apply a discriminant check to
3950 the object itself.
3951
8edc33fa
RD
39522014-01-24 Robert Dewar <dewar@adacore.com>
3953
3954 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
3955
ad4e3362
ES
39562014-01-24 Ed Schonberg <schonberg@adacore.com>
3957
3958 * sem_ch3.adb (Analyze_Declarations): At the end of an
3959 appropriate declarative part, call Freeze_All from the first
3960 declaration in the scope, not from the first unfrozen one. This
3961 is necessary to apply visibility checks to entities with delayed
3962 aspects. Otherwise, in the presence of instantiations and cleanups
3963 that they may generate, the delayed aspects may be analyzed too
3964 late and produce spurious visibility errors.
3965 * sem_attr.adb: Place etype on range.
3966 * sem_ch6.adb: Documentation expression functions.
3967
d0ef7921
AC
39682014-01-24 Robert Dewar <dewar@adacore.com>
3969
3970 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
3971 terminology in compiler).
3972
39732014-01-24 Robert Dewar <dewar@adacore.com>
3974
3975 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
3976 categories, now that Ada 95 supports raise expressions.
3977
39782014-01-24 Robert Dewar <dewar@adacore.com>
3979
3980 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
3981 Short_Enums_On_Target.
3982 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
3983 into account.
3984 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
3985
39862014-01-24 Ed Schonberg <schonberg@adacore.com>
3987
3988 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
3989 indication is given explicity, check that it matches the array
3990 component type or the container element type of the domain
3991 of iteration.
3992
39932014-01-24 Tristan Gingold <gingold@adacore.com>
3994
3995 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
bff2d234
TG
3996 * gcc-interface/misc.c (flag_short_enums): Declare.
3997 (gnat_post_options): Set it.
d0ef7921
AC
3998
39992014-01-24 Vincent Celier <celier@adacore.com>
4000
4001 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
4002 to cache the result when Including_Libraries is False.
4003 * prj-env.ads (Ada_Objects_Path): Update documentation
4004 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
4005 (Get_Object_Directory): Return the Library_Ali_Dir only when
4006 when Including_Libraries is True.
4007 * prj.ads (Get_Object_Directory): Fix and complete documentation
4008 (Project_Data): New component Ada_Objects_Path_No_Libs
4009
162c21d9
AC
40102014-01-24 Robert Dewar <dewar@adacore.com>
4011
4012 * checks.adb (Expr_Known_Valid): Result of fpt operator never
4013 considered valid.
4014
40152014-01-24 Eric Botcazou <ebotcazou@adacore.com>
4016
4017 * back_end.adb: Minor fix in comment.
4018
40192014-01-24 Javier Miranda <miranda@adacore.com>
4020
4021 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
4022 required to report the error in case of task types.
4023
40242014-01-24 Ed Schonberg <schonberg@adacore.com>
4025
4026 * sem_attr.adb: Additional index checking.
4027
08cd7c2f
AC
40282014-01-24 Ed Schonberg <schonberg@adacore.com>
4029
4030 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
4031 expressions in each component association, and for records note
4032 the entity in each association choice, for subsequent resolution.
4033 (Resolve_Attribute, case 'Update): Complete resolution of
4034 expressions in each component association.
4035
40362014-01-24 Robert Dewar <dewar@adacore.com>
4037
4038 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
4039 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
4040 leading to wrong handling of SPARK_Mode for library units).
4041
40422014-01-24 Robert Dewar <dewar@adacore.com>
4043
4044 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
4045 on generic instances (do not consider them to be internally
4046 generated)
4047
40482014-01-24 Doug Rupp <rupp@adacore.com>
4049
4050 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
4051 vice pthread_sigmask.
4052
40532014-01-24 Vincent Celier <celier@adacore.com>
4054
4055 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
4056 not default.
4057
40582014-01-24 Vincent Celier <celier@adacore.com>
4059
4060 * prj-ext.adb (Add): Do not output anything when Silent is True,
4061 whatever the verbosity. When Source is From_External_Attribute,
4062 set the corresponding environment variable if it is not already set.
4063 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
4064 to False
4065 * prj-proc.adb (Process_Expression_For_Associative_Array):
4066 For attribute External, call Prj.Ext.Add with Silent set to
4067 True for the child environment, to avoid useless output in non
4068 default verbosity.
4069
40702014-01-24 Ed Schonberg <schonberg@adacore.com>
4071
4072 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
4073 range given by a subtype indication, and force evaluation of
4074 the bounds, as for a simple range.
4075 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
4076 of bounds of slice for various kinds of discrete ranges.
4077 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
4078 Evaluate_Slice_Bounds.
4079
40802014-01-24 Bob Duff <duff@adacore.com>
4081
4082 * s-taskin.ads (Activator): Make this Atomic, because
4083 Activation_Is_Complete reads it, and that can be called
4084 from any task. Previously, this component was only
4085 modified by the activator before activation, and by
4086 Self after activation.
4087 * a-taside.ads, a-taside.adb (Environment_Task,
4088 Activation_Is_Complete): Implement these missing functions.
4089
7610fee8
AC
40902014-01-24 Doug Rupp <rupp@adacore.com>
4091
4092 * init.c: Add a handler section for Android.
4093
40942014-01-24 Arnaud Charlet <charlet@adacore.com>
4095
4096 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
4097
40982014-01-24 Ed Schonberg <schonberg@adacore.com>
4099
4100 * sem_ch4.adb (Operator_Check): If one operand is a
4101 Raise_Expression, set its type to that of the other operand.
4102 * sem_res.adb (Resolve_Raise_Expression): new procedure.
4103 (Resolve_Actuals): For an actual that is a Raise_Expression,
4104 set the type to that of the formal.
4105 * sem_type.adb (Find_Unique_Type): If one of the operands is a
4106 Raise_Expression, return type of the other operand.
4107
41082014-01-24 Ed Schonberg <schonberg@adacore.com>
4109
4110 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
4111 component of the record has a type with a default aspect, and
4112 the corresponding aggregate component is initiaized with a box,
4113 use the default value in the rewritten aggregate.
4114
41152014-01-24 Tristan Gingold <gingold@adacore.com>
4116
4117 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
4118 s-interr-sigaction.adb,
4119 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
4120 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
4121 to the call to Install_Restricted_Handlers.
4122
41232014-01-24 Emmanuel Briot <briot@adacore.com>
4124
4125 * prj-nmsc.adb (Check_File): Add protection when the source is
4126 not fully initialized.
4127
4a854847
AC
41282014-01-24 Ed Schonberg <schonberg@adacore.com>
4129
4130 * sem_util.adb (Is_Post_State): In a postcondition, a selected
4131 component that denotes an implicit dereference is a reference
4132 to the post state of the subprogram.
4133
41342014-01-24 Robert Dewar <dewar@adacore.com>
4135
4136 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
4137 for generated subprograms.
4138 (Analyze_Subprogram_Specification): Ditto.
4139
41402014-01-24 Vincent Celier <celier@adacore.com>
4141
4142 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
4143 attributes in package Builder of aggregate and aggregate library
4144 projects.
4145 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
4146 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
4147 Remove parameters. Change error message from "... externally
4148 build library ..." to "... externally built project ...".
4149 (Process_Naming_Scheme.Check): Do not do any check in aggregate
4150 project, as attribute Library_Dir and Library_Name have already
4151 been detected as forbidden.
4152
41532014-01-24 Vincent Celier <celier@adacore.com>
4154
4155 * prj-env.adb (Find_Project): If cached project path is not in
4156 project directory, look in current directory first and use cached
4157 project path only if project is not found in project directory.
4158
a6ae518f
RD
41592014-01-24 Robert Dewar <dewar@adacore.com>
4160
4161 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
4162
0bd38d94
AC
41632014-01-24 Vincent Celier <celier@adacore.com>
4164
4165 * projects.texi: Document that aggregate projects are only
4166 supported by gprbuild, but not by gnatmake. Document that the
4167 only attribute Switches in package Binder of aggregate projects
4168 will be ignored if its index is not others. Document that
4169 attribute Global_Config_File is allowed in package Binder of
4170 aggregate projects.
4171
41722014-01-24 Robert Dewar <dewar@adacore.com>
4173
4174 * sem_prag.adb: Minor code reorganization.
4175 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
4176
0567ae8d
AC
41772014-01-24 Pascal Obry <obry@adacore.com>
4178
4179 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
4180 attribute definition.
4181
41822014-01-24 Vincent Celier <celier@adacore.com>
4183
4184 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
4185 in the Queue the same source (same path, same multi-source index)
4186 from the same project file, to avoid compiling several times
4187 the same source.
4188
41892014-01-24 Eric Botcazou <ebotcazou@adacore.com>
4190
4191 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
4192 (Has_Gigi_Rep_Item): Likewise.
4193 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
4194 Has_Gigi_Rep_Item for objects.
4195 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
4196 (prepend_one_attribute): ...this.
4197 (prepend_one_attribute_pragma): New function extracted from...
4198 (prepend_attributes): ...here. Swap the parameters for consistency.
4199 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
4200 prepend_attributes.
4201 <object>: Deal with a pragma Linker_Section on a constant
4202 or variable. <E_Function>: Deal with a pragma Linker_Section
4203 on a subprogram.
4204 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
4205
42062014-01-24 Vincent Celier <celier@adacore.com>
4207
4208 * opt.ads: Minor comment update.
4209
4437ea95
AC
42102014-01-24 Robert Dewar <dewar@adacore.com>
4211
4212 * sem_prag.adb (Analyze_Input_Output): Add missing error check
4213 for junk operand.
4214 * sem_util.adb (Is_Refined_State): Add defense against junk
4215 tree from error.
4216
42172014-01-24 Pascal Obry <obry@adacore.com>
4218
4219 * projects.texi: Removes Build_Slaves attribute documentation.
4220
ea0f1fc8
AC
42212014-01-23 Robert Dewar <dewar@adacore.com>
4222
4223 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
4224 setting.
4225
42262014-01-23 Ed Schonberg <schonberg@adacore.com>
4227
4228 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
4229 applies to expressions that come from source.
4230 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
4231 message.
4232 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
4233 rule regarding potentially unevaluated expressions, to prefix
4234 of attribute.
4235
19992053
AC
42362014-01-23 Ed Schonberg <schonberg@adacore.com>
4237
4238 * exp_util.adb (Make_Invqriant_Call): If type of expression is
4239 a private extension, get invariant from base type.
4240
42412014-01-23 Robert Dewar <dewar@adacore.com>
4242
4243 * sem_util.adb, sem_attr.adb: Minor reformatting.
4244
42452014-01-23 Robert Dewar <dewar@adacore.com>
4246
4247 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
4248 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
4249 * sem.adb (Semantics): Remove save/restore of
4250 SPARK_Mode[_Pragma]. Not needed since already done in
4251 Save/Restore_Opt_Config_Switches.
4252
42532014-01-23 Robert Dewar <dewar@adacore.com>
4254
4255 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
4256 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
4257 Linker_Section enhancements.
4258
c733429f
AC
42592014-01-23 Tristan Gingold <gingold@adacore.com>
4260
4261 * gnat_rm.texi: Minor editing.
4262
42632014-01-23 Robert Dewar <dewar@adacore.com>
4264
4265 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
4266 with'ed internal units.
4267 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
4268
42692014-01-23 Javier Miranda <miranda@adacore.com>
4270
4271 * lib-xref.adb (Generate_Reference): As part of processing the
4272 "end-of-spec" reference generate an extra reference to the first
4273 private entity of the package.
4274 * xr_tabls.adb (Add_Reference): No action needed for the extra
4275 'E' reference associated; similar to the processing of the
4276 'e' reference.
4277
42782014-01-23 Bob Duff <duff@adacore.com>
4279
4280 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
4281
42822014-01-23 Ed Schonberg <schonberg@adacore.com>
4283
4284 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
4285 predicate to implement rule given in 6.1.1 (20/3).
4286 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
4287 'Old in a postcondition, if it is potentially unevaluated and
4288 it is not an entity name.
4289
8bdc02c2
BD
42902014-01-23 Bob Duff <duff@adacore.com>
4291
4292 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
4293
e949ee22
AC
42942014-01-23 Robert Dewar <dewar@adacore.com>
4295
4296 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
4297 msg on VMS.
4298
42992014-01-23 Bob Duff <duff@adacore.com>
4300
4301 * g-dynhta.ads: Minor comment fix.
4302
43032014-01-23 Yannick Moy <moy@adacore.com>
4304
4305 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
4306 from spec on body only when not already inherited on spec. Set
4307 SPARK_Mode from context on body without previous spec. *
4308 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
4309 library-level entities. Correct retrieval of entity from
4310 declaration, for cases where the declaration is not a unit.
4311 * sem_ch12.adb (Instantiate_Object): Avoid
4312 calling Is_Volatile_Object on an empty node.
4313
545d3e65
RD
43142014-01-23 Robert Dewar <dewar@adacore.com>
4315
4316 * gnatlink.adb (Gnatlink): Check for suspicious executable file
4317 names on windows.
4318
43192014-01-23 Robert Dewar <dewar@adacore.com>
4320
4321 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
4322 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
4323 style errors in instances.
4324 * g-dynhta.ads (Static_HTable): Comment updates.
4325
cc55f9be
VC
43262014-01-23 Vincent Celier <celier@adacore.com>
4327
4328 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
4329 to find a configuration project file when Config_File_Name is
4330 No_Configuration_File.
4331 * prj-conf.ads (No_Configuration_File): New constant String.
4332 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
4333 with Config_File_Name set to No_Configuration_File, so that
4334 no existing configuration project file will be used, and the
4335 configuration project will be only created in memory when
4336 Add_Default_GNAT_Naming_Scheme is called.
4337 * projects.texi: Minor reformatting.
4338
225a0c5c
VC
43392014-01-23 Vincent Celier <celier@adacore.com>
4340
4341 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
4342 a config project file if On_Load_Config is not null.
4343 * prj-pars.adb: Minor comment changes.
4344
89253742
ES
43452014-01-23 Ed Schonberg <schonberg@adacore.com>
4346
4347 * lib-xref.adb (Output_References): Output progenitors of
4348 synchronized tagged types, for source navigation.
4349
53c53f6d
AC
43502014-01-23 Robert Dewar <dewar@adacore.com>
4351
4352 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
4353 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
4354 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
4355
43562014-01-23 Emmanuel Briot <briot@adacore.com>
4357
4358 * prj-conf.adb (Get_Or_Create_Configuration_File): call
4359 On_Load_Config later.
4360
43612014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4362
4363 * sem_ch3.adb (Analyze_Declarations): Do not
4364 generate the spec of the late primitive in ASIS mode. Add two
4365 comments to explain the special cases when the expansion is
4366 not performed.
4367
43682014-01-23 Robert Dewar <dewar@adacore.com>
4369
4370 * sem_util.adb (Note_Possible_Modification): Fix error of
4371 misbehaving for implicit dereference cases in -gnatc mode.
4372
43732014-01-23 Emmanuel Briot <briot@adacore.com>
4374
4375 * prj-pars.adb: Minor reformatting.
4376
3b8056a5
AC
43772014-01-22 Ed Schonberg <schonberg@adacore.com>
4378
4379 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
4380 body generated for an expression function within a protected body
4381 needs a set of renaming declarations if the expression function
4382 comes from source.
4383
43842014-01-22 Ed Schonberg <schonberg@adacore.com>
4385
4386 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
4387 list interface progenitor of a tagged concurrent type, for better
4388 source navigation.
4389
43902014-01-22 Robert Dewar <dewar@adacore.com>
4391
4392 * lib.adb (In_Extended_Main_Code_Unit): Return False for
4393 Standard_Location.
4394 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
4395 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
4396 treatment of Slocs No_Location and Standard_Location.
4397 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
4398 check for entity with Standard_Location Sloc, rather than relying
4399 on Lib routines to do that.
4400 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
4401 that a call cannot occur before a later occuring body within
4402 the same unit.
4403
fba9ebfc
AC
44042014-01-22 Thomas Quinot <quinot@adacore.com>
4405
4406 * rtsfind.adb: Update comment.
4407
44082014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
4409
4410 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
4411 * sem_ch3.adb (Analyze_Declarations): Add local variable
4412 Body_Seen. Generate the spec of a late controlled
4413 primitive body that is about to freeze its related type.
4414 (Handle_Late_Controlled_Primitive): New routine.
4415
44162014-01-22 Robert Dewar <dewar@adacore.com>
4417
4418 * a-stream.adb: Minor reformatting.
4419
44202014-01-22 Ed Schonberg <schonberg@adacore.com>
4421
4422 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
4423 sub-procedure Declared_In_Actual to handle properly the visibility
4424 of actuals in actual packages, that are themselves actuals to a
4425 actual package of the current instance. This mimics properly the
4426 visibility of formals of formal packages declared with a box,
4427 within the corresponding generic unit.
4428
44292014-01-22 Robert Dewar <dewar@adacore.com>
4430
4431 * checks.adb: Do not assume that a volatile variable is valid.
4432
44332014-01-22 Thomas Quinot <quinot@adacore.com>
4434
4435 * g-catiio.ads (Image, Value): Clarify that these functions
4436 operate in the local time zone. Minor documentation update.
4437
44382014-01-22 Thomas Quinot <quinot@adacore.com>
4439
4440 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
4441
b2834fbd
AC
44422014-01-22 Robert Dewar <dewar@adacore.com>
4443
4444 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
4445 Moved to sem_aux.adb.
4446
44472014-01-22 Robert Dewar <dewar@adacore.com>
4448
4449 * vms_data.ads: Minor reformatting.
4450
44512014-01-22 Robert Dewar <dewar@adacore.com>
4452
4453 * debug.adb: Document messages affected by -gnatd.E including
4454 the new ones that relate to late definition of equality.
4455 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
4456 debug flag -gnatd.E is set, then generate warnings rather than
4457 errors.
4458 (Check_Untagged_Equality): In earlier versions of Ada,
4459 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
4460
44612014-01-22 Robert Dewar <dewar@adacore.com>
4462
4463 * sem_prag.adb (Usage_Error): Output additional messages for
4464 unconstrained OUT parameters lacking an input dependency.
4465
44662014-01-22 Robert Dewar <dewar@adacore.com>
4467
4468 * sem_ch4.adb: Minor reformatting.
4469
44702014-01-22 Robert Dewar <dewar@adacore.com>
4471
4472 * restrict.ads: Minor reformatting.
4473 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
4474 forbids a call from within a subprogram to the same subprogram.
4475
44762014-01-22 Thomas Quinot <quinot@adacore.com>
4477
4478 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
4479 stream attributes for Stream_Element_Array.
4480 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
4481 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
4482 defined in the current scope.
4483
d4129bfa
AC
44842014-01-22 Robert Dewar <dewar@adacore.com>
4485
4486 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
4487
44882014-01-22 Thomas Quinot <quinot@adacore.com>
4489
4490 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
4491
44922014-01-22 Thomas Quinot <quinot@adacore.com>
4493
4494 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
4495 declaration initialized with a function call, whose type
4496 has variable size, need to remove side effects so that the
4497 initialization expression becomes a dereference of a temporary
4498 reference to the function result.
4499
b6f36bf8
YM
45002014-01-22 Yannick Moy <moy@adacore.com>
4501
4502 * errout.adb (Initialize): Remove trick to add dummy entry
4503 in Warnings table.
4504 * erroutc.adb (Set_Warnings_Mode_Off,
4505 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
4506 command line switch.
4507 * opt.ads (Warning_Mode): Document behavior
4508 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
4509
113a62d9
RD
45102014-01-22 Robert Dewar <dewar@adacore.com>
4511
4512 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
4513
45142014-01-22 Robert Dewar <dewar@adacore.com>
4515
4516 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
4517 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
4518 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
4519 case Storage_Size): call Check_Pool_Size_Clash.
4520
f5f6d8d7
AC
45212014-01-22 Robert Dewar <dewar@adacore.com>
4522
4523 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
4524 sem_eval.ads: Minor reformatting.
4525
45262014-01-22 Thomas Quinot <quinot@adacore.com>
4527
4528 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
4529 Any_Composite to prevent cascaded errors.
4530
45312014-01-22 Yannick Moy <moy@adacore.com>
4532
4533 * errout.adb (Initialize): Do not insert special entry in Warnings
4534 table in GNATprove_Mode.
4535 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
4536 GNATprove_Mode.
4537 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
4538 warnings anymore.
4539
2e70d415
AC
45402014-01-22 Robert Dewar <dewar@adacore.com>
4541
4542 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
4543 initializes case.
4544
45452014-01-22 Robert Dewar <dewar@adacore.com>
4546
4547 * snames.ads-tmpl: Update header.
4548
45492014-01-22 Thomas Quinot <quinot@adacore.com>
4550
4551 * exp_util.adb (Insert_Actions): When inserting actions on a
4552 short circuit operator that has already been analyzed, do not park
4553 actions in node; instead introduce an N_Expression_With_Actions
4554 and insert actions immediately.
4555 Add guard for unexpected case of climbing up through statement
4556 in Actions list of an N_Expression_With_Actions.
4557 * sem_elab.adb (Insert_Elab_Check): Remove complex
4558 specialized circuitry for the case where the context is already
4559 analyzed, as it is not needed and introduces irregularities in
4560 finalization. Instead rely on the above change to Insert_Actions
4561 to ensure that late insertion on short circuit operators works
4562 as expected.
4563
45642014-01-22 Ed Schonberg <schonberg@adacore.com>
4565
4566 * sem_ch4.adb (Operator_Check): Improve error message when an
4567 operand of concatenation is an access type.
4568
45692014-01-22 Thomas Quinot <quinot@adacore.com>
4570
4571 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
4572 cascaded error.
4573
45742014-01-22 Ed Schonberg <schonberg@adacore.com>
4575
4576 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
4577 of an expanded name in a proper body, whose prefix is a package
4578 in the context of the proper body, when there is a homonym of
4579 the package declared in the parent unit.
4580
1250f802
RD
45812014-01-22 Robert Dewar <dewar@adacore.com>
4582
4583 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
4584 msg if errors found.
4585 (Check_One_Unit): Same change.
4586
45872014-01-22 Robert Dewar <dewar@adacore.com>
4588
4589 * ug_words: Add missing/wrong entries for VMS warning switches.
4590 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
4591
54533a0b
AC
45922014-01-22 Jerome Guitton <guitton@adacore.com>
4593
4594 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
4595 arm.
4596
45972014-01-22 Robert Dewar <dewar@adacore.com>
4598
4599 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
4600
3044bbe4
EB
46012014-01-22 Eric Botcazou <ebotcazou@adacore.com>
4602
4603 * gcc-interface/Makefile.in: Minor fixes.
4604
71affc54
AC
46052014-01-21 Robert Dewar <dewar@adacore.com>
4606
4607 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
4608 * par-ch5.adb (P_Condition): New version with expression prescanned.
4609 * par.adb (P_Condition): New version with expression prescanned.
4610
46112014-01-21 Robert Dewar <dewar@adacore.com>
4612
4613 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
4614 if Address is not a private type.
4615 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4616 Ignore pragma if System.Address is not a private type.
4617
46182014-01-21 Arnaud Charlet <charlet@adacore.com>
4619
4620 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
4621 uninitialized value.
4622
ef1c0511
AC
46232014-01-21 Thomas Quinot <quinot@adacore.com>
4624
4625 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
4626
46272014-01-21 Ed Schonberg <schonberg@adacore.com>
4628
4629 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
4630 the value of Assertions_Enabled flag when compiling an instance of
4631 an internal unit. This facilitates the use of pre/postconditions
4632 in generic internal units, such as the new elementary function
4633 libraries.
4634
46352014-01-21 Robert Dewar <dewar@adacore.com>
4636
4637 * exp_aggr.adb: Minor reformatting.
4638 * sem_attr.adb: Minor reformatting.
4639 * sem_res.adb: Minor comment addition.
4640 * einfo.adb: Minor comment updates.
4641 * freeze.adb: Minor reformatting and code reorganization.
4642
46432014-01-21 Ed Schonberg <schonberg@adacore.com>
4644
4645 * par-ch4.adb (P_If_Expression): Handle more gracefully an
4646 elsif clause that does not have an else part.
4647
637a41a5
AC
46482014-01-21 Robert Dewar <dewar@adacore.com>
4649
4650 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
4651 * gcc-interface/Makefile.in: clean up target pairs.
4652
46532014-01-21 Pascal Obry <obry@adacore.com>
4654
4655 * projects.texi: Minor typo fix.
4656
46572014-01-21 Thomas Quinot <quinot@adacore.com>
4658
4659 * freeze.adb (Check_Component_Storage_Order): If a record type
4660 has an explicit Scalar_Storage_Order attribute definition clause,
4661 reject any component that itself is of a composite type and does
4662 not have one.
4663
46642014-01-21 Ed Schonberg <schonberg@adacore.com>
4665
4666 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
4667 can be used to generate proper cross-reference information for
4668 the parent units of proper bodies.
4669
46702014-01-21 Thomas Quinot <quinot@adacore.com>
4671
4672 * exp_pakd.adb (Expand_Packed_Element_Set,
4673 Expand_Packed_Element_Reference): No byte swapping required in
4674 the front-end for the case of a reverse storage order array,
4675 as this is now handled uniformly in the back-end. However we
4676 still need to swap back an extracted element if it is itself a
4677 nested composite with reverse storage order.
4678
497716fe
AC
46792014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
4680
4681 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
4682 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
4683 include "others".
4684
46852014-01-21 Arnaud Charlet <charlet@adacore.com>
4686
4687 * gnat_ugn.texi: Minor updates.
4688
fb1fdf7d
AC
46892014-01-21 Thomas Quinot <quinot@adacore.com>
4690
4691 * exp_pakd.adb: Update comment, minor reformatting.
4692
46932014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
4694
4695 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
4696 object check when SPARK_Mode is on.
4697 * sem_ch6.adb (Process_Formals): Trigger the volatile object
4698 check when SPARK_Mode is on.
4699 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
4700 check when SPARK_Mode is on.
4701 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
4702 corresponding pragma of aspect SPARK_Mode in the visible
4703 declarations of a package declaration.
4704 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
4705 check when SPARK_Mode is on.
4706 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
4707 check when SPARK_Mode is on.
4708 (Resolve_Entity_Name): Trigger
4709 the volatile object check when SPARK_Mode is on.
4710
84f80f5b
AC
47112014-01-21 Robert Dewar <dewar@adacore.com>
4712
4713 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
4714 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
4715
47162014-01-21 Ed Schonberg <schonberg@adacore.com>
4717
4718 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
4719 object is declared, it is rewritten as a renaming of an dynamic
4720 expression that wraps the initial value. The renaming declaration
4721 is first given an internal name, to prevent collisions with the
4722 entity already declared, and then the name is modified to reflect
4723 the original one. the modification of the name must preserve
4724 the source location of the original, to prevent spurious errors
4725 when compiling with style checks if the declaration involves
4726 more than one entity.
4727
6c3c671e
AC
47282014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
4729
4730 * aspects.adb Add entries for Async_Readers, Async_Writers,
4731 Effective_Reads and Effective_Writes in table Canonical_Aspect.
4732 * aspects.ads Add entries for Async_Readers, Async_Writers,
4733 Effective_Reads and Effective_Writes in tables Aspect_Id,
4734 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
4735 * atree.adb (Ekind_In): New version with 8 parameters.
4736 (Node34): New routine.
4737 (Set_Node34): New routine.
4738 * atree.ads (Ekind_In): New version with 8 parameters.
4739 (Node34): New routine.
4740 (Set_Node34): New routine.
4741 * einfo.adb Contract is now Node34.
4742 (Contract): Update the assertion and node usage.
4743 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
4744 Effective_Reads and Effective_Writes.
4745 (Set_Contract): Update the assertion and node usage.
4746 (Write_Field24_Name): Remove the output for a contract.
4747 (Write_Field34_Name): Add output for a contract.
4748 * einfo.ads Contract is now Node34. Update the comment on
4749 attribute usage and related node structures.
4750 (Get_Pragma): Update the comment on usage.
4751 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
4752 Effective_Reads and Effective_Writes do not require special
4753 processing by the parser.
4754 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
4755 (Analyze_Declarations): Analyze the contract of a variable at
4756 the end of the declarative region.
4757 (Analyze_Object_Declaration): Create a contract for a variable.
4758 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
4759 of classification pragmas.
4760 (Process_Formals): Detect an illegal
4761 use of a volatile object as a formal in a function.
4762 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
4763 a volatile object as an actual in generic instantiation.
4764 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
4765 Effective_Reads and Effective_Writes in table Sig_Flags.
4766 (Analyze_External_State_In_Decl_Part): New routine.
4767 (Analyze_Global_Item): Detect an illegal use of a volatile object
4768 as a global item of a function.
4769 (Analyze_Pragma): Reimplement
4770 pragma Abstract_State. Add support for pragmas Async_Readers,
4771 Async_Writers, Effective_Reads and Effective_Writes.
4772 (Check_External_Properties): New routine.
4773 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
4774 (Check_External_Properties): New routine.
4775 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
4776 volatile object as an actual in a call.
4777 (Resolve_Entity_Name):
4778 Add local variables Par, Prev and Usage_OK. Detect illegal
4779 contexts of volatile objects.
4780 * sem_util.adb (Add_Contract_Item): Add support for
4781 pragmas associated with the contract of a variable.
4782 (Async_Readers_Enabled): New routine.
4783 (Async_Writers_Enabled): New routine.
4784 (Effective_Reads_Enabled): New routine.
4785 (Effective_Writes_Enabled): New routine.
4786 (Has_Enabled_Property):
4787 New routine.
4788 (Is_Unchecked_Conversion_Instance): New routine.
4789 (Is_Volatile_Object): Add support for entities that may denote
4790 a volatile object.
4791 * sem_util.ads (Add_Contract_Item): Update the
4792 comment on usage.
4793 (Async_Readers_Enabled): New routine.
4794 (Async_Writers_Enabled): New routine.
4795 (Effective_Reads_Enabled): New routine.
4796 (Effective_Writes_Enabled): New routine.
4797 (Is_Unchecked_Conversion_Instance): New routine.
4798 * sinfo.ads Update the comment on the structure of N_Contract.
4799 * snames.ads-tmpl Add predefined names for Async_Readers,
4800 Async_Writers, Effective_Reads and Effective_Writes. Add
4801 pragma ids for Async_Readers, Async_Writers, Effective_Reads
4802 and Effective_Writes.
4803
48042014-01-21 Robert Dewar <dewar@adacore.com>
4805
4806 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
4807 * sem_eval.adb (Compile_Time_Known_Value): Remove special
4808 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
4809 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
4810 (Test_Foldable): Add CRT_Safe parameter
4811 * sem_eval.ads (Compile_Time_Known_Value): Remove special
4812 handling of CRT mode.
4813 (CRT_Safe_Compile_Time_Known_Value): New function.
4814
084c2203
RD
48152014-01-21 Robert Dewar <dewar@adacore.com>
4816
4817 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
4818 with pragma or aspect that applies to package spec or subprogram
4819 spec.
4820
579847c2
AC
48212014-01-21 Robert Dewar <dewar@adacore.com>
4822
4823 * exp_aggr.adb: Minor reformatting.
4824
48252014-01-21 Johannes Kanig <kanig@adacore.com>
4826
4827 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
4828
48292014-01-21 Bob Duff <duff@adacore.com>
4830
4831 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
4832
48332014-01-21 Steve Baird <baird@adacore.com>
4834
4835 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
4836
48372014-01-21 Vincent Celier <celier@adacore.com>
4838
4839 * prj-part.adb (Parse_Single_Project): Accept to extend a project
4840 if it has only be imported by an project being extended. When a
4841 project that has only been imported by a project being extended
4842 is imported by another project that is not being extended,
4843 reset the previous indication, so that it will be an error if
4844 this project is extended later.
4845 * prj-tree.adb (Create_Project): Include component From_Extended
4846 in table Projects_HT
4847 * prj-tree.ads (Project_Name_And_Node): New Boolean component
4848 From_Extended
4849
48502014-01-21 Robert Dewar <dewar@adacore.com>
4851
4852 * atree.ads, atree.adb: Add Node33 and Set_Node33.
4853 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
4854 New field (SPARK_Pragma_Inherited): New flag
4855 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
4856 Removed.
4857 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
4858 * opt.ads (SPARK_Mode_Pragma): New global variable.
4859 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
4860 * sem_ch3.adb: Use new SPARK_Mode data structures.
4861 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
4862 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
4863 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
4864 (Pop_Scope): Restore SPARK_Mode_Pragma.
4865 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
4866 new data structures.
4867
48682014-01-21 Arnaud Charlet <charlet@adacore.com>
4869
4870 * back_end.adb: Undo previous change, not needed. Minor reformatting.
4871
376e7d14
AC
48722014-01-21 Thomas Quinot <quinot@adacore.com>
4873
4874 * exp_ch5.adb: Fix comment.
4875 * switch-c.adb: Minor comment update.
4876 * exp_ch3.adb: Minor reformatting.
4877
48782014-01-21 Arnaud Charlet <charlet@adacore.com>
4879
4880 * back_end.adb (Scan_Compiler_Arguments): Do not store object
4881 filename in gnatprove mode.
4882
48832014-01-21 Thomas Quinot <quinot@adacore.com>
4884
4885 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
4886 suppresses usage of primitive _assign for tagged types).
4887 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
4888 No_Ctrl_Actions for a tagged type that does not require
4889 finalization, as we want to disable usage of _assign (which
4890 may cause undesirable discriminant checks on an uninitialized,
4891 invalid target).
4892
48932014-01-21 Ed Schonberg <schonberg@adacore.com>
4894
4895 * sem_prag.adb: Reject invariant'class on completion.
4896
8d81fb4e
AC
48972014-01-21 Javier Miranda <miranda@adacore.com>
4898
4899 * exp_ch3.adb (Build_Init_Procedure): For
4900 derivations of interfaces, do not move the the initialization
4901 of the _parent field since such assignment is not generated.
4902
49032014-01-21 Ed Schonberg <schonberg@adacore.com>
4904
4905 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
4906 with the operator it renames if we are within an expression of
4907 a pre/postcondition, because the expression will be reanalyzed
4908 at a later point, and the analysis of the renaming may affect
4909 the visibility of the operator when in an instance.
4910
49112014-01-21 Robert Dewar <dewar@adacore.com>
4912
4913 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
4914 Add this flag to type conversion nodes and assignment nodes.
4915 * treepr.adb: Deal properly with Flag 1,2,3.
4916 * treeprs.adt: Minor comment update.
4917
49182014-01-21 Robert Dewar <dewar@adacore.com>
4919
4920 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
4921 parameter.
4922 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
4923 parameter, completely rewrite spec.
4924
49252014-01-21 Ed Schonberg <schonberg@adacore.com>
4926
4927 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
4928 instance that is inlined, it may have been rewritten as a wrapper
4929 package. In that case the unit that must be made visible is the
4930 related instance of the package.
4931
49322014-01-21 Arnaud Charlet <charlet@adacore.com>
4933
4934 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
4935 previous change in codepeer mode.
4936
6b6041ec
AC
49372014-01-21 Arnaud Charlet <charlet@adacore.com>
4938
4939 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
4940 call to Abort_Undefer, as expected by the runtime.
4941 * s-tasren.adb (Local_Complete_Rendezvous): Replace
4942 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
4943 deferred at this point. Update comments.
4944
49452014-01-21 Thomas Quinot <quinot@adacore.com>
4946
4947 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
4948
49492014-01-21 Arnaud Charlet <charlet@adacore.com>
4950
4951 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
4952 remove from doc.
4953
77a2f3df
RD
49542014-01-21 Robert Dewar <dewar@adacore.com>
4955
4956 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
4957
5f0c4d67
AC
49582014-01-21 Thomas Quinot <quinot@adacore.com>
4959
4960 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
4961 this is value is used in Node_Id arithmetic operations.
4962 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
4963 instead of hard-coded unrolled code.
4964
49652014-01-21 Yannick Moy <moy@adacore.com>
4966
4967 * gnat1drv.adb: Minor code cleanup, removing useless code.
4968
49692014-01-21 Arnaud Charlet <charlet@adacore.com>
4970
4971 * opt.ads (SPARK_Switches_File_Name): New.
4972 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
4973 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
4974 * gnat_ugn.texi: Document -gnates.
4975
49762014-01-21 Yannick Moy <moy@adacore.com>
4977
4978 * errout.adb (Special_Msg_Delete): Update comment. Remove
4979 special case for GNATprove which should not ignore mismatch
4980 in sizes for representation clauses.
4981 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
4982 which should not ignore pragma Pack.
4983
49842014-01-21 Ed Schonberg <schonberg@adacore.com>
4985
4986 * sem_ch4.adb: Code clean up.
4987
49882014-01-21 Steve Baird <baird@adacore.com>
4989
4990 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
4991
4bcf6815
AC
49922014-01-21 Robert Dewar <dewar@adacore.com>
4993
4994 * gcc-interface/gigi.h: Get Flags array address.
4995 * gcc-interface/trans.c: Acquire Flags array address.
4996 * atree.adb: Add support for Flags array and Flag0,1,2,3.
4997 * atree.ads: Add support for Flags array and Flag0,1,2,3.
4998 * atree.h: Add support for Flags array and Flag0,1,2,3.
4999 * back_end.adb: Pass Flags array address to gigi.
5000
50012014-01-21 Ed Schonberg <schonberg@adacore.com>
5002
5003 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
5004 reference to generated body so that legality checks on stream
5005 attributes are properly applied. If type is tagged and already
5006 frozen, insert generated body at the point of the renaming
5007 declaration.
5008
50092014-01-21 Ed Schonberg <schonberg@adacore.com>
5010
5011 * sem_ch12.adb: Code clean up.
5012 * sem_ch8.adb: Minor reformatting
5013
43417b90
AC
50142014-01-20 Robert Dewar <dewar@adacore.com>
5015
5016 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
5017 converting warnings on inevitable exceptions to errors.
5018 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
5019 converting warnings on inevitable exceptions to errors.
5020 * opt.adb (SPARK_Mode_Config): Handled like other config flags
5021 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
5022 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
5023 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
5024 New flag (Config_Switches_Type): Add SPARK_Mode field
5025 * sem.adb: Minor code reorganization (remove unnecessary with)
5026 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
5027 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
5028 converting warnings on inevitable exceptions to errors.
5029 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
5030 converting warnings on inevitable exceptions to errors.
5031 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
5032 converting warnings on inevitable exceptions to errors.
5033 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
5034 converting warnings on inevitable exceptions to errors.
5035 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
5036 from spec if needed
5037 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
5038 from spec if needed
5039 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
5040 Restore SPARK_Mode
5041 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
5042 converting warnings on inevitable exceptions to errors.
5043 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
5044 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
5045 of Get_SPARK_Mode_Id
5046 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
5047 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
5048 converting warnings on inevitable exceptions to errors.
5049 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
5050 converting warnings on inevitable exceptions to errors.
5051 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
5052 SPARK_Mode_Type
5053
50542014-01-20 Ed Schonberg <schonberg@adacore.com>
5055
5056 * sem_ch13.adb: Add semantic information to rewritten type
5057 reference.
5058
50592014-01-20 Ed Schonberg <schonberg@adacore.com>
5060
5061 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
5062 are of a type with unknown discriminants, convert both to the
5063 underlying view of the type, so that the proper constraint check
5064 can be applied to the right-hand side.
5065
50662014-01-20 Robert Dewar <dewar@adacore.com>
5067
5068 * atree.adb (Copy_Node): Fix failure to copy last component
5069 (Exchange_Entities): Fix failure to exchange last entity
5070
50712014-01-20 Ed Schonberg <schonberg@adacore.com>
5072
5073 * sem_ch12.adb: Code clean up.
5074
e4deba8e
RD
50752014-01-20 Robert Dewar <dewar@adacore.com>
5076
5077 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
5078
a736f6e6
AC
50792014-01-20 Ed Schonberg <schonberg@adacore.com>
5080
5081 * sem_ch4.adb (Analyze_Quantified_Expression): If after
5082 pre-analysis the loop parameter specification has been
5083 rewritten as a iterator specification, propagate the change to
5084 the quantified expression, for ASIS navigtion needs.
5085
50862014-01-20 Vincent Celier <celier@adacore.com>
5087
5088 * par-ch10.adb: Minor error message change: escape [ and ].
5089
4a28b181
AC
50902014-01-20 Robert Dewar <dewar@adacore.com>
5091
5092 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
5093 * errout.adb: Implement [ and ] insertion characters.
5094 * errout.ads: Document new [ and ] insertion characters.
5095 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
5096 addition of ??? comment.
5097 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
5098 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
5099 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
5100 Make warnings on exceptions into errors in GNATprove mode.
5101 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
5102 in error messages.
5103
51042014-01-20 Ed Schonberg <schonberg@adacore.com>
5105
5106 * sem_ch13.adb: Code clean up.
5107
b465ef6f
AC
51082014-01-20 Robert Dewar <dewar@adacore.com>
5109
5110 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
5111 messages.
5112 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
5113 error in GNATprove mode.
5114
51152014-01-20 Ed Schonberg <schonberg@adacore.com>
5116
5117 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
5118 reference 'Old takes no parameters, and thus can appear as a
5119 prefix of a slice.
5120
51212014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5122
5123 * exp_aggr.adb: Fix minor typos.
5124
a6152428
AC
51252014-01-20 Ed Schonberg <schonberg@adacore.com>
5126
5127 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
5128 instance the attribute is legal, and its value is determined
5129 statically if the type has no discriminants. This choice is
5130 more useful than rechecking the legality rule in the instance,
5131 is consistent with older usage, and is also consistent with all
5132 existing tests.
5133
51342014-01-20 Arnaud Charlet <charlet@adacore.com>
5135
5136 * sem_cat.adb (Validate_Static_Object_Name): Change error into
5137 warning in Relaxed_Semantic_Mode.
5138
e19fd0bd
AC
51392014-01-20 Ed Schonberg <schonberg@adacore.com>
5140
5141 * sem_attr.adb: Code and comments cleanup.
5142
51432014-01-20 Yannick Moy <moy@adacore.com>
5144
5145 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
5146 * errout.adb (Compilation_Errors): Remove special handling in
5147 GNATprove mode.
5148 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
5149 removed debug flags.
5150 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
5151 Global, Initial_Condition, Initializes and Refined_State pragmas and
5152 aspects.
5153 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
5154 SPARK_Strict_Mode): Remove global flags.
5155 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
5156 always performed now, on packages declaring a null state.
5157 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
5158 at providing pedantic mode for bounds of integer types.
5159 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
5160 "some" quantified expression now issued under control of -gnatw.t,
5161 like the other warning on unused bound variable.
5162 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
5163 on removed flag.
5164 (Analyze_Pragma): Remove tests for SPARK 2014
5165 pragmas, not officially allowed by GNAT.
5166
58827738
AC
51672014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5168
5169 * sem_prag.adb (Analyze_Pragma): Ensure that
5170 the sole argument of pragmas Abstract_State, Contract_Cases,
5171 Depends, Global and Initializes in in aggregate form.
5172 (Analyze_Refined_Pragma): Ensure that the sole argument of
5173 pragmas Refined_Depends, Refined_Global and Refined_State is in
5174 aggregate form.
5175 (Ensure_Aggregate_Form): New routine.
5176
51772014-01-20 Doug Rupp <rupp@adacore.com>
5178
5179 * sem_attr.adb (Analyze_Attribute): case
5180 Attribute_Constrained => treat all prefixes as legal for Declib
5181 compatibility.
5182
9559eccf
AC
51832014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5184
5185 * sem_prag.adb (Check_Mode): Reimplement the routine.
5186 (Find_Mode): New routine.
5187
51882014-01-20 Robert Dewar <dewar@adacore.com>
5189
5190 * sem_ch4.adb (Operator_Check): Handle additional
5191 Allow_Integer_Address cases.
5192
7dbd3de9
RD
51932014-01-20 Robert Dewar <dewar@adacore.com>
5194
5195 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
5196 allowed if address is non-private, no longer true.
5197 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5198 Remove check for address being private, causes difficulty when
5199 pragma used in gnat.adc file and is not needed, since we guard
5200 this in Address_Integer_Convert_OK.
5201 * exp_ch7.adb: Minor reformatting.
5202 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
5203
52042014-01-20 Robert Dewar <dewar@adacore.com>
5205
5206 * checks.adb (Apply_Range_Check): Remove gnatprove special
5207 casing of exponentiation.
5208 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
5209 operand for integer case to check range against Natural.
5210
061828e3
AC
52112014-01-20 Robert Dewar <dewar@adacore.com>
5212
5213 * s-tataat.adb: Minor reformatting.
5214
52152014-01-20 Robert Dewar <dewar@adacore.com>
5216
5217 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
5218 entities, and also fix documentation to remove mention of visible
5219 integer type, since this is not what the implementation does.
5220 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
5221 entities, and also fix documentation to remove mention of visible
5222 integer type, since this is not what the implementation does.
5223 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
5224 function.
5225 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
5226 case for parameter type check.
5227 * sem_res.adb (Resolve): Use new function
5228 Address_Integer_Convert_OK.
5229 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
5230 reformatting throughout.
5231 * sem_util.adb (Address_Integer_Convert_OK): New function.
5232 * sem_util.ads: Minor reformatting (put specs in alpha order)
5233 (Address_Integer_Convert_OK): New function.
5234
52352014-01-20 Thomas Quinot <quinot@adacore.com>
5236
5237 * exp_ch7.adb (Wrap_Transient_Expression):
5238 Insertion extra conditional expression only if
5239 Opt.Suppress_Control_Flow_Optimizations is set.
5240
ff4e28eb
AC
52412014-01-20 Arnaud Charlet <charlet@adacore.com>
5242
5243 * s-tataat.adb (Initialize_Attributes): Abort might already be
5244 deferred in Create_Task.
5245
52462014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5247
5248 * checks.adb (Apply_Scalar_Range_Check): Flag
5249 the exponent as requiring a range check when the expression is
5250 an exponentiation.
5251
a1efcc17
AC
52522014-01-20 Fedor Rybin <frybin@adacore.com>
5253
5254 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
5255
52562014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5257
5258 * sem_util.adb (Default_Initialization): New routine.
5259 * sem_util.ads: Add new type Default_Initialization_Kind.
5260 (Default_Initialization): New routine.
5261
52622014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5263
5264 * sem_prag.adb (Check_Mode): Correct all error
5265 message logic dealing with in/in out parameters that may appear
5266 as inputs or have a self reference.
5267
6fd0a72a
AC
52682014-01-20 Robert Dewar <dewar@adacore.com>
5269
5270 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
5271 * sem_res.adb (Resolve): Fix error causing infinite loop for
5272 integer used as address. Allow addresses as integers.
5273
52742014-01-20 Arnaud Charlet <charlet@adacore.com>
5275
5276 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
5277
52782014-01-20 Bob Duff <duff@adacore.com>
5279
5280 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
5281 error when "use all" is not followed by "type".
5282
3b4598a7
AC
52832014-01-20 Bob Duff <duff@adacore.com>
5284
5285 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
5286 followed by free.
5287
52882014-01-20 Ed Schonberg <schonberg@adacore.com>
5289
5290 * checks.adb (Apply_Address_Clause_Check): If there is an
5291 alignment check on the expression in an address clause, and there
5292 is no local exception propagation, add an additional explanatory
5293 message to clarify the cause of previous warning.
5294
4058ddcc
AC
52952014-01-20 Robert Dewar <dewar@adacore.com>
5296
5297 * exp_ch7.adb: Minor reformatting.
5298 * opt.ads: Minor comment updates.
5299 * sem.adb: Minor name change Is_Main_Unit =>
5300 Is_Main_Unit_Or_Main_Unit_Spec.
5301 * sem_ch6.adb: Minor reformatting and code reorganization.
5302
53032014-01-20 Bob Duff <duff@adacore.com>
5304
5305 * gnat_ugn.texi: Update gnatpp switches.
5306
53072014-01-20 Thomas Quinot <quinot@adacore.com>
5308
5309 * exp_ch9.adb: Minor comment edit.
5310
d8a764c4
AC
53112014-01-20 Robert Dewar <dewar@adacore.com>
5312
5313 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
5314 only if System.Address is a private type.
5315 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
5316 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5317 Allowed only if type System.Address is private, since otherwise
5318 it makes no sense.
5319 * sem_res.adb: Fix failure to properly Analyze unchecked
5320 conversions that were introduced by Allow_Integer_Address.
5321 * switch-c.adb: Remove -gnates switch.
5322 * usage.adb: Remove -gnates switch.
5323 * gnat_ugn.texi: Remove documentation of -gnates flag.
5324
53252014-01-20 Ed Schonberg <schonberg@adacore.com>
5326
5327 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
5328 resolve expression to perform proper name capture.
5329
53302014-01-20 Ed Schonberg <schonberg@adacore.com>
5331
5332 * sem.adb (Semantics): When saving/restoring configuration
5333 switches, the spec of a pre- defined unit that is the main unit
5334 must be treated as a predefined unit as well.
5335
53362014-01-20 Thomas Quinot <quinot@adacore.com>
5337
5338 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
5339 expression, insert an extra conditional expression when saving
5340 the value of the expression, for the benefit of control flow
5341 graph based coverage analysis.
5342 * exp_ch3.adb: Minor reformatting.
5343
818b578d
AC
53442014-01-20 Robert Dewar <dewar@adacore.com>
5345
5346 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
5347 * gnat_rm.texi: Document pragma Allow_Integer_Address.
5348 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
5349 * opt.ads: New flag Allow_Integer_Address.
5350 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
5351 * sem_ch5.adb: Minor reformatting.
5352 * sem_prag.adb: Implement pragma Allow_Integer_Address.
5353 * sem_res.adb (Resolve): Allow integer address value if
5354 switch set.
5355 * sem_util.adb: Minor reformatting.
5356 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
5357 * switch-c.adb: Recognize flag -gnates.
5358 * usage.adb: Document flag -gnates.
5359
53602014-01-20 Thomas Quinot <quinot@adacore.com>
5361
5362 * s-tadeca.adb: Fix minor typos in comment.
5363
c2e54001
AC
53642014-01-20 Pascal Obry <obry@adacore.com>
5365
5366 * s-win32.ads (FreeLibrary): New import.
5367
53682014-01-20 Robert Dewar <dewar@adacore.com>
5369
5370 * sem_res.adb, sem_cat.adb: Minor reformatting.
5371 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
5372 assigning to OUT parameters for the current subprogram scope.
5373 * exp_ch4.adb: Minor reformatting.
5374
53752014-01-20 Ed Schonberg <schonberg@adacore.com>
5376
5377 * exp_ch4.adb (Process_Transient_Object,
5378 Find_Enclosing_Contexts): If the top-level if-expression that
5379 generated the transient object is an actual in a call, the proper
5380 Hook_Context is a construct enclosing the call.
5381 * einfo.ads: Indicate that Related_Expression is used to link a
5382 loop variable to the container expression over which the loop
5383 takes place.
5384 (Analyze_Iterator_Specification): Set the Related_Expression of
5385 the loop variable in a container element iterator.
5386 (Note_Possible_Modification): If the variable is the loop
5387 variable in a container element iterator, indicate that the
5388 enclosing container is also modified.
5389
53902014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5391
5392 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
5393
90b51aaf
AC
53942014-01-20 Robert Dewar <dewar@adacore.com>
5395
5396 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
5397 Minor reformatting and code clean up.
5398
53992014-01-20 Arnaud Charlet <charlet@adacore.com>
5400
5401 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
5402 of objects of private type if Relaxed_RM_Semantics.
5403
2838fa93
AC
54042014-01-20 Claire Dross <dross@adacore.com>
5405
5406 * a-cofove.ads (Vector): Capacity discriminant
5407 should be in range of the index.
5408
54092014-01-20 Thomas Quinot <quinot@adacore.com>
5410
5411 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
5412 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
5413 possible difference between epoch of Ada.Calendar clock and Ada
5414 real-time/tasking clock.
5415 * s-taprop-posix.adb: Minor comment fix.
5416
54172014-01-20 Doug Rupp <rupp@adacore.com>
5418
5419 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
5420
54212014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5422
5423 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
5424 checks on the prefix of attribute 'Old.
5425 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
5426 generation of validity checks on a range that belongs to the
5427 iteration scheme of a quantified expression.
5428 * sem_ch5.adb (One_Bound): Suppress the generation of validity
5429 checks on a bound that belongs to the iteration scheme of a
5430 quantified expression, generate the check in all other cases.
5431
54322014-01-20 Bob Duff <duff@adacore.com>
5433
5434 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
5435
54362014-01-20 Ed Schonberg <schonberg@adacore.com>
5437
5438 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
5439 interpretations that do not come from other predefined units,
5440 to prevent spurious ambiguities in the presence of user-defined
5441 operators in the context of (an instance of) a predefined unit.
5442
1e569204
AC
54432014-01-20 Robert Dewar <dewar@adacore.com>
5444
5445 * gnat_rm.texi: Document that Loop_Variant is included in
5446 Statement_Assertions.
5447 * sem_prag.adb (Check_Kind): Add Loop_Variant to
5448 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
5449 to Statement_Assertions.
5450
54512014-01-20 Doug Rupp <rupp@adacore.com>
5452
5453 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
5454 for errno ENOENT from RTP on NFS mounted file system.
5455
0969e96d
AC
54562014-01-20 Ed Schonberg <schonberg@adacore.com>
5457
5458 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
5459 examine code that does not come from source. The check does not
5460 apply to code generated for constraint checks, and such code may
5461 generate spurious error messages when compiled with expansion
5462 disabled (as in a generic unit) because side effects may not
5463 have been removed.
5464 2) Make error messages more explicit: indicate the component
5465 of the construct whose value is indeterminate because of a
5466 call to a function with in-out parameter in another component,
5467 when there is no mandated order of execution between the two
5468 components (actuals, aggregate components, alternatives).
5469
54702014-01-20 Robert Dewar <dewar@adacore.com>
5471
5472 * gnat_rm.texi: Minor cleanup.
5473
36eef04a
AC
54742014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5475
5476 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
5477 can now apply to a refined postcondition.
5478 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
5479 variable Result_Seen. Add variables Case_Prag, Post_Prag,
5480 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
5481 whether postconditions and/or constract-cases mention attribute
5482 'Result and introduce a post-state when applied to functions.
5483 (Check_Result_And_Post_State): Removed.
5484 * sem_prag.adb (Analyze_Pragma): Add local variable
5485 Result_Seen. Verify that the expression of pragma Refined_Post
5486 mentions attribute 'Result and introduces a post-state.
5487 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
5488
54892014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5490
5491 * exp_ch7.adb (Is_Subprogram_Call): New routine.
5492 (Process_Transient_Objects): Make variable Must_Hook global with
5493 respect to all locally declared subprograms. Search the context
5494 for at least one subprogram call.
5495 (Requires_Hooking): Removed.
5496
54972014-01-20 Claire Dross <dross@adacore.com>
5498
5499 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
5500 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
5501 External_Axiomatization);
5502
65441a1e
RD
55032014-01-20 Robert Dewar <dewar@adacore.com>
5504
5505 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
5506 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
5507 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
5508 Allow Loop_Entry to be used in these pragmas if they appear in
5509 an appropriate context.
5510 (Placement_Error): Specialize error
5511 message for pragma Assert[_And_Cut] or pragma Assume containing
5512 Loop_Entry attribute.
5513 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
5514 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
5515 and code clean ups.
5516
800da977
AC
55172014-01-20 Robert Dewar <dewar@adacore.com>
5518
5519 * gnat1drv.adb: Minor comment update.
5520
55212014-01-20 Tristan Gingold <gingold@adacore.com>
5522
5523 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
5524 variables, comment out unused code.
5525 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
5526 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
5527 * s-excmac-arm.ads: New file.
5528
55292014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5530
5531 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
5532 Drange and Index_Typ. Remove the circuitry which creates a
5533 range check to compare the index type of the array against the
5534 discrete_range.
5535 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
5536 the circuitry which creates a range check to handle a
5537 discrete_range denoted by a subtype indication.
5538
55392014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
5540
5541 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
5542 nodes to get the original sloc range.
5543
55442014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5545
5546 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
5547 entity of a [library level] package.
5548
51b0e05a
AC
55492014-01-20 Tristan Gingold <gingold@adacore.com>
5550
5551 * raise-gcc.c (exception_class_eq): New function.
5552 (is_handled_by): Use it to compare exception classes.
5553 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
5554 be called to return URC_CONTINUE_UNWIND.
5555 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
5556 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
5557
55582014-01-20 Robert Dewar <dewar@adacore.com>
5559
5560 * opt.ads: Minor comment update.
5561
5ff90f08
AC
55622014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5563
5564 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
5565 constants to the "Local variables" area. Add new constant D. Add
5566 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
5567 to Pref_Typ and update all occurrences. Add circuitry to extract
5568 the discrete_range and the index type and build a range check.
5569
55702014-01-20 Arnaud Charlet <charlet@adacore.com>
5571
5572 * gnat1drv.adb (Adjust_Global_Switches): Enable
5573 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
5574 is set.
5575
55762014-01-20 Thomas Quinot <quinot@adacore.com>
5577
5578 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
5579
55802014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5581
5582 * sem_ch13.adb (Analyze_Aspect_Specifications):
5583 When aspect SPARK_Mode appears on a package body, insert the
5584 generated pragma at the top of the body declarations.
5585
1f0b1e48
RD
55862014-01-20 Robert Dewar <dewar@adacore.com>
5587
5588 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
5589 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
5590 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
5591 sem_ch8.adb, exp_dist.adb: Minor reformatting.
5592
c093d3cc
AC
55932014-01-20 Yannick Moy <moy@adacore.com>
5594
5595 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
5596 mode.
5597
55982014-01-20 Pascal Obry <obry@adacore.com>
5599
5600 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
5601 write scheme).
5602 * g-arrspl.adb: Adapt all routine to this new implementation.
5603 (Set): Copy the Slice_Set definition before reusing it.
5604
0bd75e44
AC
56052014-01-20 Arnaud Charlet <charlet@adacore.com>
5606
5607 * sem_prag.adb (Process_Import_Or_Interface): In
5608 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
5609 (Analyze_Pragma): Ditto for pragma Export.
5610 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
5611 Import style.
5612
aca90db9
AC
56132014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5614
5615 * einfo.ads: E_Abstract_State is now part of the entities that
5616 can be overloaded. Update type Overloadable_Kind to reflect the
5617 inclusion of abstract states.
5618 * sem_ch6.adb (New_Overloaded_Entity): A function can now
5619 overload an abstract state.
5620 * sem_prag.adb (Analyze_Constituent): Handle the overloading
5621 of states by functions. Use Entity_Of to obtain the entity of
5622 a constituent. (Analyze_Global_Item): Handle the overloading of
5623 states by functions.
5624 (Analyze_Initialization_Item): Handle the
5625 overloading of states by functions. Use Entity_Of to obtain the
5626 entity of an item.
5627 (Analyze_Input_Item): Handle the overloading
5628 of states by functions. Use Entity_Of to obtain the entity of an item.
5629 (Analyze_Input_Output): Handle the overloading of states by functions.
5630 (Analyze_Refinement_Clause): Handle the overloading
5631 of states by functions. Use Entity_Of to obtain the entity of an item.
5632 (Appears_In): Use Entity_Of to obtain the entity of an element.
5633 (Check_Usage): Use Entity_Of to obtain the entity of
5634 an item. Add a guard to prevent a crash due to a previous error.
5635 (Resolve_State): New routine.
5636
56372014-01-20 Yannick Moy <moy@adacore.com>
5638
5639 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
5640 opt.ads: Minor comments updates.
5641
dc726757
HK
56422014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5643
5644 * einfo.adb (Non_Limited_View): Applies to abstract states.
5645 (Set_From_Limited_With): Applies to abstract states.
5646 (Set_Non_Limited_View): Applies to abstract states.
5647 (Write_Field17): Output the non-limited view of an abstract state.
5648 * einfo.ads: Update the comment on usage and occurrences in
5649 nodes for attributes From_Limited_With and Non_Limited_View.
5650 * sem_aux.adb (Available_View): This routine can now handle
5651 abstract states.
5652 * sem_aux.ads (Available_View): This routine can now handle
5653 abstract states. Update the comment on usage.
5654 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
5655 of states and variables.
5656 (In_Pragmas_Depends_Or_Global): New routine.
5657 * sem_ch10.adb (Build_Limited_Views): Implement
5658 abstract (limited) views of variables and states.
5659 (Build_Shadow_Entity): This routine is now a procedure. Add
5660 formal parameter Shadow. Update the comment on usage. Add
5661 context-specific decoration for states and variables.
5662 (Decorate_State): New routine. (Decorate_Variable): New routine.
5663 (Find_And_Process_States): New routine.
5664 (Process_Declarations): Renamed to Process_Declarations_And_States.
5665 (Process_Declarations_And_States): Add formal parameters
5666 Pack and Create_Abstract_Views. Update the comment on usage.
5667 (Process_States): New routine.
5668 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
5669 views of states and variables. Match the abstract view of a state
5670 against its corresponding non-abstract view.
5671 (Is_Matching_Input):
5672 Handle abstract views of states and variables. Match the abstract
5673 view of a state against its corresponding non-abstract view.
5674 (Process_Global_Item): Handle abstract views of states and
5675 variables.
5676
3a5de596
BD
56772014-01-20 Bob Duff <duff@adacore.com>
5678
5679 * sem_ch10.adb (Expand_With_Clause): Don't
5680 recurse on the prefix if the current with-ed name refers to a
5681 package that renames its own parent, eg "package P.Q renames P;".
5682
4460a9bc
YM
56832014-01-20 Yannick Moy <moy@adacore.com>
5684
5685 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
5686 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
5687 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
5688 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
5689 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
5690 Expander_Active.
5691
56922014-01-20 Yannick Moy <moy@adacore.com>
5693
5694 * sinfo.ads Update documentation of GNATprove mode.
5695
f5da7a97
YM
56962014-01-20 Yannick Moy <moy@adacore.com>
5697
5698 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
5699 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
5700 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
5701 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
5702 GNATprove_Mode.
5703 * sem_ch13.adb: Remove blank.
5704 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
5705 subprograms by alias for renamings, not for inherited primitive
5706 operations.
5707 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
5708 in GNATprove mode.
5709 (Remove_Side_Effects): Apply the removal in
5710 GNATprove mode, for the full analysis of expressions.
5711 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
5712 mode.
5713 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
5714 save/restore actions for Expander_Active flag in GNATprove mode,
5715 similar to what is done in ASIS mode.
5716 * frontend.adb (Frontend): Generic bodies are instantiated in
5717 GNATprove mode.
5718 * gnat1drv.adb (Adjust_Global_Switches): Set operating
5719 mode to Check_Semantics in GNATprove mode, although a light
5720 expansion is still performed.
5721 (Gnat1drv): Set Back_End_Mode to
5722 Declarations_Only in GNATprove mode, and later on special case
5723 the GNATprove mode to continue analysis anyway.
5724 * lib-writ.adb (Write_ALI): Always generate ALI files in
5725 GNATprove mode.
5726 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
5727 Expander_Active.
5728 (SPARK_Mode): Renamed as GNATprove_Mode.
5729 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
5730 tree in GNATprove_Mode.
5731 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
5732 body in GNATprove mode.
5733 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
5734 mode.
5735 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
5736 Make sure side effects are removed in GNATprove mode.
5737
fd6e497e
EB
57382014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5739
5740 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
5741 for aliased objects with an unconstrained nominal subtype.
5742 * gcc-interface/trans.c (Call_to_gnu): Likewise.
5743 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
5744 <case N_Op_Minus>: Remove useless code.
5745 (Exception_Handler_to_gnu_zcx): Minor tweaks.
5746
44e9e3ec
EB
57472014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5748
5749 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
5750 Tidy up. For a subtype with discriminants and variant part, if a
5751 variant is statically selected and the fields all have a constant
5752 position, put them in order of increasing position. Likewise if
5753 no variant part but representation clause is present.
5754 * gcc-interface/utils.c (make_packable_type): Robustify.
5755 (maybe_pad_type): Use local variable and tidy up condition. If no
5756 alignment is specified, use the original one.
5757 (create_type_stub_decl): Minor tweak.
5758 (convert) <case VECTOR_CST>: Fix typo.
5759 <case CONSTRUCTOR>: Deal with padding types around the same type.
5760 Do not punt on missing fields.
5761 (unchecked_convert): Call finish_record_type to lay out the special
5762 record types made for conversions from/to problematic integer types.
5763 Bump the alignment of CONSTRUCTORs before converting them to a more
5764 aligned type.
5765
59f5c969
EB
57662014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5767
5768 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
5769 obsolete code for type_annotate_only mode, simplify code and slightly
5770 improve wording of comments.
5771
2323a580
EB
57722014-01-12 Eric Botcazou <ebotcazou@adacore.com>
5773
5774 PR ada/59772
5775 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
5776 as intermediate type.
5777 (UI_To_gnu): Likewise.
5778
517c399e
EB
57792014-01-03 Eric Botcazou <ebotcazou@adacore.com>
5780
5781 * gnatvsn.ads (Current_Year): Bump to 2014.
5782
98db73df 57832014-01-02 Tobias Burnus <burnus@net-b.de>
00f96dc9 5784
98db73df 5785 * gnat_ugn.texi: Bump @copying's copyright year.
ad41bd84 5786\f
98db73df 5787Copyright (C) 2014 Free Software Foundation, Inc.
ad41bd84
JM
5788
5789Copying and distribution of this file, with or without modification,
5790are permitted in any medium without royalty provided the copyright
5791notice and this notice are preserved.